mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Deadchat plays everything - A simple way for admins to let deadchat control things. (#55314)
* Deadchat plays things * Pocket lint * View those variables * Arr var * Arrr save changes and don't code while drunk * Loog dot exe * Big ol' changes
This commit is contained in:
@@ -103,7 +103,7 @@
|
||||
// 5% chance every round to have anarchy mode deadchat control on birdboat.
|
||||
if(prob(5))
|
||||
desc = "[initial(desc)] It's waddling more than usual. It seems to be possessed."
|
||||
deadchat_plays_goose()
|
||||
deadchat_plays()
|
||||
|
||||
/mob/living/simple_animal/hostile/retaliate/goose/vomit/Destroy()
|
||||
UnregisterSignal(src, COMSIG_MOVABLE_MOVED)
|
||||
@@ -233,14 +233,16 @@
|
||||
vomitTimeBonus = 0
|
||||
|
||||
/// A proc to make it easier for admins to make the goose playable by deadchat.
|
||||
/mob/living/simple_animal/hostile/retaliate/goose/vomit/proc/deadchat_plays_goose()
|
||||
/mob/living/simple_animal/hostile/retaliate/goose/vomit/deadchat_plays(mode = ANARCHY_MODE, cooldown = 12 SECONDS)
|
||||
. = AddComponent(/datum/component/deadchat_control/cardinal_movement, mode, list(
|
||||
"vomit" = CALLBACK(src, .proc/vomit_prestart, 25),
|
||||
"honk" = CALLBACK(src, /atom/movable.proc/say, "HONK!!!"),
|
||||
"spin" = CALLBACK(src, /mob.proc/emote, "spin")), cooldown, CALLBACK(src, .proc/stop_deadchat_plays))
|
||||
|
||||
if(. == COMPONENT_INCOMPATIBLE)
|
||||
return
|
||||
|
||||
stop_automated_movement = TRUE
|
||||
AddComponent(/datum/component/deadchat_control, ANARCHY_MODE, list(
|
||||
"up" = CALLBACK(GLOBAL_PROC, .proc/_step, src, NORTH),
|
||||
"down" = CALLBACK(GLOBAL_PROC, .proc/_step, src, SOUTH),
|
||||
"left" = CALLBACK(GLOBAL_PROC, .proc/_step, src, WEST),
|
||||
"right" = CALLBACK(GLOBAL_PROC, .proc/_step, src, EAST),
|
||||
"vomit" = CALLBACK(src, .proc/vomit_prestart, 25)), 12 SECONDS, 4 SECONDS)
|
||||
|
||||
/datum/action/cooldown/vomit
|
||||
name = "Vomit"
|
||||
|
||||
@@ -702,3 +702,14 @@
|
||||
if(user.incapacitated())
|
||||
return
|
||||
return relaydrive(user, direction)
|
||||
|
||||
/mob/living/simple_animal/deadchat_plays(mode = ANARCHY_MODE, cooldown = 12 SECONDS)
|
||||
. = AddComponent(/datum/component/deadchat_control/cardinal_movement, mode, list(), cooldown, CALLBACK(src, .proc/stop_deadchat_plays))
|
||||
|
||||
if(. == COMPONENT_INCOMPATIBLE)
|
||||
return
|
||||
|
||||
stop_automated_movement = TRUE
|
||||
|
||||
/mob/living/simple_animal/proc/stop_deadchat_plays()
|
||||
stop_automated_movement = FALSE
|
||||
|
||||
@@ -413,13 +413,18 @@
|
||||
qdel(src)
|
||||
return gain
|
||||
|
||||
/obj/singularity/deadchat_controlled
|
||||
/obj/singularity/deadchat_plays(mode = DEMOCRACY_MODE, cooldown = 12 SECONDS)
|
||||
. = AddComponent(/datum/component/deadchat_control/cardinal_movement, mode, list(), cooldown, CALLBACK(src, .proc/stop_deadchat_plays))
|
||||
|
||||
if(. == COMPONENT_INCOMPATIBLE)
|
||||
return
|
||||
|
||||
move_self = FALSE
|
||||
|
||||
/obj/singularity/proc/stop_deadchat_plays()
|
||||
move_self = TRUE
|
||||
|
||||
/obj/singularity/deadchat_controlled/Initialize(mapload, starting_energy)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/deadchat_control, DEMOCRACY_MODE, list(
|
||||
"up" = CALLBACK(GLOBAL_PROC, .proc/_step, src, NORTH),
|
||||
"down" = CALLBACK(GLOBAL_PROC, .proc/_step, src, SOUTH),
|
||||
"left" = CALLBACK(GLOBAL_PROC, .proc/_step, src, WEST),
|
||||
"right" = CALLBACK(GLOBAL_PROC, .proc/_step, src, EAST)))
|
||||
deadchat_plays(mode = DEMOCRACY_MODE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user