procs
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
/datum/component/souldeath/Initialize()
|
||||
if(!isitem(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/equip)
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/unequip)
|
||||
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(equip))
|
||||
RegisterSignal(parent, COMSIG_ITEM_DROPPED, PROC_REF(unequip))
|
||||
|
||||
/datum/component/souldeath/proc/equip(datum/source, mob/living/equipper, slot)
|
||||
if(!slot || equip_slot == slot)
|
||||
wearer = equipper
|
||||
RegisterSignal(wearer, COMSIG_MOB_DEATH, .proc/die, TRUE)
|
||||
RegisterSignal(wearer, COMSIG_MOB_DEATH, PROC_REF(die), TRUE)
|
||||
signal = TRUE
|
||||
else
|
||||
if(signal)
|
||||
|
||||
@@ -130,8 +130,8 @@
|
||||
master = get_mob_by_key(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.
|
||||
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_LIVING_RESIST, PROC_REF(owner_resist)) //Do resistance calc if resist is pressed#
|
||||
RegisterSignal(owner, COMSIG_MOVABLE_HEAR, PROC_REF(owner_hear))
|
||||
mental_capacity = 500 - M.getOrganLoss(ORGAN_SLOT_BRAIN)//It's their brain!
|
||||
lewd = (owner.client?.prefs.cit_toggles & HYPNO) && (master.client?.prefs.cit_toggles & HYPNO)
|
||||
var/message = "[(lewd ? "I am a good pet for [enthrallGender]." : "[master] is a really inspirational person!")]"
|
||||
@@ -486,14 +486,14 @@
|
||||
//Speak (Forces player to talk)
|
||||
if (lowertext(customTriggers[trigger][1]) == "speak")//trigger2
|
||||
var/saytext = "Your mouth moves on it's own before you can even catch it."
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "<span class='notice'><i>[saytext]</i></span>"), 5)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), C, "<span class='notice'><i>[saytext]</i></span>"), 5)
|
||||
addtimer(CALLBACK(C, /atom/movable/proc/say, "[customTriggers[trigger][2]]"), 5)
|
||||
log_reagent("FERMICHEM: MKULTRA: [owner] ckey: [owner.key] has been forced to say: \"[customTriggers[trigger][2]]\" from previous trigger.")
|
||||
|
||||
|
||||
//Echo (repeats message!) allows customisation, but won't display var calls! Defaults to hypnophrase.
|
||||
else if (lowertext(customTriggers[trigger][1]) == "echo")//trigger2
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, C, "<span class='velvet'><i>[customTriggers[trigger][2]]</i></span>"), 5)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), C, "<span class='velvet'><i>[customTriggers[trigger][2]]</i></span>"), 5)
|
||||
//(to_chat(owner, "<span class='hypnophrase'><i>[customTriggers[trigger][2]]</i></span>"))//trigger3
|
||||
|
||||
//Shocking truth!
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
/obj/vehicle/sealed/vectorcraft/rideable/wheelchair/ComponentInitialize() //Since it's technically a chair I want it to have chair properties
|
||||
. = ..()
|
||||
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE, CALLBACK(src, .proc/can_user_rotate),CALLBACK(src, .proc/can_be_rotated),null)
|
||||
AddComponent(/datum/component/simple_rotation,ROTATION_ALTCLICK | ROTATION_CLOCKWISE, CALLBACK(src, PROC_REF(can_user_rotate),CALLBACK(src), .proc/can_be_rotated),null)
|
||||
|
||||
|
||||
/obj/vehicle/sealed/vectorcraft/rideable/wheelchair/Destroy()
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
set name = "Mentorhelp"
|
||||
|
||||
//clean the input msg
|
||||
if(!msg)
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
//remove out mentorhelp verb temporarily to prevent spamming of mentors.
|
||||
remove_verb(src, /client/verb/mentorhelp)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/add_verb, src, /client/verb/mentorhelp), 30 SECONDS)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(add_verb), src, /client/verb/mentorhelp), 30 SECONDS)
|
||||
|
||||
msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
|
||||
if(!msg || !mob)
|
||||
|
||||
@@ -38,14 +38,14 @@
|
||||
/obj/item/clothing/head/hattip/equipped(mob/M, slot)
|
||||
. = ..()
|
||||
if (slot == ITEM_SLOT_HEAD)
|
||||
RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
RegisterSignal(M, COMSIG_MOB_SAY, PROC_REF(handle_speech))
|
||||
else
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
/obj/item/clothing/head/hattip/dropped(mob/M)
|
||||
. = ..()
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/root_and_toot, src, src, 200))
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(root_and_toot), src, src, 200))
|
||||
|
||||
/obj/item/clothing/head/hattip/proc/root_and_toot(obj/item/clothing/head/hattip/hat)
|
||||
hat.animate_atom_living()
|
||||
|
||||
Reference in New Issue
Block a user