Skip to content

Commit

Permalink
Merge branch 'cmss13-devs:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantornRU authored Jan 24, 2025
2 parents c8b9f30 + 842be9d commit 25986ea
Show file tree
Hide file tree
Showing 337 changed files with 14,700 additions and 12,988 deletions.
1 change: 1 addition & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Mark stale issues and pull requests
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
stale:
Expand Down
9 changes: 8 additions & 1 deletion code/__DEFINES/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@
#define ALCOHOL_METABOLISM AMOUNT_PER_TIME(1, 5 SECONDS)
#define RAPID_METABOLISM AMOUNT_PER_TIME(1, 2 SECONDS)

// Factor of how fast mob nutrition decreases
/// How fast mob nutrition normally decreases
#define HUNGER_FACTOR 0.05
/// Additional mob nutrition cost when regenerating blood
#define BLOOD_NUTRITION_COST 0.25
/// Additional mob nutrition cost when cold
#define COLD_NUTRITION_COST 1

// Nutrition levels
#define NUTRITION_MAX 550
Expand Down Expand Up @@ -132,6 +136,7 @@
#define PROPERTY_CARDIOTOXIC "cardiotoxic"
#define PROPERTY_NEUROTOXIC "neurotoxic"
#define PROPERTY_HYPERMETABOLIC "hypermetabolic"
#define PROPERTY_IGNITING "igniting"
//Neutral
#define PROPERTY_NUTRITIOUS "nutritious"
#define PROPERTY_KETOGENIC "ketogenic"
Expand Down Expand Up @@ -325,3 +330,5 @@
#define INCENDIARY_SHARDS_MAX_REDUCTION 2
#define HORNET_SHARDS_MAX_REDUCTION 2
#define NEURO_SHARDS_MAX_REDUCTION 2

