Skip to content

Commit

Permalink
Merge remote-tracking branch 'cmss13-devs/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsVyzo committed Aug 27, 2024
2 parents 9efaf09 + 37cc136 commit 250ac26
Show file tree
Hide file tree
Showing 126 changed files with 2,150 additions and 205 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/client_prefs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#define TOGGLE_AUTOMATIC_PUNCTUATION (1<<7) // Whether your sentences will automatically be punctuated with a period
#define TOGGLE_COMBAT_CLICKDRAG_OVERRIDE (1<<8) // Whether disarm/harm intents cause clicks to trigger immediately when the mouse button is depressed.
#define TOGGLE_ALTERNATING_DUAL_WIELD (1<<9) // Whether dual-wielding fires both guns at once or swaps between them, OUTDATED, used to update savefiles, now dual_wield_pref
#define TOGGLE_FULLSCREEN (1<<10) // See /client/proc/toggle_fullscreen in client_procs.dm
#define TOGGLE_FULLSCREEN (1<<10) // See /client/proc/update_fullscreen in client_procs.dm
#define TOGGLE_MEMBER_PUBLIC (1<<11) //determines if you get a byond logo by your name in ooc if you're a member or not
#define TOGGLE_OOC_FLAG (1<<12) // determines if your country flag appears by your name in ooc chat
#define TOGGLE_MIDDLE_MOUSE_SWAP_HANDS (1<<13) //Toggle whether middle click swaps your hands
Expand Down
9 changes: 8 additions & 1 deletion code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define SQUAD_SOF "SOF"
#define SQUAD_CBRN "CBRN"
#define SQUAD_FORECON "FORECON"
#define SQUAD_SOLAR "Solar Devils"

// Job name defines
#define JOB_SQUAD_MARINE "Rifleman"
Expand Down Expand Up @@ -124,6 +125,8 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)
#define JOB_GENERAL "USCM General"
#define JOB_ACMC "Assistant Commandant of the Marine Corps"
#define JOB_CMC "Commandant of the Marine Corps"
#define JOB_PLT_MED "Platoon Corpsman"
#define JOB_PLT_SL "Platoon Squad Leader"
#define JOB_SQUAD_TECH "Reconnaissance Support Technician"

// Used to add a timelock to a job. Will be passed onto derivatives
Expand Down Expand Up @@ -335,11 +338,15 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)
#define JOB_PROVOST_TML "Provost Team Leader"
#define JOB_PROVOST_ADVISOR "Provost Advisor"
#define JOB_PROVOST_INSPECTOR "Provost Inspector"
#define JOB_PROVOST_CINSPECTOR "Provost Chief Inspector"
#define JOB_PROVOST_UNDERCOVER "Provost Undercover Inspector"

#define JOB_PROVOST_DMARSHAL "Provost Deputy Marshal"
#define JOB_PROVOST_MARSHAL "Provost Marshal"
#define JOB_PROVOST_SMARSHAL "Provost Sector Marshal"
#define JOB_PROVOST_CMARSHAL "Provost Chief Marshal"

#define PROVOST_JOB_LIST list(JOB_PROVOST_ENFORCER, JOB_PROVOST_TML, JOB_PROVOST_ADVISOR, JOB_PROVOST_INSPECTOR, JOB_PROVOST_MARSHAL, JOB_PROVOST_SMARSHAL, JOB_PROVOST_CMARSHAL)
#define PROVOST_JOB_LIST list(JOB_PROVOST_ENFORCER, JOB_PROVOST_TML, JOB_PROVOST_ADVISOR, JOB_PROVOST_INSPECTOR, JOB_PROVOST_CINSPECTOR, JOB_PROVOST_DMARSHAL, JOB_PROVOST_MARSHAL, JOB_PROVOST_SMARSHAL, JOB_PROVOST_CMARSHAL)

#define JOB_RIOT "Riot Control"
#define JOB_RIOT_CHIEF "Chief Riot Control"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/keybinding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
//Client
#define COMSIG_KB_CLIENT_GETHELP_DOWN "keybinding_client_gethelp_down"
#define COMSIG_KB_CLIENT_SCREENSHOT_DOWN "keybinding_client_screenshot_down"
#define COMSIG_KB_CLIENT_TOGGLEFULLSCREEN_DOWN "keybinding_client_togglefullscreen_down"
#define COMSIG_KB_CLIENT_MINIMALHUD_DOWN "keybinding_client_minimalhud_down"

