Skip to content

Commit

Permalink
Merge branch 'master' into tac-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Cthulhu80 authored Sep 26, 2023
2 parents c75b1e5 + a33bb0c commit 68c2d98
Show file tree
Hide file tree
Showing 161 changed files with 1,997 additions and 707 deletions.
7 changes: 7 additions & 0 deletions code/__DEFINES/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@
//flags
#define CONFIG_ENTRY_LOCKED (1<<0) //can't edit
#define CONFIG_ENTRY_HIDDEN (1<<1) //can't see value

#define ON_CONFIG_LOAD(type) \
##type/New() { \
. = ..(); \
RegisterSignal(SSdcs, COMSIG_GLOB_CONFIG_LOADED, PROC_REF(__on_config_load)); \
}; \
##type/proc/__on_config_load()
6 changes: 6 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@

#define COMSIG_GHOST_MOVED "ghost_moved"

/// When a mob is turned into a /mob/dead/observer at /mob/proc/ghostize()
#define COMSIG_MOB_GHOSTIZE "mob_ghostize"

/// When a mob gets a new mind via transfer at /datum/mind/proc/transfer_to()
#define COMSIG_MOB_NEW_MIND "mob_new_mind"

#define COMSIG_MOB_MOUSEDOWN "mob_mousedown" //from /client/MouseDown(): (atom/object, turf/location, control, params)
#define COMSIG_MOB_MOUSEUP "mob_mouseup" //from /client/MouseUp(): (atom/object, turf/location, control, params)
#define COMSIG_MOB_MOUSEDRAG "mob_mousedrag" //from /client/MouseDrag(): (atom/src_object, atom/over_object, turf/src_location, turf/over_location, src_control, over_control, params)
Expand Down
9 changes: 9 additions & 0 deletions code/__DEFINES/dcs/signals/signals_client.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@

/// Called after a client logs into a mob: (mob)
#define COMSIG_CLIENT_MOB_LOGIN "client_mob_changed"

/// Called when something is added to a client's screen : /client/proc/add_to_screen(screen_add)
#define COMSIG_CLIENT_SCREEN_ADD "client_screen_add"

/// Called when something is removed from a client's screen : /client/proc/remove_from_screen(screen_remove)
#define COMSIG_CLIENT_SCREEN_REMOVE "client_screen_remove"

/// When a mind is transfered to another mob at /datum/mind/proc/transfer_to()
#define COMSIG_CLIENT_MIND_TRANSFER "mind_transfer"
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/signals_global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
/// called after a successful var edit somewhere in the world: (list/args)
#define COMSIG_GLOB_VAR_EDIT "!var_edit"

#define COMSIG_GLOB_CONFIG_LOADED "!config_loaded"

///from /mob/living/carbon/xenomorph/initialize
#define COMSIG_GLOB_XENO_SPAWN "!xeno_spawn"

Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST
#define JOB_DROPSHIP_CREW_CHIEF "Dropship Crew Chief"
#define JOB_CREWMAN "Vehicle Crewman"
#define JOB_INTEL "Intelligence Officer"
#define JOB_DROPSHIP_ROLES /datum/timelock/dropship
#define JOB_DROPSHIP_ROLES_LIST list(JOB_DROPSHIP_CREW_CHIEF, JOB_PILOT)
#define JOB_AUXILIARY_ROLES /datum/timelock/auxiliary
#define JOB_AUXILIARY_ROLES_LIST list(JOB_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_CREWMAN, JOB_INTEL)

Expand Down Expand Up @@ -258,7 +260,11 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST
#define JOB_UPP_SRLT_OFFICER "UPP Senior Leytenant"
#define JOB_UPP_KPT_OFFICER "UPP Kapitan"
#define JOB_UPP_MAY_OFFICER "UPP Mayjor"
#define JOB_UPP_LTKOL_OFFICER "UPP Leytenant Kolonel"
#define JOB_UPP_KOL_OFFICER "UPP Kolonel"
#define JOB_UPP_MAY_GENERAL "UPP Mayjor General"
#define JOB_UPP_LT_GENERAL "UPP Leytenant General"
#define JOB_UPP_GENERAL "UPP Army General"

