Revert "12/21 modernizations from TG live"
This commit is contained in:
@@ -8,10 +8,9 @@
|
||||
slot_flags = SLOT_BACK
|
||||
force = 5
|
||||
throwforce = 6
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
w_class = 4
|
||||
origin_tech = "biotech=4"
|
||||
actions_types = list(/datum/action/item_action/toggle_paddles)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
|
||||
var/on = 0 //if the paddles are equipped (1) or on the defib (0)
|
||||
var/safety = 1 //if you can zap people with the defibs on harm mode
|
||||
@@ -95,10 +94,20 @@
|
||||
var/mob/M = src.loc
|
||||
if(istype(over_object, /obj/screen/inventory/hand))
|
||||
var/obj/screen/inventory/hand/H = over_object
|
||||
if(!M.unEquip(src))
|
||||
return
|
||||
M.put_in_hand(src, H.held_index)
|
||||
|
||||
switch(H.slot_id)
|
||||
if(slot_r_hand)
|
||||
if(M.r_hand)
|
||||
return
|
||||
if(!M.unEquip(src))
|
||||
return
|
||||
M.put_in_r_hand(src)
|
||||
if(slot_l_hand)
|
||||
if(M.l_hand)
|
||||
return
|
||||
if(!M.unEquip(src))
|
||||
return
|
||||
M.put_in_l_hand(src)
|
||||
|
||||
/obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(W == paddles)
|
||||
@@ -188,10 +197,11 @@
|
||||
if(slot == user.getBackSlot())
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/defibrillator/proc/remove_paddles(mob/user) //this fox the bug with the paddles when other player stole you the defib when you have the paddles equiped
|
||||
if(ismob(paddles.loc))
|
||||
var/mob/M = paddles.loc
|
||||
/obj/item/weapon/defibrillator/proc/remove_paddles(mob/user)
|
||||
var/mob/living/carbon/human/M = user
|
||||
if(paddles in get_both_hands(M))
|
||||
M.unEquip(paddles,1)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/defibrillator/Destroy()
|
||||
@@ -231,7 +241,7 @@
|
||||
desc = "A belt-equipped defibrillator that can be rapidly deployed."
|
||||
icon_state = "defibcompact"
|
||||
item_state = "defibcompact"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
w_class = 3
|
||||
slot_flags = SLOT_BELT
|
||||
origin_tech = "biotech=5"
|
||||
|
||||
@@ -276,7 +286,7 @@
|
||||
item_state = "defibpaddles"
|
||||
force = 0
|
||||
throwforce = 6
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
w_class = 4
|
||||
flags = NODROP
|
||||
|
||||
var/revivecost = 1000
|
||||
@@ -306,6 +316,7 @@
|
||||
loc = defib
|
||||
busy = 0
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/shockpaddles/update_icon()
|
||||
icon_state = "defibpaddles[wielded]"
|
||||
@@ -314,7 +325,7 @@
|
||||
icon_state = "defibpaddles[wielded]_cooldown"
|
||||
|
||||
/obj/item/weapon/twohanded/shockpaddles/suicide_act(mob/user)
|
||||
user.visible_message("<span class='danger'>[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
user.visible_message("<span class='danger'>[user] is putting the live paddles on \his chest! It looks like \he's trying to commit suicide.</span>")
|
||||
if(req_defib)
|
||||
defib.deductcharge(revivecost)
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
@@ -324,7 +335,7 @@
|
||||
if(!req_defib)
|
||||
return ..()
|
||||
if(user)
|
||||
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_held_item()
|
||||
var/obj/item/weapon/twohanded/offhand/O = user.get_inactive_hand()
|
||||
if(istype(O))
|
||||
O.unwield()
|
||||
user << "<span class='notice'>The paddles snap back into the main unit.</span>"
|
||||
@@ -344,7 +355,7 @@
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/twohanded/shockpaddles/attack(mob/M, mob/user)
|
||||
var/halfwaycritdeath = (HEALTH_THRESHOLD_CRIT + HEALTH_THRESHOLD_DEAD) / 2
|
||||
var/halfwaycritdeath = (config.health_threshold_crit + config.health_threshold_dead) / 2
|
||||
|
||||
if(busy)
|
||||
return
|
||||
@@ -353,7 +364,7 @@
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
return
|
||||
if(!wielded)
|
||||
if(iscyborg(user))
|
||||
if(isrobot(user))
|
||||
user << "<span class='warning'>You must activate the paddles in your active module before you can use them on someone!</span>"
|
||||
else
|
||||
user << "<span class='warning'>You need to wield the paddles in both hands before you can use them on someone!</span>"
|
||||
@@ -372,7 +383,7 @@
|
||||
return
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(user.a_intent == INTENT_DISARM)
|
||||
if(user.a_intent == "disarm")
|
||||
if(req_defib && defib.safety)
|
||||
return
|
||||
if(!req_defib && !combat)
|
||||
@@ -401,7 +412,7 @@
|
||||
user << "<span class='warning'>You need to target your patient's \
|
||||
chest with [src]!</span>"
|
||||
return
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(user.a_intent == "harm")
|
||||
if(req_defib && defib.safety)
|
||||
return
|
||||
if(!req_defib && !combat)
|
||||
@@ -545,41 +556,17 @@
|
||||
H.heart_attack = 0
|
||||
user.visible_message("<span class='notice'>[req_defib ? "[defib]" : "[src]"] pings: Patient's heart is now beating again.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
|
||||
|
||||
else if (!H.getorgan(/obj/item/organ/heart))
|
||||
user.visible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Patient's heart is missing. Operation aborted.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
|
||||
else
|
||||
user.visible_message("<span class='warning'>[req_defib ? "[defib]" : "[src]"] buzzes: Patient is not in a valid state. Operation aborted.</span>")
|
||||
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
|
||||
busy = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/twohanded/shockpaddles/cyborg
|
||||
name = "cyborg defibrillator paddles"
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "defibpaddles0"
|
||||
item_state = "defibpaddles0"
|
||||
req_defib = FALSE
|
||||
|
||||
/obj/item/weapon/twohanded/shockpaddles/cyborg/attack(mob/M, mob/user)
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.emagged)
|
||||
combat = TRUE
|
||||
else
|
||||
combat = FALSE
|
||||
else
|
||||
combat = FALSE
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/twohanded/shockpaddles/syndicate
|
||||
name = "syndicate defibrillator paddles"
|
||||
desc = "A pair of paddles used to revive deceased operatives. It possesses both the ability to penetrate armor and to deliver powerful shocks offensively."
|
||||
combat = TRUE
|
||||
combat = 1
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "defibpaddles0"
|
||||
item_state = "defibpaddles0"
|
||||
req_defib = FALSE
|
||||
req_defib = 0
|
||||
|
||||
Reference in New Issue
Block a user