//Communication
Expand Down
9 changes: 9 additions & 0 deletions code/__DEFINES/paygrade_defs/provost.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
// Paygrade shorthand defines, to allow clearer designation.

// PROVOST OFFICE
/// PvI, Provost Advisor
#define PAY_SHORT_PVA"PvA"

/// PvI, Provost Inspector
#define PAY_SHORT_PVI "PvI"

/// PvCI, Provost Chief Inspector
#define PAY_SHORT_PVCI "PvCI"

/// PvDM, Provost Deputy Marshal
#define PAY_SHORT_PVDM "PvDM"

/// PvM, Provost Marshal
#define PAY_SHORT_PVM "PvM"

Expand Down
1 change: 1 addition & 0 deletions code/controllers/subsystem/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ GLOBAL_LIST_INIT(radiochannels, list(
SQUAD_SOF = SOF_FREQ,
SQUAD_CBRN = CBRN_FREQ,
SQUAD_FORECON = FORECON_FREQ,
SQUAD_SOLAR = SOF_FREQ,

RADIO_CHANNEL_ALAMO = DS1_FREQ,
RADIO_CHANNEL_NORMANDY = DS2_FREQ,
Expand Down
22 changes: 21 additions & 1 deletion code/controllers/subsystem/decorator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SUBSYSTEM_DEF(decorator)
var/list/datum/weakref/currentrun = list()

/datum/controller/subsystem/decorator/Initialize()
var/list/all_decors = typesof(/datum/decorator) - list(/datum/decorator) - typesof(/datum/decorator/manual)
var/list/all_decors = typesof(/datum/decorator) - list(/datum/decorator) - typesof(/datum/decorator/manual) - typesof(/datum/decorator/gamemode)
for(var/decor_type in all_decors)
var/datum/decorator/decor = new decor_type()
if(!decor.is_active_decor())
Expand All @@ -43,6 +43,8 @@ SUBSYSTEM_DEF(decorator)
registered_decorators[app_type] = list()
registered_decorators[app_type] += decor

RegisterSignal(SSdcs, COMSIG_GLOB_MODE_PRESETUP, PROC_REF(handle_mode_specific))

for(var/i in registered_decorators)
registered_decorators[i] = sortDecorators(registered_decorators[i])

Expand Down Expand Up @@ -71,6 +73,24 @@ SUBSYSTEM_DEF(decorator)
if(MC_TICK_CHECK)
return

/datum/controller/subsystem/decorator/proc/handle_mode_specific()
SIGNAL_HANDLER

for(var/decorator_type in typesof(/datum/decorator/gamemode))
var/datum/decorator/gamemode/gamemode_decorator = new decorator_type()

if(!istype(SSticker.mode, gamemode_decorator.gamemode))
continue

var/applicable_types = gamemode_decorator.get_decor_types()
if(!length(applicable_types))
continue

active_decorators |= gamemode_decorator

for(var/applicable_type in applicable_types)
LAZYADD(registered_decorators[applicable_type], gamemode_decorator)

/datum/controller/subsystem/decorator/proc/add_decorator(decor_type, ...)
var/list/arguments = list()
if (length(args) > 1)
Expand Down
7 changes: 1 addition & 6 deletions code/datums/ammo/bullet/special_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,10 @@
RegisterSignal(SSdcs, COMSIG_GLOB_MODE_PRESETUP, PROC_REF(setup_hvh_damage))

/datum/ammo/bullet/minigun/proc/setup_hvh_damage()
SIGNAL_HANDLER
if(MODE_HAS_FLAG(MODE_FACTION_CLASH))
damage = 15

/datum/ammo/bullet/minigun/tank
accuracy = -HIT_ACCURACY_TIER_1
accuracy_var_low = PROJECTILE_VARIANCE_TIER_8
accuracy_var_high = PROJECTILE_VARIANCE_TIER_8
accurate_range = 12

/datum/ammo/bullet/m60
name = "M60 bullet"
headshot_state = HEADSHOT_OVERLAY_MEDIUM
Expand Down
30 changes: 30 additions & 0 deletions code/datums/ammo/bullet/tank.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
//======
*/

//Autocannon Ammo//

/datum/ammo/bullet/tank/flak
name = "flak autocannon bullet"
icon_state = "autocannon"
sound_hit = 'sound/weapons/sting_boom_small1.ogg'
damage_falloff = 0
flags_ammo_behavior = AMMO_BALLISTIC
accurate_range_min = 4
Expand Down Expand Up @@ -72,3 +75,30 @@
for(var/mob/living/carbon/L in T)
if(L.stat == CONSCIOUS && L.mob_size <= MOB_SIZE_XENO)
shake_camera(L, 1, 1)

//Minigun Ammo//

/datum/ammo/bullet/tank/minigun
name = "minigun bullet"
headshot_state = HEADSHOT_OVERLAY_MEDIUM
icon_state = "bullet_large"

accuracy = -HIT_ACCURACY_TIER_1
accuracy_var_low = PROJECTILE_VARIANCE_TIER_8
accuracy_var_high = PROJECTILE_VARIANCE_TIER_8
accurate_range = 12
damage = 40
penetration = ARMOR_PENETRATION_TIER_6
damage_armor_punch = 1

/datum/ammo/bullet/tank/minigun/New()
..()
if(SSticker.mode && MODE_HAS_FLAG(MODE_FACTION_CLASH))
damage = 15
else if(SSticker.current_state < GAME_STATE_PLAYING)
RegisterSignal(SSdcs, COMSIG_GLOB_MODE_PRESETUP, PROC_REF(setup_hvh_damage))

/datum/ammo/bullet/tank/minigun/proc/setup_hvh_damage()
SIGNAL_HANDLER
if(MODE_HAS_FLAG(MODE_FACTION_CLASH))
damage = 15
46 changes: 46 additions & 0 deletions code/datums/decorators/gamemode_decorator.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#define GAMEMODE_DECORATOR(type, mode, list_edits) \
/datum/decorator/gamemode##type##mode { \
gamemode = mode; \
apply_type = type; \
edits = list_edits; \
}

#define VARIABLE_EDIT(type, variable, value) nameof(type::variable) = value
#define ARMOR_EDIT(variable, value) VARIABLE_EDIT(/obj/item/clothing/suit/storage/marine, variable, value)
#define GUN_EDIT(variable, value) VARIABLE_EDIT(/obj/item/weapon/gun, variable, value)
#define AMMO_EDIT(variable, value) VARIABLE_EDIT(/obj/item/ammo_magazine, variable, value)

/**
* Gamemode decorators allow us to make changes to edits on specific gamemodes,
* to assist in balancing varied gameplay in different modes
*
* They can be manually defined, and procs overridden. Alternatively,
* using the GAMEMODE_DECORATOR define, you can quickly make a decorator for
* a specific type and subtypes.
*
* eg:
* ```
* GAMEMODE_DECORATOR(/obj/item/clothing/suit/storage/marine/smartgunner, /datum/game_mode/extended/faction_clash, list(
* ARMOR_EDIT(armor_bullet, CLOTHING_ARMOR_HIGH),
* ARMOR_EDIT(armor_internaldamage, CLOTHING_ARMOR_HIGH)
* ))
* ```
*
* If you need to edit different types, make a new define using VARIABLE_EDIT, and provide the parent path for the type.
*/
/datum/decorator/gamemode
/// The gamemode type this should apply to
var/gamemode

/// Which type this should apply edits to
var/apply_type

/// The list of edits to make
var/list/edits

/datum/decorator/gamemode/get_decor_types()
return typesof(apply_type)

/datum/decorator/gamemode/decorate(atom/object)
for(var/edit in edits)
object.vars[edit] = edits[edit]
91 changes: 91 additions & 0 deletions code/datums/emergency_calls/solar_devils.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/datum/emergency_call/solar_devils
name = "USCM Solar Devils (Half Squad)"
arrival_message = "This is the Solar Devils of the USCM 2nd Division, responding to your distress beacon. Don't worry, the grown-ups are here to clean up your mess."
objectives = "Assist local Marine forces in dealing with whatever issue they can't handle. Further orders may be forthcoming."
home_base = /datum/lazy_template/ert/uscm_station
probability = 0
mob_min = 3
mob_max = 5

max_medics = 1
max_smartgunners = 1

/datum/emergency_call/solar_devils/create_member(datum/mind/new_mind, turf/override_spawn_loc)
var/turf/spawn_loc = override_spawn_loc ? override_spawn_loc : get_spawn_point()

if(!istype(spawn_loc))
return //Didn't find a useable spawn point.

var/mob/living/carbon/human/mob = new(spawn_loc)
new_mind.transfer_to(mob, TRUE)

if(!leader && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(mob.client, JOB_SQUAD_LEADER, time_required_for_job))
leader = mob
arm_equipment(mob, /datum/equipment_preset/uscm/tl_pve, TRUE, TRUE)
to_chat(mob, SPAN_ROLE_HEADER("You are the Solar Devils Team Leader!"))

else if(medics < max_medics && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(mob.client, JOB_SQUAD_MEDIC, time_required_for_job))
medics++
arm_equipment(mob, /datum/equipment_preset/uscm/medic_pve, TRUE, TRUE)
to_chat(mob, SPAN_ROLE_HEADER("You are the Solar Devils Platoon Corpsman!"))

else if(smartgunners < max_smartgunners && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_SMARTGUNNER) && check_timelock(mob.client, JOB_SQUAD_SMARTGUN))
smartgunners++
to_chat(mob, SPAN_ROLE_HEADER("You are the Solar Devils Smartgunner!"))
arm_equipment(mob, /datum/equipment_preset/uscm/sg_pve, TRUE, TRUE)

