Skip to content

Commit

Permalink
Merge branch 'master' into instrumentstoloadout
Browse files Browse the repository at this point in the history
Signed-off-by: 4000daniel1 <[email protected]>
  • Loading branch information
4000daniel1 authored Feb 24, 2024
2 parents 00ff389 + b78b9b8 commit 8968612
Show file tree
Hide file tree
Showing 291 changed files with 5,993 additions and 2,872 deletions.
12 changes: 10 additions & 2 deletions aurorastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
#include "code\__DEFINES\ruin_tags.dm"
#include "code\__DEFINES\rust_g.dm"
#include "code\__DEFINES\rust_g_debug.dm"
#include "code\__DEFINES\rust_g_overrides.dm"
#include "code\__DEFINES\ship_weapons.dm"
#include "code\__DEFINES\shuttle.dm"
#include "code\__DEFINES\singletons.dm"
Expand Down Expand Up @@ -134,6 +135,7 @@
#include "code\__DEFINES\dcs\signals.dm"
#include "code\__DEFINES\dcs\signals\signals_datum.dm"
#include "code\__DEFINES\dcs\signals\signals_global.dm"
#include "code\__DEFINES\dcs\signals\signals_lore_radio.dm"
#include "code\__DEFINES\dcs\signals\signals_record.dm"
#include "code\__DEFINES\dcs\signals\signals_spatial_grid.dm"
#include "code\__DEFINES\dcs\signals\signals_subsystem.dm"
Expand Down Expand Up @@ -165,6 +167,7 @@
#include "code\__HELPERS\overlay.dm"
#include "code\__HELPERS\overmap.dm"
#include "code\__HELPERS\qdel.dm"
#include "code\__HELPERS\ref.dm"
#include "code\__HELPERS\sanitize_values.dm"
#include "code\__HELPERS\shell.dm"
#include "code\__HELPERS\smart_token_bucket.dm"
Expand Down Expand Up @@ -1012,6 +1015,7 @@
#include "code\game\objects\items\ipc_overloaders.dm"
#include "code\game\objects\items\items_icon.dm"
#include "code\game\objects\items\knitting.dm"
#include "code\game\objects\items\lore_radio.dm"
#include "code\game\objects\items\paintkit.dm"
#include "code\game\objects\items\recharger_backpack.dm"
#include "code\game\objects\items\shooting_range.dm"
Expand Down Expand Up @@ -1608,11 +1612,11 @@
#include "code\modules\background\religion\unathi.dm"
#include "code\modules\background\religion\vaurca.dm"
#include "code\modules\background\space_sectors\badlands.dm"
#include "code\modules\background\space_sectors\coalition.dm"
#include "code\modules\background\space_sectors\generic_sectors.dm"
#include "code\modules\background\space_sectors\space_sector.dm"
#include "code\modules\background\space_sectors\tauceti.dm"
#include "code\modules\background\space_sectors\void.dm"
#include "code\modules\background\space_sectors\coalition\coalition.dm"
#include "code\modules\balloon_alert\balloon_alert.dm"
#include "code\modules\battlemonsters\datum_core.dm"
#include "code\modules\battlemonsters\datum_elements.dm"
Expand Down Expand Up @@ -1877,6 +1881,7 @@
#include "code\modules\clothing\under\accessories\lockets.dm"
#include "code\modules\clothing\under\accessories\medal.dm"
#include "code\modules\clothing\under\accessories\necklace.dm"
#include "code\modules\clothing\under\accessories\religious.dm"
#include "code\modules\clothing\under\accessories\shirts.dm"
#include "code\modules\clothing\under\accessories\storage.dm"
#include "code\modules\clothing\under\accessories\temperature.dm"
Expand Down Expand Up @@ -2864,7 +2869,8 @@
#include "code\modules\overmap\exoplanets\decor\flora\jungle.dm"
#include "code\modules\overmap\exoplanets\decor\flora\konyang.dm"
#include "code\modules\overmap\exoplanets\decor\flora\marsh.dm"
#include "code\modules\overmap\exoplanets\decor\flora\potted.dm"
#include "code\modules\overmap\exoplanets\decor\flora\potted_big.dm"
#include "code\modules\overmap\exoplanets\decor\flora\potted_small.dm"
#include "code\modules\overmap\exoplanets\decor\flora\snow.dm"
#include "code\modules\overmap\exoplanets\decor\objs\clearing.dm"
#include "code\modules\overmap\exoplanets\decor\objs\monolith.dm"
Expand Down Expand Up @@ -3466,6 +3472,7 @@
#include "code\modules\tgui\states\deep_inventory.dm"
#include "code\modules\tgui\states\default.dm"
#include "code\modules\tgui\states\hands.dm"
#include "code\modules\tgui\states\heavy_vehicle.dm"
#include "code\modules\tgui\states\human_adjacent.dm"
#include "code\modules\tgui\states\human_adjacent_loc.dm"
#include "code\modules\tgui\states\inventory.dm"
Expand Down Expand Up @@ -3546,6 +3553,7 @@
#include "code\unit_tests\species_tests.dm"
#include "code\unit_tests\sql_tests.dm"
#include "code\unit_tests\ss_test.dm"
#include "code\unit_tests\stairs_type.dm"
#include "code\unit_tests\subsystem_init.dm"
#include "code\unit_tests\timer_sanity.dm"
#include "code\unit_tests\unit_test.dm"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@

GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768))

// for /datum/var/datum_flags
#define DF_USE_TAG (1<<0)

///Whether /atom/Initialize() has already run for the object
#define INITIALIZED_1 (1<<5)
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/signals_lore_radio.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Signals related to lore radios, also known as analog radios
// Sent from space_sector.dm

#define COMSIG_GLOB_LORE_RADIO_BROADCAST "!lore_radio_broadcast"
2 changes: 2 additions & 0 deletions code/__DEFINES/global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ GLOBAL_LIST_EMPTY(reg_dna)

GLOBAL_DATUM(newplayer_start, /turf)

GLOBAL_DATUM(lobby_mobs_location, /turf)

//Spawnpoints.
GLOBAL_LIST_EMPTY(latejoin)
GLOBAL_LIST_EMPTY(latejoin_gateway)
Expand Down
3 changes: 1 addition & 2 deletions code/__DEFINES/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#define CONSULAR_ROLE /datum/job/consular
#define JOURNALIST_ROLE /datum/job/journalist
#define CHAPLAIN_ROLE /datum/job/chaplain
#define ASSISTANT_ROLE /datum/job/assistant

//Event Roles
//Used for generic department jobs for off-ship events
Expand Down Expand Up @@ -48,4 +47,4 @@
#define ZENG_ROLES list(SCIENCE_ROLES, MEDICAL_ROLES, CIVILIAN_ROLES, REPRESENTATIVE_ROLE)
#define HEPH_ROLES list(OPERATIONS_ROLES, ENGINEERING_ROLES, CIVILIAN_ROLES, REPRESENTATIVE_ROLE)
#define ORION_ROLES list(OPERATIONS_ROLES, CIVILIAN_ROLES, REPRESENTATIVE_ROLE, SERVICE_ROLES)
#define INDEP_ROLES list(NON_CREW_CIVILIAN_ROLES, CONSULAR_ROLE, CHAPLAIN_ROLE, OFF_DUTY_CREW_MEMBER_ROLE, JOURNALIST_ROLE, ASSISTANT_ROLE)
#define INDEP_ROLES list(NON_CREW_CIVILIAN_ROLES, CONSULAR_ROLE, CHAPLAIN_ROLE, OFF_DUTY_CREW_MEMBER_ROLE, JOURNALIST_ROLE)
3 changes: 3 additions & 0 deletions code/__DEFINES/rust_g_overrides.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// RUSTG_OVERRIDE_BUILTINS is not used since the file APIs don't work well over Linux.
#define url_encode(text) rustg_url_encode("[text]")
#define url_decode(text) rustg_url_decode("[text]")
28 changes: 0 additions & 28 deletions code/__DEFINES/subsystem-priority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,13 @@
THAT ARE PRESENT THERE
*/

