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:
Poojawa
2017-04-13 23:37:00 -05:00
committed by GitHub
parent cdc32c98fa
commit 7e9b96a00f
1322 changed files with 174827 additions and 23888 deletions
@@ -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