else
arm_equipment(mob, /datum/equipment_preset/uscm/rifleman_pve, TRUE, TRUE)
to_chat(mob, SPAN_ROLE_HEADER("You are a Solar Devils Rifleman!"))

to_chat(mob, SPAN_ROLE_BODY("You are a member of the 3rd Battalion 'Solar Devils', part of the USCM's 2nd Division, 1st Regiment. Unlike most of the USS Almayer's troops, you are well-trained and properly-equipped career marines. Semper Fidelis."))
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), mob, SPAN_BOLD("Objectives:</b> [objectives]")), 1 SECONDS)

/datum/emergency_call/solar_devils_full
name = "USCM Solar Devils (Full Squad)"
arrival_message = "This is the Solar Devils of the USCM 2nd Division, responding to your distress beacon. Don't worry, the grown-ups are here to clean up your mess."
objectives = "Assist local Marine forces in dealing with whatever issue they can't handle. Further orders may be forthcoming."
home_base = /datum/lazy_template/ert/uscm_station
probability = 0
mob_min = 3
mob_max = 10

max_engineers = 2
max_medics = 1
max_smartgunners = 2

/datum/emergency_call/solar_devils_full/create_member(datum/mind/new_mind, turf/override_spawn_loc)
var/turf/spawn_loc = override_spawn_loc ? override_spawn_loc : get_spawn_point()