#define SS_INIT_PERSISTENT_CONFIG 26
#define SS_INIT_MISC_FIRST 25
#define SS_INIT_SEEDS 24 // Plant controller setup.
#define SS_INIT_MAPLOAD 22 // DMM parsing and load. Unless you know what you're doing, make sure this remains first.
#define SS_INIT_JOBS 21
#define SS_INIT_MAPFINALIZE 20 // Asteroid generation.
#define SS_INIT_PARALLAX 19 // Parallax image cache generation. Must run before ghosts are able to join
#define SS_INIT_ATOMS 17 // World initialization. Will trigger lighting updates. Observers can join after this loads.
#define SS_INIT_ASSETS 16 // Assets subsystem setup.
#define SS_INIT_POWER 15 // Initial powernet build.
#define SS_INIT_ECONOMY 14 // Cargo needs economy set up
#define SS_INIT_CARGO 13 // Random warehouse generation. Runs after SSatoms because it assumes objects are initialized when it runs.
#define SS_INIT_PIPENET 12 // Initial pipenet build.
#define SS_INIT_MACHINERY 11 // Machinery prune and powernet build.
#define SS_INIT_AIR 10 // Air setup and pre-bake.
#define SS_INIT_NIGHT 9 // Nightmode controller. Will trigger lighting updates.
#define SS_INIT_SMOOTHING 8 // Object icon smoothing. Creates overlays.
#define SS_INIT_ICON_UPDATE 7 // Icon update queue flush. Should run before overlays.
#define SS_INIT_AO 6 // Wall AO neighbour build.
#define SS_INIT_OVERLAY 5 // Overlay flush.
#define SS_INIT_AWAY_MAPS 4 // Note: away maps (ruins, exoplanets, ...) must initialize before ghost roles in order for their spawnpoints to work.
#define SS_INIT_GHOSTROLES 3 // Ghost roles must initialize before SS_INIT_MISC due to some roles (matriarch drones) relying on the assumption that this SS is initialized.
#define SS_INIT_MISC 2 // Subsystems without an explicitly set initialization order start here.
#define SS_INIT_SUNLIGHT 1 // Sunlight setup. Creates lots of lighting & SSzcopy updates.
#define SS_INIT_LIGHTING 0 // Generation of lighting overlays and pre-bake. May cause openturf updates, should initialize before SSzcopy.
#define SS_INIT_ZCOPY -1 // Z-mimic flush. Should run after SSoverlay & SSicon_smooth so it copies the smoothed sprites.
#define SS_INIT_XENOARCH -2 // Xenoarch is this far below because it can infinite loop if placed in SS_INIT_MISC as it was before, due to some subsystems spawning stuff there.
#define SS_INIT_HOLOMAP -4 // Minimap subsystem. Should be initialized after all maps, away sites, ships, planets, etc.
#define SS_INIT_LOBBY -5 // Lobby timer starts here. The lobby timer won't actually start going down until the MC starts ticking, so you probably want this last
#define SS_INIT_PING -6 // Pinger for the clients
#define SS_INIT_CHAT -7 // To ensure chat remains smooth during init.

// Something to remember when setting priorities: SS_TICKER runs before Normal, which runs before SS_BACKGROUND.
// Each group has its own priority bracket.
Expand All @@ -58,14 +34,11 @@
#define SS_PRIORITY_TICKER 100 // Gameticker.
//#define FIRE_PRIORITY_DEFAULT 50 // This is defined somewhere else.
#define SS_PRIORITY_MOB 40 // Mob Life().
#define SS_PRIORITY_ASSET 40 // Asset loading subsystem - not to be confused with SSassets.
#define SS_PRIORITY_AIR 40 // ZAS processing.
#define SS_PRIORITY_CHAT 30 // Chat
#define SS_PRIORITY_STATPANELS 25 // Statpanels.
#define SS_PRIORITY_LIGHTING 25 // Queued lighting engine updates.
#define SS_PRIORITY_MACHINERY 25 // Machinery + powernet ticks.
#define SS_PRIORITY_NANOUI 25 // UI updates.
#define SS_PRIORITY_VOTE 20
#define SS_PRIORITY_ELECTRONICS 20 // Integrated Electronics processing.
#define SS_PRIORITY_CALAMITY 20 // Singularity, Tesla, Nar'sie, blob, etc.
#define SS_PRIORITY_EVENT 20
Expand All @@ -77,7 +50,6 @@
#define SS_PRIORITY_CHEMISTRY 10 // Multi-tick chemical reactions.
#define SS_PRIORITY_SHUTTLE 10 // Shuttle movement.
#define SS_PRIORITY_AIRFLOW 10 // Handles object movement due to ZAS airflow.
#define SS_PRIORITY_PING 10
#define SS_PRIORITY_ZCOPY 10 // Z-mimic icon generation/updates.
#define SS_PRIORITY_ARRIVALS 10 // Centcomm arrivals shuttle auto-launch. Usually asleep.

Expand Down
29 changes: 29 additions & 0 deletions code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,47 @@
// Subsystems shutdown in the reverse of the order they initialize in
// The numbers just define the ordering, they are meaningless otherwise.

