Remove drop_item, drop_item_v, put_in_hands_or_del

This commit is contained in:
Jordan Brown
2017-10-07 13:36:33 -04:00
committed by CitadelStationBot
parent 5f4b3594d0
commit 075cb673c0
152 changed files with 1778 additions and 425 deletions
@@ -34,6 +34,7 @@ BONUS
<b>Stage Speed 6:</b> Increases cough frequency.<br>\
<b>If Airborne:</b> Coughing will infect bystanders.<br>\
<b>Stealth 4:</b> The symptom remains hidden until active."
<<<<<<< HEAD
/datum/symptom/cough/Start(datum/disease/advance/A)
..()
@@ -72,3 +73,43 @@ BONUS
if(infective)
A.spread(1)
=======
/datum/symptom/cough/Start(datum/disease/advance/A)
..()
if(A.properties["stealth"] >= 4)
suppress_warning = TRUE
if(A.spread_flags &= AIRBORNE) //infect bystanders
infective = TRUE
if(A.properties["resistance"] >= 3) //strong enough to drop items
power = 1.5
if(A.properties["resistance"] >= 10) //strong enough to stun (rarely)
power = 2
if(A.properties["stage_rate"] >= 6) //cough more often
symptom_delay_max = 10
/datum/symptom/cough/Activate(datum/disease/advance/A)
if(!..())
return
var/mob/living/M = A.affected_mob
switch(A.stage)
if(1, 2, 3)
if(prob(base_message_chance) && !suppress_warning)
to_chat(M, "<span notice='warning'>[pick("You swallow excess mucus.", "You lightly cough.")]</span>")
else
M.emote("cough")
if(power >= 1.5)
var/obj/item/I = M.get_active_held_item()
if(I && I.w_class == WEIGHT_CLASS_TINY)
M.dropItemToGround(I)
if(power >= 2 && prob(10))
to_chat(M, "<span notice='userdanger'>[pick("You have a coughing fit!", "You can't stop coughing!")]</span>")
M.Stun(20)
M.emote("cough")
addtimer(CALLBACK(M, /mob/.proc/emote, "cough"), 6)
addtimer(CALLBACK(M, /mob/.proc/emote, "cough"), 12)
addtimer(CALLBACK(M, /mob/.proc/emote, "cough"), 18)
if(infective)
A.spread(1)
>>>>>>> b6d349e... Remove drop_item, drop_item_v, put_in_hands_or_del (#31386)
+3 -4
View File
@@ -85,7 +85,7 @@
"<span class='userdanger'>[A] strikes your abdomen, neck and back consecutively!</span>")
playsound(get_turf(D), 'sound/weapons/cqchit2.ogg', 50, 1, -1)
var/obj/item/I = D.get_active_held_item()
if(I && D.drop_item())
if(I && D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.adjustStaminaLoss(50)
D.apply_damage(25, BRUTE)
@@ -145,7 +145,7 @@
D.visible_message("<span class='warning'>[A] strikes [D]'s jaw with their hand!</span>", \
"<span class='userdanger'>[A] strikes your jaw, disorienting you!</span>")
playsound(get_turf(D), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
if(I && D.drop_item())
if(I && D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.Jitter(2)
D.apply_damage(5, BRUTE)
@@ -193,7 +193,6 @@
to_chat(user, "<span class='boldannounce'>You remember the basics of CQC.</span>")
var/datum/martial_art/cqc/D = new(null)
D.teach(user)
user.drop_item()
visible_message("<span class='warning'>[src] beeps ominously, and a moment later it bursts up in flames.</span>")
new /obj/effect/decal/cleanable/ash(get_turf(src))
qdel(src)
new /obj/effect/decal/cleanable/ash(user.drop_location())
+1 -1
View File
@@ -150,7 +150,7 @@
if(prob(60))
I = D.get_active_held_item()
if(I)
if(D.drop_item())
if(D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.visible_message("<span class='danger'>[A] has disarmed [D]!</span>", \
"<span class='userdanger'>[A] has disarmed [D]!</span>")
+4 -5
View File
@@ -41,7 +41,7 @@
"<span class='userdanger'>[A] grabs your wrist and violently wrenches it to the side!</span>")
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
D.emote("scream")
D.drop_item()
D.dropItemToGround(D.get_active_held_item())
D.apply_damage(5, BRUTE, pick("l_arm", "r_arm"))
D.Stun(60)
return 1
@@ -79,7 +79,7 @@
D.visible_message("<span class='warning'>[A] kicks [D] in the head!</span>", \
"<span class='userdanger'>[A] kicks you in the jaw!</span>")
D.apply_damage(20, BRUTE, "head")
D.drop_item()
D.drop_all_held_items()
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
D.Stun(80)
return 1
@@ -168,10 +168,9 @@
to_chat(user, message)
var/datum/martial_art/the_sleeping_carp/theSleepingCarp = new(null)
theSleepingCarp.teach(user)
user.drop_item()
visible_message("<span class='warning'>[src] lights up in fire and quickly burns to ash.</span>")
new /obj/effect/decal/cleanable/ash(get_turf(src))
qdel(src)
visible_message("<span class='warning'>[src] lights up in fire and quickly burns to ash.</span>")
new /obj/effect/decal/cleanable/ash(user.drop_location())
/obj/item/twohanded/bostaff
name = "bo staff"
+1 -1
View File
@@ -270,7 +270,7 @@ GLOBAL_LIST_EMPTY(mutations_list)
/datum/mutation/human/cough/on_life(mob/living/carbon/human/owner)
if(prob(5) && owner.stat == CONSCIOUS)
owner.drop_item()
owner.drop_all_held_items()
owner.emote("cough")
/datum/mutation/human/dwarfism
+3 -2
View File
@@ -250,9 +250,10 @@
if(istype(I, /obj/item/device/assembly))
var/obj/item/device/assembly/A = I
if(A.attachable)
if(!L.drop_item())
if(!L.temporarilyRemoveItemFromInventory(A))
return
attach_assembly(target_wire, A)
if(!attach_assembly(target_wire, A))
A.forceMove(L.drop_location())
. = TRUE
else
to_chat(L, "<span class='warning'>You need an attachable assembly!</span>")