mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Removes some unnecessary global variables (#16353)
Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
//This is a list of words which are ignored by the parser when comparing message contents for names. MUST BE IN LOWER CASE!
|
||||
GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown", "the", "a", "an", "of", "monkey", "alien", "as"))
|
||||
|
||||
/client/verb/adminhelp()
|
||||
set category = "Admin"
|
||||
set name = "Adminhelp"
|
||||
|
||||
@@ -28,8 +28,6 @@
|
||||
reconcile_air()
|
||||
return
|
||||
|
||||
GLOBAL_VAR_INIT(pipenetwarnings, 10)
|
||||
|
||||
/datum/pipeline/proc/build_pipeline(obj/machinery/atmospherics/base)
|
||||
var/volume = 0
|
||||
if(istype(base, /obj/machinery/atmospherics/pipe))
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#define MINIMUM_PERCENTAGE_LOSS 0.5
|
||||
#define VARIABLE_LOSS 2 // Invariant: 1 - VARIABLE_LOSS/10 >= MINIMUM_PERCENTAGE_LOSS
|
||||
|
||||
GLOBAL_VAR_INIT(account_hack_attempted, 0)
|
||||
|
||||
/datum/event/money_hacker
|
||||
var/datum/money_account/affected_account
|
||||
endWhen = 100
|
||||
@@ -12,8 +10,6 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0)
|
||||
end_time = world.time + 6000
|
||||
if(GLOB.all_money_accounts.len)
|
||||
affected_account = pick(GLOB.all_money_accounts)
|
||||
|
||||
GLOB.account_hack_attempted = 1
|
||||
else
|
||||
kill()
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
GLOBAL_VAR_INIT(sent_spiders_to_station, 0)
|
||||
|
||||
/datum/event/spider_infestation
|
||||
announceWhen = 400
|
||||
var/spawncount = 1
|
||||
@@ -8,7 +6,6 @@ GLOBAL_VAR_INIT(sent_spiders_to_station, 0)
|
||||
/datum/event/spider_infestation/setup()
|
||||
announceWhen = rand(announceWhen, announceWhen + 50)
|
||||
spawncount = round(num_players() * 0.8)
|
||||
GLOB.sent_spiders_to_station = 1
|
||||
|
||||
/datum/event/spider_infestation/announce()
|
||||
if(successSpawn)
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
GLOBAL_VAR_INIT(totaltribbles, 0) //global variable so it updates for all tribbles, not just the new one being made.
|
||||
|
||||
|
||||
/mob/living/simple_animal/tribble
|
||||
name = "tribble"
|
||||
desc = "It's a small furry creature that makes a soft trill."
|
||||
@@ -22,7 +19,8 @@ GLOBAL_VAR_INIT(totaltribbles, 0) //global variable so it updates for all trib
|
||||
response_harm = "whacks"
|
||||
harm_intent_damage = 5
|
||||
var/gestation = 0
|
||||
var/maxtribbles = 50 //change this to change the max limit
|
||||
var/static/total_tribbles = 0
|
||||
var/static/max_tribbles = 50 //change this to change the max limit
|
||||
wander = 1
|
||||
|
||||
|
||||
@@ -35,7 +33,7 @@ GLOBAL_VAR_INIT(totaltribbles, 0) //global variable so it updates for all trib
|
||||
//random pixel offsets so they cover the floor
|
||||
src.pixel_x = rand(-5.0, 5)
|
||||
src.pixel_y = rand(-5.0, 5)
|
||||
GLOB.totaltribbles += 1
|
||||
total_tribbles++
|
||||
|
||||
|
||||
/mob/living/simple_animal/tribble/attack_hand(mob/user as mob)
|
||||
@@ -60,7 +58,7 @@ GLOBAL_VAR_INIT(totaltribbles, 0) //global variable so it updates for all trib
|
||||
|
||||
|
||||
/mob/living/simple_animal/tribble/proc/procreate()
|
||||
if(GLOB.totaltribbles <= maxtribbles)
|
||||
if(total_tribbles <= max_tribbles)
|
||||
for(var/mob/living/simple_animal/tribble/F in src.loc)
|
||||
if(!F || F == src)
|
||||
new /mob/living/simple_animal/tribble(src.loc)
|
||||
@@ -83,7 +81,7 @@ GLOBAL_VAR_INIT(totaltribbles, 0) //global variable so it updates for all trib
|
||||
. = ..(gibbed)
|
||||
if(!.)
|
||||
return FALSE
|
||||
GLOB.totaltribbles -= 1
|
||||
total_tribbles--
|
||||
|
||||
|
||||
//||Item version of the trible ||
|
||||
|
||||
@@ -52,9 +52,6 @@
|
||||
if(ckey in GLOB.deadmins)
|
||||
verbs += /client/proc/readmin
|
||||
|
||||
//Clear ability list and update from mob.
|
||||
client.verbs -= GLOB.ability_verbs
|
||||
|
||||
if(abilities)
|
||||
client.verbs |= abilities
|
||||
|
||||
|
||||
@@ -1130,13 +1130,14 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
to_chat(usr, "You are not dead or you have given up your right to be respawned!")
|
||||
return
|
||||
|
||||
#define MOUSE_RESPAWN_TIME 5 MINUTES
|
||||
|
||||
/mob/proc/become_mouse()
|
||||
var/timedifference = world.time - client.time_died_as_mouse
|
||||
if(client.time_died_as_mouse && timedifference <= GLOB.mouse_respawn_time * 600)
|
||||
if(client.time_died_as_mouse && timedifference <= MOUSE_RESPAWN_TIME)
|
||||
var/timedifference_text
|
||||
timedifference_text = time2text(GLOB.mouse_respawn_time * 600 - timedifference,"mm:ss")
|
||||
to_chat(src, "<span class='warning'>You may only spawn again as a mouse more than [GLOB.mouse_respawn_time] minutes after your death. You have [timedifference_text] left.</span>")
|
||||
timedifference_text = time2text(MOUSE_RESPAWN_TIME - timedifference, "mm:ss")
|
||||
to_chat(src, "<span class='warning'>You may only spawn again as a mouse more than [MOUSE_RESPAWN_TIME / 600] minutes after your death. You have [timedifference_text] left.</span>")
|
||||
return
|
||||
|
||||
//find a viable mouse candidate
|
||||
@@ -1149,6 +1150,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
else
|
||||
to_chat(src, "<span class='warning'>Unable to find any unwelded vents to spawn mice at.</span>")
|
||||
|
||||
#undef MOUSE_RESPAWN_TIME
|
||||
|
||||
/mob/proc/assess_threat() //For sec bot threat assessment
|
||||
return 5
|
||||
|
||||
|
||||
@@ -137,19 +137,12 @@
|
||||
/obj/structure/necropolis_gate/locked
|
||||
locked = TRUE
|
||||
|
||||
GLOBAL_DATUM(necropolis_gate, /obj/structure/necropolis_gate/legion_gate)
|
||||
/obj/structure/necropolis_gate/legion_gate
|
||||
desc = "A tremendous, impossibly large gateway, set into a massive tower of stone."
|
||||
sight_blocker_distance = 2
|
||||
|
||||
/obj/structure/necropolis_gate/legion_gate/Initialize()
|
||||
. = ..()
|
||||
GLOB.necropolis_gate = src
|
||||
|
||||
/obj/structure/necropolis_gate/legion_gate/Destroy(force)
|
||||
if(force)
|
||||
if(GLOB.necropolis_gate == src)
|
||||
GLOB.necropolis_gate = null
|
||||
. = ..()
|
||||
else
|
||||
return QDEL_HINT_LETMELIVE
|
||||
|
||||
@@ -143,10 +143,6 @@
|
||||
D.register()
|
||||
D.forceMove(locate(200, 200, zpos))
|
||||
|
||||
GLOBAL_LIST_INIT(atmos_machine_typecache, typecacheof(/obj/machinery/atmospherics))
|
||||
GLOBAL_LIST_INIT(cable_typecache, typecacheof(/obj/structure/cable))
|
||||
GLOBAL_LIST_INIT(maploader_typecache, typecacheof(/obj/effect/landmark/map_loader))
|
||||
|
||||
/datum/space_level/proc/resume_init()
|
||||
if(dirt_count > 0)
|
||||
throw EXCEPTION("Init told to resume when z-level still dirty. Z level: '[zpos]'")
|
||||
@@ -156,9 +152,9 @@ GLOBAL_LIST_INIT(maploader_typecache, typecacheof(/obj/effect/landmark/map_loade
|
||||
init_list = list()
|
||||
var/watch = start_watch()
|
||||
listclearnulls(our_atoms)
|
||||
var/list/late_maps = typecache_filter_list(our_atoms, GLOB.maploader_typecache)
|
||||
var/list/pipes = typecache_filter_list(our_atoms, GLOB.atmos_machine_typecache)
|
||||
var/list/cables = typecache_filter_list(our_atoms, GLOB.cable_typecache)
|
||||
var/list/late_maps = typecache_filter_list(our_atoms, typecacheof(/obj/effect/landmark/map_loader))
|
||||
var/list/pipes = typecache_filter_list(our_atoms, typecacheof(/obj/machinery/atmospherics))
|
||||
var/list/cables = typecache_filter_list(our_atoms, typecacheof(/obj/structure/cable))
|
||||
// If we don't carefully add dirt around the map templates, bad stuff happens
|
||||
// so we separate them out here
|
||||
our_atoms -= late_maps
|
||||
|
||||
Reference in New Issue
Block a user