Merge branch 'master' into Ghommie-cit430
This commit is contained in:
@@ -68,4 +68,4 @@
|
||||
new /datum/hallucination/chat(owner, TRUE, FALSE, "<span class='hypnophrase'>[hypnotic_phrase]</span>")
|
||||
|
||||
/datum/brain_trauma/hypnosis/handle_hearing(datum/source, list/hearing_args)
|
||||
hearing_args[HEARING_MESSAGE] = target_phrase.Replace(hearing_args[HEARING_MESSAGE], "<span class='hypnophrase'>$1</span>")
|
||||
hearing_args[HEARING_RAW_MESSAGE] = target_phrase.Replace(hearing_args[HEARING_RAW_MESSAGE], "<span class='hypnophrase'>$1</span>")
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
if(prob(25))
|
||||
var/deja_vu = pick_n_take(hear_dejavu)
|
||||
var/static/regex/quoted_spoken_message = regex("\".+\"", "gi")
|
||||
hearing_args[HEARING_MESSAGE] = quoted_spoken_message.Replace(hearing_args[HEARING_MESSAGE], "\"[deja_vu]\"") //Quotes included to avoid cases where someone says part of their name
|
||||
hearing_args[HEARING_RAW_MESSAGE] = quoted_spoken_message.Replace(hearing_args[HEARING_RAW_MESSAGE], "\"[deja_vu]\"") //Quotes included to avoid cases where someone says part of their name
|
||||
return
|
||||
if(hear_dejavu.len >= 15)
|
||||
if(prob(50))
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
if(findtext(hearing_args[HEARING_RAW_MESSAGE], reg))
|
||||
addtimer(CALLBACK(src, .proc/freak_out, null, word), 10) //to react AFTER the chat message
|
||||
hearing_args[HEARING_MESSAGE] = reg.Replace(hearing_args[HEARING_MESSAGE], "<span class='phobia'>$1</span>")
|
||||
hearing_args[HEARING_RAW_MESSAGE] = reg.Replace(hearing_args[HEARING_RAW_MESSAGE], "<span class='phobia'>$1</span>")
|
||||
break
|
||||
|
||||
/datum/brain_trauma/mild/phobia/handle_speech(datum/source, list/speech_args)
|
||||
|
||||
@@ -198,9 +198,9 @@
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/handle_hearing(datum/source, list/hearing_args)
|
||||
if(HAS_TRAIT(owner, TRAIT_DEAF) || owner == hearing_args[HEARING_SPEAKER])
|
||||
return
|
||||
var/message = hearing_args[HEARING_MESSAGE]
|
||||
var/message = hearing_args[HEARING_RAW_MESSAGE]
|
||||
if(findtext(message, codeword))
|
||||
hearing_args[HEARING_MESSAGE] = replacetext(message, codeword, "<span class='warning'>[codeword]</span>")
|
||||
hearing_args[HEARING_RAW_MESSAGE] = replacetext(message, codeword, "<span class='warning'>[codeword]</span>")
|
||||
addtimer(CALLBACK(src, /datum/brain_trauma/severe/split_personality.proc/switch_personalities), 10)
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/handle_speech(datum/source, list/speech_args)
|
||||
|
||||
@@ -184,6 +184,7 @@
|
||||
|
||||
// The type arg is casted so initial works, you shouldn't be passing a real instance into this
|
||||
/datum/proc/GetComponent(datum/component/c_type)
|
||||
RETURN_TYPE(c_type)
|
||||
if(initial(c_type.dupe_mode) == COMPONENT_DUPE_ALLOWED)
|
||||
stack_trace("GetComponent was called to get a component of which multiple copies could be on an object. This can easily break and should be changed. Type: \[[c_type]\]")
|
||||
var/list/dc = datum_components
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
var/bonus_modifier = 0 //percentage increase to bonus item chance
|
||||
var/butcher_sound = 'sound/weapons/slice.ogg' //sound played when butchering
|
||||
var/butchering_enabled = TRUE
|
||||
var/can_be_blunt = FALSE
|
||||
|
||||
/datum/component/butchering/Initialize(_speed, _effectiveness, _bonus_modifier, _butcher_sound, disabled)
|
||||
/datum/component/butchering/Initialize(_speed, _effectiveness, _bonus_modifier, _butcher_sound, disabled, _can_be_blunt)
|
||||
if(_speed)
|
||||
speed = _speed
|
||||
if(_effectiveness)
|
||||
@@ -16,6 +17,22 @@
|
||||
butcher_sound = _butcher_sound
|
||||
if(disabled)
|
||||
butchering_enabled = FALSE
|
||||
if(_can_be_blunt)
|
||||
can_be_blunt = _can_be_blunt
|
||||
if(isitem(parent))
|
||||
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/onItemAttack)
|
||||
|
||||
/datum/component/butchering/proc/onItemAttack(obj/item/source, mob/living/M, mob/living/user)
|
||||
if(user.a_intent == INTENT_HARM && M.stat == DEAD && (M.butcher_results || M.guaranteed_butcher_results)) //can we butcher it?
|
||||
if(butchering_enabled && (can_be_blunt || source.get_sharpness()))
|
||||
INVOKE_ASYNC(src, .proc/startButcher, source, M, user)
|
||||
return COMPONENT_ITEM_NO_ATTACK
|
||||
|
||||
/datum/component/butchering/proc/startButcher(obj/item/source, mob/living/M, mob/living/user)
|
||||
to_chat(user, "<span class='notice'>You begin to butcher [M]...</span>")
|
||||
playsound(M.loc, butcher_sound, 50, TRUE, -1)
|
||||
if(do_mob(user, M, speed) && M.Adjacent(source))
|
||||
Butcher(user, M)
|
||||
|
||||
/datum/component/butchering/proc/Butcher(mob/living/butcher, mob/living/meat)
|
||||
var/turf/T = meat.drop_location()
|
||||
@@ -50,3 +67,23 @@
|
||||
|
||||
/datum/component/butchering/proc/ButcherEffects(mob/living/meat) //extra effects called on butchering, override this via subtypes
|
||||
return
|
||||
|
||||
///Special snowflake component only used for the recycler.
|
||||
/datum/component/butchering/recycler
|
||||
|
||||
/datum/component/butchering/recycler/Initialize(_speed, _effectiveness, _bonus_modifier, _butcher_sound, disabled, _can_be_blunt)
|
||||
if(!istype(parent, /obj/machinery/recycler)) //EWWW
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
. = ..()
|
||||
if(. == COMPONENT_INCOMPATIBLE)
|
||||
return
|
||||
RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, .proc/onCrossed)
|
||||
|
||||
/datum/component/butchering/recycler/proc/onCrossed(datum/source, mob/living/L)
|
||||
if(!istype(L))
|
||||
return
|
||||
var/obj/machinery/recycler/eater = parent
|
||||
if(eater.safety_mode || (eater.stat & (BROKEN|NOPOWER))) //I'm so sorry.
|
||||
return
|
||||
if(L.stat == DEAD && (L.butcher_results || L.guaranteed_butcher_results))
|
||||
Butcher(parent, L)
|
||||
@@ -174,3 +174,13 @@
|
||||
/datum/dog_fashion/back/deathsquad
|
||||
name = "Trooper REAL_NAME"
|
||||
desc = "That's not red paint. That's real corgi blood."
|
||||
|
||||
/datum/dog_fashion/head/colour
|
||||
name = "Stylish REAL_NAME"
|
||||
desc = "From the tips of their paws to the top of their head, they look like a made bed."
|
||||
emote_see = list("tries to tap dances.","looks sadly at others outfits...","barks at bad fashion!")
|
||||
|
||||
/datum/dog_fashion/head/telegram
|
||||
name = "Messenger REAL_NAME"
|
||||
desc = "Dont shoot the messenger..."
|
||||
emote_see = list("licks an envelope.","looks ready to set off to send a letter...","works on barking!")
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
/datum/element
|
||||
var/element_flags = NONE
|
||||
/**
|
||||
* The index of the first attach argument to consider for duplicate elements
|
||||
* Is only used when flags contains ELEMENT_BESPOKE
|
||||
* This is infinity so you must explicitly set this
|
||||
*/
|
||||
var/id_arg_index = INFINITY
|
||||
|
||||
/datum/element/proc/Attach(datum/target)
|
||||
if(type == /datum/element)
|
||||
@@ -19,11 +25,15 @@
|
||||
//DATUM PROCS
|
||||
|
||||
/datum/proc/AddElement(eletype, ...)
|
||||
var/datum/element/ele = SSdcs.GetElement(eletype)
|
||||
var/datum/element/ele = SSdcs.GetElement(arglist(args))
|
||||
args[1] = src
|
||||
if(ele.Attach(arglist(args)) == ELEMENT_INCOMPATIBLE)
|
||||
CRASH("Incompatible [eletype] assigned to a [type]! args: [json_encode(args)]")
|
||||
|
||||
/datum/proc/RemoveElement(eletype)
|
||||
var/datum/element/ele = SSdcs.GetElement(eletype)
|
||||
ele.Detach(src)
|
||||
/**
|
||||
* Finds the singleton for the element type given and detaches it from src
|
||||
* You only need additional arguments beyond the type if you're using ELEMENT_BESPOKE
|
||||
*/
|
||||
/datum/proc/RemoveElement(eletype, ...)
|
||||
var/datum/element/ele = SSdcs.GetElement(arglist(args))
|
||||
ele.Detach(src)
|
||||
@@ -1,6 +1,3 @@
|
||||
#define EMOTE_VISIBLE 1
|
||||
#define EMOTE_AUDIBLE 2
|
||||
|
||||
/datum/emote
|
||||
var/key = "" //What calls the emote
|
||||
var/key_third_person = "" //This will also call the emote
|
||||
|
||||
@@ -541,6 +541,38 @@
|
||||
icon_state = "ichorial_stain"
|
||||
alerttooltipstyle = "clockcult"
|
||||
|
||||
|
||||
//GOLEM GANG
|
||||
|
||||
/datum/status_effect/strandling //get it, strand as in durathread strand + strangling = strandling hahahahahahahahahahhahahaha i want to die
|
||||
id = "strandling"
|
||||
status_type = STATUS_EFFECT_UNIQUE
|
||||
alert_type = /obj/screen/alert/status_effect/strandling
|
||||
|
||||
/datum/status_effect/strandling/on_apply()
|
||||
ADD_TRAIT(owner, TRAIT_MAGIC_CHOKE, "dumbmoron")
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/strandling/on_remove()
|
||||
REMOVE_TRAIT(owner, TRAIT_MAGIC_CHOKE, "dumbmoron")
|
||||
return ..()
|
||||
|
||||
/obj/screen/alert/status_effect/strandling
|
||||
name = "Choking strand"
|
||||
desc = "A magical strand of Durathread is wrapped around your neck, preventing you from breathing! Click this icon to remove the strand."
|
||||
icon_state = "his_grace"
|
||||
alerttooltipstyle = "hisgrace"
|
||||
|
||||
/obj/screen/alert/status_effect/strandling/Click(location, control, params)
|
||||
. = ..()
|
||||
to_chat(mob_viewer, "<span class='notice'>You attempt to remove the durathread strand from around your neck.</span>")
|
||||
if(do_after(mob_viewer, 35, null, mob_viewer))
|
||||
if(isliving(mob_viewer))
|
||||
var/mob/living/L = mob_viewer
|
||||
to_chat(mob_viewer, "<span class='notice'>You succesfuly remove the durathread strand.</span>")
|
||||
L.remove_status_effect(STATUS_EFFECT_CHOKINGSTRAND)
|
||||
|
||||
|
||||
datum/status_effect/pacify
|
||||
id = "pacify"
|
||||
status_type = STATUS_EFFECT_REPLACE
|
||||
|
||||
Reference in New Issue
Block a user