if(!istype(spawn_loc))
return //Didn't find a useable spawn point.

var/mob/living/carbon/human/mob = new(spawn_loc)
new_mind.transfer_to(mob, TRUE)

if(!leader && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_LEADER) && check_timelock(mob.client, JOB_SQUAD_LEADER, time_required_for_job))
leader = mob
arm_equipment(mob, /datum/equipment_preset/uscm/sl_pve, TRUE, TRUE)
to_chat(mob, SPAN_ROLE_HEADER("You are the Solar Devils Platoon Leader!"))

else if(engineers < max_engineers && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_ENGINEER) && check_timelock(mob.client, JOB_SQUAD_LEADER, time_required_for_job))
engineers++
arm_equipment(mob, /datum/equipment_preset/uscm/tl_pve, TRUE, TRUE)
to_chat(mob, SPAN_ROLE_HEADER("You are a Solar Devils Team Leader!"))

else if(medics < max_medics && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_MEDIC) && check_timelock(mob.client, JOB_SQUAD_MEDIC, time_required_for_job))
medics++
arm_equipment(mob, /datum/equipment_preset/uscm/medic_pve, TRUE, TRUE)
to_chat(mob, SPAN_ROLE_HEADER("You are the Solar Devils Platoon Corpsman!"))

