mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Merge remote-tracking branch 'upstream/dev-freeze' into dev
This commit is contained in:
@@ -175,93 +175,6 @@
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute
|
||||
|
||||
/obj/item/weapon/beartrap
|
||||
name = "bear trap"
|
||||
throw_speed = 2
|
||||
throw_range = 1
|
||||
gender = PLURAL
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "beartrap0"
|
||||
desc = "A trap used to catch bears and other legged creatures."
|
||||
throwforce = 0
|
||||
w_class = 3.0
|
||||
origin_tech = "materials=1"
|
||||
var/deployed = 0
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "<span class='danger'>[user] is putting the [src.name] on \his head! It looks like \he's trying to commit suicide.</span>"
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/beartrap/attack_self(mob/user as mob)
|
||||
..()
|
||||
if(ishuman(user) && !user.stat && !user.restrained())
|
||||
if(deployed==0)
|
||||
user.visible_message("<span class='danger'>[user] is deploying \the [src]</span>", "<span class='danger'>You are deploying \the [src]!</span>")
|
||||
if (do_after(user, 60))
|
||||
user.visible_message("<span class='danger'>[user] has deployed \the [src]</span>", "<span class='danger'>You have deployed \the [src]!</span>")
|
||||
deployed = 1
|
||||
user.drop_from_inventory(src, user.loc)
|
||||
update_icon()
|
||||
anchored = 1
|
||||
|
||||
/obj/item/weapon/beartrap/attack_hand(mob/user as mob)
|
||||
if(ishuman(user) && !user.stat && !user.restrained())
|
||||
if(deployed==1)
|
||||
user.visible_message("<span class='danger'>[user] is disarming \the [src]</span>", "<span class='danger'>You are disarming \the [src]!</span>")
|
||||
if (do_after(user, 60))
|
||||
user.visible_message("<span class='danger'>[user] has disarmed \the [src]</span>", "<span class='danger'>You have disarmed \the [src]!</span>")
|
||||
deployed = 0
|
||||
anchored = 0
|
||||
update_icon()
|
||||
|
||||
if(deployed==0)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/beartrap/Crossed(AM as mob|obj)
|
||||
if(deployed)
|
||||
if(ishuman(AM))
|
||||
if(isturf(src.loc))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(H.m_intent == "run")
|
||||
deployed = 0
|
||||
update_icon()
|
||||
H << "<span class='danger'>You step on \the [src]!</span>"
|
||||
for(var/mob/O in viewers(H, null))
|
||||
if(O == H)
|
||||
continue
|
||||
O.show_message("<span class='danger'>[H] steps on \the [src].</span>", 1)
|
||||
if(H.lying)
|
||||
var/obj/item/organ/external/affecting = pick(H.organs)
|
||||
if(affecting.take_damage(30, 0))
|
||||
H.UpdateDamageIcon()
|
||||
affecting.embed(src)
|
||||
else
|
||||
var/list/potentialorgans = list()
|
||||
for(var/organ in list("l_leg", "r_leg", "l_foot", "r_foot"))
|
||||
var/obj/item/organ/external/R = H.get_organ(organ)
|
||||
if(R && !(R.status & ORGAN_DESTROYED))
|
||||
potentialorgans += R
|
||||
var/obj/item/organ/external/affecting = pick(potentialorgans)
|
||||
if(affecting.take_damage(30, 0))
|
||||
H.UpdateDamageIcon()
|
||||
affecting.embed(src)
|
||||
|
||||
|
||||
if(isanimal(AM) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator))
|
||||
deployed = 0
|
||||
var/mob/living/simple_animal/SA = AM
|
||||
SA.health -= 20
|
||||
..()
|
||||
|
||||
/obj/item/weapon/beartrap/update_icon()
|
||||
..()
|
||||
|
||||
if(deployed == 0)
|
||||
icon_state = "beartrap0"
|
||||
else
|
||||
icon_state = "beartrap1"
|
||||
|
||||
|
||||
/obj/item/weapon/caution
|
||||
desc = "Caution! Wet Floor!"
|
||||
name = "wet floor sign"
|
||||
|
||||
Reference in New Issue
Block a user