From 58e32a6706b2d53a6ceaeacfa3db5ea783bd6799 Mon Sep 17 00:00:00 2001 From: harryob <55142896+harryob@users.noreply.github.com> Date: Thu, 16 Nov 2023 22:44:55 +0000 Subject: [PATCH] firaview --- code/__HELPERS/logging.dm | 2 +- code/_globalvars/misc.dm | 4 -- code/controllers/subsystem/init/landmarks.dm | 4 +- code/datums/modules.dm | 62 ------------------- .../game/machinery/computer/camera_console.dm | 2 + code/game/machinery/hologram.dm | 16 +---- code/game/world.dm | 1 - code/modules/admin/admin.dm | 2 - code/modules/admin/topic/topic.dm | 27 -------- code/modules/cm_marines/shuttle_backend.dm | 5 -- .../living/carbon/xenomorph/attack_alien.dm | 2 +- code/modules/shuttles/marine_ferry.dm | 7 --- colonialmarines.dme | 1 - 13 files changed, 7 insertions(+), 128 deletions(-) delete mode 100644 code/datums/modules.dm diff --git a/code/__HELPERS/logging.dm b/code/__HELPERS/logging.dm index 721501a230bf..c20db3da303f 100644 --- a/code/__HELPERS/logging.dm +++ b/code/__HELPERS/logging.dm @@ -35,7 +35,7 @@ // will get logs that are one big line if the system is Linux and they are using notepad. This solves it by adding CR to every line ending // in the logs. ascii character 13 = CR -GLOBAL_LIST_INIT(log_end, world.system_type == UNIX ? ascii2text(13) : "") +GLOBAL_VAR_INIT(log_end, world.system_type == UNIX ? ascii2text(13) : "") /proc/error(msg) world.log << "## ERROR: [msg][GLOB.log_end]" diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index 1bbc5f3f9d34..976c161a9145 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -1,8 +1,5 @@ GLOBAL_VAR_INIT(game_year, 2182) -/// If this is anything but "secret", the secret rotation will forceably choose this mode. -GLOBAL_VAR_INIT(secret_force_mode, "secret") - GLOBAL_VAR_INIT(ooc_allowed, TRUE) GLOBAL_VAR_INIT(looc_allowed, TRUE) GLOBAL_VAR_INIT(dsay_allowed, TRUE) @@ -38,7 +35,6 @@ GLOBAL_LIST_EMPTY(IClog) GLOBAL_LIST_EMPTY(OOClog) GLOBAL_LIST_EMPTY(adminlog) -GLOBAL_DATUM_INIT(mods, /datum/moduletypes, new()) GLOBAL_VAR(join_motd) GLOBAL_VAR(current_tms) diff --git a/code/controllers/subsystem/init/landmarks.dm b/code/controllers/subsystem/init/landmarks.dm index 07654977e7e3..31b71c074a5d 100644 --- a/code/controllers/subsystem/init/landmarks.dm +++ b/code/controllers/subsystem/init/landmarks.dm @@ -48,8 +48,8 @@ SUBSYSTEM_DEF(landmark_init) continue if (pool.quota > pool.turfs.len) - log_debug("Item pool [pool.pool_name] wants to spawn more items than it has landmarks for. Spawning [GLOB.turfs.len] instances of [pool.type_to_spawn] instead. Code: ITEM_POOL_4") - message_admins("Item pool [pool.pool_name] wants to spawn more items than it has landmarks for. Spawning [GLOB.turfs.len] instances of [pool.type_to_spawn] instead. Tell the devs. Code: ITEM_POOL_4") + log_debug("Item pool [pool.pool_name] wants to spawn more items than it has landmarks for. Spawning [pool.turfs.len] instances of [pool.type_to_spawn] instead. Code: ITEM_POOL_4") + message_admins("Item pool [pool.pool_name] wants to spawn more items than it has landmarks for. Spawning [pool.turfs.len] instances of [pool.type_to_spawn] instead. Tell the devs. Code: ITEM_POOL_4") pool.quota = pool.turfs.len // Quota times, pick a random turf, spawn an item there, then remove that turf from the list. diff --git a/code/datums/modules.dm b/code/datums/modules.dm deleted file mode 100644 index c10448b1e186..000000000000 --- a/code/datums/modules.dm +++ /dev/null @@ -1,62 +0,0 @@ -// module datum. -// this is per-object instance, and shows the condition of the modules in the object -// actual modules needed is referenced through modulestypes and the object type - -/datum/module - var/status // bits set if working, 0 if broken - var/installed // bits set if installed, 0 if missing - -// moduletypes datum -// this is per-object type, and shows the modules needed for a type of object - -/datum/moduletypes - var/list/modcount = list() // assoc list of the count of modules for a type - - -GLOBAL_LIST_INIT(modules, list( // global associative list - /obj/structure/machinery/power/apc = "card_reader,power_control,id_auth,cell_power,cell_charge")) - - -/datum/module/New(obj/O) - - var/type = O.type // the type of the creating object - - var/mneed = GLOB.mods.inmodlist(type) // find if this type has modules defined - - if(!mneed) // not found in module list? - qdel(src) // delete self, thus ending proc - - var/needed = GLOB.mods.getbitmask(type) // get a bitmask for the number of modules in this object - status = needed - installed = needed - -/datum/moduletypes/proc/addmod(type, modtextlist) - GLOB.modules += type // index by type text - GLOB.modules[type] = modtextlist - -/datum/moduletypes/proc/inmodlist(type) - return type in GLOB.modules - -/datum/moduletypes/proc/getbitmask(type) - var/count = modcount[type] - if(count) - return 2**count-1 - - var/modtext = GLOB.modules[type] - var/num = 1 - var/pos = 1 - - while(1) - pos = findtext(modtext, ",", pos, 0) - if(!pos) - break - else - pos++ - num++ - - modcount += type - modcount[type] = num - - return 2**num-1 - - diff --git a/code/game/machinery/computer/camera_console.dm b/code/game/machinery/computer/camera_console.dm index cad4fd4fc747..ca8c8b2f1a34 100644 --- a/code/game/machinery/computer/camera_console.dm +++ b/code/game/machinery/computer/camera_console.dm @@ -40,6 +40,8 @@ instance.del_on_map_removal = FALSE if(instance.blend_mode_override) instance.blend_mode = instance.blend_mode_override + if(istype(instance, /atom/movable/screen/plane_master/lighting)) + instance.add_filter("awooga", 1, color_matrix_filter(color_matrix_from_string("#90ee90"))) instance.screen_loc = "[map_name]:CENTER" cam_plane_masters += instance diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index b7c0e8a68607..9ce3cb89bf79 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -59,12 +59,6 @@ Possible to do for anyone motivated enough: Itegrate EMP effect to disable the unit. */ - -// HOLOPAD MODE -// 0 = RANGE BASED -// 1 = AREA BASED -GLOBAL_VAR_INIT(HOLOPAD_MODE, 0) - /obj/structure/machinery/hologram/holopad name = "\improper AI holopad" desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely." @@ -167,17 +161,9 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ if(hologram)//If there is a hologram. if(master && !master.stat && master.client && master.eyeobj)//If there is an AI attached, it's not incapacitated, it has a client, and the client eye is centered on the projector. if(!(stat & NOPOWER))//If the machine has power. - if((GLOB.HOLOPAD_MODE == 0 && (get_dist(master.eyeobj, src) <= holo_range))) + if(get_dist(master.eyeobj, src) <= holo_range) return 1 - else if (GLOB.HOLOPAD_MODE == 1) - - var/area/holo_area = get_area(src) - var/area/eye_area = get_area(master.eyeobj) - - if(eye_area == holo_area) - return 1 - clear_holo()//If not, we want to get rid of the hologram. return 1 diff --git a/code/game/world.dm b/code/game/world.dm index 93de8c3118a1..d8156547ef76 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -46,7 +46,6 @@ GLOBAL_LIST_INIT(reboot_sfx, file2list("config/reboot_sfx.txt")) LoadBans() load_motd() load_tm_message() - loadShuttleInfoDatums() populate_gear_list() initialize_global_regex() diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 0d6995075c91..fe95affaffd2 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -138,8 +138,6 @@ var/dat = {" Change Game Mode
"} - if(GLOB.master_mode == "secret") - dat += "(Force Secret Mode)
" dat += {"
diff --git a/code/modules/admin/topic/topic.dm b/code/modules/admin/topic/topic.dm index 40c6d273b267..93cd66d586c4 100644 --- a/code/modules/admin/topic/topic.dm +++ b/code/modules/admin/topic/topic.dm @@ -565,20 +565,6 @@ dat += {"Now: [GLOB.master_mode]"} show_browser(usr, dat, "Change Gamemode", "c_mode") - else if(href_list["f_secret"]) - if(!check_rights(R_ADMIN)) return - - if(SSticker.mode) - return alert(usr, "The game has already started.", null, null, null, null) - if(GLOB.master_mode != "secret") - return alert(usr, "The game mode has to be secret!", null, null, null, null) - var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.
"} - for(var/mode in config.modes) - dat += {"[config.mode_names[mode]]
"} - dat += {"Random (default)
"} - dat += {"Now: [GLOB.secret_force_mode]"} - show_browser(usr, dat, "Change Secret Gamemode", "f_secret") - else if(href_list["c_mode2"]) if(!check_rights(R_ADMIN|R_SERVER)) return @@ -588,19 +574,6 @@ Game() // updates the main game menu SSticker.save_mode(GLOB.master_mode) - - else if(href_list["f_secret2"]) - if(!check_rights(R_ADMIN|R_SERVER)) return - - if(SSticker.mode) - return alert(usr, "The game has already started.", null, null, null, null) - if(GLOB.master_mode != "secret") - return alert(usr, "The game mode has to be secret!", null, null, null, null) - GLOB.secret_force_mode = href_list["f_secret2"] - message_admins("[key_name_admin(usr)] set the forced secret mode as [GLOB.secret_force_mode].") - Game() // updates the main game menu - .(href, list("f_secret"=1)) - else if(href_list["monkeyone"]) if(!check_rights(R_SPAWN)) return diff --git a/code/modules/cm_marines/shuttle_backend.dm b/code/modules/cm_marines/shuttle_backend.dm index 1bd96289e434..142caa81eb8a 100644 --- a/code/modules/cm_marines/shuttle_backend.dm +++ b/code/modules/cm_marines/shuttle_backend.dm @@ -87,11 +87,6 @@ DOCUMENTATION ON HOW TO ADD A NEW SHUTTLE: Fourkhan, 6/7/19 */ -GLOBAL_LIST(s_info) - -/proc/loadShuttleInfoDatums() - GLOB.s_info = list() - return 1 /proc/get_shuttle_turfs(turf/ref, list/L) diff --git a/code/modules/mob/living/carbon/xenomorph/attack_alien.dm b/code/modules/mob/living/carbon/xenomorph/attack_alien.dm index d61587a64170..ba8099cea404 100644 --- a/code/modules/mob/living/carbon/xenomorph/attack_alien.dm +++ b/code/modules/mob/living/carbon/xenomorph/attack_alien.dm @@ -769,7 +769,7 @@ last_locked = world.time if(GLOB.almayer_orbital_cannon) GLOB.almayer_orbital_cannon.is_disabled = TRUE - addtimer(CALLBACK(GLOB.almayer_orbital_cannon, .obj/structure/orbital_cannon/proc/enable), 10 MINUTES, TIMER_UNIQUE) + addtimer(CALLBACK(GLOB.almayer_orbital_cannon, TYPE_PROC_REF(/obj/structure/orbital_cannon, enable)), 10 MINUTES, TIMER_UNIQUE) queen_locked = 1 /datum/shuttle/ferry/marine/proc/door_override(mob/living/carbon/xenomorph/M, shuttle_tag) diff --git a/code/modules/shuttles/marine_ferry.dm b/code/modules/shuttles/marine_ferry.dm index 12c206ca70fe..c23d2d689ed6 100644 --- a/code/modules/shuttles/marine_ferry.dm +++ b/code/modules/shuttles/marine_ferry.dm @@ -73,13 +73,6 @@ control.visible_message(SPAN_WARNING(fail_flavortext)) return //Kill it so as not to repeat -/datum/shuttle/ferry/marine/proc/load_datums() - if(!(info_tag in GLOB.s_info)) - message_admins(SPAN_WARNING("Error with shuttles: Shuttle tag does not exist. Code: MSD10.\n WARNING: DROPSHIP LAUNCH WILL PROBABLY FAIL")) - - var/list/L = GLOB.s_info[info_tag] - info_datums = L.Copy() - /datum/shuttle/ferry/marine/proc/set_automated_launch(bool_v) automated_launch = bool_v if(bool_v) diff --git a/colonialmarines.dme b/colonialmarines.dme index 918ba1c70f67..6d079582773c 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -327,7 +327,6 @@ #include "code\datums\mind.dm" #include "code\datums\mixed.dm" #include "code\datums\mob_hud.dm" -#include "code\datums\modules.dm" #include "code\datums\movement_detector.dm" #include "code\datums\mutable_appearance.dm" #include "code\datums\quadtree.dm"