#define INIT_ORDER_PERSISTENT_CONFIGURATION 101 //Aurora snowflake conflg handling
#define INIT_ORDER_PROFILER 101
#define INIT_ORDER_GARBAGE 99
#define INIT_ORDER_DISCORD 78
#define INIT_ORDER_JOBS 65 // Must init before atoms, to set up properly the dynamic job lists.
#define INIT_ORDER_TICKER 55
#define INIT_ORDER_SEEDS 52 // More aurora snowflake, needs to load before the atoms init as it generates images for seeds that are used
#define INIT_ORDER_MISC_FIRST 51 //Another aurora snowflake system? Who would have guessed... Anyways, need to load before mapping or global HUDs are not ready when atoms request them
#define INIT_ORDER_MAPPING 50 //This is the ATLAS subsystem
#define INIT_ORDER_PARALLAX 49 // Parallax image cache generation. Must run before ghosts are able to join. Another aurora snowflake code, run after mapping or it runtimes
#define INIT_ORDER_EARLY_ASSETS 48
#define INIT_ORDER_SPATIAL_GRID 43
#define INIT_ORDER_ECONOMY 40
#define INIT_ORDER_MAPFINALIZE 31 //Asteroid generation, another aurora snowflake, must run before the atoms init
#define INIT_ORDER_ATOMS 30
#define INIT_ORDER_MACHINES 20
#define INIT_ORDER_DEFAULT 0
#define INIT_ORDER_AIR -1
#define INIT_ORDER_AWAY_MAPS -2 //Loading away sites and exoplanets, should start after air, must initialize before ghost roles in order for their spawnpoints to work
#define INIT_ORDER_GHOSTROLES -2.1 //Ghost roles must initialize before SS_INIT_MISC due to some roles (matriarch drones) relying on the assumption that this SS is initialized.
#define INIT_ORDER_MISC -2.2 //Aurora snowflake, Subsystems without an explicitly set initialization order start here
#define INIT_ORDER_CODEX -3 // Codex subsystem. Should be initialized after chemistry and cooking recipes.
#define INIT_ORDER_VOTE -4
#define INIT_ORDER_ASSETS -5
#define INIT_ORDER_ICON_UPDATE -5.5 //Yet another aurora snowflake, Icon update queue flush. Should run before overlays, probably before smoothing the icon too
#define INIT_ORDER_ICON_SMOOTHING -6
#define INIT_ORDER_OVERLAY -7
#define INIT_ORDER_LIGHTING -20
#define INIT_ORDER_ZCOPY -21 //Aurora snowflake, Z-mimic flush. Should run after SSoverlay & SSicon_smooth so it copies the smoothed sprites.
#define INIT_ORDER_STATPANELS -97
#define INIT_ORDER_CHAT -100 //Should be last to ensure chat remains smooth during init.

// Subsystem fire priority, from lowest to highest priority
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)

#define FIRE_PRIORITY_PING 10
#define FIRE_PRIORITY_GARBAGE 15
#define FIRE_PRIORITY_ASSETS 20
#define FIRE_PRIORITY_DEFAULT 50
#define FIRE_PRIORITY_STATPANEL 390
#define FIRE_PRIORITY_CHAT 400


/* AURORA SHIT */
Expand Down
15 changes: 15 additions & 0 deletions code/__HELPERS/ref.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* \ref behaviour got changed in 512 so this is necesary to replicate old behaviour.
* If it ever becomes necesary to get a more performant REF(), this lies here in wait
* #define REF(thing) (thing && isdatum(thing) && (thing:datum_flags & DF_USE_TAG) && thing:tag ? "[thing:tag]" : text_ref(thing))
**/
/proc/REF(input)
if(isdatum(input))
var/datum/thing = input
if(thing.datum_flags & DF_USE_TAG)
if(!thing.tag)
stack_trace("A ref was requested of an object with DF_USE_TAG set but no tag: [thing]")
thing.datum_flags &= ~DF_USE_TAG
else
return "\[[url_encode(thing.tag)]\]"
return text_ref(input)
2 changes: 1 addition & 1 deletion code/_onclick/hud/borer_hud.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/mob/living/simple_animal/borer/instantiate_hud(var/datum/hud/HUD)
/mob/living/simple_animal/borer/instantiate_hud(datum/hud/HUD)
HUD.borer_hud()

/datum/hud/proc/borer_hud()
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/captive_brain_hud.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/mob/living/captive_brain/instantiate_hud(var/datum/hud/HUD)
/mob/living/captive_brain/instantiate_hud(datum/hud/HUD)
HUD.captive_brain_hud()

/datum/hud/proc/captive_brain_hud()
Expand Down
53 changes: 41 additions & 12 deletions code/_onclick/hud/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,23 @@ var/list/global_huds
*/

