Skip to content

Commit

Permalink
Merge branch 'cmss13-devs:master' into NameSanityTheSequel
Browse files Browse the repository at this point in the history
  • Loading branch information
MistChristmas authored Aug 25, 2024
2 parents 2b087dc + 6656c35 commit 3441358
Show file tree
Hide file tree
Showing 323 changed files with 5,068 additions and 1,254 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define CAMERA_NET_BRIG "Brig"
#define CAMERA_NET_ALAMO "Alamo"
#define CAMERA_NET_NORMANDY "Normandy"
#define CAMERA_NET_SAIPAN "Saipan"
#define CAMERA_NET_COLONY "Colony"
#define CAMERA_NET_ARES "ARES"

Expand Down
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
2 changes: 2 additions & 0 deletions code/__DEFINES/colours.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
#define LIGHT_COLOR_HOLY_MAGIC "#FFF743"
/// deep crimson
#define LIGHT_COLOR_BLOOD_MAGIC "#D00000"
/// Warm red color rgb(250, 66, 66)
#define LIGHT_COLOR_RED "#ff3b3b"

/* These ones aren't a direct color like the ones above, because nothing would fit */
/// Warm orange color, leaning strongly towards yellow. rgb(250, 160, 25)
Expand Down
13 changes: 12 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,9 @@ 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
#define AddTimelock(Path, timelockList) \
Expand Down Expand Up @@ -263,6 +267,7 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)
#define JOB_UPP_SPECIALIST "UPP Serzhant"
#define JOB_UPP_LEADER "UPP Master Serzhant"
#define JOB_UPP_POLICE "UPP Politsiya"
#define JOB_UPP_SUPPLY "UPP Logistics Technician"
#define JOB_UPP_LT_OFFICER "UPP Leytenant"
#define JOB_UPP_LT_DOKTOR "UPP Leytenant Doktor"
#define JOB_UPP_SRLT_OFFICER "UPP Senior Leytenant"
Expand Down Expand Up @@ -290,6 +295,8 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)

#define JOB_UPP_CREWMAN "UPP Tank Crewman"

#define JOB_UPP_COMMISSAR "UPP Political Commissar"

//-------- CLF --------//
#define JOB_CLF "CLF Guerilla"
#define JOB_CLF_ENGI "CLF Field Technician"
Expand Down Expand Up @@ -331,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
3 changes: 3 additions & 0 deletions code/__DEFINES/paygrade_defs/upp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
/// UO4, Mayjor
#define PAY_SHORT_UO4 "UO4"

/// UO4P, Political Commissar
#define PAY_SHORT_UO4P "UO4P"

/// UO5, Leytenant Kolonel
#define PAY_SHORT_UO5 "UO5"

Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#define RADIO_CHANNEL_MEDSCI "MedSci"
#define RADIO_CHANNEL_MP "MP"
#define RADIO_CHANNEL_NORMANDY "Normandy"
#define RADIO_CHANNEL_SAIPAN "Saipan"
#define RADIO_CHANNEL_REQ "Req"
#define RADIO_CHANNEL_SENTRY "Sentry Network"
#define RADIO_CHANNEL_SPECIAL "special"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/shuttles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@

#define DROPSHIP_ALAMO "dropship_alamo"
#define DROPSHIP_NORMANDY "dropship_normandy"
#define DROPSHIP_SAIPAN "dropship_saipan"

#define ALMAYER_DROPSHIP_LZ1 "almayer-hangar-lz1"
#define ALMAYER_DROPSHIP_LZ2 "almayer-hangar-lz2"
Expand Down
2 changes: 2 additions & 0 deletions code/_globalvars/bitfields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ DEFINE_BITFIELD(flags_item, list(
"CAN_DIG_SHRAPNEL" = CAN_DIG_SHRAPNEL,
"ANIMATED_SURGICAL_TOOL" = ANIMATED_SURGICAL_TOOL,
"IGNITING_ITEM" = IGNITING_ITEM,
"FORCEDROP_CONDITIONAL" = FORCEDROP_CONDITIONAL,
"SMARTGUNNER_BACKPACK_OVERRIDE" = SMARTGUNNER_BACKPACK_OVERRIDE,
))

DEFINE_BITFIELD(flags_inv_hide, list(
Expand Down
14 changes: 7 additions & 7 deletions code/controllers/configuration/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
var/motd
var/policy

var/static/regex/ic_filter_regex
var/static/regex/word_filter_regex

var/is_loaded = FALSE

Expand Down Expand Up @@ -315,21 +315,21 @@


/datum/controller/configuration/proc/LoadChatFilter()
var/list/in_character_filter = list()
var/list/word_filter = list()

if(!fexists("[directory]/in_character_filter.txt"))
if(!fexists("[directory]/word_filter.txt"))
return

log_config("Loading config file in_character_filter.txt...")
log_config("Loading config file word_filter.txt...")

for(var/line in file2list("[directory]/in_character_filter.txt"))
for(var/line in file2list("[directory]/word_filter.txt"))
if(!line)
continue
if(findtextEx(line,"#",1,2))
continue
in_character_filter += REGEX_QUOTE(line)
word_filter += REGEX_QUOTE(line)

ic_filter_regex = length(in_character_filter) ? regex("\\b([jointext(in_character_filter, "|")])\\b", "i") : null
word_filter_regex = length(word_filter) ? regex("\\b([jointext(word_filter, "|")])\\b", "i") : null

//Message admins when you can.
/datum/controller/configuration/proc/DelayedMessageAdmins(text)
Expand Down
3 changes: 3 additions & 0 deletions code/controllers/subsystem/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ Radiochat range: 1441 to 1489 (most devices refuse to be tune to other frequency

#define DS1_FREQ 1488
#define DS2_FREQ 1489
#define DS3_FREQ 1490

//Marine Squad channels
#define ALPHA_FREQ 1491
Expand Down Expand Up @@ -173,9 +174,11 @@ 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,
RADIO_CHANNEL_SAIPAN = DS3_FREQ,

RADIO_CHANNEL_COLONY = COLONY_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
5 changes: 5 additions & 0 deletions code/datums/ASRS.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
reference_package = /datum/supply_packs/ammo_m4a3_mag_box_ap
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs_asrs/ammo_m4a3_mag_box_hp
reference_package = /datum/supply_packs/ammo_m4a3_mag_box_hp
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs_asrs/ammo_mag_box
reference_package = /datum/supply_packs/ammo_mag_box
cost = ASRS_VERY_LOW_WEIGHT
Expand Down Expand Up @@ -123,3 +127,4 @@
/datum/supply_packs_asrs/ingredient
reference_package = /datum/supply_packs/ingredient
pool = ASRS_POOL_FOOD
cost = ASRS_VERY_LOW_WEIGHT
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]
2 changes: 1 addition & 1 deletion code/datums/emergency_calls/forecon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "FORECON (Squad)"
arrival_message = "A Force Reconnaissance squad has been dispatched to your ship. Stand by."
objectives = "Handle whatever threat is present. Further orders may be provided."
home_base = /datum/lazy_template/ert/weyland_station
home_base = /datum/lazy_template/ert/uscm_station
probability = 0
mob_min = 3
mob_max = 6
Expand Down
Loading

0 comments on commit 3441358

Please sign in to comment.