mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
Global variable wrappers (#25325)
* Add the system for managed global variables * Travis ban old globals * So you CAN inline proccall, that's neat * Fix that * master.dm * Remove the hack procs * Move InitGlobals to the proper spot * configuration.dm * Fix the missing pre-slash * clockcult.dm * This is probably for the best * Doy * Fix shit * Rest of the DEFINES tree * Fix * Use global. for access * Update find_references_in_globals Always hated that proc Whoever made it must've bee a r e a l idiot... * __HELPERS tree * Move global initialization to master. Fix the declaration * database.dm * Dat newline * I said DECLARATIVE order! * Here's something you can chew on @Iamgoofball * game_modes.dm * Fix this * genetics.dm * flavor_misc.dm * More stuff * Do it mso's way. Keep the controllers as global * Make master actually see it * Fix * Finish _globalvars/lists * Finish the rest of the _globalvars tree * This is weird * Migrate the controllers * SLOTH -> GLOB * Lighting globals * round_start_time -> ticker * PAI card list -> pai SS * record_id_num -> static * Diseases list -> SSdisease * More disease globals to the SS * More disease stuff * Emote list * Better and better * Bluh * So much stuff * Ahh * Wires * dview * station_areas * Teleportlocs * blood_splatter_icons * Stuff and such * More stuff * RAD IO * More stuff and such * Blob shit * Changeling stuff * Add "Balance" to changelogs * Balance for changelog compiler + Auto Tagging * Update the PR template * hivemind_bank * Bip * sacrificed * Good shit * Better define * More cult shit * Devil shit * Gang shit * > borers Fix shit * Rename the define * Nuke * Objectives * Sandbox * Multiverse sword * Announce systems * Stuff and such * TC con * Airlock * doppllllerrrrrr * holopads * Shut up byond you inconsistent fuck * Sneaky fuck * Burp * Bip * Fixnshit * Port without regard * askdlfjs; * asdfjasoidojfi * Protected globals and more * SO MANY * ajsimkvahsaoisd * akfdsiaopwimfeoiwafaw * gsdfigjosidjfgiosdg * AHHHHHHHHHHHHHHHHHHHHHHH!!!!! * facerolll * ASDFASDFASDF * Removes the unused parts of dmm_suite * WIP * Fix quote * asdfjauwfnkjs * afwlunhskjfda * asfjlaiwuefhaf * SO CLOSE * wwwweeeeeewwwww * agdgmoewranwg * HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!? * Fix syntax errors * 100 errors * Another 100 * So many... * Ugh * More shit * kilme * Stuuuuuufffff * ajrgmrlshio;djfa;sdkl * jkbhkhjbmjvjmh * soi soi soi * butt * TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING * lllllllllllllllllllllllllllllllllllllllllll * afsdijfiawhnflnjhnwsdfs * yugykihlugk,kj * time to go * STUFFF!!! * AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!! * ngoaijdjlfkamsdlkf * Break time * aufjsdklfalsjfi * CONTROL KAY AND PRAY * IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * Goteem * Fix testing mode * This does not belong in this PR * Convert it to a controller * Eh, fuck this option * Revert controllerization Ill do it some other time * Fix * Working controllerization * FOR THE LOVE OF CHRIST PROTECT THE LOGS * Protect admins and deadmins * Use the inbuilt proc
This commit is contained in:
committed by
duncathan salt
parent
e550f019b0
commit
9e1ef0ffe2
@@ -1,5 +1,5 @@
|
||||
|
||||
var/global/list/rad_collectors = list()
|
||||
GLOBAL_LIST_EMPTY(rad_collectors)
|
||||
|
||||
/obj/machinery/power/rad_collector
|
||||
name = "Radiation Collector Array"
|
||||
@@ -8,7 +8,7 @@ var/global/list/rad_collectors = list()
|
||||
icon_state = "ca"
|
||||
anchored = 0
|
||||
density = 1
|
||||
req_access = list(access_engine_equip)
|
||||
req_access = list(GLOB.access_engine_equip)
|
||||
// use_power = 0
|
||||
obj_integrity = 350
|
||||
max_integrity = 350
|
||||
@@ -21,10 +21,10 @@ var/global/list/rad_collectors = list()
|
||||
|
||||
/obj/machinery/power/rad_collector/New()
|
||||
..()
|
||||
rad_collectors += src
|
||||
GLOB.rad_collectors += src
|
||||
|
||||
/obj/machinery/power/rad_collector/Destroy()
|
||||
rad_collectors -= src
|
||||
GLOB.rad_collectors -= src
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/rad_collector/process()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/icon_state_on = "emitter_+a"
|
||||
anchored = 0
|
||||
density = 1
|
||||
req_access = list(access_engine_equip)
|
||||
req_access = list(GLOB.access_engine_equip)
|
||||
|
||||
use_power = 0
|
||||
idle_power_usage = 10
|
||||
|
||||
@@ -319,7 +319,7 @@ field_generator power level display
|
||||
//I want to avoid using global variables.
|
||||
spawn(1)
|
||||
var/temp = 1 //stops spam
|
||||
for(var/obj/singularity/O in singularities)
|
||||
for(var/obj/singularity/O in GLOB.singularities)
|
||||
if(O.last_warning && temp)
|
||||
if((world.time - O.last_warning) > 50) //to stop message-spam
|
||||
temp = 0
|
||||
|
||||
@@ -91,13 +91,13 @@
|
||||
/obj/singularity/narsie/proc/pickcultist() //Narsie rewards her cultists with being devoured first, then picks a ghost to follow.
|
||||
var/list/cultists = list()
|
||||
var/list/noncultists = list()
|
||||
for(var/obj/structure/destructible/clockwork/massive/ratvar/enemy in poi_list) //Prioritize killing Ratvar
|
||||
for(var/obj/structure/destructible/clockwork/massive/ratvar/enemy in GLOB.poi_list) //Prioritize killing Ratvar
|
||||
if(enemy.z != z)
|
||||
continue
|
||||
acquire(enemy)
|
||||
return
|
||||
|
||||
for(var/mob/living/carbon/food in living_mob_list) //we don't care about constructs or cult-Ians or whatever. cult-monkeys are fair game i guess
|
||||
for(var/mob/living/carbon/food in GLOB.living_mob_list) //we don't care about constructs or cult-Ians or whatever. cult-monkeys are fair game i guess
|
||||
var/turf/pos = get_turf(food)
|
||||
if(pos.z != src.z)
|
||||
continue
|
||||
@@ -116,7 +116,7 @@
|
||||
return
|
||||
|
||||
//no living humans, follow a ghost instead.
|
||||
for(var/mob/dead/observer/ghost in player_list)
|
||||
for(var/mob/dead/observer/ghost in GLOB.player_list)
|
||||
if(!ghost.client)
|
||||
continue
|
||||
var/turf/pos = get_turf(ghost)
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
src.energy = starting_energy
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
poi_list |= src
|
||||
singularities |= src
|
||||
for(var/obj/machinery/power/singularity_beacon/singubeacon in machines)
|
||||
GLOB.poi_list |= src
|
||||
GLOB.singularities |= src
|
||||
for(var/obj/machinery/power/singularity_beacon/singubeacon in GLOB.machines)
|
||||
if(singubeacon.active)
|
||||
target = singubeacon
|
||||
break
|
||||
@@ -46,8 +46,8 @@
|
||||
|
||||
/obj/singularity/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
poi_list.Remove(src)
|
||||
singularities.Remove(src)
|
||||
GLOB.poi_list.Remove(src)
|
||||
GLOB.singularities.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/singularity/Move(atom/newloc, direct)
|
||||
@@ -287,7 +287,7 @@
|
||||
if(!move_self)
|
||||
return 0
|
||||
|
||||
var/movement_dir = pick(alldirs - last_failed_movement)
|
||||
var/movement_dir = pick(GLOB.alldirs - last_failed_movement)
|
||||
|
||||
if(force_move)
|
||||
movement_dir = force_move
|
||||
@@ -431,7 +431,7 @@
|
||||
|
||||
|
||||
/obj/singularity/proc/pulse()
|
||||
for(var/obj/machinery/power/rad_collector/R in rad_collectors)
|
||||
for(var/obj/machinery/power/rad_collector/R in GLOB.rad_collectors)
|
||||
if(R.z == z && get_dist(R, src) <= 15) // Better than using orange() every process
|
||||
R.receive_pulse(energy)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user