Skip to content

Commit

Permalink
Rock and Stone. (#14213)
Browse files Browse the repository at this point in the history
* adds the brick + sounds + sprites

* finish sprites + add to req

* put_in_hands() + vars needed on stone
  • Loading branch information
Xander3359 authored Oct 20, 2023
1 parent 8f96c39 commit 672ce29
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 1 deletion.
46 changes: 45 additions & 1 deletion code/game/objects/items/weapons/blades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,47 @@
span_danger("[user] is slitting [user.p_their()] stomach open with the [name]! It looks like [user.p_theyre()] trying to commit seppuku.")))
return (BRUTELOSS)

/obj/item/weapon/brick
name = "\improper Brick"
desc = "It's a brick. By rubbing 2 bricks together, you can get some stones."
icon_state = "brick"
force = 50
throwforce = 50
attack_verb = list("smacked", "whacked", "bonked", "bricked", "thwacked", "socked")
hitsound = 'sound/weapons/heavyhit.ogg'

/obj/item/weapon/brick/attackby(obj/item/I, mob/user, params)
. = ..()
if(istype(I, /obj/item/weapon/brick))
turn_to_stone(I, user)

/obj/item/weapon/brick/proc/turn_to_stone(obj/item/itemturningtostone, mob/user)
user.balloon_alert(user, "Making stones...")
if(do_after(user, 5 SECONDS))
var/obj/new_stone = new /obj/item/stack/throwing_knife/stone(get_turf(src))
qdel(src)
user.put_in_hands(new_stone)
return
return user.balloon_alert(user, "Cancelled")

/obj/item/stack/throwing_knife/stone
name = "\improper Stone"
desc = "Capable of doing minor amounts of damage, these stones will annoy the hell out of the recipient."
item_icons = list(
slot_l_hand_str = 'icons/mob/inhands/weapons/melee_left.dmi',
slot_r_hand_str = 'icons/mob/inhands/weapons/melee_right.dmi',
)
icon_state = "stone"
force = 15
throwforce = 15
max_amount = 12
amount = 12
throw_delay = 0.3 SECONDS
hitsound = 'sound/weapons/heavyhit.ogg'
singular_name = "stone"
flags_atom = DIRLOCK
sharp = IS_NOT_SHARP_ITEM

/obj/item/weapon/combat_knife/harvester
name = "\improper HP-S Harvester knife"
desc = "TerraGov Marine Corps' experimental High Point-Singularity 'Harvester' knife. An advanced version of the HP-S Harvester blade, shrunken down to the size of the standard issue boot knife. It trades the harvester blades size and power for a smaller form, with the side effect of a miniscule chemical storage, yet it still keeps its ability to apply debilitating effects to its targets. Activate after loading to prime a single use of an effect. It also harvests substances from alien lifeforms it strikes when connected to the Vali system."
Expand Down Expand Up @@ -359,6 +400,9 @@
/obj/item/stack/throwing_knife/update_icon()
. = ..()
var/amount_to_show = amount > max_amount ? max_amount : amount
if(amount_to_show > 8)
setDir(8)
return
setDir(amount_to_show + round(amount_to_show / 3))

/obj/item/stack/throwing_knife/equipped(mob/user, slot)
Expand Down Expand Up @@ -418,7 +462,7 @@
throw_at(current_target, throw_range, throw_speed, living_user, TRUE)
current_target = null
else
var/obj/item/stack/throwing_knife/knife_to_throw = new(get_turf(src))
var/obj/item/stack/throwing_knife/knife_to_throw = new type(get_turf(src))
knife_to_throw.amount = 1
knife_to_throw.update_icon()
knife_to_throw.throw_at(current_target, throw_range, throw_speed, living_user, TRUE)
Expand Down
5 changes: 5 additions & 0 deletions code/modules/reqs/supplypacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,11 @@ WEAPONS
contains = list(/obj/item/weapon/gun/rifle/pepperball)
cost = 100

/datum/supply_packs/weapons/bricks
name = "Brick"
contains = list(/obj/item/weapon/brick)
cost = 10

/datum/supply_packs/weapons/railgun
name = "SR-220 Railgun"
contains = list(/obj/item/weapon/gun/rifle/railgun)
Expand Down
Binary file modified icons/mob/inhands/weapons/melee_left.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/weapons/melee_right.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons.dmi
Binary file not shown.
Binary file added sound/weapons/heavyhit.ogg
Binary file not shown.

0 comments on commit 672ce29

Please sign in to comment.