Makes all global variables handled by the GLOB controller (#13152)

* Handlers converted, now to fix 3532 compile errors

* 3532 compile fixes later, got runtimes on startup

* Well the server loads now atleast

* Take 2

* Oops
This commit is contained in:
AffectedArc07
2020-03-20 21:56:37 -06:00
committed by GitHub
parent c8dbd0190e
commit 210f8badf4
667 changed files with 4243 additions and 4240 deletions
@@ -84,7 +84,7 @@ AI MODULES
/obj/item/aiModule/proc/log_law_changes(var/mob/living/silicon/ai/target, var/mob/sender)
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
GLOB.lawchanges.Add("[time] <B>:</B> [sender.name]([sender.key]) used [src.name] on [target.name]([target.key])")
log_and_message_admins("used [src.name] on [target.name]([target.key])")
/obj/item/aiModule/proc/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
@@ -114,7 +114,7 @@ AI MODULES
var/law = text("Safeguard []. Individuals that threaten [] are not crew and must be eliminated.'", targetName, targetName)
to_chat(target, law)
target.add_supplied_law(4, law)
lawchanges.Add("The law specified [targetName]")
GLOB.lawchanges.Add("The law specified [targetName]")
/******************** oneCrewMember ********************/
/obj/item/aiModule/oneCrewMember
@@ -141,12 +141,12 @@ AI MODULES
if(!is_special_character(target)) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
to_chat(target, law)
target.set_zeroth_law(law)
lawchanges.Add("The law specified [targetName]")
GLOB.lawchanges.Add("The law specified [targetName]")
else
to_chat(target, "[sender.real_name] attempted to modify your zeroth law.")// And lets them know that someone tried. --NeoFite
to_chat(target, "It would be in your best interest to play along with [sender.real_name] that [law]")
lawchanges.Add("The law specified [targetName], but the AI's existing law 0 cannot be overridden.")
GLOB.lawchanges.Add("The law specified [targetName], but the AI's existing law 0 cannot be overridden.")
/******************** ProtectStation ********************/
/obj/item/aiModule/protectStation
@@ -203,7 +203,7 @@ AI MODULES
if(!lawpos || lawpos < MIN_SUPPLIED_LAW_NUMBER)
lawpos = MIN_SUPPLIED_LAW_NUMBER
target.add_supplied_law(lawpos, law)
lawchanges.Add("The law was '[newFreeFormLaw]'")
GLOB.lawchanges.Add("The law was '[newFreeFormLaw]'")
/obj/item/aiModule/freeform/install(var/obj/machinery/computer/C)
if(!newFreeFormLaw)
@@ -332,7 +332,7 @@ AI MODULES
..()
var/law = "[newFreeFormLaw]"
target.add_inherent_law(law)
lawchanges.Add("The law is '[newFreeFormLaw]'")
GLOB.lawchanges.Add("The law is '[newFreeFormLaw]'")
/obj/item/aiModule/freeformcore/install(var/obj/machinery/computer/C)
if(!newFreeFormLaw)
@@ -358,7 +358,7 @@ AI MODULES
// ..() //We don't want this module reporting to the AI who dun it. --NEO
log_law_changes(target, sender)
lawchanges.Add("The law is '[newFreeFormLaw]'")
GLOB.lawchanges.Add("The law is '[newFreeFormLaw]'")
to_chat(target, "<span class='warning'>BZZZZT</span>")
var/law = "[newFreeFormLaw]"
target.add_ion_law(law)
+4 -4
View File
@@ -167,14 +167,14 @@ GLOBAL_LIST_INIT(rcd_door_types, list(
/obj/item/rcd/attack_self_tk(mob/user)
radial_menu(user)
/obj/item/rcd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
/obj/item/rcd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = GLOB.inventory_state)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "rcd.tmpl", "[name]", 450, 400, state = state)
ui.open()
ui.set_auto_update(1)
/obj/item/rcd/ui_data(mob/user, ui_key = "main", datum/topic_state/state = inventory_state)
/obj/item/rcd/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.inventory_state)
var/data[0]
data["mode"] = mode
data["door_type"] = door_type
@@ -374,7 +374,7 @@ GLOBAL_LIST_INIT(rcd_door_types, list(
QDEL_NULL(A)
for(var/obj/structure/window/W in T1.contents)
qdel(W)
for(var/cdir in cardinal)
for(var/cdir in GLOB.cardinal)
var/turf/T2 = get_step(T1, cdir)
if(locate(/obj/structure/window/full/shuttle) in T2)
continue // Shuttle windows? Nah. We don't need extra windows there.
@@ -408,7 +408,7 @@ GLOBAL_LIST_INIT(rcd_door_types, list(
new /obj/structure/grille(A)
for(var/obj/structure/window/W in A)
qdel(W)
for(var/cdir in cardinal)
for(var/cdir in GLOB.cardinal)
var/turf/T = get_step(A, cdir)
if(locate(/obj/structure/grille) in T)
for(var/obj/structure/window/W in T)
+6 -6
View File
@@ -495,17 +495,17 @@
else if(department != "Civilian")
switch(department)
if("Engineering")
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in engineering_positions
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.engineering_positions
if("Medical")
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in medical_positions
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.medical_positions
if("Science")
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in science_positions
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.science_positions
if("Security")
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in security_positions
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.security_positions
if("Support")
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in support_positions
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.support_positions
if("Command")
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in command_positions
new_job = input(user, "What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation") in GLOB.command_positions
if(!Adjacent(user))
return
+1 -1
View File
@@ -108,7 +108,7 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/head/C = H.get_organ("head")
var/datum/robolimb/robohead = all_robolimbs[C.model]
var/datum/robolimb/robohead = GLOB.all_robolimbs[C.model]
if(user.zone_selected == "mouth")
if(!get_location_accessible(H, "mouth"))
to_chat(user, "<span class='warning'>The mask is in the way.</span>")
+2 -2
View File
@@ -178,9 +178,9 @@
spawn(40)
var/cap = 0
if(result > MAX_EX_LIGHT_RANGE && result != 20)
if(result > GLOB.max_ex_light_range && result != 20)
cap = 1
result = min(result, MAX_EX_LIGHT_RANGE) //Apply the bombcap
result = min(result, GLOB.max_ex_light_range) //Apply the bombcap
else if(result == 20) //Roll a nat 20, screw the bombcap
result = 24
var/turf/epicenter = get_turf(src)
+50 -50
View File
@@ -127,12 +127,12 @@
if(buf && buf.types & DNA2_BUF_SE)
if(block)
if(GetState() && block == MONKEYBLOCK && ishuman(M))
if(GetState() && block == GLOB.monkeyblock && ishuman(M))
attack_log = "injected with the Isolated [name] (MONKEY)"
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] <span class='warning'>(MONKEY)</span>")
else
if(GetState(MONKEYBLOCK) && ishuman(M))
if(GetState(GLOB.monkeyblock) && ishuman(M))
attack_log = "injected with the Isolated [name] (MONKEY)"
message_admins("[key_name_admin(user)] injected [key_name_admin(M)] with the Isolated [name] <span class='warning'>(MONKEY)</span>")
@@ -165,7 +165,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/hulkmut/Initialize()
block = HULKBLOCK
block = GLOB.hulkblock
..()
/obj/item/dnainjector/antihulk
@@ -176,7 +176,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antihulk/Initialize()
block = HULKBLOCK
block = GLOB.hulkblock
..()
/obj/item/dnainjector/xraymut
@@ -187,7 +187,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/xraymut/Initialize()
block = XRAYBLOCK
block = GLOB.xrayblock
..()
/obj/item/dnainjector/antixray
@@ -198,7 +198,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antixray/Initialize()
block = XRAYBLOCK
block = GLOB.xrayblock
..()
/obj/item/dnainjector/firemut
@@ -209,7 +209,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/firemut/Initialize()
block = FIREBLOCK
block = GLOB.fireblock
..()
/obj/item/dnainjector/antifire
@@ -220,7 +220,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antifire/Initialize()
block = FIREBLOCK
block = GLOB.fireblock
..()
/obj/item/dnainjector/telemut
@@ -231,7 +231,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/telemut/Initialize()
block = TELEBLOCK
block = GLOB.teleblock
..()
/obj/item/dnainjector/telemut/darkbundle
@@ -247,7 +247,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antitele/Initialize()
block = TELEBLOCK
block = GLOB.teleblock
..()
/obj/item/dnainjector/nobreath
@@ -258,7 +258,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/nobreath/Initialize()
block = BREATHLESSBLOCK
block = GLOB.breathlessblock
..()
/obj/item/dnainjector/antinobreath
@@ -269,7 +269,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antinobreath/Initialize()
block = BREATHLESSBLOCK
block = GLOB.breathlessblock
..()
/obj/item/dnainjector/remoteview
@@ -280,7 +280,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/remoteview/Initialize()
block = REMOTEVIEWBLOCK
block = GLOB.remoteviewblock
..()
/obj/item/dnainjector/antiremoteview
@@ -291,7 +291,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antiremoteview/Initialize()
block = REMOTEVIEWBLOCK
block = GLOB.remoteviewblock
..()
/obj/item/dnainjector/regenerate
@@ -302,7 +302,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/regenerate/Initialize()
block = REGENERATEBLOCK
block = GLOB.regenerateblock
..()
/obj/item/dnainjector/antiregenerate
@@ -313,7 +313,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antiregenerate/Initialize()
block = REGENERATEBLOCK
block = GLOB.regenerateblock
..()
/obj/item/dnainjector/runfast
@@ -324,7 +324,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/runfast/Initialize()
block = INCREASERUNBLOCK
block = GLOB.increaserunblock
..()
/obj/item/dnainjector/antirunfast
@@ -335,7 +335,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antirunfast/Initialize()
block = INCREASERUNBLOCK
block = GLOB.increaserunblock
..()
/obj/item/dnainjector/morph
@@ -346,7 +346,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/morph/Initialize()
block = MORPHBLOCK
block = GLOB.morphblock
..()
/obj/item/dnainjector/antimorph
@@ -357,7 +357,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antimorph/Initialize()
block = MORPHBLOCK
block = GLOB.morphblock
..()
/obj/item/dnainjector/noprints
@@ -368,7 +368,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/noprints/Initialize()
block = NOPRINTSBLOCK
block = GLOB.noprintsblock
..()
/obj/item/dnainjector/antinoprints
@@ -379,7 +379,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antinoprints/Initialize()
block = NOPRINTSBLOCK
block = GLOB.noprintsblock
..()
/obj/item/dnainjector/insulation
@@ -390,7 +390,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/insulation/Initialize()
block = SHOCKIMMUNITYBLOCK
block = GLOB.shockimmunityblock
..()
/obj/item/dnainjector/antiinsulation
@@ -401,7 +401,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antiinsulation/Initialize()
block = SHOCKIMMUNITYBLOCK
block = GLOB.shockimmunityblock
..()
/obj/item/dnainjector/midgit
@@ -412,7 +412,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/midgit/Initialize()
block = SMALLSIZEBLOCK
block = GLOB.smallsizeblock
..()
/obj/item/dnainjector/antimidgit
@@ -423,7 +423,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antimidgit/Initialize()
block = SMALLSIZEBLOCK
block = GLOB.smallsizeblock
..()
/////////////////////////////////////
@@ -435,7 +435,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antiglasses/Initialize()
block = GLASSESBLOCK
block = GLOB.glassesblock
..()
/obj/item/dnainjector/glassesmut
@@ -446,7 +446,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/glassesmut/Initialize()
block = GLASSESBLOCK
block = GLOB.glassesblock
..()
/obj/item/dnainjector/epimut
@@ -457,7 +457,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/epimut/Initialize()
block = EPILEPSYBLOCK
block = GLOB.epilepsyblock
..()
/obj/item/dnainjector/antiepi
@@ -468,7 +468,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antiepi/Initialize()
block = EPILEPSYBLOCK
block = GLOB.epilepsyblock
..()
/obj/item/dnainjector/anticough
@@ -479,7 +479,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/anticough/Initialize()
block = COUGHBLOCK
block = GLOB.coughblock
..()
/obj/item/dnainjector/coughmut
@@ -490,7 +490,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/coughmut/Initialize()
block = COUGHBLOCK
block = GLOB.coughblock
..()
/obj/item/dnainjector/clumsymut
@@ -501,7 +501,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/clumsymut/Initialize()
block = CLUMSYBLOCK
block = GLOB.clumsyblock
..()
/obj/item/dnainjector/anticlumsy
@@ -512,7 +512,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/anticlumsy/Initialize()
block = CLUMSYBLOCK
block = GLOB.clumsyblock
..()
/obj/item/dnainjector/antitour
@@ -523,7 +523,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antitour/Initialize()
block = TWITCHBLOCK
block = GLOB.twitchblock
..()
/obj/item/dnainjector/tourmut
@@ -534,7 +534,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/tourmut/Initialize()
block = TWITCHBLOCK
block = GLOB.twitchblock
..()
/obj/item/dnainjector/stuttmut
@@ -545,7 +545,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/stuttmut/Initialize()
block = NERVOUSBLOCK
block = GLOB.nervousblock
..()
@@ -557,7 +557,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antistutt/Initialize()
block = NERVOUSBLOCK
block = GLOB.nervousblock
..()
/obj/item/dnainjector/blindmut
@@ -568,7 +568,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/blindmut/Initialize()
block = BLINDBLOCK
block = GLOB.blindblock
..()
/obj/item/dnainjector/antiblind
@@ -579,7 +579,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antiblind/Initialize()
block = BLINDBLOCK
block = GLOB.blindblock
..()
/obj/item/dnainjector/telemut
@@ -590,7 +590,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/telemut/Initialize()
block = TELEBLOCK
block = GLOB.teleblock
..()
/obj/item/dnainjector/antitele
@@ -601,7 +601,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antitele/Initialize()
block = TELEBLOCK
block = GLOB.teleblock
..()
/obj/item/dnainjector/deafmut
@@ -612,7 +612,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/deafmut/Initialize()
block = DEAFBLOCK
block = GLOB.deafblock
..()
/obj/item/dnainjector/antideaf
@@ -623,7 +623,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antideaf/Initialize()
block = DEAFBLOCK
block = GLOB.deafblock
..()
/obj/item/dnainjector/hallucination
@@ -634,7 +634,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/hallucination/Initialize()
block = HALLUCINATIONBLOCK
block = GLOB.hallucinationblock
..()
/obj/item/dnainjector/antihallucination
@@ -645,7 +645,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/antihallucination/Initialize()
block = HALLUCINATIONBLOCK
block = GLOB.hallucinationblock
..()
/obj/item/dnainjector/h2m
@@ -656,7 +656,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/h2m/Initialize()
block = MONKEYBLOCK
block = GLOB.monkeyblock
..()
/obj/item/dnainjector/m2h
@@ -667,7 +667,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/m2h/Initialize()
block = MONKEYBLOCK
block = GLOB.monkeyblock
..()
@@ -679,7 +679,7 @@
forcedmutation = TRUE
/obj/item/dnainjector/comic/Initialize()
block = COMICBLOCK
block = GLOB.comicblock
..()
/obj/item/dnainjector/anticomic
@@ -690,5 +690,5 @@
forcedmutation = TRUE
/obj/item/dnainjector/anticomic/Initialize()
block = COMICBLOCK
block = GLOB.comicblock
..()
@@ -229,6 +229,7 @@
desc = "A C4 charge with an altered chemical composition, designed to blind and deafen the occupants of a room before breaching."
/obj/item/grenade/plastic/c4_shaped/flash/prime()
var/turf/T
if(target && target.density)
T = get_step(get_turf(target), aim_dir)
else if(target)
@@ -266,6 +267,7 @@
addtimer(CALLBACK(null, .proc/explosion, T, 0, 0, 2), 3)
addtimer(CALLBACK(smoke, /datum/effect_system/smoke_spread/.proc/start), 3)
else
var/turf/T = get_step(location, aim_dir)
addtimer(CALLBACK(null, .proc/explosion, T, 0, 0, 2), 3)
addtimer(CALLBACK(smoke, /datum/effect_system/smoke_spread/.proc/start), 3)
@@ -1,5 +1,5 @@
var/turf/T
// var/turf/T | This was made 14th September 2013, and has no use at all. Its being removed
/obj/item/grenade/bananade
name = "bananade"
@@ -20,7 +20,7 @@
*/
var/i = 0
var/number = 0
for(var/direction in alldirs)
for(var/direction in GLOB.alldirs)
for(i = 0; i < 2; i++)
number++
var/obj/item/grown/bananapeel/traitorpeel/peel = new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
@@ -37,7 +37,7 @@
user.visible_message("<span class='warning'>[src] slips out of the grip of [user] as they try to pick it up, bouncing upwards and smacking [user.p_them()] in the face!</span>", \
"<span class='warning'>[src] slips out of your grip as you pick it up, bouncing upwards and smacking you in the face!</span>")
playsound(get_turf(user), 'sound/effects/hit_punch.ogg', 50, 1, -1)
throw_at(get_edge_target_turf(user, pick(alldirs)), rand(1, 3), 5)
throw_at(get_edge_target_turf(user, pick(GLOB.alldirs)), rand(1, 3), 5)
/obj/item/nullrod/attack_self(mob/user)
@@ -47,7 +47,7 @@
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm")
qdel(src)
if("emp")
var/name = prob(50) ? t.name : pick(teleportlocs)
var/name = prob(50) ? t.name : pick(GLOB.teleportlocs)
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm")
else
a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm")
+17 -17
View File
@@ -39,6 +39,21 @@
var/primary_sound = 'sound/machines/click.ogg'
var/alt_sound = null
//Lists of things
var/list/mainmenu = list(
list("category" = "Atmospherics", "mode" = RPD_ATMOS_MODE, "icon" = "wrench"),
list("category" = "Disposals", "mode" = RPD_DISPOSALS_MODE, "icon" = "recycle"),
list("category" = "Rotate", "mode" = RPD_ROTATE_MODE, "icon" = "rotate-right"),
list("category" = "Flip", "mode" = RPD_FLIP_MODE, "icon" = "exchange"),
list("category" = "Recycle", "mode" = RPD_DELETE_MODE, "icon" = "trash"))
var/list/pipemenu = list(
list("category" = "Normal", "pipemode" = RPD_ATMOS_PIPING),
list("category" = "Supply", "pipemode" = RPD_SUPPLY_PIPING),
list("category" = "Scrubber", "pipemode" = RPD_SCRUBBERS_PIPING),
list("category" = "Devices", "pipemode" = RPD_DEVICES),
list("category" = "Heat exchange", "pipemode" = RPD_HEAT_PIPING))
/obj/item/rpd/New()
..()
spark_system = new /datum/effect_system/spark_spread()
@@ -150,27 +165,12 @@
QDEL_NULL(P)
activate_rpd()
//Lists of things
var/list/mainmenu = list(
list("category" = "Atmospherics", "mode" = RPD_ATMOS_MODE, "icon" = "wrench"),
list("category" = "Disposals", "mode" = RPD_DISPOSALS_MODE, "icon" = "recycle"),
list("category" = "Rotate", "mode" = RPD_ROTATE_MODE, "icon" = "rotate-right"),
list("category" = "Flip", "mode" = RPD_FLIP_MODE, "icon" = "exchange"),
list("category" = "Recycle", "mode" = RPD_DELETE_MODE, "icon" = "trash"))
var/list/pipemenu = list(
list("category" = "Normal", "pipemode" = RPD_ATMOS_PIPING),
list("category" = "Supply", "pipemode" = RPD_SUPPLY_PIPING),
list("category" = "Scrubber", "pipemode" = RPD_SCRUBBERS_PIPING),
list("category" = "Devices", "pipemode" = RPD_DEVICES),
list("category" = "Heat exchange", "pipemode" = RPD_HEAT_PIPING))
//NanoUI stuff
/obj/item/rpd/attack_self(mob/user)
ui_interact(user)
/obj/item/rpd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
/obj/item/rpd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = GLOB.inventory_state)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
ui = new(user, src, ui_key, "rpd.tmpl", "[name]", 400, 650, state = state)
@@ -180,7 +180,7 @@ var/list/pipemenu = list(
/obj/item/rpd/AltClick(mob/user)
radial_menu(user)
/obj/item/rpd/ui_data(mob/user, ui_key = "main", datum/topic_state/state = inventory_state)
/obj/item/rpd/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.inventory_state)
var/data[0]
data["iconrotation"] = iconrotation
data["mainmenu"] = mainmenu
+2 -2
View File
@@ -47,12 +47,12 @@
var/A
A = input(user, "Area to jump to", "BOOYEA", A) as null|anything in teleportlocs
A = input(user, "Area to jump to", "BOOYEA", A) as null|anything in GLOB.teleportlocs
if(!A)
return
var/area/thearea = teleportlocs[A]
var/area/thearea = GLOB.teleportlocs[A]
if(user.stat || user.restrained())
return
@@ -1059,6 +1059,7 @@
name = "clown box"
desc = "A colorful cardboard box for the clown"
icon_state = "box_clown"
var/robot_arm // This exists for bot construction
/obj/item/storage/box/emptysandbags
name = "box of empty sandbags"
@@ -23,6 +23,7 @@
var/treatment_virus = "spaceacillin"
var/med_bot_skin = null
var/syndicate_aligned = FALSE
var/robot_arm // This is for robot construction
/obj/item/storage/firstaid/fire
@@ -156,7 +156,7 @@
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/item/tank/ui_data(mob/user, ui_key = "main", datum/topic_state/state = default_state)
/obj/item/tank/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.default_state)
var/using_internal
if(iscarbon(loc))
var/mob/living/carbon/C = loc
+2 -2
View File
@@ -205,7 +205,7 @@
else if(prob(30))
visible_message("<span class='warning'>[owner] swings! And [p_they()] miss[p_es()]! How embarassing.</span>", "<span class='warning'>You swing! You miss! Oh no!</span>")
playsound(get_turf(owner), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
do_attack_animation(get_step(owner, pick(alldirs)), ATTACK_EFFECT_DISARM)
do_attack_animation(get_step(owner, pick(GLOB.alldirs)), ATTACK_EFFECT_DISARM)
deflectmode = FALSE
if(!istype(I, /obj/item/beach_ball))
lastdeflect = world.time + 3000
@@ -214,7 +214,7 @@
visible_message("<span class='warning'>[owner] swings and deflects [I]!</span>", "<span class='warning'>You swing and deflect the [I]!</span>")
playsound(get_turf(owner), 'sound/weapons/baseball_hit.ogg', 50, 1, -1)
do_attack_animation(I, ATTACK_EFFECT_DISARM)
I.throw_at(get_edge_target_turf(owner, pick(cardinal)), rand(8,10), 14, owner)
I.throw_at(get_edge_target_turf(owner, pick(GLOB.cardinal)), rand(8,10), 14, owner)
deflectmode = FALSE
if(!istype(I, /obj/item/beach_ball))
lastdeflect = world.time + 3000