-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b899167
commit c8bc820
Showing
27 changed files
with
372 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
//flag to block the qdel that normally happens when a projectile is blocked | ||
///flag to block the qdel that normally happens when a projectile is blocked | ||
#define PROJECTILE_INTERRUPT_BLOCK_QDEL (4<<0) | ||
|
||
///sent by the ark SS whenever an anchoring crystal charges (/obj/structure/destructible/clockwork/anchoring_crystal/charged_crystal) | ||
#define COMSIG_ANCHORING_CRYSTAL_CHARGED "anchoring_crystal_charged" | ||
|
||
///sent by the ark SS whenever an anchoring crystal is created (/obj/structure/destructible/clockwork/anchoring_crystal/charged_crystal) | ||
#define COMSIG_ANCHORING_CRYSTAL_CREATED "anchoring_crystal_created" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/datum/controller/subsystem/shuttle | ||
///Are we disabled due to admins | ||
var/admin_emergency_disabled = FALSE |
27 changes: 27 additions & 0 deletions
27
monkestation/code/datums/status_effects/debuffs/clock_warp_sickness.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,38 @@ | ||
/datum/status_effect/clock_warp_sickness | ||
alert_type = /atom/movable/screen/alert/status_effect/clock_warp_sickness | ||
|
||
/datum/status_effect/clock_warp_sickness/on_creation(mob/living/new_owner, _duration = 1 SECOND) | ||
duration = _duration | ||
return ..() | ||
|
||
/datum/status_effect/clock_warp_sickness/on_apply() | ||
. = ..() | ||
owner.add_actionspeed_modifier(/datum/actionspeed_modifier/clock_warp_sickness) | ||
owner.add_movespeed_modifier(/datum/movespeed_modifier/clock_warp_sickness) | ||
owner.adjust_confusion(duration) | ||
owner.adjust_dizzy(duration) | ||
owner.add_client_colour(/datum/client_colour/clock_warp) | ||
|
||
/datum/status_effect/clock_warp_sickness/on_remove() | ||
. = ..() | ||
owner.remove_actionspeed_modifier(/datum/actionspeed_modifier/clock_warp_sickness) | ||
owner.remove_movespeed_modifier(/datum/movespeed_modifier/clock_warp_sickness) | ||
owner.remove_client_colour(/datum/client_colour/clock_warp) | ||
|
||
/atom/movable/screen/alert/status_effect/clock_warp_sickness | ||
name = "Warp Sickness" | ||
desc = "You are disoriented from recently teleporting." | ||
icon = 'monkestation/icons/mob/clock_cult/actions_clock.dmi' | ||
icon_state = "warp_down" | ||
alerttooltipstyle = "clockwork" | ||
|
||
/datum/movespeed_modifier/clock_warp_sickness | ||
multiplicative_slowdown = 1 | ||
|
||
/datum/actionspeed_modifier/clock_warp_sickness | ||
multiplicative_slowdown = 0.6 | ||
|
||
/datum/client_colour/clock_warp | ||
colour = LIGHT_COLOR_CLOCKWORK | ||
priority = 2 | ||
fade_out = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
monkestation/code/modules/antagonists/clock_cult/ark_subsystem.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
///A subsystem to manage the global effects of clock cult | ||
//#define SERVANT_CAPACITY_TO_GIVE 2 //how many extra servant slots do we give on first charged crystal | ||
SUBSYSTEM_DEF(the_ark) | ||
name = "The Clockwork Ark" | ||
wait = 1 SECOND | ||
flags = SS_KEEP_TIMING | SS_NO_INIT | ||
runlevels = RUNLEVEL_GAME | ||
|
||
///The list of anchoring crystals, value is 0 is uncharged and 1 if charged | ||
var/list/anchoring_crystals | ||
///How many charged anchoring crystals are there | ||
var/charged_anchoring_crystals = 0 | ||
///Dimension theme used for transforming turfs | ||
var/datum/dimension_theme/clockwork/clock_dimension_theme | ||
///Assoc list of the original names of areas that are valid to summon anchoring crystals keyed to its area | ||
var/list/valid_crystal_areas | ||
///The pool of hallucinations we can trigger | ||
var/list/hallucination_pool | ||
|
||
/datum/controller/subsystem/the_ark/Initialize() | ||
anchoring_crystals = list() | ||
clock_dimension_theme = new(is_cult = TRUE) | ||
hallucination_pool = list( | ||
/datum/hallucination/fake_item/clockwork_slab = 2, | ||
/datum/hallucination/nearby_fake_item/clockwork_slab = 2, | ||
/datum/hallucination/hazard/clockwork_skewer = 1, | ||
/datum/hallucination/delusion/preset/clock_cultists = 1, | ||
/datum/hallucination/fake_sound/weird/clockcult_kindle = 2, | ||
/datum/hallucination/fake_sound/weird/clockcult_warp = 2, | ||
) | ||
initialized = TRUE | ||
|
||
/datum/controller/subsystem/the_ark/fire(resumed) | ||
if(charged_anchoring_crystals) | ||
handle_charged_crystals() | ||
|
||
/datum/controller/subsystem/the_ark/proc/handle_charged_crystals() | ||
if(prob(charged_anchoring_crystals)) | ||
var/mob/living/selected_player = pick(GLOB.alive_player_list) | ||
if(prob(50)) | ||
selected_player.cause_hallucination(pick_weight(hallucination_pool), "The Clockwork Ark") | ||
else | ||
to_chat(selected_player, span_notice(pick(list("You hear a faint ticking in the back of your mind", "You smell something metallic", \ | ||
"You see a flash of light out of the corner of your eye", "You feel an otherworldly presence", "You feel like your forgetting something")))) | ||
|
||
if(charged_anchoring_crystals >= 2) | ||
return | ||
|
||
/datum/controller/subsystem/the_ark/proc/on_crystal_charged(obj/structure/destructible/clockwork/anchoring_crystal/charged_crystal) | ||
charged_anchoring_crystals++ | ||
anchoring_crystals[charged_crystal] = 1 | ||
SEND_SIGNAL(src, COMSIG_ANCHORING_CRYSTAL_CHARGED, charged_crystal) | ||
var/datum/scripture/create_structure/anchoring_crystal/crystal_script | ||
addtimer(CALLBACK(src, PROC_REF(clear_shuttle_interference), charged_crystal), \ | ||
(ANCHORING_CRYSTAL_COOLDOWN - (ANCHORING_CRYSTAL_CHARGE_DURATION SECONDS)) + initial(crystal_script.invocation_time)) | ||
|
||
/*if(1) //add 2 more max servants and increase replica fabricator build speed | ||
GLOB.main_clock_cult.max_human_servants += SERVANT_CAPACITY_TO_GIVE*/ | ||
if(charged_anchoring_crystals == ANCHORING_CRYSTALS_TO_SUMMON + 1) //create a steam helios on reebe | ||
if(length(GLOB.abscond_markers)) | ||
var/turf/created_at = get_turf(pick(GLOB.abscond_markers)) | ||
new /obj/vehicle/sealed/mecha/steam_helios(created_at) | ||
new /obj/effect/temp_visual/steam(created_at) | ||
else if(GLOB.clock_ark) | ||
new /obj/vehicle/sealed/mecha/steam_helios(get_turf(GLOB.clock_ark)) | ||
else | ||
message_admins("No valid location for Steam Helios creation.") | ||
|
||
///fully disables the shuttle similar to the admin verb | ||
/datum/controller/subsystem/the_ark/proc/block_shuttle(datum/blocker) | ||
if(SSshuttle.admin_emergency_disabled || SSshuttle.emergency.mode == SHUTTLE_DISABLED) | ||
return | ||
|
||
SSshuttle.last_mode = SSshuttle.emergency.mode | ||
SSshuttle.last_call_time = SSshuttle.emergency.timeLeft(1) | ||
SSshuttle.emergency_no_recall = TRUE | ||
SSshuttle.emergency.setTimer(0) | ||
SSshuttle.emergency.mode = SHUTTLE_DISABLED | ||
|
||
///renables the shuttle | ||
/datum/controller/subsystem/the_ark/proc/clear_shuttle_interference(datum/unblocker) | ||
if(SSshuttle.admin_emergency_disabled || SSshuttle.emergency.mode != SHUTTLE_DISABLED || (unblocker && istype(unblocker, /obj/structure/destructible/clockwork/anchoring_crystal))) | ||
return | ||
|
||
SSshuttle.emergency_no_recall = FALSE | ||
if(SSshuttle.last_mode == SHUTTLE_DISABLED) | ||
SSshuttle.last_mode = SHUTTLE_IDLE | ||
|
||
SSshuttle.emergency.mode = SSshuttle.last_mode | ||
if(SSshuttle.last_call_time < 10 SECONDS && SSshuttle.last_mode != SHUTTLE_IDLE) | ||
SSshuttle.last_call_time = 10 SECONDS //Make sure no insta departures. | ||
SSshuttle.emergency.setTimer(SSshuttle.last_call_time) | ||
priority_announce("Emergency shuttle uplink connection regained.", "Higher Dimensional Affairs", ANNOUNCER_SPANOMALIES, has_important_message = TRUE) | ||
|
||
///returns how many charged anchor crystals there are | ||
/datum/controller/subsystem/the_ark/proc/get_charged_anchor_crystals() | ||
var/charged_count = 0 | ||
for(var/crystal in SSthe_ark.anchoring_crystals) | ||
charged_count += SSthe_ark.anchoring_crystals[crystal] | ||
return charged_count | ||
|
||
//#undef SERVANT_CAPACITY_TO_GIVE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.