else if(smartgunners < max_smartgunners && HAS_FLAG(mob.client.prefs.toggles_ert, PLAY_SMARTGUNNER) && check_timelock(mob.client, JOB_SQUAD_SMARTGUN))
smartgunners++
to_chat(mob, SPAN_ROLE_HEADER("You are a Solar Devils Smartgunner!"))
arm_equipment(mob, /datum/equipment_preset/uscm/sg_pve, TRUE, TRUE)

else
arm_equipment(mob, /datum/equipment_preset/uscm/rifleman_pve, TRUE, TRUE)
to_chat(mob, SPAN_ROLE_HEADER("You are a Solar Devils Rifleman!"))

to_chat(mob, SPAN_ROLE_BODY("You are a member of the 3rd Battalion 'Solar Devils', part of the USCM's 2nd Division, 1st Regiment. Unlike most of the USS Almayer's troops, you are well-trained and properly-equipped career marines. Semper Fidelis."))
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), mob, SPAN_BOLD("Objectives:</b> [objectives]")), 1 SECONDS)
13 changes: 13 additions & 0 deletions code/datums/factions/uscm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
if(JOB_GENERAL, JOB_COLONEL, JOB_ACMC, JOB_CMC)
marine_rk = "general"
border_rk = "command"
if(JOB_PLT_MED)
marine_rk = "med"
if(JOB_PLT_SL)
marine_rk = "leader"
if(JOB_SQUAD_TECH)
marine_rk = "tech"
if(JOB_INTEL)
Expand Down Expand Up @@ -145,9 +149,18 @@
if(JOB_PROVOST_INSPECTOR)
marine_rk = "pvi"
border_rk = "command"
if(JOB_PROVOST_UNDERCOVER)
marine_rk = "pvuc"
border_rk = "command"
if(JOB_PROVOST_CINSPECTOR)
marine_rk = "pvci"
border_rk = "command"
if(JOB_PROVOST_ADVISOR)
marine_rk = "pva"
border_rk = "command"
if(JOB_PROVOST_DMARSHAL)
marine_rk = "pvdm"
border_rk = "command"
if(JOB_PROVOST_MARSHAL, JOB_PROVOST_CMARSHAL, JOB_PROVOST_SMARSHAL)
marine_rk = "pvm"
border_rk = "command"
Expand Down
15 changes: 15 additions & 0 deletions code/datums/keybinding/client.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@
winset(user, null, "command=.screenshot [!user.keys_held["shift"] ? "auto" : ""]")
return TRUE

/datum/keybinding/client/toggle_fullscreen
hotkey_keys = list("F11")
classic_keys = list("F11")
name = "toggle_fullscreen"
full_name = "Toggle Fullscreen"
description = "Toggles whether the game window will be true fullscreen or normal."
keybind_signal = COMSIG_KB_CLIENT_TOGGLEFULLSCREEN_DOWN

/datum/keybinding/client/toggle_fullscreen/down(client/user)
. = ..()
if(.)
return
user.toggle_fullscreen_preference()
return TRUE

/datum/keybinding/client/minimal_hud
hotkey_keys = list("F12")
classic_keys = list("F12")
Expand Down
2 changes: 1 addition & 1 deletion code/datums/pain/_pain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
if(!isnull(threshold_horrible))
activate_horrible()

if(new_level >= PAIN_LEVEL_SEVERE)
if(new_level >= PAIN_LEVEL_SEVERE && feels_pain)
RegisterSignal(source_mob, COMSIG_MOB_DRAGGED, PROC_REF(oxyloss_drag), override = TRUE)
RegisterSignal(source_mob, COMSIG_MOB_DEVOURED, PROC_REF(handle_devour), override = TRUE)
RegisterSignal(source_mob, COMSIG_MOVABLE_PRE_THROW, PROC_REF(oxy_kill), override = TRUE)
Expand Down
Loading

0 comments on commit 250ac26

Please sign in to comment.