upstream-merge-28047
This commit is contained in:
@@ -361,7 +361,6 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
name = "Next Tier Requirements"
|
||||
desc = "You shouldn't be seeing this description unless you're very fast. If you're very fast, good job!"
|
||||
icon_state = "no-servants-caches"
|
||||
var/static/list/scripture_states = list(SCRIPTURE_DRIVER = TRUE, SCRIPTURE_SCRIPT = FALSE, SCRIPTURE_APPLICATION = FALSE, SCRIPTURE_REVENANT = FALSE, SCRIPTURE_JUDGEMENT = FALSE)
|
||||
|
||||
/obj/screen/alert/clockwork/scripture_reqs/Initialize()
|
||||
. = ..()
|
||||
@@ -374,12 +373,11 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
|
||||
/obj/screen/alert/clockwork/scripture_reqs/process()
|
||||
if(GLOB.clockwork_gateway_activated)
|
||||
qdel(src)
|
||||
mob_viewer.clear_alert("scripturereq")
|
||||
return
|
||||
var/current_state
|
||||
scripture_states = scripture_unlock_check()
|
||||
for(var/i in scripture_states)
|
||||
if(!scripture_states[i])
|
||||
for(var/i in SSticker.scripture_states)
|
||||
if(!SSticker.scripture_states[i])
|
||||
current_state = i
|
||||
break
|
||||
icon_state = "no"
|
||||
@@ -459,7 +457,6 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
var/servants = 0
|
||||
var/validservants = 0
|
||||
var/unconverted_ais_exist = get_unconverted_ais()
|
||||
var/list/scripture_states = scripture_unlock_check()
|
||||
var/list/textlist
|
||||
for(var/mob/living/L in GLOB.living_mob_list)
|
||||
if(is_servant_of_ratvar(L))
|
||||
@@ -496,7 +493,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
textlist += "<b>[unconverted_ais_exist] unconverted AIs exist!</b><br>"
|
||||
else
|
||||
textlist += "<b>An unconverted AI exists!</b><br>"
|
||||
if(scripture_states[SCRIPTURE_REVENANT])
|
||||
if(SSticker.scripture_states[SCRIPTURE_REVENANT])
|
||||
var/inathneq_available = GLOB.clockwork_generals_invoked["inath-neq"] <= world.time
|
||||
var/sevtug_available = GLOB.clockwork_generals_invoked["sevtug"] <= world.time
|
||||
var/nezbere_available = GLOB.clockwork_generals_invoked["nezbere"] <= world.time
|
||||
@@ -508,9 +505,9 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
textlist += "Generals available: <b>NONE</b><br>"
|
||||
else
|
||||
textlist += "Generals available: <b>NONE</b><br>"
|
||||
for(var/i in scripture_states)
|
||||
for(var/i in SSticker.scripture_states)
|
||||
if(i != SCRIPTURE_DRIVER) //ignore the always-unlocked stuff
|
||||
textlist += "[i] Scripture: <b>[scripture_states[i] ? "UNLOCKED":"LOCKED"]</b><br>"
|
||||
textlist += "[i] Scripture: <b>[SSticker.scripture_states[i] ? "UNLOCKED":"LOCKED"]</b><br>"
|
||||
desc = textlist.Join()
|
||||
..()
|
||||
|
||||
|
||||
@@ -207,10 +207,9 @@ Credit where due:
|
||||
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)
|
||||
for(var/i in SSticker.scripture_states)
|
||||
if(i != SCRIPTURE_DRIVER)
|
||||
text += "<br><b>[i] scripture</b> was: <b>[scripture_states[i] ? "UN":""]LOCKED</b>"
|
||||
text += "<br><b>[i] scripture</b> was: <b>[SSticker.scripture_states[i] ? "UN":""]LOCKED</b>"
|
||||
if(servants_of_ratvar.len)
|
||||
text += "<br><b>Ratvar's servants were:</b>"
|
||||
for(var/datum/mind/M in servants_of_ratvar)
|
||||
|
||||
@@ -7,13 +7,17 @@
|
||||
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 && GLOB.clockwork_caches >= SCRIPT_CACHE_REQ)
|
||||
.[SCRIPTURE_SCRIPT] = (SSticker.scripture_states[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 && GLOB.clockwork_caches >= APPLICATION_CACHE_REQ && GLOB.clockwork_construction_value >= APPLICATION_CV_REQ)
|
||||
.[SCRIPTURE_APPLICATION] = (SSticker.scripture_states[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 && GLOB.clockwork_caches >= REVENANT_CACHE_REQ && GLOB.clockwork_construction_value >= REVENANT_CV_REQ)
|
||||
.[SCRIPTURE_REVENANT] = (SSticker.scripture_states[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 && GLOB.clockwork_caches >= JUDGEMENT_CACHE_REQ && GLOB.clockwork_construction_value >= JUDGEMENT_CV_REQ && !unconverted_ai_exists)
|
||||
.[SCRIPTURE_JUDGEMENT] = (SSticker.scripture_states[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
|
||||
@@ -21,7 +25,7 @@
|
||||
. = scripture_unlock_check()
|
||||
for(var/i in .)
|
||||
if(.[i] != previous_states[i])
|
||||
hierophant_message("<span class='large_brass'><i>Hierophant Network:</i> <b>[i] Scripture has been [.[i] ? "un":""]locked.</b></span>")
|
||||
hierophant_message("<span class='large_brass'><i>Hierophant Network:</i> <b>[i] Scripture has been [.[i] ? "un":""]locked.</b></span>") //maybe admins fucked with scripture states?
|
||||
update_slab_info()
|
||||
|
||||
/proc/get_unconverted_ais()
|
||||
@@ -59,6 +63,3 @@
|
||||
//changes construction value
|
||||
/proc/change_construction_value(amount)
|
||||
GLOB.clockwork_construction_value += amount
|
||||
|
||||
/proc/can_recite_scripture(mob/living/L)
|
||||
return (is_servant_of_ratvar(L) && L.stat == CONSCIOUS && L.can_speak_vocal() && (GLOB.ratvar_awakens || (ishuman(L) || issilicon(L))))
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
var/target_component_id //the target component ID to create, if any
|
||||
var/no_cost = FALSE //If the slab is admin-only and needs no components and has no scripture locks
|
||||
var/speed_multiplier = 1 //multiples how fast this slab recites scripture
|
||||
var/nonhuman_usable = FALSE //if the slab can be used by nonhumans, defaults to off
|
||||
var/produces_components = TRUE //if it produces components at all
|
||||
var/selected_scripture = SCRIPTURE_DRIVER
|
||||
var/recollecting = FALSE //if we're looking at fancy recollection
|
||||
@@ -32,9 +33,13 @@
|
||||
no_cost = TRUE
|
||||
produces_components = FALSE
|
||||
|
||||
/obj/item/clockwork/slab/scarab
|
||||
nonhuman_usable = TRUE
|
||||
|
||||
/obj/item/clockwork/slab/debug
|
||||
speed_multiplier = 0
|
||||
no_cost = TRUE
|
||||
nonhuman_usable = TRUE
|
||||
|
||||
/obj/item/clockwork/slab/debug/attack_hand(mob/living/user)
|
||||
..()
|
||||
@@ -44,6 +49,7 @@
|
||||
/obj/item/clockwork/slab/cyborg //three scriptures, plus a spear and proselytizer
|
||||
clockwork_desc = "A divine link to the Celestial Derelict, allowing for limited recital of scripture.\n\
|
||||
Hitting a slab, a Servant with a slab, or a cache will <b>transfer</b> this slab's components into the target, the target's slab, or the global cache, respectively."
|
||||
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
|
||||
@@ -100,6 +106,12 @@
|
||||
slab_ability = null
|
||||
return ..()
|
||||
|
||||
/obj/item/clockwork/slab/ratvar_act()
|
||||
if(GLOB.ratvar_awakens)
|
||||
nonhuman_usable = TRUE
|
||||
else
|
||||
nonhuman_usable = initial(nonhuman_usable)
|
||||
|
||||
/obj/item/clockwork/slab/dropped(mob/user)
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/check_on_mob, user), 1) //dropped is called before the item is out of the slot, so we need to check slightly later
|
||||
@@ -126,7 +138,7 @@
|
||||
production_time = world.time + SLAB_PRODUCTION_TIME + production_slowdown
|
||||
var/mob/living/L
|
||||
L = get_atom_on_turf(src, /mob/living)
|
||||
if(istype(L) && can_recite_scripture(L))
|
||||
if(istype(L) && is_servant_of_ratvar(L) && (nonhuman_usable || ishuman(L)))
|
||||
var/component_to_generate = target_component_id
|
||||
if(!component_to_generate)
|
||||
component_to_generate = get_weighted_component_id(src) //more likely to generate components that we have less of
|
||||
@@ -256,7 +268,7 @@
|
||||
if(busy)
|
||||
to_chat(user, "<span class='warning'>[src] refuses to work, displaying the message: \"[busy]!\"</span>")
|
||||
return 0
|
||||
if(!can_recite_scripture(user))
|
||||
if(!nonhuman_usable && !ishuman(user))
|
||||
to_chat(user, "<span class='nezbere'>[src] hums fitfully in your hands, but doesn't seem to do anything...</span>")
|
||||
return 0
|
||||
access_display(user)
|
||||
@@ -276,15 +288,14 @@
|
||||
ui.open()
|
||||
|
||||
/obj/item/clockwork/slab/proc/recite_scripture(datum/clockwork_scripture/scripture, mob/living/user)
|
||||
if(!scripture || !user || !user.canUseTopic(src) || !can_recite_scripture(user))
|
||||
if(!scripture || !user || !user.canUseTopic(src) || (!nonhuman_usable && !ishuman(user)))
|
||||
return FALSE
|
||||
if(user.get_active_held_item() != src)
|
||||
to_chat(user, "<span class='warning'>You need to hold the slab in your active hand to recite scripture!</span>")
|
||||
return FALSE
|
||||
var/initial_tier = initial(scripture.tier)
|
||||
if(initial_tier != SCRIPTURE_PERIPHERAL)
|
||||
var/list/tiers_of_scripture = scripture_unlock_check()
|
||||
if(!GLOB.ratvar_awakens && !no_cost && !tiers_of_scripture[initial_tier])
|
||||
if(!GLOB.ratvar_awakens && !no_cost && !SSticker.scripture_states[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
|
||||
@@ -401,15 +412,27 @@
|
||||
|
||||
switch(selected_scripture) //display info based on selected scripture tier
|
||||
if(SCRIPTURE_DRIVER)
|
||||
data["tier_info"] = "<font color=#B18B25><i>These scriptures are always unlocked.</i></font>"
|
||||
data["tier_info"] = "<font color=#B18B25><b>These scriptures are permenantly unlocked.</b></font>"
|
||||
if(SCRIPTURE_SCRIPT)
|
||||
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[SCRIPT_SERVANT_REQ]</b> Servants and <b>[SCRIPT_CACHE_REQ]</b> Tinkerer's Cache.</i></font>"
|
||||
if(SSticker.scripture_states[SCRIPTURE_SCRIPT])
|
||||
data["tier_info"] = "<font color=#B18B25><b>These scriptures are permenantly unlocked.</b></font>"
|
||||
else
|
||||
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[SCRIPT_SERVANT_REQ]</b> Servants and <b>[SCRIPT_CACHE_REQ]</b> Tinkerer's Cache.</i></font>"
|
||||
if(SCRIPTURE_APPLICATION)
|
||||
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[APPLICATION_SERVANT_REQ]</b> Servants, <b>[APPLICATION_CACHE_REQ]</b> Tinkerer's Caches, and <b>[APPLICATION_CV_REQ]CV</b>.</i></font>"
|
||||
if(SSticker.scripture_states[SCRIPTURE_APPLICATION])
|
||||
data["tier_info"] = "<font color=#B18B25><b>These scriptures are permenantly unlocked.</b></font>"
|
||||
else
|
||||
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[APPLICATION_SERVANT_REQ]</b> Servants, <b>[APPLICATION_CACHE_REQ]</b> Tinkerer's Caches, and <b>[APPLICATION_CV_REQ]CV</b>.</i></font>"
|
||||
if(SCRIPTURE_REVENANT)
|
||||
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[REVENANT_SERVANT_REQ]</b> Servants, <b>[REVENANT_CACHE_REQ]</b> Tinkerer's Caches, and <b>[REVENANT_CV_REQ]CV</b>.</i></font>"
|
||||
if(SSticker.scripture_states[SCRIPTURE_REVENANT])
|
||||
data["tier_info"] = "<font color=#B18B25><b>These scriptures are permenantly unlocked.</b></font>"
|
||||
else
|
||||
data["tier_info"] = "<font color=#B18B25><i>These scriptures require at least <b>[REVENANT_SERVANT_REQ]</b> Servants, <b>[REVENANT_CACHE_REQ]</b> Tinkerer's Caches, and <b>[REVENANT_CV_REQ]CV</b>.</i></font>"
|
||||
if(SCRIPTURE_JUDGEMENT)
|
||||
data["tier_info"] = "<font color=#B18B25><i>This scripture requires at least <b>[JUDGEMENT_SERVANT_REQ]</b> Servants, <b>[JUDGEMENT_CACHE_REQ]</b> Tinkerer's Caches, and <b>[JUDGEMENT_CV_REQ]CV</b>.<br>In addition, there may not be any active non-Servant AIs.</i></font>"
|
||||
if(SSticker.scripture_states[SCRIPTURE_JUDGEMENT])
|
||||
data["tier_info"] = "<font color=#B18B25><b>This scripture is permenantly unlocked.</b></font>"
|
||||
else
|
||||
data["tier_info"] = "<font color=#B18B25><i>This scripture requires at least <b>[JUDGEMENT_SERVANT_REQ]</b> Servants, <b>[JUDGEMENT_CACHE_REQ]</b> Tinkerer's Caches, and <b>[JUDGEMENT_CV_REQ]CV</b>.<br>In addition, there may not be any active non-Servant AIs.</i></font>"
|
||||
|
||||
data["selected"] = selected_scripture
|
||||
|
||||
|
||||
Reference in New Issue
Block a user