/datum/hud
///The mob that possesses the HUD
var/mob/mymob

var/hud_shown = 1 //Used for the HUD toggle (F12)
var/inventory_shown = 1 //the inventory
var/show_intent_icons = 0
var/hotkey_ui_hidden = 0 //This is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
///Boolean, if the HUD is shown, used for the HUD toggle (F12)
var/hud_shown = TRUE

///Boolean, if the inventory is shows
var/inventory_shown = TRUE

///Boolean, if the intent icons are shown
var/show_intent_icons = FALSE

///Boolean, this is to hide the buttons that can be used via hotkeys. (hotkeybuttons list of buttons)
var/hotkey_ui_hidden = FALSE

///Boolean, if the action buttons are hidden
var/action_buttons_hidden = FALSE

var/obj/screen/lingchemdisplay
var/obj/screen/instability_display //Technomancer.
Expand All @@ -141,7 +152,6 @@ var/list/global_huds
var/list/obj/screen/hotkeybuttons

var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
var/action_buttons_hidden = 0

/datum/hud/New(mob/owner)
mymob = owner
Expand Down Expand Up @@ -169,7 +179,9 @@ var/list/global_huds
. = ..()

/datum/hud/proc/hidden_inventory_update()
if(!mymob) return
if(!mymob)
return

if(ishuman(mymob))
var/mob/living/carbon/human/H = mymob
for(var/gear_slot in H.species.hud.gear)
Expand Down Expand Up @@ -289,16 +301,30 @@ var/list/global_huds
H.r_store.screen_loc = null


/**
* Instantiate an HUD to the current mob that own is
*/
/datum/hud/proc/instantiate()
if(!ismob(mymob)) return 0
if(!mymob.client) return 0
SHOULD_NOT_SLEEP(TRUE)
SHOULD_CALL_PARENT(FALSE)

if(!ismob(mymob))
stack_trace("HUD instantiation called on an HUD without a mob!")
return FALSE

if(!(mymob.client))
return FALSE

var/ui_style = ui_style2icon(mymob.client.prefs.UI_style)
var/ui_color = mymob.client.prefs.UI_style_color
var/ui_alpha = mymob.client.prefs.UI_style_alpha

mymob.instantiate_hud(src, ui_style, ui_color, ui_alpha)

/mob/proc/instantiate_hud(var/datum/hud/HUD, var/ui_style, var/ui_color, var/ui_alpha)
/mob/proc/instantiate_hud(datum/hud/HUD, ui_style, ui_color, ui_alpha)
SHOULD_NOT_SLEEP(TRUE)
SHOULD_CALL_PARENT(FALSE)

return

//Triggered when F12 is pressed (Unless someone changed something in the DMF)
Expand All @@ -307,16 +333,19 @@ var/list/global_huds
set hidden = 1

if(!hud_used)
to_chat(usr, "<span class='warning'>This mob type does not use a HUD.</span>")
to_chat(usr, SPAN_WARNING("This mob type does not use a HUD."))
return

if(!ishuman(src))
to_chat(usr, "<span class='warning'>Inventory hiding is currently only supported for human mobs, sorry.</span>")
to_chat(usr, SPAN_WARNING("Inventory hiding is currently only supported for human mobs."))
return

if(!client)
return

if(!client) return
if(client.view != world.view)
return

if(hud_used.hud_shown)
hud_used.hud_shown = 0
if(src.hud_used.adding)
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/human.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/mob/living/carbon/human/instantiate_hud(var/datum/hud/HUD, var/ui_style, var/ui_color, var/ui_alpha)
/mob/living/carbon/human/instantiate_hud(datum/hud/HUD, ui_style, ui_color, ui_alpha)
HUD.human_hud(ui_style, ui_color, ui_alpha, src)

/datum/hud/proc/human_hud(var/ui_style='icons/mob/screen/white.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255, var/mob/living/carbon/human/target)
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/morph.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/mob/living/simple_animal/hostile/morph/instantiate_hud(var/datum/hud/HUD)
/mob/living/simple_animal/hostile/morph/instantiate_hud(datum/hud/HUD)
HUD.morph_hud()

/datum/hud/proc/morph_hud()
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/nymph_hud.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/mob/living/carbon/alien/instantiate_hud(var/datum/hud/HUD)
/mob/living/carbon/alien/instantiate_hud(datum/hud/HUD)
HUD.nymph_hud()

/datum/hud/proc/nymph_hud()
Expand Down
Loading

0 comments on commit 8968612

Please sign in to comment.