Merge branch 'master' into upstream-merge-31069

This commit is contained in:
LetterJay
2017-10-01 02:56:28 -04:00
committed by GitHub
304 changed files with 74912 additions and 8305 deletions
+19 -108
View File
@@ -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."
@@ -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))
@@ -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()
..()
-45
View File
@@ -1,45 +0,0 @@
/datum/hud/marauder
var/obj/screen/hosthealth
var/obj/screen/blockchance
var/obj/screen/counterchance
/datum/hud/marauder/New(mob/living/simple_animal/hostile/guardian/owner)
..()
var/obj/screen/using
healths = new /obj/screen/healths/clock()
infodisplay += healths
hosthealth = new /obj/screen/healths/clock()
hosthealth.screen_loc = ui_internal
infodisplay += hosthealth
using = new /obj/screen/marauder/emerge()
using.screen_loc = ui_zonesel
static_inventory += using
/datum/hud/marauder/Destroy()
blockchance = null
counterchance = null
hosthealth = null
return ..()
/mob/living/simple_animal/hostile/clockwork/marauder/create_mob_hud()
if(client && !hud_used)
hud_used = new /datum/hud/marauder(src, ui_style2icon(client.prefs.UI_style))
/obj/screen/marauder
icon = 'icons/mob/clockwork_mobs.dmi'
/obj/screen/marauder/emerge
icon_state = "marauder_emerge"
name = "Emerge/Return"
desc = "Emerge or Return."
/obj/screen/marauder/emerge/Click()
if(istype(usr, /mob/living/simple_animal/hostile/clockwork/marauder))
var/mob/living/simple_animal/hostile/clockwork/marauder/M = usr
if(M.is_in_host())
M.try_emerge()
else
M.return_to_host()
+91 -104
View File
@@ -1,104 +1,91 @@
/mob/dead/observer/DblClickOn(var/atom/A, var/params)
if(client.click_intercept)
if(call(client.click_intercept,"InterceptClickOn")(src,params,A))
return
if(can_reenter_corpse && mind && mind.current)
if(A == mind.current || (mind.current in A)) // double click your corpse or whatever holds it
reenter_corpse() // (cloning scanner, body bag, closet, mech, etc)
return // seems legit.
// Things you might plausibly want to follow
if(ismovableatom(A))
ManualFollow(A)
// Otherwise jump
else if(A.loc)
loc = get_turf(A)
update_parallax_contents()
/mob/dead/observer/ClickOn(var/atom/A, var/params)
if(client.click_intercept)
if(call(client.click_intercept,"InterceptClickOn")(src,params,A))
return
var/list/modifiers = params2list(params)
if(modifiers["shift"] && modifiers["middle"])
ShiftMiddleClickOn(A)
return
if(modifiers["shift"] && modifiers["ctrl"])
CtrlShiftClickOn(A)
return
if(modifiers["middle"])
MiddleClickOn(A)
return
if(modifiers["shift"])
ShiftClickOn(A)
return
if(modifiers["alt"])
AltClickOn(A)
return
if(modifiers["ctrl"])
CtrlClickOn(A)
return
if(world.time <= next_move)
return
// You are responsible for checking config.ghost_interaction when you override this function
// Not all of them require checking, see below
A.attack_ghost(src)
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
/atom/proc/attack_ghost(mob/dead/observer/user)
if(user.client)
if(IsAdminGhost(user))
attack_ai(user)
if(user.client.prefs.inquisitive_ghost)
user.examinate(src)
// ---------------------------------------
// And here are some good things for free:
// Now you can click through portals, wormholes, gateways, and teleporters while observing. -Sayu
/obj/machinery/teleport/hub/attack_ghost(mob/user)
var/atom/l = loc
var/obj/machinery/computer/teleporter/com = locate(/obj/machinery/computer/teleporter, locate(l.x - 2, l.y, l.z))
if(com && com.locked)
user.forceMove(get_turf(com.locked))
/obj/effect/portal/attack_ghost(mob/user)
if(linked)
user.forceMove(get_turf(linked))
/obj/machinery/gateway/centerstation/attack_ghost(mob/user)
if(awaygate)
user.forceMove(awaygate.loc)
else
to_chat(user, "[src] has no destination.")
/obj/machinery/gateway/centeraway/attack_ghost(mob/user)
if(stationgate)
user.forceMove(stationgate.loc)
else
to_chat(user, "[src] has no destination.")
/obj/item/storage/attack_ghost(mob/user)
orient2hud(user)
show_to(user)
/obj/machinery/teleport/hub/attack_ghost(mob/user)
if(power_station && power_station.engaged && power_station.teleporter_console && power_station.teleporter_console.target)
user.forceMove(get_turf(power_station.teleporter_console.target))
// -------------------------------------------
// This was supposed to be used by adminghosts
// I think it is a *terrible* idea
// but I'm leaving it here anyway
// commented out, of course.
/*
/atom/proc/attack_admin(mob/user as mob)
if(!user || !user.client || !user.client.holder)
return
attack_hand(user)
*/
/mob/dead/observer/DblClickOn(var/atom/A, var/params)
if(client.click_intercept)
if(call(client.click_intercept,"InterceptClickOn")(src,params,A))
return
if(can_reenter_corpse && mind && mind.current)
if(A == mind.current || (mind.current in A)) // double click your corpse or whatever holds it
reenter_corpse() // (cloning scanner, body bag, closet, mech, etc)
return // seems legit.
// Things you might plausibly want to follow
if(ismovableatom(A))
ManualFollow(A)
// Otherwise jump
else if(A.loc)
loc = get_turf(A)
update_parallax_contents()
/mob/dead/observer/ClickOn(var/atom/A, var/params)
if(client.click_intercept)
if(call(client.click_intercept,"InterceptClickOn")(src,params,A))
return
var/list/modifiers = params2list(params)
if(modifiers["shift"] && modifiers["middle"])
ShiftMiddleClickOn(A)
return
if(modifiers["shift"] && modifiers["ctrl"])
CtrlShiftClickOn(A)
return
if(modifiers["middle"])
MiddleClickOn(A)
return
if(modifiers["shift"])
ShiftClickOn(A)
return
if(modifiers["alt"])
AltClickOn(A)
return
if(modifiers["ctrl"])
CtrlClickOn(A)
return
if(world.time <= next_move)
return
// You are responsible for checking config.ghost_interaction when you override this function
// Not all of them require checking, see below
A.attack_ghost(src)
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
/atom/proc/attack_ghost(mob/dead/observer/user)
if(user.client)
if(IsAdminGhost(user))
attack_ai(user)
if(user.client.prefs.inquisitive_ghost)
user.examinate(src)
// ---------------------------------------
// And here are some good things for free:
// Now you can click through portals, wormholes, gateways, and teleporters while observing. -Sayu
/obj/machinery/teleport/hub/attack_ghost(mob/user)
var/atom/l = loc
var/obj/machinery/computer/teleporter/com = locate(/obj/machinery/computer/teleporter, locate(l.x - 2, l.y, l.z))
if(com && com.locked)
user.forceMove(get_turf(com.locked))
/obj/effect/portal/attack_ghost(mob/user)
if(linked)
user.forceMove(get_turf(linked))
/obj/machinery/gateway/centerstation/attack_ghost(mob/user)
if(awaygate)
user.forceMove(awaygate.loc)
else
to_chat(user, "[src] has no destination.")
/obj/machinery/gateway/centeraway/attack_ghost(mob/user)
if(stationgate)
user.forceMove(stationgate.loc)
else
to_chat(user, "[src] has no destination.")
/obj/item/storage/attack_ghost(mob/user)
orient2hud(user)
show_to(user)
/obj/machinery/teleport/hub/attack_ghost(mob/user)
if(power_station && power_station.engaged && power_station.teleporter_console && power_station.teleporter_console.target)
user.forceMove(get_turf(power_station.teleporter_console.target))