Defib fixes and chem effects stuff
This commit is contained in:
@@ -39,7 +39,6 @@
|
|||||||
|
|
||||||
/obj/item/defibrillator/loaded/Initialize() //starts with hicap
|
/obj/item/defibrillator/loaded/Initialize() //starts with hicap
|
||||||
. = ..()
|
. = ..()
|
||||||
paddles = make_paddles()
|
|
||||||
cell = new(src)
|
cell = new(src)
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
@@ -208,8 +207,8 @@
|
|||||||
var/M = get(paddles, /mob)
|
var/M = get(paddles, /mob)
|
||||||
remove_paddles(M)
|
remove_paddles(M)
|
||||||
QDEL_NULL(paddles)
|
QDEL_NULL(paddles)
|
||||||
. = ..()
|
QDEL_NULL(cell)
|
||||||
update_icon()
|
return ..()
|
||||||
|
|
||||||
/obj/item/defibrillator/proc/deductcharge(chrgdeductamt)
|
/obj/item/defibrillator/proc/deductcharge(chrgdeductamt)
|
||||||
if(cell)
|
if(cell)
|
||||||
@@ -250,7 +249,6 @@
|
|||||||
|
|
||||||
/obj/item/defibrillator/compact/loaded/Initialize()
|
/obj/item/defibrillator/compact/loaded/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
paddles = make_paddles()
|
|
||||||
cell = new(src)
|
cell = new(src)
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
@@ -262,7 +260,6 @@
|
|||||||
|
|
||||||
/obj/item/defibrillator/compact/combat/loaded/Initialize()
|
/obj/item/defibrillator/compact/combat/loaded/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
paddles = make_paddles()
|
|
||||||
cell = new /obj/item/stock_parts/cell/infinite(src)
|
cell = new /obj/item/stock_parts/cell/infinite(src)
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
@@ -301,28 +298,24 @@
|
|||||||
|
|
||||||
/obj/item/twohanded/shockpaddles/equipped(mob/user, slot)
|
/obj/item/twohanded/shockpaddles/equipped(mob/user, slot)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(!req_defib || listeningTo == user)
|
if(!req_defib)
|
||||||
return
|
return
|
||||||
if(listeningTo)
|
|
||||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
|
||||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/check_range)
|
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/check_range)
|
||||||
listeningTo = user
|
|
||||||
|
|
||||||
/obj/item/twohanded/shockpaddles/Moved()
|
/obj/item/twohanded/shockpaddles/Moved()
|
||||||
. = ..()
|
. = ..()
|
||||||
check_range()
|
check_range()
|
||||||
|
|
||||||
/obj/item/twohanded/shockpaddles/proc/check_range()
|
/obj/item/twohanded/shockpaddles/proc/check_range()
|
||||||
if(!req_defib)
|
if(!req_defib || !defib)
|
||||||
return
|
return
|
||||||
if(!in_range(src,defib))
|
if(!in_range(src,defib))
|
||||||
var/mob/living/L = loc
|
var/mob/living/L = loc
|
||||||
if(istype(L))
|
if(istype(L))
|
||||||
to_chat(L, "<span class='warning'>[defib]'s paddles overextend and come out of your hands!</span>")
|
to_chat(L, "<span class='warning'>[defib]'s paddles overextend and come out of your hands!</span>")
|
||||||
L.temporarilyRemoveItemFromInventory(src,TRUE)
|
|
||||||
else
|
else
|
||||||
visible_message("<span class='notice'>[src] snap back into [defib].</span>")
|
visible_message("<span class='notice'>[src] snap back into [defib].</span>")
|
||||||
snap_back()
|
snap_back()
|
||||||
|
|
||||||
/obj/item/twohanded/shockpaddles/proc/recharge(var/time)
|
/obj/item/twohanded/shockpaddles/proc/recharge(var/time)
|
||||||
if(req_defib || !time)
|
if(req_defib || !time)
|
||||||
@@ -363,14 +356,14 @@
|
|||||||
/obj/item/twohanded/shockpaddles/dropped(mob/user)
|
/obj/item/twohanded/shockpaddles/dropped(mob/user)
|
||||||
if(!req_defib)
|
if(!req_defib)
|
||||||
return ..()
|
return ..()
|
||||||
if(listeningTo)
|
|
||||||
UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED)
|
|
||||||
if(user)
|
if(user)
|
||||||
|
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
|
||||||
var/obj/item/twohanded/offhand/O = user.get_inactive_held_item()
|
var/obj/item/twohanded/offhand/O = user.get_inactive_held_item()
|
||||||
if(istype(O))
|
if(istype(O))
|
||||||
O.unwield()
|
O.unwield()
|
||||||
to_chat(user, "<span class='notice'>The paddles snap back into the main unit.</span>")
|
if(user != loc)
|
||||||
snap_back()
|
to_chat(user, "<span class='notice'>The paddles snap back into the main unit.</span>")
|
||||||
|
snap_back()
|
||||||
return unwield(user)
|
return unwield(user)
|
||||||
|
|
||||||
/obj/item/twohanded/shockpaddles/proc/snap_back()
|
/obj/item/twohanded/shockpaddles/proc/snap_back()
|
||||||
|
|||||||
@@ -198,7 +198,6 @@
|
|||||||
var/enthrallGender //Use master or mistress
|
var/enthrallGender //Use master or mistress
|
||||||
|
|
||||||
var/mental_capacity //Higher it is, lower the cooldown on commands, capacity reduces with resistance.
|
var/mental_capacity //Higher it is, lower the cooldown on commands, capacity reduces with resistance.
|
||||||
var/datum/weakref/redirect_component //resistance
|
|
||||||
|
|
||||||
var/distancelist = list(2,1.5,1,0.8,0.6,0.5,0.4,0.3,0.2) //Distance multipliers
|
var/distancelist = list(2,1.5,1,0.8,0.6,0.5,0.4,0.3,0.2) //Distance multipliers
|
||||||
|
|
||||||
@@ -228,7 +227,7 @@
|
|||||||
master = get_mob_by_key(enthrallID)
|
master = get_mob_by_key(enthrallID)
|
||||||
//if(M.ckey == enthrallID)
|
//if(M.ckey == enthrallID)
|
||||||
// owner.remove_status_effect(src)//At the moment, a user can enthrall themselves, toggle this back in if that should be removed.
|
// owner.remove_status_effect(src)//At the moment, a user can enthrall themselves, toggle this back in if that should be removed.
|
||||||
redirect_component = WEAKREF(owner.AddComponent(/datum/component/redirect, list(COMSIG_LIVING_RESIST = CALLBACK(src, .proc/owner_resist)))) //Do resistance calc if resist is pressed#
|
RegisterSignal(owner, COMSIG_LIVING_RESIST, .proc/owner_resist) //Do resistance calc if resist is pressed#
|
||||||
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/owner_hear)
|
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, .proc/owner_hear)
|
||||||
mental_capacity = 500 - M.getOrganLoss(ORGAN_SLOT_BRAIN)//It's their brain!
|
mental_capacity = 500 - M.getOrganLoss(ORGAN_SLOT_BRAIN)//It's their brain!
|
||||||
var/mob/living/carbon/human/H = owner
|
var/mob/living/carbon/human/H = owner
|
||||||
@@ -566,8 +565,7 @@
|
|||||||
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing2")
|
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing2")
|
||||||
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing3")
|
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing3")
|
||||||
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing4")
|
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing4")
|
||||||
qdel(redirect_component.resolve())
|
UnregisterSignal(M, COMSIG_LIVING_RESIST)
|
||||||
redirect_component = null
|
|
||||||
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
|
UnregisterSignal(owner, COMSIG_MOVABLE_HEAR)
|
||||||
REMOVE_TRAIT(owner, TRAIT_PACIFISM, "MKUltra")
|
REMOVE_TRAIT(owner, TRAIT_PACIFISM, "MKUltra")
|
||||||
to_chat(owner, "<span class='big redtext'><i>You're now free of [master]'s influence, and fully independent!'</i></span>")
|
to_chat(owner, "<span class='big redtext'><i>You're now free of [master]'s influence, and fully independent!'</i></span>")
|
||||||
|
|||||||
Reference in New Issue
Block a user