Skip to content

Commit

Permalink
(Ready) Clockwork Cult Rework: Proof-of-concept (tgstation#29741)
Browse files Browse the repository at this point in the history
* Starting on the rework

* Reworks the Ark

* Work on Reebe

* More Ark stuff

* this too

* Removes ark silliness, remaps Reebe a tad

* Spawning mechanics

* Work on gamemode code

* Finishes up ark stuff

* Removes Judgement, and lots of other changes

* New Ark activation sounds, Ratvar text

* Spawn protection!

* Adds the abscondence bijou

* Bijou stuff

* well, this is it

* somewhat absentminded coder

* Remaps the Reebe z

* replica fabricators now work!

* Guide paper!

* Now they're clockwork floors

* Infirmary, tweaks, numbers

* A new thing!

* this is ok for now

* I was gonna whine but it's actually necessary

* Adds damage scaling to ocular wardens

* I missed a thing

* you can go back too

* New clockwork armor sprites

* Weapons, scripture, oh my!

* no! shoo!

* hey, I forgot about you!

* this looks much better, I'll give you that

* no teleporting into the void!

* we have no need of you anymore

* Conflicteroos

* AUTOMATIC SPINNING CHAIRS

* how many times do we have to teach you this LESSON OLD MAN

* flagged!

* last time, meesa promise

* Conflicts 1

* wood filling

* Kindle is a projectile, and other stuff

* Chameleon jumpsuit, some small changes

* 150 hours of testing

* Curious is the trapmaker's art

* Conflicts 1

* naaah

* Fixes an ark sound

* Removes the prolonging prism

* Adds a delay to warping in

* First steps towards changing the power system

* Removes power from sigils, moves to global

* Conflicts 1

* zoom zoom

* Adds the stargazer, re-adds conversion

* conflicts? more like CLOCK-flicts

* get it? clockflicts?

* Daemon tuning

* Scraps components, 1/?

* A grace period, among other things

* You can't get to reebe from space no stop bad

* Adds some cogscarab shells to Reebe - yes, I get the sounds

* FUCK

* Chairs are very important.

* Clock golems, sound improvement, intercoms

* Sounds, floor fixes, conflicts

* Fixes the conflicts

* Prevents intercom use during non-clock rounds

* Wiki, HUD timer, tweaks, golems

* Components, removes unused structures, rep. fab power

* go-time

* Ending the round is not a good idea

* whoops, forgot about you

* ssh is ok

* this works too
  • Loading branch information
Ashe Higgs authored and optimumtact committed Sep 26, 2017
1 parent 2fce446 commit b7e7779
Show file tree
Hide file tree
Showing 107 changed files with 2,859 additions and 2,764 deletions.
1 change: 1 addition & 0 deletions _maps/basemap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "map_files\generic\Space.dmm"
#include "map_files\generic\SpaceDock.dmm"
#include "map_files\Mining\Lavaland.dmm"
#include "map_files\generic\City_of_Cogs.dmm"

#ifdef ALL_MAPS
#include "map_files\debug\runtimestation.dmm"
Expand Down
345 changes: 345 additions & 0 deletions _maps/map_files/generic/City_of_Cogs.dmm

Large diffs are not rendered by default.

46 changes: 17 additions & 29 deletions code/__DEFINES/clockcult.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,43 +8,31 @@
GLOBAL_VAR_INIT(clockwork_construction_value, 0) //The total value of all structures built by the clockwork cult
GLOBAL_VAR_INIT(clockwork_caches, 0) //How many clockwork caches exist in the world (not each individual)
GLOBAL_VAR_INIT(clockwork_vitality, 0) //How much Vitality is stored, total
GLOBAL_LIST_EMPTY(active_daemons) //A list of all active tinkerer's daemons
GLOBAL_VAR_INIT(clockwork_power, 0) //How many watts of power are globally available to the clockwork cult

GLOBAL_LIST_EMPTY(all_clockwork_objects) //All clockwork items, structures, and effects in existence
GLOBAL_LIST_EMPTY(all_clockwork_mobs) //All clockwork SERVANTS (not creatures) in existence
GLOBAL_LIST_INIT(clockwork_component_cache, list(BELLIGERENT_EYE = 0, VANGUARD_COGWHEEL = 0, GEIS_CAPACITOR = 0, REPLICANT_ALLOY = 0, HIEROPHANT_ANSIBLE = 0)) //The pool of components that caches draw from

GLOBAL_VAR_INIT(ratvar_approaches, 0) //The servants can choose to "herald" Ratvar, permanently buffing them but announcing their presence to the crew.
GLOBAL_VAR_INIT(ratvar_awakens, 0) //If Ratvar has been summoned; not a boolean, for proper handling of multiple Ratvars
GLOBAL_VAR_INIT(ark_of_the_clockwork_justiciar, FALSE) //The Ark on the Reebe z-level

GLOBAL_VAR_INIT(clockwork_gateway_activated, FALSE) //if a gateway to the celestial derelict has ever been successfully activated
GLOBAL_VAR_INIT(script_scripture_unlocked, FALSE) //If script scripture is available, through converting at least one crewmember
GLOBAL_VAR_INIT(application_scripture_unlocked, FALSE) //If script scripture is available
GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not used to track existing scripture

//Scripture tiers and requirements; peripherals should never be used
#define SCRIPTURE_PERIPHERAL "Peripheral"
#define SCRIPTURE_DRIVER "Driver"
#define SCRIPTURE_SCRIPT "Script"
#define SCRIPT_SERVANT_REQ 6
#define SCRIPT_CACHE_REQ 1
#define SCRIPTURE_APPLICATION "Application"
#define APPLICATION_SERVANT_REQ 9
#define APPLICATION_CACHE_REQ 3
#define APPLICATION_CV_REQ 100
#define SCRIPTURE_JUDGEMENT "Judgement"
#define JUDGEMENT_SERVANT_REQ 12
#define JUDGEMENT_CACHE_REQ 5
#define JUDGEMENT_CV_REQ 300

//general component/cooldown things
#define SLAB_PRODUCTION_TIME 450 //how long(deciseconds) slabs require to produce a single component; defaults to 45 seconds

#define SLAB_SERVANT_SLOWDOWN 150 //how much each servant above 5 slows down slab-based generation; defaults to 15 seconds per sevant

#define SLAB_SLOWDOWN_MAXIMUM 1350 //maximum slowdown from additional servants; defaults to 2 minutes 15 seconds

#define CACHE_PRODUCTION_TIME 300 //how long(deciseconds) caches require to produce a component; defaults to 30 seconds

#define ACTIVE_CACHE_SLOWDOWN 50 //how many additional deciseconds caches take to produce a component for each linked cache; defaults to 5 seconds

#define LOWER_PROB_PER_COMPONENT 10 //how much each component in the cache reduces the weight of getting another of that component type
//Various costs related to power.
#define SCRIPT_UNLOCK_THRESHOLD 50000 //Scripts will unlock if the total power reaches this amount
#define APPLICATION_UNLOCK_THRESHOLD 100000 //Applications will unlock if the total powre reaches this amount

#define MAX_COMPONENTS_BEFORE_RAND (10*LOWER_PROB_PER_COMPONENT) //the number of each component, times LOWER_PROB_PER_COMPONENT, you need to have before component generation will become random
#define ABSCOND_ABDUCTION_COST 95

//clockcult power defines
#define MIN_CLOCKCULT_POWER 25 //the minimum amount of power clockcult machines will handle gracefully
Expand Down Expand Up @@ -72,11 +60,11 @@ GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not us
//Ark defines
#define GATEWAY_SUMMON_RATE 1 //the time amount the Gateway to the Celestial Derelict gets each process tick; defaults to 1 per tick

#define GATEWAY_REEBE_FOUND 119 //when progress is at or above this, the gateway finds reebe and begins drawing power
#define GATEWAY_REEBE_FOUND 240 //when progress is at or above this, the gateway finds reebe and begins drawing power

#define GATEWAY_RATVAR_COMING 239 //when progress is at or above this, ratvar has entered and is coming through the gateway
#define GATEWAY_RATVAR_COMING 480 //when progress is at or above this, ratvar has entered and is coming through the gateway

#define GATEWAY_RATVAR_ARRIVAL 300 //when progress is at or above this, game over ratvar's here everybody go home
#define GATEWAY_RATVAR_ARRIVAL 600 //when progress is at or above this, game over ratvar's here everybody go home

#define ARK_SUMMON_COST 5 //how many of each component an Ark costs to summon

Expand All @@ -94,6 +82,6 @@ GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not us

#define OCULAR_WARDEN_EXCLUSION_RANGE 3 //the range at which ocular wardens cannot be placed near other ocular wardens

#define RATVARIAN_SPEAR_DURATION 1800 //how long ratvarian spears last; defaults to 3 minutes
#define CLOCKWORK_ARMOR_COOLDOWN 1800 //The cooldown period between summoning suits of clockwork armor

#define PRISM_DELAY_DURATION 1200 //how long prolonging prisms delay the shuttle for; defaults to 2 minutes
#define RATVARIAN_SPEAR_COOLDOWN 300 //The cooldown period between summoning another Ratvarian spear
5 changes: 4 additions & 1 deletion code/__DEFINES/maps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ The /tg/ codebase currently requires you to have 11 z-levels of the same size di
z-level order is important, the order you put them in inside the map config.dm will determine what z level number they are assigned ingame.
Names of z-level do not matter, but order does greatly, for instances such as checking alive status of revheads on z1
current as of 2016/6/2
current as of september 17, 2017
z1 = station
z2 = centcom
z5 = mining
z6 = city of cogs
Everything else = randomized space
Last space-z level = empty
*/
Expand All @@ -17,6 +18,7 @@ Last space-z level = empty

#define MAIN_STATION "Main Station"
#define CENTCOM "CentCom"
#define CITY_OF_COGS "City of Cogs"
#define EMPTY_AREA_1 "Empty Area 1"
#define EMPTY_AREA_2 "Empty Area 2"
#define MINING "Mining Asteroid"
Expand All @@ -38,6 +40,7 @@ Last space-z level = empty
#define ZLEVEL_STATION_PRIMARY 2
#define ZLEVEL_MINING 5
#define ZLEVEL_LAVALAND 5
#define ZLEVEL_CITYOFCOGS 6
#define ZLEVEL_EMPTY_SPACE 12
#define ZLEVEL_TRANSIT 11

Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/status_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
#define CURSE_WASTING 4 //causes gradual damage
#define CURSE_GRASPING 8 //hands reach out from the sides of the screen, doing damage and stunning if they hit the target

#define STATUS_EFFECT_KINDLE /datum/status_effect/kindle //A knockdown reduced by 1 second for every 3 points of damage the target takes.

/////////////
// NEUTRAL //
/////////////
Expand Down
2 changes: 2 additions & 0 deletions code/_globalvars/lists/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ GLOBAL_LIST_EMPTY(blobstart)
GLOBAL_LIST_EMPTY(secequipment)
GLOBAL_LIST_EMPTY(deathsquadspawn)
GLOBAL_LIST_EMPTY(emergencyresponseteamspawn)
GLOBAL_LIST_EMPTY(servant_spawns) //Servants of Ratvar spawn here
GLOBAL_LIST_EMPTY(city_of_cogs_spawns) //Anyone entering the City of Cogs spawns here
GLOBAL_LIST_EMPTY(ruin_landmarks)

//away missions
Expand Down
127 changes: 19 additions & 108 deletions code/_onclick/hud/alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -378,90 +378,6 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
/obj/screen/alert/clockwork
alerttooltipstyle = "clockcult"

/obj/screen/alert/clockwork/scripture_reqs
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"

/obj/screen/alert/clockwork/scripture_reqs/Initialize()
. = ..()
START_PROCESSING(SSprocessing, src)
process()

/obj/screen/alert/clockwork/scripture_reqs/Destroy()
STOP_PROCESSING(SSprocessing, src)
return ..()

/obj/screen/alert/clockwork/scripture_reqs/process()
if(GLOB.clockwork_gateway_activated)
mob_viewer.clear_alert("scripturereq")
return
var/current_state
for(var/i in SSticker.scripture_states)
if(!SSticker.scripture_states[i])
current_state = i
break
icon_state = "no"
if(!current_state)
name = "Current Objective"
for(var/obj/structure/destructible/clockwork/massive/celestial_gateway/G in GLOB.all_clockwork_objects)
var/area/gate_area = get_area(G)
desc = "<b>Protect the Ark at [gate_area.map_name]!</b>"
return
desc = "<b>All tiers of Scripture are unlocked.<br>\
Acquire components and summon the Ark.</b>"
else
name = "Next Tier Requirements"
var/validservants = 0
var/unconverted_ais_exist = get_unconverted_ais()
for(var/mob/living/L in GLOB.living_mob_list)
if(is_servant_of_ratvar(L) && (ishuman(L) || issilicon(L)))
validservants++
var/req_servants = 0
var/req_caches = 0
var/req_cv = 0
var/req_ai = FALSE
var/list/textlist = list("Requirements for <b>[current_state] Scripture:</b>")
switch(current_state) //get our requirements based on the tier
if(SCRIPTURE_SCRIPT)
req_servants = SCRIPT_SERVANT_REQ
req_caches = SCRIPT_CACHE_REQ
if(SCRIPTURE_APPLICATION)
req_servants = APPLICATION_SERVANT_REQ
req_caches = APPLICATION_CACHE_REQ
req_cv = APPLICATION_CV_REQ
if(SCRIPTURE_JUDGEMENT)
req_servants = JUDGEMENT_SERVANT_REQ
req_caches = JUDGEMENT_CACHE_REQ
req_cv = JUDGEMENT_CV_REQ
req_ai = TRUE
textlist += "<br><b>[validservants]/[req_servants]</b> Servants"
if(validservants < req_servants)
icon_state += "-servants" //in this manner, generate an icon key based on what we're missing
else
textlist += ": <b><font color=#5A6068>\[CHECK\]</font></b>"
textlist += "<br><b>[GLOB.clockwork_caches]/[req_caches]</b> Tinkerer's Caches"
if(GLOB.clockwork_caches < req_caches)
icon_state += "-caches"
else
textlist += ": <b><font color=#5A6068>\[CHECK\]</font></b>"
if(req_cv) //cv only shows up if the tier requires it
textlist += "<br><b>[GLOB.clockwork_construction_value]/[req_cv]</b> Construction Value"
if(GLOB.clockwork_construction_value < req_cv)
icon_state += "-cv"
else
textlist += ": <b><font color=#5A6068>\[CHECK\]</font></b>"
if(req_ai) //same for ai
if(unconverted_ais_exist)
if(unconverted_ais_exist > 1)
textlist += "<br><b>[unconverted_ais_exist] unconverted AIs exist!</b><br>"
else
textlist += "<br><b>An unconverted AI exists!</b>"
icon_state += "-ai"
else
textlist += "<br>No unconverted AIs exist: <b><font color=#5A6068>\[CHECK\]</font></b>"
desc = textlist.Join()

/obj/screen/alert/clockwork/infodump
name = "Global Records"
desc = "You shouldn't be seeing this description, because it should be dynamically generated."
Expand All @@ -473,7 +389,6 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
else
var/servants = 0
var/validservants = 0
var/unconverted_ais_exist = get_unconverted_ais()
var/list/textlist
for(var/mob/living/L in GLOB.living_mob_list)
if(is_servant_of_ratvar(L))
Expand All @@ -487,29 +402,25 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
textlist = list("<b>[servants]</b> Servants, [validservants ? "<b>[validservants]</b> of which counts":"none of which count"] towards scripture.<br>")
else
textlist = list("<b>[servants]</b> Servant, who [validservants ? "counts":"does not count"] towards scripture.<br>")
textlist += "<b>[GLOB.clockwork_caches ? "[GLOB.clockwork_caches]</b> Tinkerer's Caches.":"No Tinkerer's Caches, construct one!</b>"]<br>\
<b>[GLOB.clockwork_construction_value]</b> Construction Value.<br>"
textlist += "<b>[Floor(servants * 0.2)]</b> Tinkerer's Daemons can be active at once. <b>[LAZYLEN(GLOB.active_daemons)]</b> are active.<br>"
for(var/obj/structure/destructible/clockwork/massive/celestial_gateway/G in GLOB.all_clockwork_objects)
var/area/gate_area = get_area(G)
textlist += "Ark Location: <b>[uppertext(gate_area.map_name)]</b><br>"
if(G.still_needs_components())
textlist += "Ark Components required:<br>"
for(var/i in G.required_components)
if(G.required_components[i])
textlist += "[get_component_icon(i)] <b><font color=[get_component_color_bright(i)]>[G.required_components[i]]</font></b> "
textlist += "<br>"
else
textlist += "Seconds until Ratvar's arrival: <b>[G.get_arrival_text(TRUE)]</b><br>"
break
if(unconverted_ais_exist)
if(unconverted_ais_exist > 1)
textlist += "<b>[unconverted_ais_exist] unconverted AIs exist!</b><br>"
else
textlist += "<b>An unconverted AI exists!</b><br>"
for(var/i in SSticker.scripture_states)
if(i != SCRIPTURE_DRIVER) //ignore the always-unlocked stuff
textlist += "[i] Scripture: <b>[SSticker.scripture_states[i] ? "UNLOCKED":"LOCKED"]</b><br>"
for(var/i in SSticker.scripture_states)
if(i != SCRIPTURE_DRIVER) //ignore the always-unlocked stuff
textlist += "[i] Scripture: <b>[SSticker.scripture_states[i] ? "UNLOCKED":"LOCKED"]</b><br>"
var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar
if(G)
var/time_info
var/time_name
if(G.seconds_until_activation)
time_info = G.seconds_until_activation
time_name = "until the Ark activates"
else if(G.grace_period)
time_info = G.grace_period
time_name = "of grace period remaining"
else if(G.progress_in_seconds)
time_info = GATEWAY_RATVAR_ARRIVAL - G.progress_in_seconds
time_name = "until the Ark finishes summoning"
if(time_info)
textlist += "<b>[time_info / 60] minutes</b> [time_name].<br>"
textlist += "<b>[DisplayPower(get_clockwork_power())]</b> power available for use."
desc = textlist.Join()
..()

Expand Down
45 changes: 0 additions & 45 deletions code/_onclick/hud/clockwork_marauder.dm

This file was deleted.

2 changes: 1 addition & 1 deletion code/controllers/subsystem/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ SUBSYSTEM_DEF(mapping)
var/space_zlevels = list()
for(var/i in ZLEVEL_SPACEMIN to ZLEVEL_SPACEMAX)
switch(i)
if(ZLEVEL_MINING, ZLEVEL_LAVALAND, ZLEVEL_EMPTY_SPACE, ZLEVEL_TRANSIT)
if(ZLEVEL_MINING, ZLEVEL_LAVALAND, ZLEVEL_EMPTY_SPACE, ZLEVEL_TRANSIT, ZLEVEL_CITYOFCOGS)
continue
else
space_zlevels += i
Expand Down
18 changes: 10 additions & 8 deletions code/datums/antagonists/datum_clockcult.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,23 +103,22 @@
S.laws.associate(S)
S.update_icons()
S.show_laws()
hierophant_network.Grant(S)
hierophant_network.title = "Silicon"
hierophant_network.span_for_name = "nezbere"
hierophant_network.span_for_message = "brass"
else if(isbrain(current))
hierophant_network.Grant(current)
hierophant_network.title = "Vessel"
hierophant_network.span_for_name = "nezbere"
hierophant_network.span_for_message = "alloy"
else if(isclockmob(current))
hierophant_network.Grant(current)
hierophant_network.title = "Construct"
hierophant_network.span_for_name = "nezbere"
hierophant_network.span_for_message = "brass"
hierophant_network.Grant(current)
current.throw_alert("clockinfo", /obj/screen/alert/clockwork/infodump)
if(!GLOB.clockwork_gateway_activated)
current.throw_alert("scripturereq", /obj/screen/alert/clockwork/scripture_reqs)
var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar
if(G.active && ishuman(current))
current.add_overlay(mutable_appearance('icons/effects/genetics.dmi', "servitude", -MUTATIONS_LAYER))

/datum/antagonist/clockcult/remove_innate_effects(mob/living/mob_override)
var/mob/living/current = owner.current
Expand All @@ -129,9 +128,10 @@
current.faction -= "ratvar"
current.remove_language(/datum/language/ratvar)
current.clear_alert("clockinfo")
current.clear_alert("scripturereq")
for(var/datum/action/innate/function_call/F in owner.current.actions) //Removes any bound Ratvarian spears
qdel(F)
for(var/datum/action/innate/clockwork_arnaments/C in owner.current.actions) //Removes any bound clockwork armor
qdel(C)
for(var/datum/action/innate/call_weapon/W in owner.current.actions) //and weapons too
qdel(W)
if(issilicon(current))
var/mob/living/silicon/S = current
if(isAI(S))
Expand All @@ -149,6 +149,8 @@
R.module.rebuild_modules()
if(temp_owner)
temp_owner.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them, we need to update buttons
temp_owner.cut_overlays()
temp_owner.regenerate_icons()

/datum/antagonist/clockcult/on_removal()
SSticker.mode.servants_of_ratvar -= owner
Expand Down
Loading

0 comments on commit b7e7779

Please sign in to comment.