April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
@@ -84,7 +84,6 @@ Credit where due:
|
||||
|
||||
/datum/game_mode
|
||||
var/list/servants_of_ratvar = list() //The Enlightened servants of Ratvar
|
||||
var/clockwork_objective = CLOCKCULT_GATEWAY //The objective that the servants must fulfill
|
||||
var/clockwork_explanation = "Construct a Gateway to the Celestial Derelict and free Ratvar." //The description of the current objective
|
||||
|
||||
/datum/game_mode/clockwork_cult
|
||||
@@ -126,7 +125,6 @@ Credit where due:
|
||||
return 1
|
||||
|
||||
/datum/game_mode/clockwork_cult/post_setup()
|
||||
forge_clock_objectives()
|
||||
for(var/S in servants_to_serve)
|
||||
var/datum/mind/servant = S
|
||||
log_game("[servant.key] was made an initial servant of Ratvar")
|
||||
@@ -137,16 +135,6 @@ Credit where due:
|
||||
..()
|
||||
return 1
|
||||
|
||||
/datum/game_mode/clockwork_cult/proc/forge_clock_objectives() //Determine what objective that Ratvar's servants will fulfill
|
||||
var/list/possible_objectives = list(CLOCKCULT_ESCAPE, CLOCKCULT_GATEWAY)
|
||||
clockwork_objective = pick(possible_objectives)
|
||||
switch(clockwork_objective)
|
||||
if(CLOCKCULT_ESCAPE)
|
||||
clockwork_explanation = "Construct a Gateway to the Celestial Derelict and proselytize the entire station."
|
||||
if(CLOCKCULT_GATEWAY)
|
||||
clockwork_explanation = "Construct a Gateway to the Celestial Derelict and free Ratvar."
|
||||
return 1
|
||||
|
||||
/datum/game_mode/clockwork_cult/proc/greet_servant(mob/M) //Description of their role
|
||||
if(!M)
|
||||
return 0
|
||||
@@ -182,21 +170,18 @@ Credit where due:
|
||||
if(!L || !istype(L) || !L.mind)
|
||||
return 0
|
||||
var/datum/mind/M = L.mind
|
||||
to_chat(M.current, "<b>This is Ratvar's will:</b> [clockwork_explanation]")
|
||||
M.memory += "<b>Ratvar's will:</b> [clockwork_explanation]<br>"
|
||||
to_chat(M.current, "<b>This is Ratvar's will:</b> [CLOCKCULT_OBJECTIVE]")
|
||||
M.memory += "<b>Ratvar's will:</b> [CLOCKCULT_OBJECTIVE]<br>"
|
||||
return 1
|
||||
|
||||
/datum/game_mode/clockwork_cult/proc/check_clockwork_victory()
|
||||
switch(clockwork_objective)
|
||||
if(CLOCKCULT_ESCAPE)
|
||||
if(clockwork_gateway_activated)
|
||||
ticker.news_report = CLOCK_PROSELYTIZATION
|
||||
return TRUE
|
||||
if(CLOCKCULT_GATEWAY)
|
||||
if(ratvar_awakens)
|
||||
ticker.news_report = CLOCK_SUMMON
|
||||
return TRUE
|
||||
ticker.news_report = CULT_FAILURE
|
||||
if(GLOB.clockwork_gateway_activated)
|
||||
SSticker.news_report = CLOCK_PROSELYTIZATION //failure, technically, but we have the station
|
||||
if(GLOB.ratvar_awakens)
|
||||
SSticker.news_report = CLOCK_SUMMON
|
||||
return TRUE
|
||||
else
|
||||
SSticker.news_report = CULT_FAILURE
|
||||
return FALSE
|
||||
|
||||
/datum/game_mode/clockwork_cult/declare_completion()
|
||||
@@ -205,26 +190,26 @@ Credit where due:
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_clockwork_cult()
|
||||
var/text = ""
|
||||
if(istype(ticker.mode, /datum/game_mode/clockwork_cult)) //Possibly hacky?
|
||||
var/datum/game_mode/clockwork_cult/C = ticker.mode
|
||||
if(istype(SSticker.mode, /datum/game_mode/clockwork_cult)) //Possibly hacky?
|
||||
var/datum/game_mode/clockwork_cult/C = SSticker.mode
|
||||
if(C.check_clockwork_victory())
|
||||
text += "<span class='large_brass'><b>Ratvar's servants have succeeded in fulfilling His goals!</b></span>"
|
||||
feedback_set_details("round_end_result", "win - servants completed their objective ([clockwork_objective])")
|
||||
feedback_set_details("round_end_result", "win - servants completed their objective (summon ratvar)")
|
||||
else
|
||||
var/half_victory = FALSE
|
||||
var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = locate() in all_clockwork_objects
|
||||
var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = locate() in GLOB.all_clockwork_objects
|
||||
if(G)
|
||||
half_victory = TRUE
|
||||
if(half_victory)
|
||||
text += "<span class='large_brass'><b>The crew escaped before [clockwork_objective == CLOCKCULT_GATEWAY ? "Ratvar could rise":"the station could be proselytized"], but the gateway \
|
||||
text += "<span class='large_brass'><b>The crew escaped before Ratvar could rise, but the gateway \
|
||||
was successfully constructed!</b></span>"
|
||||
feedback_set_details("round_end_result", "halfwin - servants constructed the gateway but their objective was not completed ([clockwork_objective])")
|
||||
feedback_set_details("round_end_result", "halfwin - servants constructed the gateway but their objective was not completed (summon ratvar)")
|
||||
else
|
||||
text += "<span class='userdanger'>Ratvar's servants have failed!</span>"
|
||||
feedback_set_details("round_end_result", "loss - servants failed their objective ([clockwork_objective])")
|
||||
text += "<br><b>The servants' objective was:</b> <br>[clockwork_explanation]"
|
||||
text += "<br>Ratvar's servants had <b>[clockwork_caches]</b> Tinkerer's Caches."
|
||||
text += "<br><b>Construction Value(CV)</b> was: <b>[clockwork_construction_value]</b>"
|
||||
feedback_set_details("round_end_result", "loss - servants failed their objective (summon ratvar)")
|
||||
text += "<br><b>The servants' objective was:</b> <br>[CLOCKCULT_OBJECTIVE]"
|
||||
text += "<br>Ratvar's servants had <b>[GLOB.clockwork_caches]</b> Tinkerer's Caches."
|
||||
text += "<br><b>Construction Value(CV)</b> was: <b>[GLOB.clockwork_construction_value]</b>"
|
||||
var/list/scripture_states = scripture_unlock_check()
|
||||
for(var/i in scripture_states)
|
||||
if(i != SCRIPTURE_DRIVER)
|
||||
@@ -236,11 +221,11 @@ Credit where due:
|
||||
to_chat(world, text)
|
||||
|
||||
/datum/game_mode/proc/update_servant_icons_added(datum/mind/M)
|
||||
var/datum/atom_hud/antag/A = huds[ANTAG_HUD_CLOCKWORK]
|
||||
var/datum/atom_hud/antag/A = GLOB.huds[ANTAG_HUD_CLOCKWORK]
|
||||
A.join_hud(M.current)
|
||||
set_antag_hud(M.current, "clockwork")
|
||||
|
||||
/datum/game_mode/proc/update_servant_icons_removed(datum/mind/M)
|
||||
var/datum/atom_hud/antag/A = huds[ANTAG_HUD_CLOCKWORK]
|
||||
var/datum/atom_hud/antag/A = GLOB.huds[ANTAG_HUD_CLOCKWORK]
|
||||
A.leave_hud(M.current)
|
||||
set_antag_hud(M.current, null)
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
|
||||
/obj/effect/clockwork/New()
|
||||
..()
|
||||
all_clockwork_objects += src
|
||||
GLOB.all_clockwork_objects += src
|
||||
|
||||
/obj/effect/clockwork/Destroy()
|
||||
all_clockwork_objects -= src
|
||||
GLOB.all_clockwork_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/effect/clockwork/examine(mob/user)
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
var/mob/living/carbon/C = L
|
||||
C.silent += 5
|
||||
var/message = "[sigil_name] in [get_area(src)] <span class='sevtug'>[is_servant_of_ratvar(L) ? "successfully converted" : "failed to convert"]</span>"
|
||||
for(var/M in mob_list)
|
||||
for(var/M in GLOB.mob_list)
|
||||
if(isobserver(M))
|
||||
var/link = FOLLOW_LINK(M, L)
|
||||
to_chat(M, "[link] <span class='heavy_brass'>[message] [L.real_name]!</span>")
|
||||
@@ -198,7 +198,7 @@
|
||||
var/structure_number = 0
|
||||
for(var/obj/structure/destructible/clockwork/powered/P in range(SIGIL_ACCESS_RANGE, src))
|
||||
structure_number++
|
||||
to_chat(user, "<span class='[power_charge ? "brass":"alloy"]'>It is storing <b>[ratvar_awakens ? "INFINITY":"[power_charge]"]W</b> of power, \
|
||||
to_chat(user, "<span class='[power_charge ? "brass":"alloy"]'>It is storing <b>[GLOB.ratvar_awakens ? "INFINITY":"[power_charge]"]W</b> of power, \
|
||||
and <b>[structure_number]</b> Clockwork Structure[structure_number == 1 ? "":"s"] [structure_number == 1 ? "is":"are"] in range.</span>")
|
||||
if(iscyborg(user))
|
||||
to_chat(user, "<span class='brass'>You can recharge from the [sigil_name] by crossing it.</span>")
|
||||
@@ -248,7 +248,7 @@
|
||||
update_glow()
|
||||
|
||||
/obj/effect/clockwork/sigil/transmission/proc/modify_charge(amount)
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
update_glow()
|
||||
return TRUE
|
||||
if(power_charge - amount < 0)
|
||||
@@ -258,7 +258,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/effect/clockwork/sigil/transmission/proc/update_glow()
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
alpha = 255
|
||||
else
|
||||
alpha = min(initial(alpha) + power_charge*0.02, 255)
|
||||
@@ -289,8 +289,8 @@
|
||||
/obj/effect/clockwork/sigil/vitality/examine(mob/user)
|
||||
..()
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
to_chat(user, "<span class='[vitality ? "inathneq_small":"alloy"]'>It has access to <b>[ratvar_awakens ? "INFINITE":"[vitality]"]</b> units of vitality.</span>")
|
||||
if(ratvar_awakens)
|
||||
to_chat(user, "<span class='[vitality ? "inathneq_small":"alloy"]'>It has access to <b>[GLOB.ratvar_awakens ? "INFINITE":"[vitality]"]</b> units of vitality.</span>")
|
||||
if(GLOB.ratvar_awakens)
|
||||
to_chat(user, "<span class='inathneq_small'>It can revive Servants at no cost!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='inathneq_small'>It can revive Servants at a cost of <b>[base_revive_cost]</b> vitality plus vitality equal to the non-oxygen damage they have, in addition to being destroyed in the process.</span>")
|
||||
@@ -303,7 +303,7 @@
|
||||
addtimer(CALLBACK(src, .proc/update_alpha), 10)
|
||||
sleep(10)
|
||||
//as long as they're still on the sigil and are either not a servant or they're a servant AND it has remaining vitality
|
||||
while(L && (!is_servant_of_ratvar(L) || (is_servant_of_ratvar(L) && (ratvar_awakens || vitality))) && get_turf(L) == get_turf(src))
|
||||
while(L && (!is_servant_of_ratvar(L) || (is_servant_of_ratvar(L) && (GLOB.ratvar_awakens || vitality))) && get_turf(L) == get_turf(src))
|
||||
sigil_active = TRUE
|
||||
if(animation_number >= 4)
|
||||
new /obj/effect/overlay/temp/ratvar/sigil/vitality(get_turf(src))
|
||||
@@ -323,7 +323,7 @@
|
||||
qdel(W)
|
||||
L.dust()
|
||||
else
|
||||
if(!ratvar_awakens && L.stat == CONSCIOUS)
|
||||
if(!GLOB.ratvar_awakens && L.stat == CONSCIOUS)
|
||||
vitality_drained = L.adjustToxLoss(1)
|
||||
else
|
||||
vitality_drained = L.adjustToxLoss(1.5)
|
||||
@@ -334,7 +334,7 @@
|
||||
else
|
||||
if(L.stat == DEAD)
|
||||
var/revival_cost = base_revive_cost + L.getCloneLoss() + L.getToxLoss() + L.getFireLoss() + L.getBruteLoss() //ignores oxygen damage
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
revival_cost = 0
|
||||
var/mob/dead/observer/ghost = L.get_ghost(TRUE)
|
||||
if(vitality >= revival_cost && (ghost || (L.mind && L.mind.active)))
|
||||
@@ -344,14 +344,14 @@
|
||||
var/obj/effect/overlay/temp/ratvar/sigil/vitality/V = new /obj/effect/overlay/temp/ratvar/sigil/vitality(get_turf(src))
|
||||
animate(V, alpha = 0, transform = matrix()*2, time = 8)
|
||||
playsound(L, 'sound/magic/Staff_Healing.ogg', 50, 1)
|
||||
L.visible_message("<span class='warning'>[L] suddenly gets back up, [ratvar_awakens ? "[L.p_their()] body dripping blue ichor":"even as [src] scatters into blue sparks around [L.p_them()]"]!</span>", \
|
||||
L.visible_message("<span class='warning'>[L] suddenly gets back up, [GLOB.ratvar_awakens ? "[L.p_their()] body dripping blue ichor":"even as [src] scatters into blue sparks around [L.p_them()]"]!</span>", \
|
||||
"<span class='inathneq'>\"[text2ratvar("You will be okay, child.")]\"</span>")
|
||||
vitality -= revival_cost
|
||||
if(!ratvar_awakens)
|
||||
if(!GLOB.ratvar_awakens)
|
||||
qdel(src)
|
||||
break
|
||||
var/vitality_for_cycle = 3
|
||||
if(!ratvar_awakens)
|
||||
if(!GLOB.ratvar_awakens)
|
||||
if(L.stat == CONSCIOUS)
|
||||
vitality_for_cycle = 2
|
||||
vitality_for_cycle = min(vitality, vitality_for_cycle)
|
||||
@@ -360,7 +360,7 @@
|
||||
if(!vitality_used)
|
||||
break
|
||||
|
||||
if(!ratvar_awakens)
|
||||
if(!GLOB.ratvar_awakens)
|
||||
vitality -= vitality_used
|
||||
|
||||
sleep(2)
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
/obj/effect/clockwork/spatial_gateway/Bumped(atom/A)
|
||||
..()
|
||||
if(isliving(A) || istype(A, /obj/item))
|
||||
if(A && !QDELETED(A))
|
||||
pass_through_gateway(A)
|
||||
|
||||
/obj/effect/clockwork/spatial_gateway/proc/pass_through_gateway(atom/movable/A, no_cost)
|
||||
@@ -151,13 +151,13 @@
|
||||
var/list/possible_targets = list()
|
||||
var/list/teleportnames = list()
|
||||
|
||||
for(var/obj/structure/destructible/clockwork/powered/clockwork_obelisk/O in all_clockwork_objects)
|
||||
for(var/obj/structure/destructible/clockwork/powered/clockwork_obelisk/O in GLOB.all_clockwork_objects)
|
||||
if(!O.Adjacent(invoker) && O != src && (O.z <= ZLEVEL_SPACEMAX) && O.anchored) //don't list obelisks that we're next to
|
||||
var/area/A = get_area(O)
|
||||
var/locname = initial(A.name)
|
||||
possible_targets[avoid_assoc_duplicate_keys("[locname] [O.name]", teleportnames)] = O
|
||||
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
for(var/mob/living/L in GLOB.living_mob_list)
|
||||
if(!L.stat && is_servant_of_ratvar(L) && !L.Adjacent(invoker) && (L.z <= ZLEVEL_SPACEMAX)) //People right next to the invoker can't be portaled to, for obvious reasons
|
||||
possible_targets[avoid_assoc_duplicate_keys("[L.name] ([L.real_name])", teleportnames)] = L
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/proc/generate_cache_component(specific_component_id, atom/A)
|
||||
if(!specific_component_id)
|
||||
specific_component_id = get_weighted_component_id()
|
||||
clockwork_component_cache[specific_component_id]++
|
||||
GLOB.clockwork_component_cache[specific_component_id]++
|
||||
if(A)
|
||||
var/component_animation_type = get_component_animation_type(specific_component_id)
|
||||
new component_animation_type(get_turf(A))
|
||||
@@ -13,15 +13,15 @@
|
||||
/proc/get_weighted_component_id(obj/item/clockwork/slab/storage_slab)
|
||||
. = list()
|
||||
if(storage_slab)
|
||||
if(clockwork_caches)
|
||||
for(var/i in clockwork_component_cache)
|
||||
.[i] = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*(clockwork_component_cache[i] + storage_slab.stored_components[i]), 1)
|
||||
if(GLOB.clockwork_caches)
|
||||
for(var/i in GLOB.clockwork_component_cache)
|
||||
.[i] = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*(GLOB.clockwork_component_cache[i] + storage_slab.stored_components[i]), 1)
|
||||
else
|
||||
for(var/i in clockwork_component_cache)
|
||||
for(var/i in GLOB.clockwork_component_cache)
|
||||
.[i] = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*storage_slab.stored_components[i], 1)
|
||||
else
|
||||
for(var/i in clockwork_component_cache)
|
||||
.[i] = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*clockwork_component_cache[i], 1)
|
||||
for(var/i in GLOB.clockwork_component_cache)
|
||||
.[i] = max(MAX_COMPONENTS_BEFORE_RAND - LOWER_PROB_PER_COMPONENT*GLOB.clockwork_component_cache[i], 1)
|
||||
. = pickweight(.)
|
||||
|
||||
//returns a component name from a component id
|
||||
@@ -37,8 +37,6 @@
|
||||
return "Replicant Alloy"
|
||||
if(HIEROPHANT_ANSIBLE)
|
||||
return "Hierophant Ansible"
|
||||
else
|
||||
return null
|
||||
|
||||
//returns a component acronym from a component id
|
||||
/proc/get_component_acronym(id)
|
||||
@@ -53,8 +51,6 @@
|
||||
return "RA"
|
||||
if(HIEROPHANT_ANSIBLE)
|
||||
return "HA"
|
||||
else
|
||||
return null
|
||||
|
||||
//returns a component id from a component name
|
||||
/proc/get_component_id(name)
|
||||
@@ -69,8 +65,6 @@
|
||||
return REPLICANT_ALLOY
|
||||
if("Hierophant Ansible")
|
||||
return HIEROPHANT_ANSIBLE
|
||||
else
|
||||
return null
|
||||
|
||||
//returns a component spanclass from a component id
|
||||
/proc/get_component_span(id)
|
||||
@@ -127,8 +121,6 @@
|
||||
return /obj/effect/overlay/temp/ratvar/component/alloy
|
||||
if(HIEROPHANT_ANSIBLE)
|
||||
return /obj/effect/overlay/temp/ratvar/component/ansible
|
||||
else
|
||||
return null
|
||||
|
||||
//returns a type for a component from a component id
|
||||
/proc/get_component_type(id)
|
||||
@@ -142,6 +134,4 @@
|
||||
if(REPLICANT_ALLOY)
|
||||
return /obj/item/clockwork/component/replicant_alloy
|
||||
if(HIEROPHANT_ANSIBLE)
|
||||
return /obj/item/clockwork/component/hierophant_ansible
|
||||
else
|
||||
return null
|
||||
return /obj/item/clockwork/component/hierophant_ansible
|
||||
@@ -2,7 +2,7 @@
|
||||
/proc/hierophant_message(message, servantsonly, atom/target)
|
||||
if(!message)
|
||||
return FALSE
|
||||
for(var/M in mob_list)
|
||||
for(var/M in GLOB.mob_list)
|
||||
if(!servantsonly && isobserver(M))
|
||||
if(target)
|
||||
var/link = FOLLOW_LINK(M, target)
|
||||
|
||||
@@ -101,14 +101,11 @@ List of nuances:
|
||||
/proc/clockwork_say(atom/movable/AM, message, whisper=FALSE)
|
||||
var/list/spans = list(SPAN_ROBOT)
|
||||
|
||||
var/old_languages_spoken = AM.languages_spoken
|
||||
AM.languages_spoken = HUMAN //anyone who can understand HUMAN will hear weird shitty ratvar speak, otherwise it'll get starred out
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
if(!whisper)
|
||||
L.say(message, "clock", spans)
|
||||
L.say(message, "clock", spans, language=/datum/language/common)
|
||||
else
|
||||
L.whisper(message)
|
||||
else
|
||||
AM.say(message)
|
||||
AM.languages_spoken = old_languages_spoken
|
||||
AM.say(message, language=/datum/language/common)
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
/proc/scripture_unlock_check()
|
||||
var/servants = 0
|
||||
var/unconverted_ai_exists = get_unconverted_ais()
|
||||
for(var/mob/living/M in living_mob_list)
|
||||
for(var/mob/living/M in GLOB.living_mob_list)
|
||||
if(is_servant_of_ratvar(M) && (ishuman(M) || issilicon(M)))
|
||||
servants++
|
||||
. = list(SCRIPTURE_DRIVER = TRUE, SCRIPTURE_SCRIPT = FALSE, SCRIPTURE_APPLICATION = FALSE, SCRIPTURE_REVENANT = FALSE, SCRIPTURE_JUDGEMENT = FALSE)
|
||||
//Drivers: always unlocked
|
||||
.[SCRIPTURE_SCRIPT] = (servants >= SCRIPT_SERVANT_REQ && clockwork_caches >= SCRIPT_CACHE_REQ)
|
||||
.[SCRIPTURE_SCRIPT] = (servants >= SCRIPT_SERVANT_REQ && GLOB.clockwork_caches >= SCRIPT_CACHE_REQ)
|
||||
//Script: SCRIPT_SERVANT_REQ or more non-brain servants and SCRIPT_CACHE_REQ or more clockwork caches
|
||||
.[SCRIPTURE_APPLICATION] = (servants >= APPLICATION_SERVANT_REQ && clockwork_caches >= APPLICATION_CACHE_REQ && clockwork_construction_value >= APPLICATION_CV_REQ)
|
||||
.[SCRIPTURE_APPLICATION] = (servants >= APPLICATION_SERVANT_REQ && GLOB.clockwork_caches >= APPLICATION_CACHE_REQ && GLOB.clockwork_construction_value >= APPLICATION_CV_REQ)
|
||||
//Application: APPLICATION_SERVANT_REQ or more non-brain servants, APPLICATION_CACHE_REQ or more clockwork caches, and at least APPLICATION_CV_REQ CV
|
||||
.[SCRIPTURE_REVENANT] = (servants >= REVENANT_SERVANT_REQ && clockwork_caches >= REVENANT_CACHE_REQ && clockwork_construction_value >= REVENANT_CV_REQ)
|
||||
.[SCRIPTURE_REVENANT] = (servants >= REVENANT_SERVANT_REQ && GLOB.clockwork_caches >= REVENANT_CACHE_REQ && GLOB.clockwork_construction_value >= REVENANT_CV_REQ)
|
||||
//Revenant: REVENANT_SERVANT_REQ or more non-brain servants, REVENANT_CACHE_REQ or more clockwork caches, and at least REVENANT_CV_REQ CV
|
||||
.[SCRIPTURE_JUDGEMENT] = (servants >= JUDGEMENT_SERVANT_REQ && clockwork_caches >= JUDGEMENT_CACHE_REQ && clockwork_construction_value >= JUDGEMENT_CV_REQ && !unconverted_ai_exists)
|
||||
.[SCRIPTURE_JUDGEMENT] = (servants >= JUDGEMENT_SERVANT_REQ && GLOB.clockwork_caches >= JUDGEMENT_CACHE_REQ && GLOB.clockwork_construction_value >= JUDGEMENT_CV_REQ && !unconverted_ai_exists)
|
||||
//Judgement: JUDGEMENT_SERVANT_REQ or more non-brain servants, JUDGEMENT_CACHE_REQ or more clockwork caches, at least JUDGEMENT_CV_REQ CV, and there are no living, non-servant ais
|
||||
|
||||
//reports to servants when scripture is locked or unlocked
|
||||
@@ -26,33 +26,36 @@
|
||||
|
||||
/proc/get_unconverted_ais()
|
||||
. = 0
|
||||
for(var/ai in ai_list)
|
||||
var/mob/living/silicon/AI = ai
|
||||
if(is_servant_of_ratvar(AI) || !isturf(AI.loc) || AI.z != ZLEVEL_STATION)
|
||||
for(var/ai in GLOB.ai_list)
|
||||
var/mob/living/silicon/ai/AI = ai
|
||||
if(AI.deployed_shell && is_servant_of_ratvar(AI.deployed_shell))
|
||||
continue
|
||||
if(is_servant_of_ratvar(AI) || !isturf(AI.loc) || AI.z != ZLEVEL_STATION || AI.stat == DEAD)
|
||||
continue
|
||||
.++
|
||||
|
||||
/proc/update_slab_info(obj/item/clockwork/slab/set_slab)
|
||||
generate_all_scripture()
|
||||
var/needs_update = FALSE //if everything needs an update, for whatever reason
|
||||
for(var/s in all_scripture)
|
||||
var/datum/clockwork_scripture/S = all_scripture[s]
|
||||
for(var/s in GLOB.all_scripture)
|
||||
var/datum/clockwork_scripture/S = GLOB.all_scripture[s]
|
||||
if(S.creation_update())
|
||||
needs_update = TRUE
|
||||
if(!set_slab || needs_update)
|
||||
for(var/obj/item/clockwork/slab/S in all_clockwork_objects)
|
||||
for(var/obj/item/clockwork/slab/S in GLOB.all_clockwork_objects)
|
||||
SStgui.update_uis(S)
|
||||
S.update_quickbind()
|
||||
if(needs_update)
|
||||
S.update_quickbind()
|
||||
else
|
||||
SStgui.update_uis(set_slab)
|
||||
set_slab.update_quickbind()
|
||||
|
||||
/proc/generate_all_scripture()
|
||||
if(!all_scripture.len)
|
||||
if(!GLOB.all_scripture.len)
|
||||
for(var/V in sortList(subtypesof(/datum/clockwork_scripture), /proc/cmp_clockscripture_priority))
|
||||
var/datum/clockwork_scripture/S = new V
|
||||
all_scripture[S.type] = S
|
||||
GLOB.all_scripture[S.type] = S
|
||||
|
||||
//changes construction value
|
||||
/proc/change_construction_value(amount)
|
||||
clockwork_construction_value += amount
|
||||
GLOB.clockwork_construction_value += amount
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
/obj/item/clockwork/New()
|
||||
..()
|
||||
ratvar_act()
|
||||
all_clockwork_objects += src
|
||||
GLOB.all_clockwork_objects += src
|
||||
|
||||
/obj/item/clockwork/Destroy()
|
||||
all_clockwork_objects -= src
|
||||
GLOB.all_clockwork_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/clockwork/examine(mob/user)
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
/obj/item/clothing/head/helmet/clockwork/New()
|
||||
..()
|
||||
ratvar_act()
|
||||
all_clockwork_objects += src
|
||||
GLOB.all_clockwork_objects += src
|
||||
|
||||
/obj/item/clothing/head/helmet/clockwork/Destroy()
|
||||
all_clockwork_objects -= src
|
||||
GLOB.all_clockwork_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/head/helmet/clockwork/ratvar_act()
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100)
|
||||
flags |= STOPSPRESSUREDMAGE
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
@@ -67,14 +67,14 @@
|
||||
/obj/item/clothing/suit/armor/clockwork/New()
|
||||
..()
|
||||
ratvar_act()
|
||||
all_clockwork_objects += src
|
||||
GLOB.all_clockwork_objects += src
|
||||
|
||||
/obj/item/clothing/suit/armor/clockwork/Destroy()
|
||||
all_clockwork_objects -= src
|
||||
GLOB.all_clockwork_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/armor/clockwork/ratvar_act()
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100)
|
||||
flags |= STOPSPRESSUREDMAGE
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
@@ -128,14 +128,14 @@
|
||||
/obj/item/clothing/gloves/clockwork/New()
|
||||
..()
|
||||
ratvar_act()
|
||||
all_clockwork_objects += src
|
||||
GLOB.all_clockwork_objects += src
|
||||
|
||||
/obj/item/clothing/gloves/clockwork/Destroy()
|
||||
all_clockwork_objects -= src
|
||||
GLOB.all_clockwork_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/gloves/clockwork/ratvar_act()
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 100, bio = 100, rad = 100, fire = 100, acid = 100)
|
||||
flags |= STOPSPRESSUREDMAGE
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT
|
||||
@@ -181,17 +181,17 @@
|
||||
/obj/item/clothing/shoes/clockwork/New()
|
||||
..()
|
||||
ratvar_act()
|
||||
all_clockwork_objects += src
|
||||
GLOB.all_clockwork_objects += src
|
||||
|
||||
/obj/item/clothing/shoes/clockwork/Destroy()
|
||||
all_clockwork_objects -= src
|
||||
GLOB.all_clockwork_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/shoes/clockwork/negates_gravity()
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/shoes/clockwork/ratvar_act()
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
flags |= NOSLIP
|
||||
else
|
||||
flags &= NOSLIP
|
||||
|
||||
@@ -113,11 +113,11 @@
|
||||
charge_delay = 2
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer/ratvar_act()
|
||||
if(nezbere_invoked)
|
||||
if(GLOB.nezbere_invoked)
|
||||
charge_rate = 1250
|
||||
else
|
||||
charge_rate = initial(charge_rate)
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
uses_power = FALSE
|
||||
speed_multiplier = initial(speed_multiplier) * 0.25
|
||||
else
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
/obj/item/clockwork/clockwork_proselytizer/proc/can_use_power(amount)
|
||||
if(amount == RATVAR_POWER_CHECK)
|
||||
if(ratvar_awakens || !uses_power)
|
||||
if(GLOB.ratvar_awakens || !uses_power)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
var/obj/effect/proc_holder/slab/slab_ability //the slab's current bound ability, for certain scripture
|
||||
var/list/quickbound = list(/datum/clockwork_scripture/ranged_ability/geis_prep, /datum/clockwork_scripture/create_object/replicant, \
|
||||
/datum/clockwork_scripture/create_object/tinkerers_cache) //quickbound scripture, accessed by index
|
||||
var/maximum_quickbound = 5 //how many quickbound scriptures we can have
|
||||
actions_types = list(/datum/action/item_action/clock/hierophant)
|
||||
|
||||
/obj/item/clockwork/slab/starter
|
||||
@@ -51,6 +52,7 @@
|
||||
nonhuman_usable = TRUE
|
||||
quickbound = list(/datum/clockwork_scripture/ranged_ability/judicial_marker, /datum/clockwork_scripture/ranged_ability/linked_vanguard, \
|
||||
/datum/clockwork_scripture/create_object/tinkerers_cache)
|
||||
maximum_quickbound = 6 //we usually have one or two unique scriptures, so if ratvar is up let us bind one more
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/clockwork/slab/cyborg/engineer //five scriptures, plus a proselytizer
|
||||
@@ -81,7 +83,15 @@
|
||||
quickbound = list(/datum/clockwork_scripture/ranged_ability/linked_vanguard, /datum/clockwork_scripture/spatial_gateway, /datum/clockwork_scripture/channeled/volt_void/cyborg)
|
||||
|
||||
/obj/item/clockwork/slab/cyborg/access_display(mob/living/user)
|
||||
to_chat(user, "<span class='warning'>Use the action buttons to recite your limited set of scripture!</span>")
|
||||
if(!GLOB.ratvar_awakens)
|
||||
to_chat(user, "<span class='warning'>Use the action buttons to recite your limited set of scripture!</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/clockwork/slab/cyborg/ratvar_act()
|
||||
..()
|
||||
if(!GLOB.ratvar_awakens)
|
||||
SStgui.close_uis(src)
|
||||
|
||||
/obj/item/clockwork/slab/New()
|
||||
..()
|
||||
@@ -97,7 +107,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/clockwork/slab/ratvar_act()
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
nonhuman_usable = TRUE
|
||||
else
|
||||
nonhuman_usable = initial(nonhuman_usable)
|
||||
@@ -119,7 +129,7 @@
|
||||
return
|
||||
var/servants = 0
|
||||
var/production_slowdown = 0
|
||||
for(var/mob/living/M in living_mob_list)
|
||||
for(var/mob/living/M in GLOB.living_mob_list)
|
||||
if(is_servant_of_ratvar(M) && (ishuman(M) || issilicon(M)))
|
||||
servants++
|
||||
if(servants > SCRIPT_SERVANT_REQ)
|
||||
@@ -149,11 +159,11 @@
|
||||
continue
|
||||
var/datum/clockwork_scripture/quickbind_slot = quickbound[i]
|
||||
to_chat(user, "<b>Quickbind</b> button: <span class='[get_component_span(initial(quickbind_slot.primary_component))]'>[initial(quickbind_slot.name)]</span>.")
|
||||
if(clockwork_caches) //show components on examine
|
||||
if(GLOB.clockwork_caches) //show components on examine
|
||||
to_chat(user, "<b>Stored components (with global cache):</b>")
|
||||
for(var/i in stored_components)
|
||||
to_chat(user, "<span class='[get_component_span(i)]_small'><i>[get_component_name(i)][i != REPLICANT_ALLOY ? "s":""]:</i> <b>[stored_components[i]]</b> \
|
||||
(<b>[stored_components[i] + clockwork_component_cache[i]]</b>)</span>")
|
||||
(<b>[stored_components[i] + GLOB.clockwork_component_cache[i]]</b>)</span>")
|
||||
else
|
||||
to_chat(user, "<b>Stored components:</b>")
|
||||
for(var/i in stored_components)
|
||||
@@ -195,9 +205,9 @@
|
||||
if(!C.component_id)
|
||||
return 0
|
||||
user.visible_message("<span class='notice'>[user] inserts [C] into [src].</span>", "<span class='notice'>You insert [C] into [src]\
|
||||
[clockwork_caches ? ", where it is added to the global cache":""].</span>")
|
||||
if(clockwork_caches)
|
||||
clockwork_component_cache[C.component_id]++
|
||||
[GLOB.clockwork_caches ? ", where it is added to the global cache":""].</span>")
|
||||
if(GLOB.clockwork_caches)
|
||||
GLOB.clockwork_component_cache[C.component_id]++
|
||||
update_slab_info()
|
||||
else
|
||||
stored_components[C.component_id]++
|
||||
@@ -207,11 +217,15 @@
|
||||
return 1
|
||||
else if(istype(I, /obj/item/clockwork/slab) && ratvarian)
|
||||
var/obj/item/clockwork/slab/S = I
|
||||
var/needs_update = FALSE
|
||||
for(var/i in stored_components)
|
||||
stored_components[i] += S.stored_components[i]
|
||||
S.stored_components[i] = 0
|
||||
update_slab_info(src)
|
||||
update_slab_info(S)
|
||||
if(S.stored_components[i])
|
||||
needs_update = TRUE
|
||||
if(needs_update)
|
||||
update_slab_info(src)
|
||||
update_slab_info(S)
|
||||
user.visible_message("<span class='notice'>[user] empties [src] into [S].</span>", "<span class='notice'>You transfer your slab's components into [S].</span>")
|
||||
else
|
||||
return ..()
|
||||
@@ -265,7 +279,7 @@
|
||||
ui_interact(user)
|
||||
return TRUE
|
||||
|
||||
/obj/item/clockwork/slab/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = inventory_state)
|
||||
/obj/item/clockwork/slab/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "clockwork_slab", name, 800, 420, master_ui, state)
|
||||
@@ -282,7 +296,7 @@
|
||||
var/initial_tier = initial(scripture.tier)
|
||||
if(initial_tier != SCRIPTURE_PERIPHERAL)
|
||||
var/list/tiers_of_scripture = scripture_unlock_check()
|
||||
if(!ratvar_awakens && !no_cost && !tiers_of_scripture[initial_tier])
|
||||
if(!GLOB.ratvar_awakens && !no_cost && !tiers_of_scripture[initial_tier])
|
||||
to_chat(user, "<span class='warning'>That scripture is not unlocked, and cannot be recited!</span>")
|
||||
return FALSE
|
||||
var/datum/clockwork_scripture/scripture_to_recite = new scripture
|
||||
@@ -294,7 +308,7 @@
|
||||
//Guide to Serving Ratvar
|
||||
/obj/item/clockwork/slab/proc/recollection()
|
||||
var/list/textlist = list("If you're seeing this, file a bug report.")
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
textlist = list("<font color=#BE8700 size=3><b>")
|
||||
for(var/i in 1 to 100)
|
||||
textlist += "HONOR RATVAR "
|
||||
@@ -302,7 +316,7 @@
|
||||
else
|
||||
var/servants = 0
|
||||
var/production_time = SLAB_PRODUCTION_TIME
|
||||
for(var/mob/living/M in living_mob_list)
|
||||
for(var/mob/living/M in GLOB.living_mob_list)
|
||||
if(is_servant_of_ratvar(M) && (ishuman(M) || issilicon(M)))
|
||||
servants++
|
||||
if(servants > SCRIPT_SERVANT_REQ)
|
||||
@@ -358,11 +372,12 @@
|
||||
The remaining functions are several buttons in the top left while holding the slab.<br>From left to right, they are:<br>\
|
||||
<b><font color=#DAAA18>Hierophant Network</font></b>, which allows communication to other Servants.<br>")
|
||||
if(LAZYLEN(quickbound))
|
||||
for(var/i in 1 to quickbound.len)
|
||||
if(!quickbound[i])
|
||||
continue
|
||||
var/datum/clockwork_scripture/quickbind_slot = quickbound[i]
|
||||
textlist += "A <b>Quickbind</b> slot, currently set to <b><font color=[get_component_color_bright(initial(quickbind_slot.primary_component))]>[initial(quickbind_slot.name)]</font></b>.<br>"
|
||||
for(var/i in 1 to maximum_quickbound)
|
||||
if(LAZYLEN(quickbound) < i || !quickbound[i])
|
||||
textlist += "A <b>Quickbind</b> slot, currently set to <b><font color=#BE8700>Nothing</font></b>.<br>"
|
||||
else
|
||||
var/datum/clockwork_scripture/quickbind_slot = quickbound[i]
|
||||
textlist += "A <b>Quickbind</b> slot, currently set to <b><font color=[get_component_color_bright(initial(quickbind_slot.primary_component))]>[initial(quickbind_slot.name)]</font></b>.<br>"
|
||||
textlist += "<br>\
|
||||
Examine the slab or swap to Recital to check the number of components it has available.<br><br>\
|
||||
\
|
||||
@@ -379,9 +394,9 @@
|
||||
temp_data += " "
|
||||
else
|
||||
temp_data += " ("
|
||||
if(clockwork_caches) //if we have caches, display what's in the global cache
|
||||
for(var/i in clockwork_component_cache)
|
||||
temp_data += "<font color=[get_component_color_bright(i)]>[get_component_acronym(i)] <b>[data["components"][i] + clockwork_component_cache[i]]</b></font>"
|
||||
if(GLOB.clockwork_caches) //if we have caches, display what's in the global cache
|
||||
for(var/i in GLOB.clockwork_component_cache)
|
||||
temp_data += "<font color=[get_component_color_bright(i)]>[get_component_acronym(i)] <b>[data["components"][i] + GLOB.clockwork_component_cache[i]]</b></font>"
|
||||
if(i != HIEROPHANT_ANSIBLE)
|
||||
temp_data += " "
|
||||
else
|
||||
@@ -411,8 +426,8 @@
|
||||
generate_all_scripture()
|
||||
|
||||
data["scripture"] = list()
|
||||
for(var/s in all_scripture)
|
||||
var/datum/clockwork_scripture/S = all_scripture[s]
|
||||
for(var/s in GLOB.all_scripture)
|
||||
var/datum/clockwork_scripture/S = GLOB.all_scripture[s]
|
||||
if(S.tier == selected_scripture) //display only scriptures of the selected tier
|
||||
var/scripture_color = get_component_color_bright(S.primary_component)
|
||||
var/list/temp_info = list("name" = "<font color=[scripture_color]><b>[S.name]</b></font>",
|
||||
@@ -456,10 +471,10 @@
|
||||
selected_scripture = params["category"]
|
||||
if("component")
|
||||
var/list/components = list("Random Components")
|
||||
for(var/i in clockwork_component_cache)
|
||||
for(var/i in GLOB.clockwork_component_cache)
|
||||
var/cache_components = 0
|
||||
if(clockwork_caches)
|
||||
cache_components = clockwork_component_cache[i]
|
||||
if(GLOB.clockwork_caches)
|
||||
cache_components = GLOB.clockwork_component_cache[i]
|
||||
components["[get_component_name(i)] [(cache_components + stored_components[i])]"] = i
|
||||
var/input_component = input("Choose a component type.", "Target Component") as null|anything in components
|
||||
if(input_component && !..())
|
||||
@@ -474,8 +489,8 @@
|
||||
quickbound[found_index] = null //otherwise, leave it as a null so the scripture maintains position
|
||||
update_quickbind()
|
||||
else
|
||||
var/target_index = input("Position of [initial(path.name)], 1 to 5?", "Input") as num|null
|
||||
if(isnum(target_index) && target_index > 0 && target_index < 6 && !..())
|
||||
var/target_index = input("Position of [initial(path.name)], 1 to [maximum_quickbound]?", "Input") as num|null
|
||||
if(isnum(target_index) && target_index > 0 && target_index <= maximum_quickbound && !..())
|
||||
var/datum/clockwork_scripture/S
|
||||
if(LAZYLEN(quickbound) >= target_index)
|
||||
S = quickbound[target_index]
|
||||
@@ -488,6 +503,9 @@
|
||||
return
|
||||
while(LAZYLEN(quickbound) < index)
|
||||
quickbound += null
|
||||
var/datum/clockwork_scripture/quickbind_slot = GLOB.all_scripture[quickbound[index]]
|
||||
if(quickbind_slot && !quickbind_slot.quickbind)
|
||||
return //we can't unbind things we can't normally bind
|
||||
quickbound[index] = scripture
|
||||
update_quickbind()
|
||||
|
||||
@@ -500,7 +518,7 @@
|
||||
continue
|
||||
var/datum/action/item_action/clock/quickbind/Q = new /datum/action/item_action/clock/quickbind(src)
|
||||
Q.scripture_index = i
|
||||
var/datum/clockwork_scripture/quickbind_slot = all_scripture[quickbound[i]]
|
||||
var/datum/clockwork_scripture/quickbind_slot = GLOB.all_scripture[quickbound[i]]
|
||||
Q.name = "[quickbind_slot.name] ([Q.scripture_index])"
|
||||
var/list/temp_desc = list()
|
||||
for(var/c in quickbind_slot.consumed_components) //show how much the bound scripture costs
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
|
||||
/obj/item/clothing/glasses/judicial_visor/New()
|
||||
..()
|
||||
all_clockwork_objects += src
|
||||
GLOB.all_clockwork_objects += src
|
||||
blaster = new(src)
|
||||
blaster.visor = src
|
||||
|
||||
/obj/item/clothing/glasses/judicial_visor/Destroy()
|
||||
all_clockwork_objects -= src
|
||||
GLOB.all_clockwork_objects -= src
|
||||
if(blaster.ranged_ability_user)
|
||||
blaster.remove_ranged_ability()
|
||||
blaster.visor = null
|
||||
@@ -131,7 +131,7 @@
|
||||
continue
|
||||
V.recharging = TRUE //To prevent exploiting multiple visors to bypass the cooldown
|
||||
V.update_status()
|
||||
addtimer(CALLBACK(V, /obj/item/clothing/glasses/judicial_visor.proc/recharge_visor, ranged_ability_user), (ratvar_awakens ? visor.recharge_cooldown*0.1 : visor.recharge_cooldown) * 2)
|
||||
addtimer(CALLBACK(V, /obj/item/clothing/glasses/judicial_visor.proc/recharge_visor, ranged_ability_user), (GLOB.ratvar_awakens ? visor.recharge_cooldown*0.1 : visor.recharge_cooldown) * 2)
|
||||
clockwork_say(ranged_ability_user, text2ratvar("Kneel, heathens!"))
|
||||
ranged_ability_user.visible_message("<span class='warning'>[ranged_ability_user]'s judicial visor fires a stream of energy at [target], creating a strange mark!</span>", "<span class='heavy_brass'>You direct [visor]'s power to [target]. You must wait for some time before doing this again.</span>")
|
||||
var/turf/targetturf = get_turf(target)
|
||||
@@ -139,7 +139,7 @@
|
||||
add_logs(ranged_ability_user, targetturf, "created a judicial marker")
|
||||
ranged_ability_user.update_action_buttons_icon()
|
||||
ranged_ability_user.update_inv_glasses()
|
||||
addtimer(CALLBACK(visor, /obj/item/clothing/glasses/judicial_visor.proc/recharge_visor, ranged_ability_user), ratvar_awakens ? visor.recharge_cooldown*0.1 : visor.recharge_cooldown)//Cooldown is reduced by 10x if Ratvar is up
|
||||
addtimer(CALLBACK(visor, /obj/item/clothing/glasses/judicial_visor.proc/recharge_visor, ranged_ability_user), GLOB.ratvar_awakens ? visor.recharge_cooldown*0.1 : visor.recharge_cooldown)//Cooldown is reduced by 10x if Ratvar is up
|
||||
remove_ranged_ability()
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/clockwork/ratvarian_spear/ratvar_act()
|
||||
if(ratvar_awakens) //If Ratvar is alive, the spear is extremely powerful
|
||||
if(GLOB.ratvar_awakens) //If Ratvar is alive, the spear is extremely powerful
|
||||
force = 25
|
||||
throwforce = 50
|
||||
armour_penetration = 10
|
||||
@@ -40,7 +40,7 @@
|
||||
timerid = addtimer(CALLBACK(src, .proc/break_spear), RATVARIAN_SPEAR_DURATION, TIMER_STOPPABLE)
|
||||
|
||||
/obj/item/clockwork/ratvarian_spear/cyborg/ratvar_act() //doesn't break!
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
force = 25
|
||||
throwforce = 50
|
||||
armour_penetration = 10
|
||||
|
||||
@@ -18,21 +18,20 @@
|
||||
The purpose of your existence is to further the goals of the servants and Ratvar himself. Above all else, serve Ratvar.</b>"
|
||||
new_mob_message = "<span class='brass'>The soul vessel emits a jet of steam before its cogwheel smooths out.</span>"
|
||||
dead_message = "<span class='deadsay'>Its cogwheel, scratched and dented, lies motionless.</span>"
|
||||
fluff_names = list("Judge", "Guard", "Servant", "Smith", "Auger")
|
||||
possible_names = list("Judge", "Guard", "Servant", "Smith", "Auger")
|
||||
autoping = FALSE
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
force_replace_ai_name = TRUE
|
||||
|
||||
/obj/item/device/mmi/posibrain/soul_vessel/New()
|
||||
/obj/item/device/mmi/posibrain/soul_vessel/Initialize()
|
||||
..()
|
||||
radio.on = 0
|
||||
radio.on = FALSE
|
||||
laws = new /datum/ai_laws/ratvar()
|
||||
braintype = picked_fluff_name
|
||||
all_clockwork_objects += src
|
||||
brainmob.languages_spoken = RATVAR
|
||||
braintype = picked_name
|
||||
GLOB.all_clockwork_objects += src
|
||||
|
||||
/obj/item/device/mmi/posibrain/soul_vessel/Destroy()
|
||||
all_clockwork_objects -= src
|
||||
GLOB.all_clockwork_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/device/mmi/posibrain/soul_vessel/examine(mob/user)
|
||||
@@ -49,14 +48,16 @@
|
||||
/obj/item/device/mmi/posibrain/soul_vessel/attack_self(mob/living/user)
|
||||
if(!is_servant_of_ratvar(user))
|
||||
to_chat(user, "<span class='warning'>You fiddle around with [src], to no avail.</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
..()
|
||||
|
||||
/obj/item/device/mmi/posibrain/soul_vessel/attack(mob/living/target, mob/living/carbon/human/user)
|
||||
if(!is_servant_of_ratvar(user) || !ishuman(target))
|
||||
..()
|
||||
return
|
||||
if(used || (brainmob && brainmob.key))
|
||||
if(QDELETED(brainmob))
|
||||
return
|
||||
if(brainmob.key)
|
||||
to_chat(user, "<span class='nezbere'>\"This vessel is filled, friend. Provide it with a body.\"</span>")
|
||||
return
|
||||
if(is_servant_of_ratvar(target))
|
||||
@@ -95,8 +96,8 @@
|
||||
if(!prev_fakedeath)
|
||||
H.status_flags &= ~FAKEDEATH
|
||||
H.apply_status_effect(STATUS_EFFECT_SIGILMARK) //let them be affected by vitality matrices
|
||||
picked_fluff_name = "Slave"
|
||||
braintype = picked_fluff_name
|
||||
picked_name = "Slave"
|
||||
braintype = picked_name
|
||||
brainmob.timeofhostdeath = H.timeofdeath
|
||||
user.visible_message("<span class='warning'>[user] presses [src] to [H]'s head, ripping through the skull and carefully extracting the brain!</span>", \
|
||||
"<span class='brass'>You extract [H]'s consciousness from [H.p_their()] body, trapping it in the soul vessel.</span>")
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
/obj/item/clothing/glasses/wraith_spectacles/New()
|
||||
..()
|
||||
all_clockwork_objects += src
|
||||
GLOB.all_clockwork_objects += src
|
||||
|
||||
/obj/item/clothing/glasses/wraith_spectacles/Destroy()
|
||||
all_clockwork_objects -= src
|
||||
GLOB.all_clockwork_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/glasses/wraith_spectacles/attack_self(mob/user)
|
||||
@@ -38,7 +38,7 @@
|
||||
if(blind_cultist(H))
|
||||
return
|
||||
if(is_servant_of_ratvar(H))
|
||||
to_chat(H, "<span class='heavy_brass'>You push the spectacles down, and all is revealed to you.[ratvar_awakens ? "" : " Your eyes begin to itch - you cannot do this for long."]</span>")
|
||||
to_chat(H, "<span class='heavy_brass'>You push the spectacles down, and all is revealed to you.[GLOB.ratvar_awakens ? "" : " Your eyes begin to itch - you cannot do this for long."]</span>")
|
||||
var/datum/status_effect/wraith_spectacles/WS = H.has_status_effect(STATUS_EFFECT_WRAITHSPECS)
|
||||
if(WS)
|
||||
WS.apply_eye_damage(H)
|
||||
@@ -57,13 +57,13 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/glasses/wraith_spectacles/proc/set_vision_vars(update_vision)
|
||||
invis_view = SEE_INVISIBLE_LIVING
|
||||
lighting_alpha = null
|
||||
tint = 0
|
||||
vision_flags = NONE
|
||||
darkness_view = 2
|
||||
if(!up)
|
||||
if(is_servant_of_ratvar(loc))
|
||||
invis_view = SEE_INVISIBLE_NOLIGHTING
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
vision_flags = SEE_MOBS | SEE_TURFS | SEE_OBJS
|
||||
darkness_view = 3
|
||||
else
|
||||
@@ -83,7 +83,7 @@
|
||||
return
|
||||
set_vision_vars(TRUE)
|
||||
if(is_servant_of_ratvar(user))
|
||||
to_chat(user, "<span class='heavy_brass'>As you put on the spectacles, all is revealed to you.[ratvar_awakens ? "" : " Your eyes begin to itch - you cannot do this for long."]</span>")
|
||||
to_chat(user, "<span class='heavy_brass'>As you put on the spectacles, all is revealed to you.[GLOB.ratvar_awakens ? "" : " Your eyes begin to itch - you cannot do this for long."]</span>")
|
||||
var/datum/status_effect/wraith_spectacles/WS = user.has_status_effect(STATUS_EFFECT_WRAITHSPECS)
|
||||
if(WS)
|
||||
WS.apply_eye_damage(user)
|
||||
@@ -137,10 +137,10 @@
|
||||
var/mob/living/carbon/human/H = owner
|
||||
var/glasses_right = istype(H.glasses, /obj/item/clothing/glasses/wraith_spectacles)
|
||||
var/obj/item/clothing/glasses/wraith_spectacles/WS = H.glasses
|
||||
if(glasses_right && !WS.up && !ratvar_awakens)
|
||||
if(glasses_right && !WS.up && !GLOB.ratvar_awakens)
|
||||
apply_eye_damage(H)
|
||||
else
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
H.cure_nearsighted()
|
||||
H.cure_blind()
|
||||
H.adjust_eye_damage(-eye_damage_done)
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
unsuitable_atmos_damage = 0
|
||||
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) //Robotic
|
||||
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
|
||||
languages_spoken = RATVAR
|
||||
languages_understood = HUMAN|RATVAR
|
||||
healable = FALSE
|
||||
del_on_death = TRUE
|
||||
speak_emote = list("clanks", "clinks", "clunks", "clangs")
|
||||
verb_ask = "requests"
|
||||
verb_exclaim = "proclaims"
|
||||
verb_yell = "harangues"
|
||||
initial_languages = list(/datum/language/common, /datum/language/ratvar)
|
||||
only_speaks_language = /datum/language/ratvar
|
||||
bubble_icon = "clock"
|
||||
light_color = "#E42742"
|
||||
death_sound = 'sound/magic/clockwork/anima_fragment_death.ogg'
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/fragment/Life()
|
||||
..()
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
adjustHealth(-5)
|
||||
else if(movement_delay_time > world.time)
|
||||
adjustHealth(-0.2)
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/fragment/Stat()
|
||||
..()
|
||||
if(statpanel("Status") && movement_delay_time > world.time && !ratvar_awakens)
|
||||
if(statpanel("Status") && movement_delay_time > world.time && !GLOB.ratvar_awakens)
|
||||
stat(null, "Movement delay(seconds): [max(round((movement_delay_time - world.time)*0.1, 0.1), 0)]")
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/fragment/death(gibbed)
|
||||
@@ -59,7 +59,7 @@
|
||||
UnarmedAttack(L)
|
||||
attacktext = previousattacktext
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
if(!ratvar_awakens)
|
||||
if(!GLOB.ratvar_awakens)
|
||||
adjustHealth(4)
|
||||
adjust_movement_delay(10) //with the above damage, total of 20 movement delay plus speed = 0 due to damage
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/fragment/movement_delay()
|
||||
. = ..()
|
||||
if(movement_delay_time > world.time && !ratvar_awakens)
|
||||
if(movement_delay_time > world.time && !GLOB.ratvar_awakens)
|
||||
. += min((movement_delay_time - world.time) * 0.1, 10) //the more delay we have, the slower we go
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/fragment/adjustHealth(amount)
|
||||
@@ -77,7 +77,7 @@
|
||||
adjust_movement_delay(amount*2.5)
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/fragment/proc/adjust_movement_delay(amount)
|
||||
if(ratvar_awakens) //if ratvar is up we ignore movement delay
|
||||
if(GLOB.ratvar_awakens) //if ratvar is up we ignore movement delay
|
||||
movement_delay_time = 0
|
||||
else if(movement_delay_time > world.time)
|
||||
movement_delay_time = movement_delay_time + amount
|
||||
|
||||
@@ -41,10 +41,10 @@
|
||||
emerge_from_host(FALSE, TRUE)
|
||||
unbind_from_host()
|
||||
return
|
||||
if(!ratvar_awakens && host.stat == DEAD)
|
||||
if(!GLOB.ratvar_awakens && host.stat == DEAD)
|
||||
death()
|
||||
return
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
adjustHealth(-50)
|
||||
else
|
||||
adjustHealth(-10)
|
||||
@@ -55,7 +55,7 @@
|
||||
to_chat(host, "<span class='userdanger'>Your marauder is now strong enough to come forward again!</span>")
|
||||
recovering = FALSE
|
||||
else
|
||||
if(ratvar_awakens) //If Ratvar is alive, marauders don't need a host and are downright impossible to kill
|
||||
if(GLOB.ratvar_awakens) //If Ratvar is alive, marauders don't need a host and are downright impossible to kill
|
||||
adjustHealth(-5)
|
||||
heal_host()
|
||||
else if(host)
|
||||
@@ -107,7 +107,7 @@
|
||||
if(iscarbon(host))
|
||||
resulthealth = round((abs(HEALTH_THRESHOLD_DEAD - host.health) / abs(HEALTH_THRESHOLD_DEAD - host.maxHealth)) * 100)
|
||||
stat(null, "Host Health: [resulthealth]%")
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
stat(null, "You are [recovering ? "un" : ""]able to deploy!")
|
||||
else
|
||||
if(resulthealth > MARAUDER_EMERGE_THRESHOLD)
|
||||
@@ -148,7 +148,7 @@
|
||||
var/resulthealth = round((host.health / host.maxHealth) * 100, 0.5)
|
||||
if(iscarbon(host))
|
||||
resulthealth = round((abs(HEALTH_THRESHOLD_DEAD - host.health) / abs(HEALTH_THRESHOLD_DEAD - host.maxHealth)) * 100)
|
||||
if(ratvar_awakens || resulthealth <= MARAUDER_EMERGE_THRESHOLD)
|
||||
if(GLOB.ratvar_awakens || resulthealth <= MARAUDER_EMERGE_THRESHOLD)
|
||||
new /obj/effect/overlay/temp/heal(host.loc, "#AF0AAF")
|
||||
host.heal_ordered_damage(4, damage_heal_order)
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
hud_used.healths.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#AF0AAF'>[round((health / maxHealth) * 100, 0.5)]%</font>"
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/marauder/proc/update_stats()
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
speed = 0
|
||||
melee_damage_lower = 20
|
||||
melee_damage_upper = 20
|
||||
@@ -261,7 +261,7 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/clockwork/marauder/proc/blockOrCounter(mob/target, atom/textobject)
|
||||
if(ratvar_awakens) //if ratvar has woken, we block nearly everything at a very high chance
|
||||
if(GLOB.ratvar_awakens) //if ratvar has woken, we block nearly everything at a very high chance
|
||||
blockchance = 90
|
||||
counterchance = 90
|
||||
if(prob(blockchance))
|
||||
@@ -284,7 +284,7 @@
|
||||
counterchance = min(counterchance + initial(counterchance), 100)
|
||||
else
|
||||
blockchance = min(blockchance + initial(blockchance), 100)
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
blockchance = 90
|
||||
counterchance = 90
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
message = "<span class='sevtug_small'>\"[message]\"</span>" //Processed output
|
||||
to_chat(src, "[name_part]<span class='sevtug_small'>:</span> [message]")
|
||||
to_chat(host, "[name_part]<span class='sevtug_small'>:</span> [message]")
|
||||
for(var/M in mob_list)
|
||||
for(var/M in GLOB.mob_list)
|
||||
if(isobserver(M))
|
||||
var/link = FOLLOW_LINK(M, src)
|
||||
to_chat(M, "[link] [name_part] <span class='sevtug_small'>(to</span> <span class='sevtug'>[findtextEx(host.name, host.real_name) ? "[host.name]" : "[host.real_name] (as [host.name])"]</span><span class='sevtug_small'>):</span> [message] ")
|
||||
@@ -329,7 +329,7 @@
|
||||
if(!host)
|
||||
to_chat(src, "<span class='warning'>You don't have a host!</span>")
|
||||
return FALSE
|
||||
if(!ratvar_awakens)
|
||||
if(!GLOB.ratvar_awakens)
|
||||
var/resulthealth = round((host.health / host.maxHealth) * 100, 0.5)
|
||||
if(iscarbon(host))
|
||||
resulthealth = round((abs(HEALTH_THRESHOLD_DEAD - host.health) / abs(HEALTH_THRESHOLD_DEAD - host.maxHealth)) * 100)
|
||||
@@ -421,7 +421,7 @@
|
||||
message = "<span class='sevtug_small'>\"[message]\"</span>" //Processed output
|
||||
to_chat(owner, "[name_part]<span class='sevtug_small'>:</span> [message]")
|
||||
to_chat(linked_marauder, "[name_part]<span class='sevtug_small'>:</span> [message]")
|
||||
for(var/M in mob_list)
|
||||
for(var/M in GLOB.mob_list)
|
||||
if(isobserver(M))
|
||||
var/link = FOLLOW_LINK(M, src)
|
||||
to_chat(M, "[link] [name_part] <span class='sevtug_small'>(to</span> <span class='sevtug'>[linked_marauder] ([linked_marauder.true_name])</span><span class='sevtug_small'>):</span> [message]")
|
||||
|
||||
@@ -58,7 +58,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
|
||||
to_chat(invoker, "<span class='warning'>[slab] refuses to work, displaying the message: \"[slab.busy]!\"</span>")
|
||||
return FALSE
|
||||
slab.busy = "Invocation ([name]) in progress"
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
channel_time *= 0.5 //if ratvar has awoken, half channel time and no cost
|
||||
else if(!slab.no_cost)
|
||||
for(var/i in consumed_components)
|
||||
@@ -68,7 +68,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
|
||||
slab.stored_components[i]--
|
||||
used_slab_components[i]++
|
||||
else
|
||||
clockwork_component_cache[i]--
|
||||
GLOB.clockwork_component_cache[i]--
|
||||
used_cache_components[i]++
|
||||
update_slab_info()
|
||||
channel_time *= slab.speed_multiplier
|
||||
@@ -78,14 +78,14 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
|
||||
if(slab)
|
||||
slab.stored_components[i] += consumed_components[i]
|
||||
else //if we can't find a slab add to the global cache
|
||||
clockwork_component_cache[i] += consumed_components[i]
|
||||
GLOB.clockwork_component_cache[i] += consumed_components[i]
|
||||
for(var/i in used_cache_components)
|
||||
if(used_cache_components[i])
|
||||
clockwork_component_cache[i] += consumed_components[i]
|
||||
GLOB.clockwork_component_cache[i] += consumed_components[i]
|
||||
update_slab_info()
|
||||
else
|
||||
successful = TRUE
|
||||
if(slab && !slab.no_cost && !ratvar_awakens) //if the slab exists and isn't debug and ratvar isn't up, log the scripture as being used
|
||||
if(slab && !slab.no_cost && !GLOB.ratvar_awakens) //if the slab exists and isn't debug and ratvar isn't up, log the scripture as being used
|
||||
feedback_add_details("clockcult_scripture_recited", name)
|
||||
if(slab)
|
||||
slab.busy = null
|
||||
@@ -102,12 +102,12 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
|
||||
|
||||
/datum/clockwork_scripture/proc/has_requirements() //if we have the components and invokers to do it
|
||||
var/checked_penalty = FALSE
|
||||
if(!ratvar_awakens && !slab.no_cost)
|
||||
if(!GLOB.ratvar_awakens && !slab.no_cost)
|
||||
checked_penalty = check_offstation_penalty()
|
||||
var/component_printout = "<span class='warning'>You lack the components to recite this piece of scripture!"
|
||||
var/failed = FALSE
|
||||
for(var/i in consumed_components)
|
||||
var/cache_components = clockwork_caches ? clockwork_component_cache[i] : 0
|
||||
var/cache_components = GLOB.clockwork_caches ? GLOB.clockwork_component_cache[i] : 0
|
||||
var/total_components = slab.stored_components[i] + cache_components
|
||||
if(consumed_components[i] && total_components < consumed_components[i])
|
||||
component_printout += "\nYou have <span class='[get_component_span(i)]_small'><b>[total_components]/[consumed_components[i]]</b> \
|
||||
@@ -117,7 +117,7 @@ Judgement: 12 servants, 5 caches, 300 CV, and any existing AIs are converted or
|
||||
component_printout += "</span>"
|
||||
to_chat(invoker, component_printout)
|
||||
return FALSE
|
||||
if(multiple_invokers_used && !multiple_invokers_optional && !ratvar_awakens && !slab.no_cost)
|
||||
if(multiple_invokers_used && !multiple_invokers_optional && !GLOB.ratvar_awakens && !slab.no_cost)
|
||||
var/nearby_servants = 0
|
||||
for(var/mob/living/L in range(1, get_turf(invoker)))
|
||||
if(is_servant_of_ratvar(L) && L.stat == CONSCIOUS && L.can_speak_vocal())
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
return TRUE
|
||||
if(is_type_in_typecache(I, ratvarian_armor_typecache))
|
||||
return FALSE
|
||||
if(!ratvar_awakens && is_type_in_typecache(I, better_armor_typecache))
|
||||
if(!GLOB.ratvar_awakens && is_type_in_typecache(I, better_armor_typecache))
|
||||
return FALSE
|
||||
return user.dropItemToGround(I)
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
sort_priority = 3
|
||||
|
||||
/datum/clockwork_scripture/memory_allocation/check_special_requirements()
|
||||
for(var/mob/living/simple_animal/hostile/clockwork/marauder/M in all_clockwork_mobs)
|
||||
for(var/mob/living/simple_animal/hostile/clockwork/marauder/M in GLOB.all_clockwork_mobs)
|
||||
if(M.host == invoker)
|
||||
to_chat(invoker, "<span class='warning'>You can only house one marauder at a time!</span>")
|
||||
return FALSE
|
||||
@@ -135,7 +135,7 @@
|
||||
if(!check_special_requirements())
|
||||
return FALSE
|
||||
to_chat(invoker, "<span class='warning'>The tendril shivers slightly as it selects a marauder...</span>")
|
||||
var/list/marauder_candidates = pollCandidates("Do you want to play as the clockwork marauder of [invoker.real_name]?", ROLE_SERVANT_OF_RATVAR, null, FALSE, 50)
|
||||
var/list/marauder_candidates = pollCandidates("Do you want to play as the clockwork marauder of [invoker.real_name]?", ROLE_SERVANT_OF_RATVAR, null, FALSE, 50, POLL_IGNORE_CLOCKWORK_MARAUDER)
|
||||
if(!check_special_requirements())
|
||||
return FALSE
|
||||
if(!marauder_candidates.len)
|
||||
@@ -281,13 +281,13 @@
|
||||
|
||||
/datum/clockwork_scripture/create_object/tinkerers_daemon/check_special_requirements()
|
||||
var/servants = 0
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
for(var/mob/living/L in GLOB.living_mob_list)
|
||||
if(is_servant_of_ratvar(L))
|
||||
servants++
|
||||
if(servants * 0.2 < clockwork_daemons)
|
||||
if(servants * 0.2 < GLOB.clockwork_daemons)
|
||||
to_chat(invoker, "<span class='nezbere'>\"Daemons are already disabled, making more of them would be a waste.\"</span>")
|
||||
return FALSE
|
||||
if(servants * 0.2 < clockwork_daemons+1)
|
||||
if(servants * 0.2 < GLOB.clockwork_daemons+1)
|
||||
to_chat(invoker, "<span class='nezbere'>\"This daemon would be useless, friend.\"</span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -17,11 +17,20 @@
|
||||
timeout_time = 50
|
||||
|
||||
/datum/clockwork_scripture/ranged_ability/linked_vanguard/check_special_requirements()
|
||||
if(islist(invoker.stun_absorption) && invoker.stun_absorption["vanguard"] && invoker.stun_absorption["vanguard"]["end_time"] > world.time)
|
||||
if(!GLOB.ratvar_awakens && islist(invoker.stun_absorption) && invoker.stun_absorption["vanguard"] && invoker.stun_absorption["vanguard"]["end_time"] > world.time)
|
||||
to_chat(invoker, "<span class='warning'>You are already shielded by a Vanguard!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/clockwork_scripture/ranged_ability/linked_vanguard/scripture_effects()
|
||||
if(GLOB.ratvar_awakens) //hey, ratvar's up! give everybody stun immunity.
|
||||
for(var/mob/living/L in view(7, get_turf(invoker)))
|
||||
if(L.stat != DEAD && is_servant_of_ratvar(L))
|
||||
L.apply_status_effect(STATUS_EFFECT_VANGUARD)
|
||||
CHECK_TICK
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
//Judicial Marker: places a judicial marker at a target location
|
||||
/datum/clockwork_scripture/ranged_ability/judicial_marker
|
||||
name = "Judicial Marker"
|
||||
@@ -40,3 +49,4 @@
|
||||
/datum/clockwork_scripture/channeled/volt_void/cyborg
|
||||
quickbind_desc = "Allows you to fire energy rays at target locations using your own power. Failing to fire causes backlash.<br><b>Maximum 4 chants.</b>"
|
||||
tier = SCRIPTURE_PERIPHERAL
|
||||
quickbind = FALSE
|
||||
|
||||
@@ -74,13 +74,19 @@
|
||||
quickbind_desc = "Allows you to temporarily absorb stuns. All stuns absorbed will affect you when disabled."
|
||||
|
||||
/datum/clockwork_scripture/vanguard/check_special_requirements()
|
||||
if(islist(invoker.stun_absorption) && invoker.stun_absorption["vanguard"] && invoker.stun_absorption["vanguard"]["end_time"] > world.time)
|
||||
if(!GLOB.ratvar_awakens && islist(invoker.stun_absorption) && invoker.stun_absorption["vanguard"] && invoker.stun_absorption["vanguard"]["end_time"] > world.time)
|
||||
to_chat(invoker, "<span class='warning'>You are already shielded by a Vanguard!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/clockwork_scripture/vanguard/scripture_effects()
|
||||
invoker.apply_status_effect(STATUS_EFFECT_VANGUARD)
|
||||
if(GLOB.ratvar_awakens)
|
||||
for(var/mob/living/L in view(7, get_turf(invoker)))
|
||||
if(L.stat != DEAD && is_servant_of_ratvar(L))
|
||||
L.apply_status_effect(STATUS_EFFECT_VANGUARD)
|
||||
CHECK_TICK
|
||||
else
|
||||
invoker.apply_status_effect(STATUS_EFFECT_VANGUARD)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -128,8 +134,8 @@
|
||||
|
||||
/datum/clockwork_scripture/ranged_ability/geis_prep/run_scripture()
|
||||
var/servants = 0
|
||||
if(!ratvar_awakens)
|
||||
for(var/mob/living/M in all_clockwork_mobs)
|
||||
if(!GLOB.ratvar_awakens)
|
||||
for(var/mob/living/M in GLOB.all_clockwork_mobs)
|
||||
if(ishuman(M) || issilicon(M))
|
||||
servants++
|
||||
if(servants > SCRIPT_SERVANT_REQ)
|
||||
@@ -159,8 +165,8 @@
|
||||
|
||||
/datum/clockwork_scripture/geis/run_scripture()
|
||||
var/servants = 0
|
||||
if(!ratvar_awakens)
|
||||
for(var/mob/living/M in all_clockwork_mobs)
|
||||
if(!GLOB.ratvar_awakens)
|
||||
for(var/mob/living/M in GLOB.all_clockwork_mobs)
|
||||
if(ishuman(M) || issilicon(M))
|
||||
servants++
|
||||
if(target.buckled)
|
||||
@@ -266,7 +272,7 @@
|
||||
var/static/prev_cost = 0
|
||||
|
||||
/datum/clockwork_scripture/create_object/tinkerers_cache/creation_update()
|
||||
var/cache_cost_increase = min(round(clockwork_caches*0.25), 5)
|
||||
var/cache_cost_increase = min(round(GLOB.clockwork_caches*0.25), 5)
|
||||
if(cache_cost_increase != prev_cost)
|
||||
prev_cost = cache_cost_increase
|
||||
consumed_components = list(BELLIGERENT_EYE = 0, VANGUARD_COGWHEEL = 0, GEIS_CAPACITOR = 0, REPLICANT_ALLOY = 1, HIEROPHANT_ANSIBLE = 0)
|
||||
@@ -279,14 +285,14 @@
|
||||
|
||||
//Wraith Spectacles: Creates a pair of wraith spectacles, which grant xray vision but damage vision slowly.
|
||||
/datum/clockwork_scripture/create_object/wraith_spectacles
|
||||
descname = "Xray Vision Glasses"
|
||||
descname = "Limited Xray Vision Glasses"
|
||||
name = "Wraith Spectacles"
|
||||
desc = "Fabricates a pair of glasses that provides true sight but quickly damage vision, eventually causing blindness if worn for too long."
|
||||
desc = "Fabricates a pair of glasses which grant true sight but cause gradual vision loss."
|
||||
invocations = list("Show the truth of this world to me!")
|
||||
channel_time = 10
|
||||
whispered = TRUE
|
||||
object_path = /obj/item/clothing/glasses/wraith_spectacles
|
||||
creator_message = "<span class='brass'>You form a pair of wraith spectacles, which will grant true sight when worn.</span>"
|
||||
creator_message = "<span class='brass'>You form a pair of wraith spectacles, which grant true sight but cause gradual vision loss.</span>"
|
||||
usage_tip = "\"True sight\" means that you are able to see through walls and in darkness."
|
||||
tier = SCRIPTURE_DRIVER
|
||||
space_allowed = TRUE
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
// JUDGEMENT //
|
||||
///////////////
|
||||
|
||||
//Ark of the Clockwork Justiciar: Creates a Gateway to the Celestial Derelict, either summoning ratvar or proselytizing everything.
|
||||
//Ark of the Clockwork Justiciar: Creates a Gateway to the Celestial Derelict, summoning ratvar.
|
||||
/datum/clockwork_scripture/create_object/ark_of_the_clockwork_justiciar
|
||||
descname = "Structure, Win Condition"
|
||||
name = "Ark of the Clockwork Justiciar"
|
||||
desc = "Tears apart a rift in spacetime to Reebe, the Celestial Derelict, using a massive amount of components.\n\
|
||||
This gateway will either call forth Ratvar from his exile if that is the task He has set you, or proselytize the entire station if it is not."
|
||||
This gateway will, after some time, call forth Ratvar from his exile and massively empower all scriptures and tools."
|
||||
invocations = list("ARMORER! FRIGHT! AMPERAGE! VANGUARD! I CALL UPON YOU!!", \
|
||||
"THE TIME HAS COME FOR OUR MASTER TO BREAK THE CHAINS OF EXILE!!", \
|
||||
"LEND US YOUR AID! ENGINE COMES!!")
|
||||
channel_time = 150
|
||||
consumed_components = list(BELLIGERENT_EYE = 3, VANGUARD_COGWHEEL = 3, GEIS_CAPACITOR = 3, REPLICANT_ALLOY = 3, HIEROPHANT_ANSIBLE = 3)
|
||||
consumed_components = list(BELLIGERENT_EYE = ARK_SUMMON_COST, VANGUARD_COGWHEEL = ARK_SUMMON_COST, GEIS_CAPACITOR = ARK_SUMMON_COST, REPLICANT_ALLOY = ARK_SUMMON_COST, HIEROPHANT_ANSIBLE = ARK_SUMMON_COST)
|
||||
invokers_required = 6
|
||||
multiple_invokers_used = TRUE
|
||||
object_path = /obj/structure/destructible/clockwork/massive/celestial_gateway
|
||||
@@ -22,31 +22,21 @@
|
||||
tier = SCRIPTURE_JUDGEMENT
|
||||
sort_priority = 1
|
||||
|
||||
/datum/clockwork_scripture/create_object/ark_of_the_clockwork_justiciar/New()
|
||||
if(ticker && ticker.mode && ticker.mode.clockwork_objective != CLOCKCULT_GATEWAY)
|
||||
invocations = list("ARMORER! FRIGHT! AMPERAGE! VANGUARD! I CALL UPON YOU!!", \
|
||||
"THIS STATION WILL BE A BEACON OF HOPE IN THE DARKNESS OF SPACE!!", \
|
||||
"HELP US MAKE THIS SHOW ENGINE'S GLORY!!")
|
||||
..()
|
||||
|
||||
/datum/clockwork_scripture/create_object/ark_of_the_clockwork_justiciar/check_special_requirements()
|
||||
if(!slab.no_cost)
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
to_chat(invoker, "<span class='big_brass'>\"I am already here, idiot.\"</span>")
|
||||
return FALSE
|
||||
for(var/obj/structure/destructible/clockwork/massive/celestial_gateway/G in all_clockwork_objects)
|
||||
for(var/obj/structure/destructible/clockwork/massive/celestial_gateway/G in GLOB.all_clockwork_objects)
|
||||
var/area/gate_area = get_area(G)
|
||||
to_chat(invoker, "<span class='userdanger'>There is already a gateway at [gate_area.map_name]!</span>")
|
||||
to_chat(invoker, "<span class='userdanger'>There is already an Ark at [gate_area.map_name]!</span>")
|
||||
return FALSE
|
||||
var/area/A = get_area(invoker)
|
||||
var/turf/T = get_turf(invoker)
|
||||
if(!T || T.z != ZLEVEL_STATION || istype(A, /area/shuttle) || !A.blob_allowed)
|
||||
to_chat(invoker, "<span class='warning'>You must be on the station to activate the Ark!</span>")
|
||||
return FALSE
|
||||
if(clockwork_gateway_activated)
|
||||
if(ticker && ticker.mode && ticker.mode.clockwork_objective != CLOCKCULT_GATEWAY)
|
||||
to_chat(invoker, "<span class='nezbere'>\"Look upon his works. Is it not glorious?\"</span>")
|
||||
else
|
||||
to_chat(invoker, "<span class='warning'>Ratvar's recent banishment renders him too weak to be wrung forth from Reebe!</span>")
|
||||
if(GLOB.clockwork_gateway_activated)
|
||||
to_chat(invoker, "<span class='warning'>Ratvar's recent banishment renders him too weak to be wrung forth from Reebe!</span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
sort_priority = 2
|
||||
|
||||
/datum/clockwork_scripture/invoke_inathneq/check_special_requirements()
|
||||
if(!slab.no_cost && clockwork_generals_invoked["inath-neq"] > world.time)
|
||||
if(!slab.no_cost && GLOB.clockwork_generals_invoked["inath-neq"] > world.time)
|
||||
to_chat(invoker, "<span class='inathneq'>\"[text2ratvar("I cannot lend you my aid yet, champion. Please be careful.")]\"</span>\n\
|
||||
<span class='warning'>Inath-neq has already been invoked recently! You must wait several minutes before calling upon the Resonant Cogwheel.</span>")
|
||||
return FALSE
|
||||
@@ -25,7 +25,7 @@
|
||||
/datum/clockwork_scripture/invoke_inathneq/scripture_effects()
|
||||
new/obj/effect/clockwork/general_marker/inathneq(get_turf(invoker))
|
||||
hierophant_message("<span class='inathneq_large'>[text2ratvar("Vanguard: \"I lend you my aid, champions! Let glory guide your blows!")]\"</span>", FALSE, invoker)
|
||||
clockwork_generals_invoked["inath-neq"] = world.time + CLOCKWORK_GENERAL_COOLDOWN
|
||||
GLOB.clockwork_generals_invoked["inath-neq"] = world.time + CLOCKWORK_GENERAL_COOLDOWN
|
||||
playsound(invoker, 'sound/magic/clockwork/invoke_general.ogg', 50, 0)
|
||||
if(invoker.real_name == "Lucio")
|
||||
clockwork_say(invoker, text2ratvar("Aww, let's break it DOWN!!"))
|
||||
@@ -56,11 +56,11 @@
|
||||
"\"What a waste of my power.\"", "\"I'm sure I could just control these minds instead, but they never ask.\"")
|
||||
|
||||
/datum/clockwork_scripture/invoke_sevtug/check_special_requirements()
|
||||
if(!slab.no_cost && clockwork_generals_invoked["sevtug"] > world.time)
|
||||
if(!slab.no_cost && GLOB.clockwork_generals_invoked["sevtug"] > world.time)
|
||||
to_chat(invoker, "<span class='sevtug'>\"[text2ratvar("Is it really so hard - even for a simpleton like you - to grasp the concept of waiting?")]\"</span>\n\
|
||||
<span class='warning'>Sevtug has already been invoked recently! You must wait several minutes before calling upon the Formless Pariah.</span>")
|
||||
return FALSE
|
||||
if(!slab.no_cost && ratvar_awakens)
|
||||
if(!slab.no_cost && GLOB.ratvar_awakens)
|
||||
to_chat(invoker, "<span class='sevtug'>\"[text2ratvar("Do you really think anything I can do right now will compare to Engine's power?")]\"</span>\n\
|
||||
<span class='warning'>Sevtug will not grant his power while Ratvar's dwarfs his own!</span>")
|
||||
return FALSE
|
||||
@@ -69,11 +69,11 @@
|
||||
/datum/clockwork_scripture/invoke_sevtug/scripture_effects()
|
||||
new/obj/effect/clockwork/general_marker/sevtug(get_turf(invoker))
|
||||
hierophant_message("<span class='sevtug_large'>[text2ratvar("Fright: \"I heed your call, idiots. Get going and use this chance while it lasts!")]\"</span>", FALSE, invoker)
|
||||
clockwork_generals_invoked["sevtug"] = world.time + GLOBAL_CLOCKWORK_GENERAL_COOLDOWN
|
||||
GLOB.clockwork_generals_invoked["sevtug"] = world.time + GLOBAL_CLOCKWORK_GENERAL_COOLDOWN
|
||||
playsound(invoker, 'sound/magic/clockwork/invoke_general.ogg', 50, 0)
|
||||
var/hum = get_sfx('sound/effects/screech.ogg') //like playsound, same sound for everyone affected
|
||||
var/turf/T = get_turf(invoker)
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
|
||||
if(H.z == invoker.z && !is_servant_of_ratvar(H))
|
||||
var/distance = 0
|
||||
distance += get_dist(T, get_turf(H))
|
||||
@@ -118,11 +118,11 @@
|
||||
multiple_invokers_used = TRUE
|
||||
|
||||
/datum/clockwork_scripture/invoke_nezbere/check_special_requirements()
|
||||
if(!slab.no_cost && clockwork_generals_invoked["nezbere"] > world.time)
|
||||
if(!slab.no_cost && GLOB.clockwork_generals_invoked["nezbere"] > world.time)
|
||||
to_chat(invoker, "<span class='nezbere'>\"[text2ratvar("Not just yet, friend. Patience is a virtue.")]\"</span>\n\
|
||||
<span class='warning'>Nezbere has already been invoked recently! You must wait several minutes before calling upon the Brass Eidolon.</span>")
|
||||
return FALSE
|
||||
if(!slab.no_cost && ratvar_awakens)
|
||||
if(!slab.no_cost && GLOB.ratvar_awakens)
|
||||
to_chat(invoker, "<span class='nezbere'>\"[text2ratvar("Our master is here already. You do not require my help, friend.")]\"</span>\n\
|
||||
<span class='warning'>There is no need for Nezbere's assistance while Ratvar is risen!</span>")
|
||||
return FALSE
|
||||
@@ -131,17 +131,19 @@
|
||||
/datum/clockwork_scripture/invoke_nezbere/scripture_effects()
|
||||
new/obj/effect/clockwork/general_marker/nezbere(get_turf(invoker))
|
||||
hierophant_message("<span class='nezbere_large'>[text2ratvar("Armorer: \"I heed your call, champions. May your artifacts bring ruin upon the heathens that oppose our master!")]\"</span>", FALSE, invoker)
|
||||
clockwork_generals_invoked["nezbere"] = world.time + GLOBAL_CLOCKWORK_GENERAL_COOLDOWN
|
||||
GLOB.clockwork_generals_invoked["nezbere"] = world.time + GLOBAL_CLOCKWORK_GENERAL_COOLDOWN
|
||||
playsound(invoker, 'sound/magic/clockwork/invoke_general.ogg', 50, 0)
|
||||
nezbere_invoked++
|
||||
for(var/obj/O in all_clockwork_objects)
|
||||
GLOB.nezbere_invoked++
|
||||
for(var/obj/O in GLOB.all_clockwork_objects)
|
||||
O.ratvar_act()
|
||||
spawn(600)
|
||||
nezbere_invoked--
|
||||
for(var/obj/O in all_clockwork_objects)
|
||||
O.ratvar_act()
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/reset_nezbere_invocation), 600)
|
||||
return TRUE
|
||||
|
||||
/proc/reset_nezbere_invocation()
|
||||
GLOB.nezbere_invoked--
|
||||
for(var/obj/O in GLOB.all_clockwork_objects)
|
||||
O.ratvar_act()
|
||||
|
||||
|
||||
//Invoke Nzcrentr, the Eternal Thunderbolt: Imbues an immense amount of energy into the invoker. After several seconds, everyone near the invoker will be hit with a devastating lightning blast.
|
||||
/datum/clockwork_scripture/invoke_nzcrentr
|
||||
@@ -158,7 +160,7 @@
|
||||
sort_priority = 5
|
||||
|
||||
/datum/clockwork_scripture/invoke_nzcrentr/check_special_requirements()
|
||||
if(!slab.no_cost && clockwork_generals_invoked["nzcrentr"] > world.time)
|
||||
if(!slab.no_cost && GLOB.clockwork_generals_invoked["nzcrentr"] > world.time)
|
||||
to_chat(invoker, "<span class='nzcrentr'>\"[text2ratvar("The boss says you have to wait. Hey, do you think he would mind if I killed you? ...He would? Ok.")]\"</span>\n\
|
||||
<span class='warning'>Nzcrentr has already been invoked recently! You must wait several minutes before calling upon the Eternal Thunderbolt.</span>")
|
||||
return FALSE
|
||||
@@ -166,7 +168,7 @@
|
||||
|
||||
/datum/clockwork_scripture/invoke_nzcrentr/scripture_effects()
|
||||
new/obj/effect/clockwork/general_marker/nzcrentr(get_turf(invoker))
|
||||
clockwork_generals_invoked["nzcrentr"] = world.time + CLOCKWORK_GENERAL_COOLDOWN
|
||||
GLOB.clockwork_generals_invoked["nzcrentr"] = world.time + CLOCKWORK_GENERAL_COOLDOWN
|
||||
hierophant_message("<span class='nzcrentr_large'>[text2ratvar("Amperage: \"[invoker.real_name] has called forth my power. Hope [invoker.p_they()] [invoker.p_do()] not shatter under it!")]\"</span>", FALSE, invoker)
|
||||
invoker.visible_message("<span class='warning'>[invoker] begins to radiate a blinding light!</span>", \
|
||||
"<span class='nzcrentr'>\"[text2ratvar("The boss says it's okay to do this. Don't blame me if you die from it.")]\"</span>\n\
|
||||
|
||||
@@ -180,17 +180,13 @@
|
||||
owner.visible_message("<span class='warning'>A strange spear materializes in [owner]'s hands!</span>", "<span class='brass'>You call forth your spear!</span>")
|
||||
var/obj/item/clockwork/ratvarian_spear/R = new(get_turf(usr))
|
||||
owner.put_in_hands(R)
|
||||
if(!ratvar_awakens)
|
||||
if(!GLOB.ratvar_awakens)
|
||||
to_chat(owner, "<span class='warning'>Your spear begins to break down in this plane of existence. You can't use it for long!</span>")
|
||||
cooldown = base_cooldown + world.time
|
||||
owner.update_action_buttons_icon()
|
||||
addtimer(CALLBACK(src, .proc/update_actions), base_cooldown)
|
||||
addtimer(CALLBACK(owner, /mob.proc/update_action_buttons_icon), base_cooldown)
|
||||
return TRUE
|
||||
|
||||
/datum/action/innate/function_call/proc/update_actions()
|
||||
if(owner)
|
||||
owner.update_action_buttons_icon()
|
||||
|
||||
|
||||
//Spatial Gateway: Allows the invoker to teleport themselves and any nearby allies to a conscious servant or clockwork obelisk.
|
||||
/datum/clockwork_scripture/spatial_gateway
|
||||
@@ -215,13 +211,14 @@
|
||||
to_chat(invoker, "<span class='warning'>You must not be inside an object to use this scripture!</span>")
|
||||
return FALSE
|
||||
var/other_servants = 0
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
for(var/mob/living/L in GLOB.living_mob_list)
|
||||
if(is_servant_of_ratvar(L) && !L.stat && L != invoker)
|
||||
other_servants++
|
||||
for(var/obj/structure/destructible/clockwork/powered/clockwork_obelisk/O in all_clockwork_objects)
|
||||
other_servants++
|
||||
for(var/obj/structure/destructible/clockwork/powered/clockwork_obelisk/O in GLOB.all_clockwork_objects)
|
||||
if(O.anchored)
|
||||
other_servants++
|
||||
if(!other_servants)
|
||||
to_chat(invoker, "<span class='warning'>There are no other servants or clockwork obelisks!</span>")
|
||||
to_chat(invoker, "<span class='warning'>There are no other conscious servants or anchored clockwork obelisks!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -232,7 +229,7 @@
|
||||
if(!L.stat && is_servant_of_ratvar(L))
|
||||
portal_uses++
|
||||
duration += 40 //4 seconds
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
portal_uses = max(portal_uses, 100) //Very powerful if Ratvar has been summoned
|
||||
duration = max(duration, 100)
|
||||
return slab.procure_gateway(invoker, duration, portal_uses)
|
||||
@@ -266,7 +263,7 @@
|
||||
var/turf/T = get_turf(invoker)
|
||||
if(!ray.run_scripture() && slab && invoker)
|
||||
if(can_recite() && T == get_turf(invoker))
|
||||
if(!ratvar_awakens)
|
||||
if(!GLOB.ratvar_awakens)
|
||||
var/obj/structure/destructible/clockwork/powered/volt_checker/VC = new/obj/structure/destructible/clockwork/powered/volt_checker(get_turf(invoker))
|
||||
var/multiplier = 0.5
|
||||
var/usable_power = min(Floor(VC.total_accessable_power() * 0.2, MIN_CLOCKCULT_POWER), 1000)
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
/obj/structure/destructible/clockwork/New()
|
||||
..()
|
||||
change_construction_value(construction_value)
|
||||
all_clockwork_objects += src
|
||||
GLOB.all_clockwork_objects += src
|
||||
|
||||
/obj/structure/destructible/clockwork/Destroy()
|
||||
change_construction_value(-construction_value)
|
||||
all_clockwork_objects -= src
|
||||
GLOB.all_clockwork_objects -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/destructible/clockwork/ratvar_act()
|
||||
if(ratvar_awakens || clockwork_gateway_activated)
|
||||
if(GLOB.ratvar_awakens || GLOB.clockwork_gateway_activated)
|
||||
obj_integrity = max_integrity
|
||||
|
||||
/obj/structure/destructible/clockwork/narsie_act()
|
||||
@@ -78,7 +78,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/destructible/clockwork/proc/get_efficiency_mod(increasing)
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
if(increasing)
|
||||
return 0.5
|
||||
return 2
|
||||
@@ -144,10 +144,10 @@
|
||||
|
||||
/obj/structure/destructible/clockwork/massive/New()
|
||||
..()
|
||||
poi_list += src
|
||||
GLOB.poi_list += src
|
||||
|
||||
/obj/structure/destructible/clockwork/massive/Destroy()
|
||||
poi_list -= src
|
||||
GLOB.poi_list -= src
|
||||
return ..()
|
||||
|
||||
/obj/structure/destructible/clockwork/massive/singularity_pull(S, current_size)
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/ratvar_act()
|
||||
..()
|
||||
if(nezbere_invoked)
|
||||
if(GLOB.nezbere_invoked)
|
||||
needs_power = FALSE
|
||||
else
|
||||
needs_power = initial(needs_power)
|
||||
@@ -225,7 +225,7 @@
|
||||
new /obj/effect/overlay/temp/emp(loc)
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/proc/total_accessable_power() //how much power we have and can use
|
||||
if(!needs_power || ratvar_awakens)
|
||||
if(!needs_power || GLOB.ratvar_awakens)
|
||||
return INFINITY //oh yeah we've got power why'd you ask
|
||||
|
||||
var/power = 0
|
||||
@@ -237,7 +237,7 @@
|
||||
var/power = 0
|
||||
var/area/A = get_area(src)
|
||||
var/area/targetAPCA
|
||||
for(var/obj/machinery/power/apc/APC in apcs_list)
|
||||
for(var/obj/machinery/power/apc/APC in GLOB.apcs_list)
|
||||
var/area/APCA = get_area(APC)
|
||||
if(APCA == A)
|
||||
target_apc = APC
|
||||
@@ -259,7 +259,7 @@
|
||||
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/proc/try_use_power(amount) //try to use an amount of power
|
||||
if(!needs_power || ratvar_awakens)
|
||||
if(!needs_power || GLOB.ratvar_awakens)
|
||||
return 1
|
||||
if(amount <= 0)
|
||||
return FALSE
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//The gateway to Reebe, from which Ratvar emerges.
|
||||
/obj/structure/destructible/clockwork/massive/celestial_gateway
|
||||
name = "gateway to the Celestial Derelict"
|
||||
name = "ark of the Clockwork Justicar"
|
||||
desc = "A massive, thrumming rip in spacetime."
|
||||
clockwork_desc = "A portal to the Celestial Derelict. Massive and intimidating, it is the only thing that can both transport Ratvar and withstand the massive amount of energy he emits."
|
||||
obj_integrity = 500
|
||||
@@ -19,10 +19,9 @@
|
||||
var/second_sound_played = FALSE
|
||||
var/third_sound_played = FALSE
|
||||
var/fourth_sound_played = FALSE
|
||||
var/ratvar_portal = TRUE //if the gateway actually summons ratvar or just produces a hugeass conversion burst
|
||||
var/obj/effect/clockwork/overlay/gateway_glow/glow
|
||||
var/obj/effect/countdown/clockworkgate/countdown
|
||||
var/list/required_components = list(BELLIGERENT_EYE = 7, VANGUARD_COGWHEEL = 7, GEIS_CAPACITOR = 7, REPLICANT_ALLOY = 7, HIEROPHANT_ANSIBLE = 7)
|
||||
var/list/required_components = list(BELLIGERENT_EYE = ARK_CONSUME_COST, VANGUARD_COGWHEEL = ARK_CONSUME_COST, GEIS_CAPACITOR = ARK_CONSUME_COST, REPLICANT_ALLOY = ARK_CONSUME_COST, HIEROPHANT_ANSIBLE = ARK_CONSUME_COST)
|
||||
|
||||
/obj/structure/destructible/clockwork/massive/celestial_gateway/New()
|
||||
..()
|
||||
@@ -30,33 +29,20 @@
|
||||
|
||||
/obj/structure/destructible/clockwork/massive/celestial_gateway/proc/spawn_animation()
|
||||
var/turf/T = get_turf(src)
|
||||
var/objective_is_gateway = (ticker && ticker.mode && ticker.mode.clockwork_objective == CLOCKCULT_GATEWAY)
|
||||
new/obj/effect/clockwork/general_marker/inathneq(T)
|
||||
if(objective_is_gateway)
|
||||
hierophant_message("<span class='inathneq'>\"[text2ratvar("Engine, come forth and show your servants your mercy")]!\"</span>")
|
||||
else
|
||||
hierophant_message("<span class='inathneq'>\"[text2ratvar("We will show all the mercy of Engine")]!\"</span>")
|
||||
hierophant_message("<span class='inathneq'>\"[text2ratvar("Engine, come forth and show your servants your mercy")]!\"</span>")
|
||||
playsound(T, 'sound/magic/clockwork/invoke_general.ogg', 30, 0)
|
||||
sleep(10)
|
||||
new/obj/effect/clockwork/general_marker/sevtug(T)
|
||||
if(objective_is_gateway)
|
||||
hierophant_message("<span class='sevtug'>\"[text2ratvar("Engine, come forth and show this station your decorating skills")]!\"</span>")
|
||||
else
|
||||
hierophant_message("<span class='sevtug'>\"[text2ratvar("We will show all Engine's decorating skills")]!\"</span>")
|
||||
hierophant_message("<span class='sevtug'>\"[text2ratvar("Engine, come forth and show this station your decorating skills")]!\"</span>")
|
||||
playsound(T, 'sound/magic/clockwork/invoke_general.ogg', 45, 0)
|
||||
sleep(10)
|
||||
new/obj/effect/clockwork/general_marker/nezbere(T)
|
||||
if(objective_is_gateway)
|
||||
hierophant_message("<span class='nezbere'>\"[text2ratvar("Engine, come forth and shine your light across this realm")]!!\"</span>")
|
||||
else
|
||||
hierophant_message("<span class='nezbere'>\"[text2ratvar("We will show all Engine's light")]!!\"</span>")
|
||||
hierophant_message("<span class='nezbere'>\"[text2ratvar("Engine, come forth and shine your light across this realm")]!!\"</span>")
|
||||
playsound(T, 'sound/magic/clockwork/invoke_general.ogg', 60, 0)
|
||||
sleep(10)
|
||||
new/obj/effect/clockwork/general_marker/nzcrentr(T)
|
||||
if(objective_is_gateway)
|
||||
hierophant_message("<span class='nzcrentr'>\"[text2ratvar("Engine, come forth")].\"</span>")
|
||||
else
|
||||
hierophant_message("<span class='nzcrentr'>\"[text2ratvar("We will show all Engine's power")].\"</span>")
|
||||
hierophant_message("<span class='nzcrentr'>\"[text2ratvar("Engine, come forth")].\"</span>")
|
||||
playsound(T, 'sound/magic/clockwork/invoke_general.ogg', 75, 0)
|
||||
sleep(10)
|
||||
playsound(T, 'sound/magic/clockwork/invoke_general.ogg', 100, 0)
|
||||
@@ -74,9 +60,7 @@
|
||||
countdown = new(src)
|
||||
countdown.start()
|
||||
var/area/gate_area = get_area(src)
|
||||
hierophant_message("<span class='large_brass'><b>A gateway to the Celestial Derelict has been created in [gate_area.map_name]!</b></span>", FALSE, src)
|
||||
if(!objective_is_gateway)
|
||||
ratvar_portal = FALSE
|
||||
hierophant_message("<span class='large_brass'><b>An Ark of the Clockwork Justicar has been created in [gate_area.map_name]!</b></span>", FALSE, src)
|
||||
SSshuttle.registerHostileEnvironment(src)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
@@ -84,7 +68,7 @@
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
if(!purpose_fulfilled)
|
||||
var/area/gate_area = get_area(src)
|
||||
hierophant_message("<span class='large_brass'><b>A gateway to the Celestial Derelict has fallen at [gate_area.map_name]!</b></span>")
|
||||
hierophant_message("<span class='large_brass'><b>An Ark of the Clockwork Justicar has fallen at [gate_area.map_name]!</b></span>")
|
||||
send_to_playing_players(sound(null, 0, channel = 8))
|
||||
var/was_stranded = SSshuttle.emergency.mode == SHUTTLE_STRANDED
|
||||
SSshuttle.clearHostileEnvironment(src)
|
||||
@@ -179,14 +163,14 @@
|
||||
to_chat(user, "<span class='[get_component_span(i)]'>[get_component_name(i)][i != REPLICANT_ALLOY ? "s":""]:</span> \
|
||||
<span class='[get_component_span(i)]_large'>[required_components[i]]</span>")
|
||||
else
|
||||
to_chat(user, "<span class='big'><b>Seconds until [ratvar_portal ? "Ratvar's arrival":"Proselytization"]:</b> [get_arrival_text(TRUE)]</span>")
|
||||
to_chat(user, "<span class='big'><b>Seconds until Ratvar's arrival:</b> [get_arrival_text(TRUE)]</span>")
|
||||
switch(progress_in_seconds)
|
||||
if(-INFINITY to GATEWAY_REEBE_FOUND)
|
||||
to_chat(user, "<span class='heavy_brass'>It's still opening.</span>")
|
||||
if(GATEWAY_REEBE_FOUND to GATEWAY_RATVAR_COMING)
|
||||
to_chat(user, "<span class='heavy_brass'>It's reached the Celestial Derelict and is drawing power from it.</span>")
|
||||
if(GATEWAY_RATVAR_COMING to INFINITY)
|
||||
to_chat(user, "<span class='heavy_brass'>[ratvar_portal ? "Ratvar is coming through the gateway":"The gateway is glowing with massed power"]!</span>")
|
||||
to_chat(user, "<span class='heavy_brass'>Ratvar is coming through the gateway!</span>")
|
||||
else
|
||||
switch(progress_in_seconds)
|
||||
if(-INFINITY to GATEWAY_REEBE_FOUND)
|
||||
@@ -194,11 +178,11 @@
|
||||
if(GATEWAY_REEBE_FOUND to GATEWAY_RATVAR_COMING)
|
||||
to_chat(user, "<span class='warning'>It seems to be leading somewhere.</span>")
|
||||
if(GATEWAY_RATVAR_COMING to INFINITY)
|
||||
to_chat(user, "<span class='boldwarning'>[ratvar_portal ? "Something is coming through":"It's glowing brightly"]!</span>")
|
||||
to_chat(user, "<span class='boldwarning'>Something is coming through!</span>")
|
||||
|
||||
/obj/structure/destructible/clockwork/massive/celestial_gateway/process()
|
||||
if(!first_sound_played || prob(7))
|
||||
for(var/M in player_list)
|
||||
for(var/M in GLOB.player_list)
|
||||
if(M && !isnewplayer(M))
|
||||
to_chat(M, "<span class='warning'><b>You hear otherworldly sounds from the [dir2text(get_dir(get_turf(M), get_turf(src)))]...</span>")
|
||||
if(!obj_integrity)
|
||||
@@ -227,9 +211,9 @@
|
||||
var/used_components = FALSE
|
||||
for(var/i in required_components)
|
||||
if(required_components[i])
|
||||
var/to_use = min(clockwork_component_cache[i], required_components[i])
|
||||
var/to_use = min(GLOB.clockwork_component_cache[i], required_components[i])
|
||||
required_components[i] -= to_use
|
||||
clockwork_component_cache[i] -= to_use
|
||||
GLOB.clockwork_component_cache[i] -= to_use
|
||||
if(to_use)
|
||||
used_components = TRUE
|
||||
if(used_components)
|
||||
@@ -276,39 +260,28 @@
|
||||
animate(glow, transform = matrix() * 3, alpha = 0, time = 5)
|
||||
var/turf/startpoint = get_turf(src)
|
||||
QDEL_IN(src, 3)
|
||||
if(ratvar_portal)
|
||||
sleep(3)
|
||||
clockwork_gateway_activated = TRUE
|
||||
new/obj/structure/destructible/clockwork/massive/ratvar(startpoint)
|
||||
else
|
||||
INVOKE_ASYNC(SSshuttle.emergency, /obj/docking_port/mobile/emergency.proc/request, null, 0) //call the shuttle immediately
|
||||
sleep(3)
|
||||
clockwork_gateway_activated = TRUE
|
||||
send_to_playing_players("<span class='ratvar'>\"[text2ratvar("Behold")]!\"</span>\n<span class='inathneq_large'>\"[text2ratvar("See Engine's mercy")]!\"</span>\n\
|
||||
<span class='sevtug_large'>\"[text2ratvar("Observe Engine's design skills")]!\"</span>\n<span class='nezbere_large'>\"[text2ratvar("Behold Engine's light")]!!\"</span>\n\
|
||||
<span class='nzcrentr_large'>\"[text2ratvar("Gaze upon Engine's power")]!\"</span>")
|
||||
send_to_playing_players('sound/magic/clockwork/invoke_general.ogg')
|
||||
var/x0 = startpoint.x
|
||||
var/y0 = startpoint.y
|
||||
for(var/I in spiral_range_turfs(255, startpoint))
|
||||
var/turf/T = I
|
||||
if(!T)
|
||||
continue
|
||||
var/dist = cheap_hypotenuse(T.x, T.y, x0, y0)
|
||||
if(dist < 100)
|
||||
dist = TRUE
|
||||
else
|
||||
dist = FALSE
|
||||
T.ratvar_act(dist)
|
||||
CHECK_TICK
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
L.ratvar_act()
|
||||
for(var/I in all_clockwork_mobs)
|
||||
var/mob/M = I
|
||||
if(M.stat == CONSCIOUS)
|
||||
clockwork_say(M, text2ratvar(pick("Purge all untruths and honor Engine!", "All glory to Engine's light!", "Engine's power is unmatched!")))
|
||||
sleep(3)
|
||||
GLOB.clockwork_gateway_activated = TRUE
|
||||
new/obj/structure/destructible/clockwork/massive/ratvar(startpoint)
|
||||
send_to_playing_players("<span class='inathneq_large'>\"[text2ratvar("See Engine's mercy")]!\"</span>\n\
|
||||
<span class='sevtug_large'>\"[text2ratvar("Observe Engine's design skills")]!\"</span>\n<span class='nezbere_large'>\"[text2ratvar("Behold Engine's light")]!!\"</span>\n\
|
||||
<span class='nzcrentr_large'>\"[text2ratvar("Gaze upon Engine's power")].\"</span>")
|
||||
send_to_playing_players('sound/magic/clockwork/invoke_general.ogg')
|
||||
var/x0 = startpoint.x
|
||||
var/y0 = startpoint.y
|
||||
for(var/I in spiral_range_turfs(255, startpoint))
|
||||
var/turf/T = I
|
||||
if(!T)
|
||||
continue
|
||||
var/dist = cheap_hypotenuse(T.x, T.y, x0, y0)
|
||||
if(dist < 100)
|
||||
dist = TRUE
|
||||
else
|
||||
dist = FALSE
|
||||
T.ratvar_act(dist, TRUE)
|
||||
CHECK_TICK
|
||||
|
||||
//the actual appearance of the Gateway to the Celestial Derelict; an object so the edges of the gate can be clicked through.
|
||||
//the actual appearance of the Ark of the Clockwork Justicar; an object so the edges of the gate can be clicked through.
|
||||
/obj/effect/clockwork/overlay/gateway_glow
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "clockwork_gateway_charging"
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
var/interdiction_range = 14 //how large an area it drains and disables in
|
||||
var/static/list/rage_messages = list("...", "Disgusting.", "Die.", "Foul.", "Worthless.", "Mortal.", "Unfit.", "Weak.", "Fragile.", "Useless.", "Leave my sight!")
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/interdiction_lens/New()
|
||||
/obj/structure/destructible/clockwork/powered/interdiction_lens/Initialize()
|
||||
..()
|
||||
set_light(1.4, 0.8, "#F42B9D")
|
||||
update_current_glow()
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/interdiction_lens/examine(mob/user)
|
||||
..()
|
||||
@@ -30,12 +30,25 @@
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
to_chat(user, "<span class='neovgre_small'>If it fails to drain any electronics or has nothing to return power to, it will disable itself for <b>[round(recharge_time/600, 1)]</b> minutes.</span>")
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/interdiction_lens/update_anchored(mob/user, do_damage)
|
||||
..()
|
||||
update_current_glow()
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/interdiction_lens/toggle(fast_process, mob/living/user)
|
||||
. = ..()
|
||||
update_current_glow()
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/interdiction_lens/proc/update_current_glow()
|
||||
if(active)
|
||||
set_light(2, 1.6, "#EE54EE")
|
||||
if(disabled)
|
||||
set_light(2, 1.6, "#151200")
|
||||
else
|
||||
set_light(2, 1.6, "#EE54EE")
|
||||
else
|
||||
set_light(1.4, 0.8, "#F42B9D")
|
||||
if(anchored)
|
||||
set_light(1.4, 0.8, "#F42B9D")
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/interdiction_lens/attack_hand(mob/living/user)
|
||||
if(user.canUseTopic(src, !issilicon(user), NO_DEXTERY))
|
||||
@@ -45,7 +58,7 @@
|
||||
toggle(0, user)
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/interdiction_lens/forced_disable(bad_effects)
|
||||
if(disabled)
|
||||
if(disabled || !anchored)
|
||||
return FALSE
|
||||
if(!active)
|
||||
toggle(0)
|
||||
@@ -53,8 +66,8 @@
|
||||
recharging = world.time + recharge_time
|
||||
flick("interdiction_lens_discharged", src)
|
||||
icon_state = "interdiction_lens_inactive"
|
||||
set_light(2, 1.6, "#151200")
|
||||
disabled = TRUE
|
||||
update_current_glow()
|
||||
return TRUE
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/interdiction_lens/process()
|
||||
@@ -84,7 +97,7 @@
|
||||
var/efficiency = get_efficiency_mod()
|
||||
var/rage_modifier = get_efficiency_mod(TRUE)
|
||||
|
||||
for(var/i in ai_list)
|
||||
for(var/i in GLOB.ai_list)
|
||||
var/mob/living/silicon/ai/AI = i
|
||||
if(AI && AI.stat != DEAD && !is_servant_of_ratvar(AI))
|
||||
unconverted_ai = TRUE
|
||||
|
||||
@@ -47,10 +47,10 @@
|
||||
|
||||
/obj/structure/destructible/clockwork/ocular_warden/ratvar_act()
|
||||
..()
|
||||
if(ratvar_awakens)
|
||||
if(GLOB.ratvar_awakens)
|
||||
damage_per_tick = 10
|
||||
sight_range = 6
|
||||
else if(nezbere_invoked)
|
||||
else if(GLOB.nezbere_invoked)
|
||||
damage_per_tick = 5
|
||||
sight_range = 5
|
||||
else
|
||||
@@ -80,7 +80,7 @@
|
||||
else
|
||||
L.playsound_local(null,'sound/machines/clockcult/ocularwarden-dot2.ogg',50,1)
|
||||
L.adjustFireLoss((!iscultist(L) ? damage_per_tick : damage_per_tick * 2) * get_efficiency_mod()) //Nar-Sian cultists take additional damage
|
||||
if(ratvar_awakens && L)
|
||||
if(GLOB.ratvar_awakens && L)
|
||||
L.adjust_fire_stacks(damage_per_tick)
|
||||
L.IgniteMob()
|
||||
else if(istype(target,/obj/mecha))
|
||||
@@ -97,7 +97,7 @@
|
||||
visible_message("<span class='warning'>[src] swivels to face [target]!</span>")
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
to_chat(L, "<span class='heavy_brass'>\"I SEE YOU!\"</span>\n<span class='userdanger'>[src]'s gaze [ratvar_awakens ? "melts you alive" : "burns you"]!</span>")
|
||||
to_chat(L, "<span class='heavy_brass'>\"I SEE YOU!\"</span>\n<span class='userdanger'>[src]'s gaze [GLOB.ratvar_awakens ? "melts you alive" : "burns you"]!</span>")
|
||||
else if(istype(target,/obj/mecha))
|
||||
var/obj/mecha/M = target
|
||||
to_chat(M.occupant, "<span class='heavy_brass'>\"I SEE YOU!\"</span>" )
|
||||
@@ -105,7 +105,7 @@
|
||||
if(prob(50))
|
||||
visible_message("<span class='notice'>[src][pick(idle_messages)]</span>")
|
||||
else
|
||||
setDir(pick(cardinal))//Random rotation
|
||||
setDir(pick(GLOB.cardinal))//Random rotation
|
||||
|
||||
/obj/structure/destructible/clockwork/ocular_warden/proc/acquire_nearby_targets()
|
||||
. = list()
|
||||
@@ -131,7 +131,7 @@
|
||||
else if(!L.mind)
|
||||
continue
|
||||
. += L
|
||||
for(var/N in mechas_list)
|
||||
for(var/N in GLOB.mechas_list)
|
||||
var/obj/mecha/M = N
|
||||
if(get_dist(M, src) <= sight_range && M.occupant && !is_servant_of_ratvar(M.occupant) && (M in view(sight_range, src)))
|
||||
. += M
|
||||
|
||||
@@ -15,11 +15,12 @@
|
||||
var/atom/prey //Whatever Ratvar is chasing
|
||||
var/clashing = FALSE //If Ratvar is FUCKING FIGHTING WITH NAR-SIE
|
||||
var/proselytize_range = 10
|
||||
dangerous_possession = TRUE
|
||||
|
||||
/obj/structure/destructible/clockwork/massive/ratvar/New()
|
||||
..()
|
||||
ratvar_awakens++
|
||||
for(var/obj/O in all_clockwork_objects)
|
||||
GLOB.ratvar_awakens++
|
||||
for(var/obj/O in GLOB.all_clockwork_objects)
|
||||
O.ratvar_act()
|
||||
START_PROCESSING(SSobj, src)
|
||||
send_to_playing_players("<span class='ratvar'>\"[text2ratvar("ONCE AGAIN MY LIGHT SHALL SHINE ACROSS THIS PATHETIC REALM")]!!\"</span>")
|
||||
@@ -27,11 +28,11 @@
|
||||
var/image/alert_overlay = image('icons/effects/clockwork_effects.dmi', "ratvar_alert")
|
||||
var/area/A = get_area(src)
|
||||
notify_ghosts("The Justiciar's light calls to you! Reach out to Ratvar in [A.name] to be granted a shell to spread his glory!", null, source = src, alert_overlay = alert_overlay)
|
||||
addtimer(CALLBACK(SSshuttle.emergency, /obj/docking_port/mobile/emergency..proc/request, null, 0.1), 50)
|
||||
INVOKE_ASYNC(SSshuttle.emergency, /obj/docking_port/mobile/emergency..proc/request, null, 0)
|
||||
|
||||
/obj/structure/destructible/clockwork/massive/ratvar/Destroy()
|
||||
ratvar_awakens--
|
||||
for(var/obj/O in all_clockwork_objects)
|
||||
GLOB.ratvar_awakens--
|
||||
for(var/obj/O in GLOB.all_clockwork_objects)
|
||||
O.ratvar_act()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
send_to_playing_players("<span class='heavy_brass'><font size=6>\"NO! I will not... be...</font> <font size=5>banished...</font> <font size=4>again...\"</font></span>")
|
||||
@@ -62,27 +63,30 @@
|
||||
T.ratvar_act()
|
||||
for(var/I in circleviewturfs(src, round(proselytize_range * 0.5)))
|
||||
var/turf/T = I
|
||||
T.ratvar_act(1)
|
||||
var/dir_to_step_in = pick(cardinal)
|
||||
T.ratvar_act(TRUE)
|
||||
var/dir_to_step_in = pick(GLOB.cardinal)
|
||||
var/list/meals = list()
|
||||
for(var/mob/living/L in GLOB.living_mob_list) //we want to know who's alive so we don't lose and retarget a single person
|
||||
if(L.z == z && !is_servant_of_ratvar(L) && L.mind)
|
||||
meals += L
|
||||
if(!prey)
|
||||
for(var/obj/singularity/narsie/N in singularities)
|
||||
for(var/obj/singularity/narsie/N in GLOB.singularities)
|
||||
if(N.z == z)
|
||||
prey = N
|
||||
break
|
||||
if(!prey) //In case there's a Nar-Sie
|
||||
var/list/meals = list()
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
if(L.z == z && !is_servant_of_ratvar(L) && L.mind)
|
||||
meals += L
|
||||
if(meals.len)
|
||||
prey = pick(meals)
|
||||
to_chat(prey, "<span class='heavy_brass'><font size=5>\"You will do.\"</font></span>\n\
|
||||
<span class='userdanger'>Something very large and very malevolent begins lumbering its way towards you...</span>")
|
||||
prey << 'sound/effects/ratvar_reveal.ogg'
|
||||
if(!prey && LAZYLEN(meals))
|
||||
prey = pick(meals)
|
||||
to_chat(prey, "<span class='heavy_brass'><font size=5>\"You will do, heretic.\"</font></span>\n\
|
||||
<span class='userdanger'You feel something massive turn its crushing focus to you...</span>")
|
||||
prey << 'sound/effects/ratvar_reveal.ogg'
|
||||
else
|
||||
if((!istype(prey, /obj/singularity/narsie) && prob(10)) || is_servant_of_ratvar(prey) || prey.z != z)
|
||||
to_chat(prey, "<span class='heavy_brass'><font size=5>\"How dull. Leave me.\"</font></span>\n\
|
||||
<span class='userdanger'>You feel tremendous relief as a set of horrible eyes loses sight of you...</span>")
|
||||
if((!istype(prey, /obj/singularity/narsie) && prob(10) && LAZYLEN(meals) > 1) || prey.z != z || !(prey in meals))
|
||||
if(is_servant_of_ratvar(prey))
|
||||
to_chat(prey, "<span class='heavy_brass'><font size=5>\"Serve me well.\"</font></span>\n\
|
||||
<span class='big_brass'>You feel great joy as your god turns His eye to another heretic...</span>")
|
||||
else
|
||||
to_chat(prey, "<span class='heavy_brass'><font size=5>\"No matter. I will find you later, heretic.\"</font></span>\n\
|
||||
<span class='userdanger'>You feel tremendous relief as the crushing focus relents...</span>")
|
||||
prey = null
|
||||
else
|
||||
dir_to_step_in = get_dir(src, prey) //Unlike Nar-Sie, Ratvar ruthlessly chases down his target
|
||||
@@ -109,13 +113,13 @@
|
||||
while(src && narsie)
|
||||
send_to_playing_players('sound/magic/clockwork/ratvar_attack.ogg')
|
||||
sleep(5.2)
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(!isnewplayer(M))
|
||||
flash_color(M, flash_color="#966400", flash_time=1)
|
||||
shake_camera(M, 4, 3)
|
||||
var/ratvar_chance = min(ticker.mode.servants_of_ratvar.len, 50)
|
||||
var/narsie_chance = ticker.mode.cult.len
|
||||
for(var/mob/living/simple_animal/hostile/construct/harvester/C in player_list)
|
||||
var/ratvar_chance = min(SSticker.mode.servants_of_ratvar.len, 50)
|
||||
var/narsie_chance = SSticker.mode.cult.len
|
||||
for(var/mob/living/simple_animal/hostile/construct/harvester/C in GLOB.player_list)
|
||||
narsie_chance++
|
||||
ratvar_chance = rand(base_victory_chance, ratvar_chance)
|
||||
narsie_chance = rand(base_victory_chance, min(narsie_chance, 50))
|
||||
@@ -125,7 +129,7 @@
|
||||
sleep(rand(2,5))
|
||||
send_to_playing_players('sound/magic/clockwork/narsie_attack.ogg')
|
||||
sleep(7.4)
|
||||
for(var/mob/M in mob_list)
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(!isnewplayer(M))
|
||||
flash_color(M, flash_color="#C80000", flash_time=1)
|
||||
shake_camera(M, 4, 3)
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
timerid = QDEL_IN(src, 15)
|
||||
var/obj/structure/destructible/clockwork/taunting_trail/Tt = locate(/obj/structure/destructible/clockwork/taunting_trail) in loc
|
||||
if(Tt && Tt != src)
|
||||
if(!step(src, pick(alldirs)))
|
||||
if(!step(src, pick(GLOB.alldirs)))
|
||||
qdel(Tt)
|
||||
else
|
||||
for(var/obj/structure/destructible/clockwork/taunting_trail/TT in loc)
|
||||
if(TT != src)
|
||||
qdel(TT)
|
||||
setDir(pick(cardinal))
|
||||
setDir(pick(GLOB.cardinal))
|
||||
transform = matrix()*1.25
|
||||
animate(src, alpha = 100, time = 15)
|
||||
|
||||
|
||||
@@ -13,19 +13,21 @@
|
||||
light_color = "#C2852F"
|
||||
var/wall_generation_cooldown
|
||||
var/turf/closed/wall/clockwork/linkedwall //if we've got a linked wall and are producing
|
||||
var/static/linked_caches = 0 //how many caches are linked to walls; affects how fast components are produced
|
||||
|
||||
/obj/structure/destructible/clockwork/cache/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
clockwork_caches++
|
||||
GLOB.clockwork_caches++
|
||||
update_slab_info()
|
||||
set_light(2, 0.7)
|
||||
|
||||
/obj/structure/destructible/clockwork/cache/Destroy()
|
||||
clockwork_caches--
|
||||
GLOB.clockwork_caches--
|
||||
update_slab_info()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(linkedwall)
|
||||
linked_caches--
|
||||
linkedwall.linkedcache = null
|
||||
linkedwall = null
|
||||
return ..()
|
||||
@@ -33,18 +35,20 @@
|
||||
/obj/structure/destructible/clockwork/cache/process()
|
||||
if(!anchored)
|
||||
if(linkedwall)
|
||||
linked_caches--
|
||||
linkedwall.linkedcache = null
|
||||
linkedwall = null
|
||||
return
|
||||
for(var/turf/closed/wall/clockwork/C in range(4, src))
|
||||
if(!C.linkedcache && !linkedwall)
|
||||
linked_caches++
|
||||
C.linkedcache = src
|
||||
linkedwall = C
|
||||
wall_generation_cooldown = world.time + (CACHE_PRODUCTION_TIME * get_efficiency_mod(TRUE))
|
||||
wall_generation_cooldown = world.time + get_production_time()
|
||||
visible_message("<span class='warning'>[src] starts to whirr in the presence of [C]...</span>")
|
||||
break
|
||||
if(linkedwall && wall_generation_cooldown <= world.time)
|
||||
wall_generation_cooldown = world.time + (CACHE_PRODUCTION_TIME * get_efficiency_mod(TRUE))
|
||||
wall_generation_cooldown = world.time + get_production_time()
|
||||
var/component_id = generate_cache_component(null, src)
|
||||
playsound(linkedwall, 'sound/magic/clockwork/fellowship_armory.ogg', rand(15, 20), 1, -3, 1, 1)
|
||||
visible_message("<span class='[get_component_span(component_id)]'>Something</span><span class='warning'> cl[pick("ank", "ink", "unk", "ang")]s around inside of [src]...</span>")
|
||||
@@ -57,7 +61,7 @@
|
||||
if(!anchored)
|
||||
to_chat(user, "<span class='warning'>[src] needs to be secured to place [C] into it!</span>")
|
||||
else
|
||||
clockwork_component_cache[C.component_id]++
|
||||
GLOB.clockwork_component_cache[C.component_id]++
|
||||
update_slab_info()
|
||||
to_chat(user, "<span class='notice'>You add [C] to [src].</span>")
|
||||
user.drop_item()
|
||||
@@ -69,7 +73,7 @@
|
||||
to_chat(user, "<span class='warning'>[src] needs to be secured to offload your slab's components into it!</span>")
|
||||
else
|
||||
for(var/i in S.stored_components)
|
||||
clockwork_component_cache[i] += S.stored_components[i]
|
||||
GLOB.clockwork_component_cache[i] += S.stored_components[i]
|
||||
S.stored_components[i] = 0
|
||||
update_slab_info()
|
||||
user.visible_message("<span class='notice'>[user] empties [S] into [src].</span>", "<span class='notice'>You offload your slab's components into [src].</span>")
|
||||
@@ -102,9 +106,12 @@
|
||||
..()
|
||||
if(is_servant_of_ratvar(user) || isobserver(user))
|
||||
if(linkedwall)
|
||||
to_chat(user, "<span class='brass'>It is linked to a Clockwork Wall and will generate a component every <b>[round((CACHE_PRODUCTION_TIME * 0.1) * get_efficiency_mod(TRUE), 0.1)]</b> seconds!</span>")
|
||||
to_chat(user, "<span class='brass'>It is linked to a Clockwork Wall and will generate a component every <b>[round(get_production_time() * 0.1, 0.1)]</b> seconds!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='alloy'>It is unlinked! Construct a Clockwork Wall nearby to generate components!</span>")
|
||||
to_chat(user, "<b>Stored components:</b>")
|
||||
for(var/i in clockwork_component_cache)
|
||||
to_chat(user, "<span class='[get_component_span(i)]_small'><i>[get_component_name(i)][i != REPLICANT_ALLOY ? "s":""]:</i> <b>[clockwork_component_cache[i]]</b></span>")
|
||||
for(var/i in GLOB.clockwork_component_cache)
|
||||
to_chat(user, "<span class='[get_component_span(i)]_small'><i>[get_component_name(i)][i != REPLICANT_ALLOY ? "s":""]:</i> <b>[GLOB.clockwork_component_cache[i]]</b></span>")
|
||||
|
||||
/obj/structure/destructible/clockwork/cache/proc/get_production_time()
|
||||
return (CACHE_PRODUCTION_TIME + (ACTIVE_CACHE_SLOWDOWN * linked_caches)) * get_efficiency_mod(TRUE)
|
||||
|
||||
@@ -22,15 +22,15 @@
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/tinkerers_daemon/New()
|
||||
..()
|
||||
clockwork_daemons++
|
||||
GLOB.clockwork_daemons++
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/tinkerers_daemon/Destroy()
|
||||
clockwork_daemons--
|
||||
GLOB.clockwork_daemons--
|
||||
return ..()
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/tinkerers_daemon/ratvar_act()
|
||||
..()
|
||||
if(nezbere_invoked)
|
||||
if(GLOB.nezbere_invoked)
|
||||
production_time = 0
|
||||
production_cooldown = initial(production_cooldown) * 0.5
|
||||
if(!active)
|
||||
@@ -47,8 +47,8 @@
|
||||
else
|
||||
to_chat(user, "<span class='brass'>It is currently producing random components.</span>")
|
||||
to_chat(user, "<span class='nezbere_small'>It will produce a component every <b>[round((production_cooldown*0.1) * get_efficiency_mod(TRUE), 0.1)]</b> seconds and requires at least the following power for each component type:</span>")
|
||||
for(var/i in clockwork_component_cache)
|
||||
to_chat(user, "<span class='[get_component_span(i)]_small'><i>[get_component_name(i)]:</i> <b>[get_component_cost(i)]W</b> <i>([clockwork_component_cache[i]] exist[clockwork_component_cache[i] == 1 ? "s" : ""])</i></span>")
|
||||
for(var/i in GLOB.clockwork_component_cache)
|
||||
to_chat(user, "<span class='[get_component_span(i)]_small'><i>[get_component_name(i)]:</i> <b>[get_component_cost(i)]W</b> <i>([GLOB.clockwork_component_cache[i]] exist[GLOB.clockwork_component_cache[i] == 1 ? "s" : ""])</i></span>")
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/tinkerers_daemon/forced_disable(bad_effects)
|
||||
if(active)
|
||||
@@ -72,17 +72,17 @@
|
||||
to_chat(user, "<span class='warning'>[src] needs to be secured to the floor before it can be activated!</span>")
|
||||
return FALSE
|
||||
var/servants = 0
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
for(var/mob/living/L in GLOB.living_mob_list)
|
||||
if(is_servant_of_ratvar(L))
|
||||
servants++
|
||||
if(servants * 0.2 < clockwork_daemons)
|
||||
if(servants * 0.2 < GLOB.clockwork_daemons)
|
||||
to_chat(user, "<span class='nezbere'>\"There are too few servants for this daemon to work.\"</span>")
|
||||
return
|
||||
if(!clockwork_caches)
|
||||
if(!GLOB.clockwork_caches)
|
||||
to_chat(user, "<span class='nezbere'>\"You require a cache for this daemon to operate. Get to it.\"</span>")
|
||||
return
|
||||
var/min_power_usable = 0
|
||||
for(var/i in clockwork_component_cache)
|
||||
for(var/i in GLOB.clockwork_component_cache)
|
||||
if(!min_power_usable)
|
||||
min_power_usable = get_component_cost(i)
|
||||
else
|
||||
@@ -94,15 +94,15 @@
|
||||
switch(choice)
|
||||
if("Specific Component")
|
||||
var/list/components = list()
|
||||
for(var/i in clockwork_component_cache)
|
||||
for(var/i in GLOB.clockwork_component_cache)
|
||||
components["[get_component_name(i)] ([get_component_cost(i)]W)"] = i
|
||||
var/input_component = input(user, "Choose a component type.", name) as null|anything in components
|
||||
component_id_to_produce = components[input_component]
|
||||
servants = 0
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
for(var/mob/living/L in GLOB.living_mob_list)
|
||||
if(is_servant_of_ratvar(L))
|
||||
servants++
|
||||
if(!is_servant_of_ratvar(user) || !user.canUseTopic(src, !issilicon(user), NO_DEXTERY) || active || !clockwork_caches || servants * 0.2 < clockwork_daemons)
|
||||
if(!is_servant_of_ratvar(user) || !user.canUseTopic(src, !issilicon(user), NO_DEXTERY) || active || !GLOB.clockwork_caches || servants * 0.2 < GLOB.clockwork_daemons)
|
||||
return
|
||||
if(!component_id_to_produce)
|
||||
to_chat(user, "<span class='warning'>You decide not to select a component and activate the daemon.</span>")
|
||||
@@ -136,24 +136,24 @@
|
||||
set_light(0)
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/tinkerers_daemon/proc/get_component_cost(id)
|
||||
return max(MIN_CLOCKCULT_POWER*2, (MIN_CLOCKCULT_POWER*2) * (1 + round(clockwork_component_cache[id] * 0.2)))
|
||||
return max(MIN_CLOCKCULT_POWER*2, (MIN_CLOCKCULT_POWER*2) * (1 + round(GLOB.clockwork_component_cache[id] * 0.2)))
|
||||
|
||||
/obj/structure/destructible/clockwork/powered/tinkerers_daemon/process()
|
||||
var/servants = 0
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
for(var/mob/living/L in GLOB.living_mob_list)
|
||||
if(is_servant_of_ratvar(L))
|
||||
servants++
|
||||
. = ..()
|
||||
var/min_power_usable = 0
|
||||
if(!component_id_to_produce)
|
||||
for(var/i in clockwork_component_cache)
|
||||
for(var/i in GLOB.clockwork_component_cache)
|
||||
if(!min_power_usable)
|
||||
min_power_usable = get_component_cost(i)
|
||||
else
|
||||
min_power_usable = min(min_power_usable, get_component_cost(i))
|
||||
else
|
||||
min_power_usable = get_component_cost(component_id_to_produce)
|
||||
if(!clockwork_caches || servants * 0.2 < clockwork_daemons || . < min_power_usable) //if we don't have enough to produce the lowest or what we chose to produce, cancel out
|
||||
if(!GLOB.clockwork_caches || servants * 0.2 < GLOB.clockwork_daemons || . < min_power_usable) //if we don't have enough to produce the lowest or what we chose to produce, cancel out
|
||||
forced_disable(FALSE)
|
||||
return
|
||||
if(production_time <= world.time)
|
||||
@@ -163,7 +163,7 @@
|
||||
if(!try_use_power(get_component_cost(component_to_generate)))
|
||||
component_to_generate = null
|
||||
if(!component_id_to_produce)
|
||||
for(var/i in clockwork_component_cache)
|
||||
for(var/i in GLOB.clockwork_component_cache)
|
||||
if(try_use_power(get_component_cost(i))) //if we fail but are producing random, try and get a different component to produce
|
||||
component_to_generate = i
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user