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
@@ -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)