#define LEVEL_TO_POTENCY_MULTIPLIER 0.5
2 changes: 2 additions & 0 deletions code/__DEFINES/equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ GLOBAL_LIST_INIT(slot_to_contained_sprite_shorthand, list(
#define ACCESSORY_SLOT_PONCHO "Ponchos"
#define ACCESSORY_SLOT_TROPHY "Trophy"
#define ACCESSORY_SLOT_MASK "Mask"
#define ACCESSORY_SLOT_WRIST_L "Left wrist"
#define ACCESSORY_SLOT_WRIST_R "Right wrist"

/// Used for uniform armor inserts.
#define ACCESSORY_SLOT_ARMOR_C "Chest armor"
Expand Down
3 changes: 1 addition & 2 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ GLOBAL_LIST_INIT(job_squad_roles, JOB_SQUAD_ROLES_LIST)

#define JOB_MESS_SERGEANT "Mess Technician"
#define JOB_SYNTH "Synthetic"
#define JOB_SHIP_SYNTH "Ship Operations Synthetic"
#define JOB_SYNTH_K9 "Synthetic K9"
#define JOB_WORKING_JOE "Working Joe"

Expand Down Expand Up @@ -228,7 +227,7 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)
#define JOB_WY_GOON_LEAD "WY Corporate Security Lead"
#define JOB_WY_GOON_RESEARCHER "WY Research Consultant"

#define ROLES_WY_GOONS list(JOB_WY_GOON_LEAD, JOB_WY_GOON_TECH, JOB_WY_GOON)
#define ROLES_WY_GOONS list(JOB_WY_GOON_LEAD, JOB_WY_GOON_TECH, JOB_WY_GOON, JOB_WY_GOON_RESEARCHER)

//---- Contractors ----//
#define JOB_CONTRACTOR "VAIPO Mercenary"
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/minimap.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define MINIMAP_FLAG_XENO (1<<0)
#define MINIMAP_FLAG_USCM (1<<1)
#define MINIMAP_FLAG_PMC (1<<2)
#define MINIMAP_FLAG_WY (1<<2)
#define MINIMAP_FLAG_UPP (1<<3)
#define MINIMAP_FLAG_CLF (1<<4)
#define MINIMAP_FLAG_YAUTJA (1<<5)
Expand Down
4 changes: 2 additions & 2 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@
GLOBAL_LIST_INIT(ROLES_COMMAND, list(JOB_CO, JOB_XO, JOB_SO, JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_CAS_PILOT, JOB_DROPSHIP_PILOT, JOB_TANK_CREW, JOB_DROPSHIP_CREW_CHIEF, JOB_POLICE, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_CHIEF_REQUISITION, JOB_CHIEF_ENGINEER, JOB_CMO, JOB_CHIEF_POLICE, JOB_SEA, JOB_SYNTH, JOB_WARDEN))

//Marine roles
#define ROLES_OFFICERS list(JOB_CO, JOB_XO, JOB_SO, JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_CAS_PILOT, JOB_DROPSHIP_PILOT, JOB_TANK_CREW, JOB_DROPSHIP_CREW_CHIEF, JOB_SEA, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_SYNTH, JOB_SHIP_SYNTH, JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE)
#define ROLES_OFFICERS list(JOB_CO, JOB_XO, JOB_SO, JOB_AUXILIARY_OFFICER, JOB_INTEL, JOB_CAS_PILOT, JOB_DROPSHIP_PILOT, JOB_TANK_CREW, JOB_DROPSHIP_CREW_CHIEF, JOB_SEA, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_SYNTH, JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE)
GLOBAL_LIST_INIT(ROLES_CIC, list(JOB_CO, JOB_XO, JOB_SO, JOB_WO_CO, JOB_WO_XO))
GLOBAL_LIST_INIT(ROLES_CIC_ANTAG, list(JOB_UPP_SRLT_OFFICER, JOB_UPP_KPT_OFFICER, JOB_UPP_CO_OFFICER, JOB_UPP_COMMISSAR))
GLOBAL_LIST_INIT(ROLES_AUXIL_SUPPORT, list(JOB_AUXILIARY_OFFICER, JOB_SEA, JOB_INTEL, JOB_CAS_PILOT, JOB_DROPSHIP_PILOT, JOB_DROPSHIP_CREW_CHIEF, JOB_TANK_CREW, JOB_WO_CHIEF_POLICE, JOB_WO_SO, JOB_WO_CREWMAN, JOB_WO_POLICE, JOB_WO_PILOT))
GLOBAL_LIST_INIT(ROLES_AUXIL_SUPPORT_ANTAG, list(JOB_UPP_CREWMAN, JOB_UPP_PILOT))
GLOBAL_LIST_INIT(ROLES_MISC, list(JOB_SYNTH, JOB_SHIP_SYNTH, JOB_WORKING_JOE, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_MESS_SERGEANT, JOB_WO_CORPORATE_LIAISON, JOB_WO_SYNTH))
GLOBAL_LIST_INIT(ROLES_MISC, list(JOB_SYNTH, JOB_WORKING_JOE, JOB_CORPORATE_LIAISON, JOB_COMBAT_REPORTER, JOB_MESS_SERGEANT, JOB_WO_CORPORATE_LIAISON, JOB_WO_SYNTH))
GLOBAL_LIST_INIT(ROLES_MISC_ANTAG, list(JOB_UPP_COMBAT_SYNTH, JOB_UPP_SUPPORT_SYNTH, JOB_UPP_JOE))
GLOBAL_LIST_INIT(ROLES_POLICE, list(JOB_CHIEF_POLICE, JOB_WARDEN, JOB_POLICE))
GLOBAL_LIST_INIT(ROLES_POLICE_ANTAG, list(JOB_UPP_POLICE))
Expand Down
4 changes: 2 additions & 2 deletions code/__DEFINES/pred.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#define SD_TYPE_BIG 0
#define SD_TYPE_SMALL 1

#define PRED_MASK_TYPE_MAX 19
#define PRED_MASK_ACCESSORY_TYPE_MAX 1
#define PRED_MASK_TYPE_MAX 20
#define PRED_MASK_ACCESSORY_TYPE_MAX 3
#define PRED_ARMOR_TYPE_MAX 8
#define PRED_GREAVE_TYPE_MAX 4
3 changes: 3 additions & 0 deletions code/__DEFINES/tgui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,6 @@
#define DETAIL_LEVEL_HEALTHANALYSER 0
#define DETAIL_LEVEL_BODYSCAN 1
#define DETAIL_LEVEL_FULL 2

#define UI_MODE_MINIMAL 1
#define UI_MODE_CLASSIC 0
9 changes: 8 additions & 1 deletion code/__DEFINES/vendors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,15 @@
#define MARINE_CAN_BUY_DRESS "dress"
#define CIVILIAN_CAN_BUY_BACKPACK "civilian_backpack"
#define CIVILIAN_CAN_BUY_UTILITY "civilian_utility"
#define CIVILIAN_CAN_BUY_UNIFORM "civilian_uniform"
#define CIVILIAN_CAN_BUY_SUIT "civilian_suit"
#define CIVILIAN_CAN_BUY_HAT "civilian_hat"
#define CIVILIAN_CAN_BUY_GLASSES "civilian_glasses"
#define CIVILIAN_CAN_BUY_SHOES "civilian_shoes"
#define CIVILIAN_CAN_BUY_GLOVES "civilian_gloves"
#define CIVILIAN_CAN_BUY_ACCESSORY "civilian_accessory"

#define MARINE_CAN_BUY_ALL list(MARINE_CAN_BUY_UNIFORM = 1, MARINE_CAN_BUY_SHOES = 1, MARINE_CAN_BUY_HELMET = 1, MARINE_CAN_BUY_ARMOR = 1, MARINE_CAN_BUY_GLOVES = 1, MARINE_CAN_BUY_EAR = 1, MARINE_CAN_BUY_BACKPACK = 1, MARINE_CAN_BUY_POUCH = 2, MARINE_CAN_BUY_BELT = 1, MARINE_CAN_BUY_GLASSES = 1, MARINE_CAN_BUY_MASK = 1, MARINE_CAN_BUY_ESSENTIALS = 1, MARINE_CAN_BUY_SECONDARY = 1, MARINE_CAN_BUY_ATTACHMENT = 1, MARINE_CAN_BUY_MRE = 1, MARINE_CAN_BUY_ACCESSORY = 1, MARINE_CAN_BUY_COMBAT_SHOES = 1, MARINE_CAN_BUY_COMBAT_HELMET = 1, MARINE_CAN_BUY_COMBAT_ARMOR = 1, MARINE_CAN_BUY_KIT = 1, MARINE_CAN_BUY_DRESS = 99)
#define MARINE_CAN_BUY_ALL list(MARINE_CAN_BUY_UNIFORM = 1, MARINE_CAN_BUY_SHOES = 1, MARINE_CAN_BUY_HELMET = 1, MARINE_CAN_BUY_ARMOR = 1, MARINE_CAN_BUY_GLOVES = 1, MARINE_CAN_BUY_EAR = 1, MARINE_CAN_BUY_BACKPACK = 1, MARINE_CAN_BUY_POUCH = 2, MARINE_CAN_BUY_BELT = 1, MARINE_CAN_BUY_GLASSES = 1, MARINE_CAN_BUY_MASK = 1, MARINE_CAN_BUY_ESSENTIALS = 1, MARINE_CAN_BUY_SECONDARY = 1, MARINE_CAN_BUY_ATTACHMENT = 1, MARINE_CAN_BUY_MRE = 1, MARINE_CAN_BUY_ACCESSORY = 1, MARINE_CAN_BUY_COMBAT_SHOES = 1, MARINE_CAN_BUY_COMBAT_HELMET = 1, MARINE_CAN_BUY_COMBAT_ARMOR = 1, MARINE_CAN_BUY_KIT = 1, MARINE_CAN_BUY_DRESS = 99, CIVILIAN_CAN_BUY_UNIFORM = 5, CIVILIAN_CAN_BUY_SUIT = 5, CIVILIAN_CAN_BUY_HAT = 5, CIVILIAN_CAN_BUY_GLASSES = 2, CIVILIAN_CAN_BUY_SHOES = 2, CIVILIAN_CAN_BUY_GLOVES = 2, CIVILIAN_CAN_BUY_ACCESSORY = 5)

#define MARINE_TOTAL_BUY_POINTS 45
#define MARINE_TOTAL_SNOWFLAKE_POINTS 120
Expand Down
4 changes: 2 additions & 2 deletions code/controllers/subsystem/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ SUBSYSTEM_DEF(minimaps)
faction = allowed_flags == MINIMAP_FLAG_XENO ? XENO_HIVE_NORMAL : FACTION_MARINE

if(is_xeno && xeno.hive.see_humans_on_tacmap && targeted_ztrait != ZTRAIT_MARINE_MAIN_SHIP)
allowed_flags |= MINIMAP_FLAG_USCM|MINIMAP_FLAG_PMC|MINIMAP_FLAG_UPP|MINIMAP_FLAG_CLF
allowed_flags |= MINIMAP_FLAG_USCM|MINIMAP_FLAG_WY|MINIMAP_FLAG_UPP|MINIMAP_FLAG_CLF
targeted_ztrait = ZTRAIT_MARINE_MAIN_SHIP
map_holder = null

Expand Down Expand Up @@ -1080,7 +1080,7 @@ SUBSYSTEM_DEF(minimaps)
if(FACTION_CLF)
return MINIMAP_FLAG_CLF
if(FACTION_PMC)
return MINIMAP_FLAG_PMC
return MINIMAP_FLAG_WY
if(FACTION_YAUTJA)
return MINIMAP_FLAG_YAUTJA
if(XENO_HIVE_CORRUPTED)
Expand Down
1 change: 1 addition & 0 deletions code/datums/agents/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@

list("AMMUNITION", 0, null, null, null),
list("M1911 Magazine", 5, /obj/item/ammo_magazine/pistol/m1911, "white", "A magazine for an M1911 pistol."),
list("Tranquilizer Magazine", 5, /obj/item/ammo_magazine/pistol/tranq, "white", "A magazine for an tranquilizer pistol."),

list("UTILITY", 0, null, null, null),
list("Security Access Tuner v2", 25, /obj/item/device/multitool/antag, "white", "An upgraded access tuner, able to rapidly hack various machinery. Disguised as a regular multitool."),
Expand Down
5 changes: 5 additions & 0 deletions code/datums/ammo/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@
/datum/ammo/New()
set_bullet_traits()

/datum/ammo/proc/setup_faction_clash_values()
accuracy = (accuracy - 85)/2
penetration = min(penetration, 30) //more ap overpenatrates anyway but makes next calculation cleaner
accurate_range = min(accurate_range, 10 - penetration/5) //this makes AP ammo better at clsoe range (and techinicly super far range when the hitchance gets bottom caped at 5% hitchance)

/datum/ammo/proc/on_bullet_generation(obj/projectile/generated_projectile, mob/bullet_generator) //NOT used on New(), applied to the projectiles.
return

Expand Down
2 changes: 1 addition & 1 deletion code/datums/ammo/bullet/lever_action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
/datum/ammo/bullet/lever_action/xm88
name = ".458 SOCOM round"

damage = 104
damage = 80
penetration = ARMOR_PENETRATION_TIER_2
accuracy = HIT_ACCURACY_TIER_1
shell_speed = AMMO_SPEED_TIER_6
Expand Down
8 changes: 7 additions & 1 deletion code/datums/ammo/bullet/pistol.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@
penetration= ARMOR_PENETRATION_TIER_2
shrapnel_chance = SHRAPNEL_CHANCE_TIER_2

/datum/ammo/bullet/pistol/setup_faction_clash_values()
. = ..()
accuracy += 20
accurate_range -= 2 //we want pistols to be more accurate but only at short range


/datum/ammo/bullet/pistol/tiny
name = "light pistol bullet"

/datum/ammo/bullet/pistol/tranq
name = "tranquilizer bullet"
flags_ammo_behavior = AMMO_BALLISTIC|AMMO_IGNORE_RESIST
stamina_damage = 30
stamina_damage = 60
damage = 15

//2020 rebalance: is supposed to counter runners and lurkers, dealing high damage to the only castes with no armor.
Expand Down
6 changes: 6 additions & 0 deletions code/datums/ammo/bullet/rifle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,18 @@
damage = 55
penetration = ARMOR_PENETRATION_TIER_3

/datum/ammo/bullet/rifle/type71/setup_faction_clash_values()
if(penetration <= ARMOR_PENETRATION_TIER_3) //so we only reduce AP of normal ammo here
penetration = ARMOR_PENETRATION_TIER_1
. = ..()

/datum/ammo/bullet/rifle/type71/ap
name = "heavy armor-piercing rifle bullet"

damage = 40
penetration = ARMOR_PENETRATION_TIER_10


/datum/ammo/bullet/rifle/type71/heap
name = "heavy high-explosive armor-piercing rifle bullet"

Expand Down
21 changes: 21 additions & 0 deletions code/datums/ammo/bullet/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
/datum/ammo/bullet/shotgun
headshot_state = HEADSHOT_OVERLAY_HEAVY

/datum/ammo/bullet/shotgun/setup_faction_clash_values()
. = ..()
accuracy = accuracy * 2 + 85 //we revert accuracy reduction that is applied on other bullets shotguns are accurate but already have short range only


/datum/ammo/bullet/shotgun/slug
name = "shotgun slug"
handful_state = "slug_shell"
Expand Down Expand Up @@ -106,6 +111,10 @@
handful_state = "flechette_shell"
multiple_handful_name = TRUE

/datum/ammo/bullet/shotgun/flechette/setup_faction_clash_values()
. = ..()
damage *= 0.7

/datum/ammo/bullet/shotgun/flechette_spread
name = "additional flechette"
icon_state = "flechette"
Expand All @@ -119,6 +128,10 @@
penetration = ARMOR_PENETRATION_TIER_7
scatter = SCATTER_AMOUNT_TIER_5

/datum/ammo/bullet/shotgun/flechette_spread/setup_faction_clash_values()
. = ..()
damage *= 0.7

/datum/ammo/bullet/shotgun/buckshot
name = "buckshot shell"
icon_state = "buckshot"
Expand Down Expand Up @@ -300,6 +313,10 @@
penetration = ARMOR_PENETRATION_TIER_10
bonus_projectiles_amount = EXTRA_PROJECTILES_TIER_2

/datum/ammo/bullet/shotgun/heavy/flechette/setup_faction_clash_values()
. = ..()
damage *= 0.7

/datum/ammo/bullet/shotgun/heavy/flechette_spread
name = "additional heavy flechette"
icon_state = "flechette"
Expand All @@ -312,6 +329,10 @@
penetration = ARMOR_PENETRATION_TIER_10
scatter = SCATTER_AMOUNT_TIER_4

/datum/ammo/bullet/shotgun/heavy/flechette_spread/setup_faction_clash_values()
. = ..()
damage *= 0.7

/*
16 GAUGE SHOTGUN AMMO
*/
Expand Down
21 changes: 21 additions & 0 deletions code/datums/ammo/bullet/special_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
damage_falloff = DAMAGE_FALLOFF_TIER_6
effective_range_max = 7

/datum/ammo/bullet/smartgun/setup_faction_clash_values()
. = ..()
max_range = 17
accurate_range = 12
effective_range_max = 12

/datum/ammo/bullet/smartgun/armor_piercing
name = "\improper AP smartgun tracer bullet"
icon_state = "bullet_ap_iff"
Expand Down Expand Up @@ -161,6 +167,10 @@
penetration= ARMOR_PENETRATION_TIER_10 //Bumped the penetration to serve a different role from sentries, MGs are a bit more offensive
accuracy = HIT_ACCURACY_TIER_3

/datum/ammo/bullet/machinegun/setup_faction_clash_values()
. = ..()
accurate_range = 12 //we revert the reduction

/datum/ammo/bullet/machinegun/set_bullet_traits()
. = ..()
LAZYADD(traits_to_give, list(
Expand All @@ -181,6 +191,13 @@
max_range = 15
effective_range_max = 7
damage_falloff = DAMAGE_FALLOFF_TIER_8
scatter = 0

/datum/ammo/bullet/machinegun/auto/setup_faction_clash_values()
accuracy = HIT_ACCURACY_TIER_4
scatter = SCATTER_AMOUNT_TIER_5
penetration = ARMOR_PENETRATION_TIER_2
. = ..()

/datum/ammo/bullet/machinegun/auto/set_bullet_traits()
return
Expand Down Expand Up @@ -246,3 +263,7 @@
damage = 35
penetration= ARMOR_PENETRATION_TIER_6
shrapnel_chance = SHRAPNEL_CHANCE_TIER_2

/datum/ammo/bullet/pkp/setup_faction_clash_values()
. = ..()
accurate_range = 14
14 changes: 3 additions & 11 deletions code/datums/ammo/bullet/tank.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,6 @@
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
/datum/ammo/bullet/tank/setup_faction_clash_values()
. = ..()
damage = 15
2 changes: 1 addition & 1 deletion code/datums/ammo/shrapnel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
flags_ammo_behavior = AMMO_STOPPED_BY_COVER
shell_speed = AMMO_SPEED_TIER_1
damage = 30
penetration = ARMOR_PENETRATION_TIER_10 //molten metal pierces your armor
penetration = ARMOR_PENETRATION_TIER_4

/datum/ammo/bullet/shrapnel/incendiary/set_bullet_traits()
. = ..()
Expand Down
Loading

0 comments on commit 25986ea

Please sign in to comment.