mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Clown is slippery and the mime has no footsteps (#21675)
* Clown is slippery and the mime has no footsteps * bam
This commit is contained in:
@@ -304,6 +304,8 @@
|
||||
|
||||
///from base of /datum/mind/proc/transfer_to(mob/living/new_character)
|
||||
#define COMSIG_MIND_TRANSER_TO "mind_transfer_to"
|
||||
///called on the mob instead of the mind
|
||||
#define COMSIG_BODY_TRANSFER_TO "body_transfer_to"
|
||||
|
||||
// /mob signals
|
||||
|
||||
|
||||
@@ -22,8 +22,10 @@
|
||||
var/slip_always
|
||||
/// The verb that players will see when someone slips on the parent. In the form of "You [slip_verb]ped on".
|
||||
var/slip_verb
|
||||
/// TRUE the player will only slip if the mob this datum is attached to is horizontal
|
||||
var/horizontal_required
|
||||
|
||||
/datum/component/slippery/Initialize(_description, _knockdown = 0, _slip_chance = 100, _slip_tiles = 0, _walking_is_safe = TRUE, _slip_always = FALSE, _slip_verb = "slip")
|
||||
/datum/component/slippery/Initialize(_description, _knockdown = 0, _slip_chance = 100, _slip_tiles = 0, _walking_is_safe = TRUE, _slip_always = FALSE, _slip_verb = "slip", _horizontal_required = FALSE)
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
@@ -34,6 +36,7 @@
|
||||
walking_is_safe = _walking_is_safe
|
||||
slip_always = _slip_always
|
||||
slip_verb = _slip_verb
|
||||
horizontal_required = _horizontal_required
|
||||
|
||||
/datum/component/slippery/RegisterWithParent()
|
||||
RegisterSignal(parent, list(COMSIG_MOVABLE_CROSSED, COMSIG_ATOM_ENTERED), PROC_REF(Slip))
|
||||
@@ -52,5 +55,9 @@
|
||||
var/atom/movable/owner = parent
|
||||
if(!isturf(owner.loc))
|
||||
return
|
||||
if(isliving(owner))
|
||||
var/mob/living/mob_owner = owner
|
||||
if(horizontal_required && !IS_HORIZONTAL(mob_owner))
|
||||
return
|
||||
if(prob(slip_chance) && victim.slip(description, knockdown, slip_tiles, walking_is_safe, slip_always, slip_verb))
|
||||
owner.after_slip(victim)
|
||||
|
||||
@@ -146,6 +146,7 @@
|
||||
if(active)
|
||||
new_character.key = key //now transfer the key to link the client to our new body
|
||||
SEND_SIGNAL(src, COMSIG_MIND_TRANSER_TO, new_character)
|
||||
SEND_SIGNAL(new_character, COMSIG_BODY_TRANSFER_TO)
|
||||
|
||||
/datum/mind/proc/store_memory(new_text)
|
||||
memory += "[new_text]<BR>"
|
||||
|
||||
@@ -307,6 +307,7 @@
|
||||
H.dna.default_blocks.Add(GLOB.comicblock)
|
||||
H.check_mutations = TRUE
|
||||
H.add_language("Clownish")
|
||||
H.AddComponent(/datum/component/slippery, H, 8 SECONDS, 100, 0, FALSE, TRUE, "slip", TRUE)
|
||||
|
||||
//action given to antag clowns
|
||||
/datum/action/innate/toggle_clumsy
|
||||
@@ -380,8 +381,7 @@
|
||||
H.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe/conjure/build/mime_wall(null))
|
||||
H.mind.AddSpell(new /obj/effect/proc_holder/spell/mime/speak(null))
|
||||
H.mind.miming = 1
|
||||
|
||||
|
||||
qdel(H.GetComponent(/datum/component/footstep))
|
||||
|
||||
/datum/job/janitor
|
||||
title = "Janitor"
|
||||
|
||||
@@ -20,6 +20,17 @@
|
||||
UpdateAppearance()
|
||||
GLOB.human_list += src
|
||||
AddComponent(/datum/component/footstep, FOOTSTEP_MOB_HUMAN, 1, -6)
|
||||
RegisterSignal(src, COMSIG_BODY_TRANSFER_TO, PROC_REF(mind_checks))
|
||||
|
||||
/**
|
||||
* Handles any adjustments to the mob after a mind transfer.
|
||||
*/
|
||||
|
||||
/mob/living/carbon/human/proc/mind_checks()
|
||||
if(!mind)
|
||||
return
|
||||
if(mind.miming)
|
||||
qdel(GetComponent(/datum/component/footstep))
|
||||
|
||||
/**
|
||||
* Sets up DNA and species.
|
||||
@@ -68,6 +79,7 @@
|
||||
splinted_limbs.Cut()
|
||||
QDEL_NULL(physiology)
|
||||
GLOB.human_list -= src
|
||||
UnregisterSignal(src, COMSIG_BODY_TRANSFER_TO)
|
||||
|
||||
/mob/living/carbon/human/dummy
|
||||
real_name = "Test Dummy"
|
||||
|
||||
Reference in New Issue
Block a user