#define JOB_UPP_COMBAT_SYNTH "UPP Combat Synthetic"

Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ var/global/list/ROLES_ENGINEERING = list(JOB_CHIEF_ENGINEER, JOB_ORDNANCE_TECH,
var/global/list/ROLES_REQUISITION = list(JOB_CHIEF_REQUISITION, JOB_CARGO_TECH, JOB_WO_CHIEF_REQUISITION, JOB_WO_REQUISITION)
var/global/list/ROLES_MEDICAL = list(JOB_CMO, JOB_RESEARCHER, JOB_DOCTOR, JOB_NURSE, JOB_WO_CMO, JOB_WO_RESEARCHER, JOB_WO_DOCTOR)
var/global/list/ROLES_MARINES = list(JOB_SQUAD_LEADER, JOB_SQUAD_TEAM_LEADER, JOB_SQUAD_SPECIALIST, JOB_SQUAD_SMARTGUN, JOB_SQUAD_MEDIC, JOB_SQUAD_ENGI, JOB_SQUAD_MARINE)
var/global/list/ROLES_SQUAD_ALL = list(SQUAD_MARINE_1, SQUAD_MARINE_2, SQUAD_MARINE_3, SQUAD_MARINE_4, SQUAD_MARINE_5, SQUAD_MARINE_CRYO)
var/global/list/ROLES_SQUAD_ALL = list(SQUAD_MARINE_1, SQUAD_MARINE_2, SQUAD_MARINE_3, SQUAD_MARINE_4, SQUAD_MARINE_5, SQUAD_MARINE_CRYO, SQUAD_MARINE_INTEL)

//Groundside roles
var/global/list/ROLES_XENO = list(JOB_XENOMORPH_QUEEN, JOB_XENOMORPH)
Expand Down
67 changes: 6 additions & 61 deletions code/__DEFINES/urls.dm
Original file line number Diff line number Diff line change
@@ -1,62 +1,7 @@
// ------ CHANGE LOG ------ //
#define URL_CHANGELOG "https://cm-ss13.com/changelog"

// ------ ISSUE TRACKER ------ //
#define URL_ISSUE_TRACKER "https://github.com/cmss13-devs/cmss13/issues"

// ------ MISC WIKI LINKS ------ //
#define URL_RULES_PAGE "https://cm-ss13.com/rules"
#define URL_RULES_EORG "https://cm-ss13.com/rules#rule-4-no-griefing"
#define URL_WIKI_LANDING "https://cm-ss13.com/wiki/Main_Page"
#define URL_WIKI_COC "https://cm-ss13.com/wiki/Rank"
#define URL_WIKI_LAW "https://cm-ss13.com/wiki/Marine_Law"
#define URL_WIKI_XENO_QUICKSTART "https://cm-ss13.com/wiki/Xeno_Quickstart_Guide"
#define URL_WIKI_MARINE_QUICKSTART "https://cm-ss13.com/wiki/Marine_Quickstart_Guide"
#define URL_WIKI_MACROS "https://cm-ss13.com/wiki/Macros"
#define URL_WIKI_SOP "https://cm-ss13.com/wiki/Standard_Operating_Procedure"
#define URL_WIKI_CO_RULES "https://cm-ss13.com/wiki/CO_Council_Rulings"
#define URL_WIKI_CONSTRUCTION "https://cm-ss13.com/wiki/Guide_to_construction"
#define URL_WIKI_ENGINEERING "https://cm-ss13.com/wiki/Guide_to_Engineering"
#define URL_WIKI_HACKING "https://cm-ss13.com/wiki/Guide_to_Engineering#Hacking"
#define URL_WIKI_SURGERY "https://cm-ss13.com/wiki/Surgery"
#define URL_WIKI_MEDICAL "https://cm-ss13.com/wiki/Guide_to_Medicine"

// ------ SPAWN GUIDES------ //
#define URL_WIKI_CO_GUIDE "https://cm-ss13.com/wiki/Commanding_Officer" // Command //
#define URL_WIKI_XO_GUIDE "https://cm-ss13.com/wiki/Executive_Officer"
#define URL_WIKI_SO_GUIDE "https://cm-ss13.com/wiki/Staff_Officer"
#define URL_WIKI_SEA_GUIDE "https://cm-ss13.com/wiki/Senior_Enlisted_Advisor"
#define URL_WIKI_SL_GUIDE "https://cm-ss13.com/wiki/Squad_Leader"
#define URL_WIKI_TL_GUIDE "https://cm-ss13.com/wiki/Squad_Radio_Telephone_Operator" // Squad Roles //
#define URL_WIKI_SPEC_GUIDE "https://cm-ss13.com/wiki/Squad_Specialist"
#define URL_WIKI_SG_GUIDE "https://cm-ss13.com/wiki/Squad_Smartgunner"
#define URL_WIKI_MEDIC_GUIDE "https://cm-ss13.com/wiki/Squad_Hospital_Corpsman"
#define URL_WIKI_COMTECH_GUIDE "https://cm-ss13.com/wiki/Squad_Combat_Technician"
#define URL_WIKI_CMP_GUIDE "https://cm-ss13.com/wiki/Chief_MP" // MP Roles //
#define URL_WIKI_MW_GUIDE "https://cm-ss13.com/wiki/Warden"
#define URL_WIKI_MP_GUIDE "https://cm-ss13.com/wiki/Military_Police"
#define URL_WIKI_ASO_GUIDE "https://cm-ss13.com/wiki/Auxiliary_Support_Officer" // Auxiliary Support
#define URL_WIKI_PO_GUIDE "https://cm-ss13.com/wiki/Pilot_Officer"
#define URL_WIKI_DCC_GUIDE "https://cm-ss13.com/wiki/Dropship_Crew_Chief"
#define URL_WIKI_IO_GUIDE "https://cm-ss13.com/wiki/Intelligence_Officer"
#define URL_WIKI_SYN_GUIDE "https://cm-ss13.com/wiki/Synthetic"
#define URL_WIKI_CE_GUIDE "https://cm-ss13.com/wiki/Chief_Engineer" // Engineering
#define URL_WIKI_OT_GUIDE "https://cm-ss13.com/wiki/Ordnance_Technician"
#define URL_WIKI_MT_GUIDE "https://cm-ss13.com/wiki/Maintenance_Technician"
#define URL_WIKI_CMO_GUIDE "https://cm-ss13.com/wiki/Chief_Medical_Officer" // Medical //
#define URL_WIKI_DOC_GUIDE "https://cm-ss13.com/wiki/Doctor"
#define URL_WIKI_NURSE_GUIDE "https://cm-ss13.com/wiki/Nurse"
#define URL_WIKI_RSR_GUIDE "https://cm-ss13.com/wiki/Researcher"
#define URL_WIKI_RO_GUIDE "https://cm-ss13.com/wiki/Requisitions_Officer" // Supply //
#define URL_WIKI_CT_GUIDE "https://cm-ss13.com/wiki/Cargo_Technician"
#define URL_WIKI_MST_GUIDE "https://cm-ss13.com/wiki/Mess_Technician"
#define URL_WIKI_CL_GUIDE "https://cm-ss13.com/wiki/Corporate_Liaison" // Misc //
#define URL_WIKI_SURV_GUIDE "https://cm-ss13.com/wiki/Survivor"
#define URL_WIKI_WJ_GUIDE "https://cm-ss13.com/wiki/Seegson_Working_Joe_Manual"

// ------ FORUM LINKS ------ //
#define URL_FORUM "https://forum.cm-ss13.com/"
#define URL_FORUM_APPEALS "https://forum.cm-ss13.com/w/in-game-appeal"
#define URL_FORUM_PLAYER_REPORT "https://forum.cm-ss13.com/w/player-report"
#define URL_FORUM_STAFF_REPORT "https://forum.cm-ss13.com/w/staff-report"
#define URL_QUEEN_GUIDE "https://cm-ss13.com/forums/showthread.php?8404-Ultimate-Queen-Guide-Rip-amp-amp-Tear-(Image-Heavy)"
#define URL_WIKI_LAW "Marine_Law"
#define URL_WIKI_XENO_QUICKSTART "Xeno_Quickstart_Guide"
#define URL_WIKI_MARINE_QUICKSTART "Marine_Quickstart_Guide"
#define URL_WIKI_MACROS "Macros"
#define URL_WIKI_SOP "Standard_Operating_Procedure"
#define URL_WIKI_CO_RULES "CO_Council_Rulings"
2 changes: 1 addition & 1 deletion code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
/client/proc/create_clickcatcher()
if(!void)
void = new()
screen += void
add_to_screen(void)

/client/proc/apply_clickcatcher()
create_clickcatcher()
Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/hud/alien.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@
var/mob/living/carbon/xenomorph/H = mymob
if(hud_version != HUD_STYLE_NOHUD)
if(H.r_hand)
H.client.screen += H.r_hand
H.client.add_to_screen(H.r_hand)
H.r_hand.screen_loc = ui_alien_datum.hud_slot_offset(H.r_hand, ui_alien_datum.ui_rhand)
if(H.l_hand)
H.client.screen += H.l_hand
H.client.add_to_screen(H.l_hand)
H.l_hand.screen_loc = ui_alien_datum.hud_slot_offset(H.l_hand, ui_alien_datum.ui_lhand)
else
if(H.r_hand)
Expand Down
12 changes: 6 additions & 6 deletions code/_onclick/hud/fullscreen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
screen.severity = severity
if (client && screen.should_show_to(src))
screen.update_for_view(client.view)
client.screen += screen
client.add_to_screen(screen)

return screen

Expand All @@ -33,12 +33,12 @@
addtimer(CALLBACK(src, PROC_REF(clear_fullscreen_after_animate), screen), animated, TIMER_CLIENT_TIME)
else
if(client)
client.screen -= screen
client.remove_from_screen(screen)
qdel(screen)

/mob/proc/clear_fullscreen_after_animate(atom/movable/screen/fullscreen/screen)
if(client)
client.screen -= screen
client.remove_from_screen(screen)
qdel(screen)

/mob/proc/clear_fullscreens()
Expand All @@ -48,7 +48,7 @@
/mob/proc/hide_fullscreens()
if(client)
for(var/category in fullscreens)
client.screen -= fullscreens[category]
client.remove_from_screen(fullscreens[category])

/mob/proc/reload_fullscreens()
if(client)
Expand All @@ -57,9 +57,9 @@
screen = fullscreens[category]
if(screen.should_show_to(src))
screen.update_for_view(client.view)
client.screen |= screen
client.add_to_screen(screen)
else
client.screen -= screen
client.remove_from_screen(screen)


/atom/movable/screen/fullscreen
Expand Down
6 changes: 3 additions & 3 deletions code/_onclick/hud/ghost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
/datum/hud/ghost/show_hud(version = 0, mob/viewmob)
// don't show this HUD if observing; show the HUD of the observee
var/mob/dead/observer/O = mymob
if (istype(O) && O.observetarget)
if (istype(O) && O.observe_target_mob)
plane_masters_update()
return FALSE

Expand All @@ -82,6 +82,6 @@
var/mob/screenmob = viewmob || mymob

if(!hud_shown)
screenmob.client.screen -= static_inventory
screenmob.client.remove_from_screen(static_inventory)
else
screenmob.client.screen += static_inventory
screenmob.client.add_to_screen(static_inventory)
46 changes: 28 additions & 18 deletions code/_onclick/hud/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,43 +189,43 @@
if(HUD_STYLE_STANDARD) //Default HUD
hud_shown = 1 //Governs behavior of other procs
if(static_inventory.len)
screenmob.client.screen += static_inventory
screenmob.client.add_to_screen(static_inventory)
if(toggleable_inventory.len && inventory_shown)
screenmob.client.screen += toggleable_inventory
screenmob.client.add_to_screen(toggleable_inventory)
if(hotkeybuttons.len && !hotkey_ui_hidden)
screenmob.client.screen += hotkeybuttons
screenmob.client.add_to_screen(hotkeybuttons)
if(infodisplay.len)
screenmob.client.screen += infodisplay
screenmob.client.add_to_screen(infodisplay)

if(HUD_STYLE_REDUCED) //Reduced HUD
hud_shown = 0 //Governs behavior of other procs
if(static_inventory.len)
screenmob.client.screen -= static_inventory
screenmob.client.remove_from_screen(static_inventory)
if(toggleable_inventory.len)
screenmob.client.screen -= toggleable_inventory
screenmob.client.remove_from_screen(toggleable_inventory)
if(hotkeybuttons.len)
screenmob.client.screen -= hotkeybuttons
screenmob.client.remove_from_screen(hotkeybuttons)
if(infodisplay.len)
screenmob.client.screen += infodisplay
screenmob.client.add_to_screen(infodisplay)

//These ones are a part of 'static_inventory', 'toggleable_inventory' or 'hotkeybuttons' but we want them to stay
if(l_hand_hud_object)
screenmob.client.screen += l_hand_hud_object //we want the hands to be visible
screenmob.client.add_to_screen(l_hand_hud_object) //we want the hands to be visible
if(r_hand_hud_object)
screenmob.client.screen += r_hand_hud_object //we want the hands to be visible
screenmob.client.add_to_screen(r_hand_hud_object) //we want the hands to be visible
if(action_intent)
screenmob.client.screen += action_intent //we want the intent switcher visible
screenmob.client.add_to_screen(action_intent) //we want the intent switcher visible

if(HUD_STYLE_NOHUD) //No HUD
hud_shown = 0 //Governs behavior of other procs
if(static_inventory.len)
screenmob.client.screen -= static_inventory
screenmob.client.remove_from_screen(static_inventory)
if(toggleable_inventory.len)
screenmob.client.screen -= toggleable_inventory
screenmob.client.remove_from_screen(toggleable_inventory)
if(hotkeybuttons.len)
screenmob.client.screen -= hotkeybuttons
screenmob.client.remove_from_screen(hotkeybuttons)
if(infodisplay.len)
screenmob.client.screen -= infodisplay
screenmob.client.remove_from_screen(infodisplay)

hud_version = display_hud_version
persistent_inventory_update(screenmob)
Expand All @@ -247,7 +247,7 @@
for(var/thing in plane_masters)
var/atom/movable/screen/plane_master/PM = plane_masters[thing]
PM.backdrop(mymob)
mymob.client.screen += PM
mymob.client.add_to_screen(PM)

/datum/hud/human/show_hud(version = 0, mob/viewmob)
. = ..()
Expand Down Expand Up @@ -412,7 +412,7 @@
if(!hud_shown)
for(var/category in alerts)
var/atom/movable/screen/alert/alert = alerts[category]
screenmob.client.screen -= alert
screenmob.client.remove_from_screen(alert)
return TRUE
var/c = 0
for(var/category in alerts)
Expand All @@ -432,8 +432,18 @@
else
. = ""
alert.screen_loc = .
screenmob.client.screen |= alert
screenmob.client.add_to_screen(alert)
if(!viewmob)
for(var/obs in mymob.observers)
reorganize_alerts(obs)
return TRUE

/// Wrapper for adding anything to a client's screen
/client/proc/add_to_screen(screen_add)
screen += screen_add
SEND_SIGNAL(src, COMSIG_CLIENT_SCREEN_ADD, screen_add)

/// Wrapper for removing anything from a client's screen
/client/proc/remove_from_screen(screen_remove)
screen -= screen_remove
SEND_SIGNAL(src, COMSIG_CLIENT_SCREEN_REMOVE, screen_remove)
Loading

0 comments on commit 68c2d98

Please sign in to comment.