Skip to content

Commit

Permalink
Merge remote-tracking branch 'cmss13-devs/master' into project/fax_re…
Browse files Browse the repository at this point in the history
…sponders
  • Loading branch information
realforest2001 committed Sep 28, 2024
2 parents bf0b1ac + 7ce846c commit f431cf4
Show file tree
Hide file tree
Showing 42 changed files with 269 additions and 77 deletions.
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/atom/signals_obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Sent after the limb has taken damage
#define COMSIG_LIMB_TAKEN_DAMAGE "limb_taken_damage"

// From /datum/effects/bleeding/internal/process_mob() and /datum/effects/bleeding/external/process_mob()
#define COMSIG_BLEEDING_PROCESS "bleeding_process"
#define COMPONENT_BLEEDING_CANCEL (1<<0)

/// From /obj/effect/alien/weeds/Initialize()
#define COMSIG_WEEDNODE_GROWTH_COMPLETE "weednode_growth_complete"
/// From /obj/effect/alien/weeds/Initialize()
Expand Down
4 changes: 4 additions & 0 deletions code/datums/effects/bleeding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
if(affected_human.chem_effect_flags & CHEM_EFFECT_NO_BLEEDING)
buffer_blood_loss = 0
return FALSE
if(SEND_SIGNAL(affected_human, COMSIG_BLEEDING_PROCESS, FALSE) & COMPONENT_BLEEDING_CANCEL)
return FALSE
affected_mob.drip(buffer_blood_loss)
buffer_blood_loss = 0

Expand Down Expand Up @@ -111,6 +113,8 @@
if(istype(affected_human))
if(affected_human.chem_effect_flags & CHEM_EFFECT_NO_BLEEDING)
return FALSE
if(SEND_SIGNAL(affected_human, COMSIG_BLEEDING_PROCESS, TRUE) & COMPONENT_BLEEDING_CANCEL)
return FALSE

blood_loss = max(blood_loss, 0) // Bleeding shouldn't give extra blood even if its only 1 tick
affected_mob.blood_volume = max(affected_mob.blood_volume - blood_loss, 0)
Expand Down
22 changes: 22 additions & 0 deletions code/datums/entities/predround_chance.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/datum/entity/predround_chance
var/chance


/datum/entity_meta/predround_chance
entity_type = /datum/entity/predround_chance
table_name = "predround_chance"
field_types = list(
"chance" = DB_FIELDTYPE_BIGINT,
)

/datum/view_record/predround_chance
var/id
var/chance

/datum/entity_view_meta/stickyban
root_record_type = /datum/entity/predround_chance
destination_entity = /datum/view_record/predround_chance
fields = list(
"id",
"chance",
)
23 changes: 21 additions & 2 deletions code/game/jobs/role_authority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -209,13 +209,27 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
if(istype(CO_surv_job))
CO_surv_job.set_spawn_positions(GLOB.players_preassigned)

if(SSnightmare.get_scenario_value("predator_round") && !Check_WO())
var/chance
var/pred_round = FALSE
var/datum/view_record/predround_chance/meta = locate() in DB_VIEW(/datum/view_record/predround_chance, DB_COMP("id", DB_EQUALS, 1))
if(!meta)
var/datum/entity/predround_chance/entity = DB_ENTITY(/datum/entity/predround_chance, 1)
entity.chance = 0 // This is 0 instead of 20 because it is going to get increased in modify_pred_round_chance
chance = 20
entity.save()
else
chance = meta.chance

if(prob(chance) && !Check_WO())
pred_round = TRUE
SSticker.mode.flags_round_type |= MODE_PREDATOR
// Set predators starting amount based on marines assigned
var/datum/job/PJ = temp_roles_for_mode[JOB_PREDATOR]
if(istype(PJ))
PJ.set_spawn_positions(GLOB.players_preassigned)
REDIS_PUBLISH("byond.round", "type" = "predator-round", "map" = SSmapping.configs[GROUND_MAP].map_name)
REDIS_PUBLISH("byond.round", "type" = "predator-round", "map" = SSmapping.configs[GROUND_MAP].map_name)

DB_FILTER(/datum/entity/predround_chance, DB_COMP("id", DB_EQUALS, 1), CALLBACK(src, PROC_REF(modify_pred_round_chance), pred_round))

// Assign the roles, this time for real, respecting limits we have established.
var/list/roles_left = assign_roles(temp_roles_for_mode, unassigned_players)
Expand Down Expand Up @@ -823,3 +837,8 @@ I hope it's easier to tell what the heck this proc is even doing, unlike previou
if(new_squad.num_tl >= new_squad.max_tl)
return TRUE
return FALSE

/datum/authority/branch/role/proc/modify_pred_round_chance(pred_round, list/datum/entity/predround_chance/entities)
var/datum/entity/predround_chance/entity = locate() in entities
entity.chance = pred_round ? 20 : entity.chance + 20
entity.save()
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ GLOBAL_LIST_INIT(cm_vending_clothing_commanding_officer, list(
list("Sidearm Pouch", 0, /obj/item/storage/pouch/pistol, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),
list("Large Shotgun Shell Pouch", 0, /obj/item/storage/pouch/shotgun/large, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),
list("Tools Pouch (Full)", 0, /obj/item/storage/pouch/tools/full, MARINE_CAN_BUY_POUCH, VENDOR_ITEM_REGULAR),

list("PATCHES (DISCRETIONARY)", 0, null, null, null),
list("Falling Falcons Shoulder Patch", 0, /obj/item/clothing/accessory/patch/falcon, null, VENDOR_ITEM_REGULAR),
list("USCM Shoulder Patch", 0, /obj/item/clothing/accessory/patch, null, VENDOR_ITEM_REGULAR),
))

/obj/structure/machinery/cm_vending/clothing/commanding_officer
Expand Down
1 change: 1 addition & 0 deletions code/game/machinery/vending/vendor_types/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@
)

/obj/structure/machinery/cm_vending/sorted/medical/Destroy()
STOP_PROCESSING(SSslowobj, src)
QDEL_NULL(last_health_display)
. = ..()

Expand Down
12 changes: 12 additions & 0 deletions code/game/objects/effects/landmarks/landmarks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,18 @@
name = "Intelligence Officer late join"
job = JOB_INTEL

/obj/effect/landmark/late_join/police
name = "Military Police late join"
job = JOB_POLICE

/obj/effect/landmark/late_join/warden
name = "Military Warden late join"
job = JOB_WARDEN

/obj/effect/landmark/late_join/chief_police
name = "Chief Military Police late join"
job = JOB_CHIEF_POLICE

/obj/effect/landmark/late_join/Initialize(mapload, ...)
. = ..()
if(squad)
Expand Down
34 changes: 18 additions & 16 deletions code/modules/character_traits/character_trait.dm
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/// The list of traits a client will gives its human mob upon spawn
/// Store as typepaths
/datum/preferences/var/list/traits
/// State var for preferences to track trait points
/// Change this value to set the amount of trait points you start with
/// The list of traits a client will gives its human mob upon spawn.
/// Store as typepaths.
/datum/preferences/var/list/datum/character_trait/traits
/// State var for preferences to track trait points.
/// Change this value to set the amount of trait points you start with.
/datum/preferences/var/trait_points = 2
/// State var to check if traits have been read in to modify
/// trait points
/// State var to check if traits have been read in to modify.
/// trait points.
/datum/preferences/var/read_traits = FALSE
/// The list of traits a human has
/// Store as typepaths
/mob/living/carbon/human/var/list/traits
/// The list of traits a human has.
/// Store as typepaths.
/mob/living/carbon/human/var/list/datum/character_trait/traits

/** Global lists
* character_trait_groups should be defined BEFORE character_traits because of dependencies
* character_trait_groups should be defined BEFORE character_traits because of dependencies.
* When trying to reference specific traits or trait groups, reference these lists, which
* store character traits and character trait groups by their type paths
*
Expand All @@ -23,8 +23,8 @@
GLOBAL_REFERENCE_LIST_INDEXED(character_trait_groups, /datum/character_trait_group, type)
GLOBAL_REFERENCE_LIST_INDEXED(character_traits, /datum/character_trait, type)

/// Character traits
/// Similar to the traits from Project Zomboid
/// Character traits.
/// Similar to the traits from Project Zomboid.
/datum/character_trait
var/trait_name = "Character Trait"
var/trait_desc = "A character trait"
Expand Down Expand Up @@ -52,7 +52,7 @@ GLOBAL_REFERENCE_LIST_INDEXED(character_traits, /datum/character_trait, type)
CRASH("Invalid trait_group set for character trait [type]")
trait_group.traits += src

/// A wrapper to check if the trait can be applied first
/// A function to check if the trait can be applied (prior to getting it)
/datum/character_trait/proc/can_give_trait(datum/preferences/target)
if(type in target.traits)
return FALSE
Expand Down Expand Up @@ -105,9 +105,11 @@ GLOBAL_REFERENCE_LIST_INDEXED(character_traits, /datum/character_trait, type)

/// Character trait groups for constraints (if any)
/datum/character_trait_group
/// For player prefs menu
// For player prefs menu
/// Group name as shown in the preferences menu
var/trait_group_name = "Trait Group"
var/group_visible = TRUE //Set this to false so the group doesn't show up in preferences
/// Whether the group will show up in the preferences menu
var/group_visible = TRUE

// CONSTRAINTS
// MODIFY THESE VARS FOR SETTING CONSTRAINTS FOR TRAIT GROUPS
Expand Down
5 changes: 5 additions & 0 deletions code/modules/client/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ GLOBAL_LIST_INIT(bgstate_options, list(
var/xeno_name_ban = FALSE
var/xeno_vision_level_pref = XENO_VISION_LEVEL_MID_NVG
var/playtime_perks = TRUE
var/show_queen_name = FALSE

var/stylesheet = "Modern"

Expand Down Expand Up @@ -448,6 +449,7 @@ GLOBAL_LIST_INIT(bgstate_options, list(
dat += "<b>Xeno postfix:</b> <a href='?_src_=prefs;preference=xeno_postfix;task=input'><b>[display_postfix]</b></a><br>"

dat += "<b>Enable Playtime Perks:</b> <a href='?_src_=prefs;preference=playtime_perks'><b>[playtime_perks? "Yes" : "No"]</b></a><br>"
dat += "<b>Show Queen Name:</b> <a href='?_src_=prefs;preference=show_queen_name'><b>[show_queen_name? "Yes" : "No"]</b></a><br>"
dat += "<b>Default Xeno Night Vision Level:</b> <a href='?_src_=prefs;preference=xeno_vision_level_pref;task=input'><b>[xeno_vision_level_pref]</b></a><br>"

var/tempnumber = rand(1, 999)
Expand Down Expand Up @@ -1859,6 +1861,9 @@ GLOBAL_LIST_INIT(bgstate_options, list(
if("playtime_perks")
playtime_perks = !playtime_perks

if("show_queen_name")
show_queen_name = !show_queen_name

if("be_special")
var/num = text2num(href_list["num"])
be_special ^= (1<<num)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/client/preferences_savefile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
S["xeno_postfix"] >> xeno_postfix
S["xeno_name_ban"] >> xeno_name_ban
S["playtime_perks"] >> playtime_perks
S["show_queen_name"] >> show_queen_name
S["xeno_vision_level_pref"] >> xeno_vision_level_pref
S["view_controller"] >> View_MC
S["observer_huds"] >> observer_huds
Expand Down Expand Up @@ -310,6 +311,7 @@
ghost_orbit = sanitize_inlist(ghost_orbit, GLOB.ghost_orbits, initial(ghost_orbit))
auto_observe = sanitize_integer(auto_observe, 0, 1, 1)
playtime_perks = sanitize_integer(playtime_perks, 0, 1, 1)
show_queen_name = sanitize_integer(show_queen_name, FALSE, TRUE, FALSE)
xeno_vision_level_pref = sanitize_inlist(xeno_vision_level_pref, list(XENO_VISION_LEVEL_NO_NVG, XENO_VISION_LEVEL_MID_NVG, XENO_VISION_LEVEL_FULL_NVG), XENO_VISION_LEVEL_MID_NVG)
hear_vox = sanitize_integer(hear_vox, FALSE, TRUE, TRUE)
hide_statusbar = sanitize_integer(hide_statusbar, FALSE, TRUE, FALSE)
Expand Down Expand Up @@ -428,6 +430,7 @@
S["xeno_name_ban"] << xeno_name_ban
S["xeno_vision_level_pref"] << xeno_vision_level_pref
S["playtime_perks"] << playtime_perks
S["show_queen_name"] << show_queen_name

S["view_controller"] << View_MC
S["observer_huds"] << observer_huds
Expand Down
1 change: 1 addition & 0 deletions code/modules/clothing/suits/marine_armor/_marine_armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@

/obj/item/clothing/suit/storage/marine/update_icon(mob/user)
var/image/I
overlays -= armor_overlays["lamp"]
armor_overlays["lamp"] = null
if(flags_marine_armor & ARMOR_LAMP_OVERLAY)
if(flags_marine_armor & ARMOR_LAMP_ON)
Expand Down
10 changes: 0 additions & 10 deletions code/modules/clothing/under/marine_uniform.dm
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@
worn_state = "upp_uniform"
min_cold_protection_temperature = ICE_PLANET_MIN_COLD_PROT
has_sensor = UNIFORM_HAS_SENSORS
sensor_faction = FACTION_UPP
suit_restricted = list(/obj/item/clothing/suit/storage/marine/faction/UPP, /obj/item/clothing/suit/gimmick/jason, /obj/item/clothing/suit/storage/snow_suit/soviet, /obj/item/clothing/suit/storage/snow_suit/survivor, /obj/item/clothing/suit/storage/webbing)
flags_jumpsuit = UNIFORM_SLEEVE_ROLLABLE

Expand Down Expand Up @@ -696,7 +695,6 @@
icon_state = "colonist"
worn_state = "colonist"
has_sensor = UNIFORM_HAS_SENSORS
sensor_faction = FACTION_COLONIST

/obj/item/clothing/under/colonist/workwear
name = "grey workwear"
Expand Down Expand Up @@ -737,39 +735,34 @@
desc = "A stylish grey-green jumpsuit - standard issue for colonists. This version appears to have the symbol of the Colonial Liberation Front emblazoned in select areas."
icon_state = "clf_uniform"
worn_state = "clf_uniform"
sensor_faction = FACTION_CLF

/obj/item/clothing/under/colonist/ua_civvies
name = "\improper UA gray utility uniform"
desc = "A stylish gray jumpsuit - standard issue for UA civilian support personnel."
icon_state = "ua_civvies"
worn_state = "ua_civvies"
has_sensor = UNIFORM_HAS_SENSORS
sensor_faction = FACTION_MARINE

/obj/item/clothing/under/colonist/wy_davisone
name = "\improper UA brown utility uniform"
desc = "A stylish brown jumpsuit - standard issue for UA civilian support personnel."
icon_state = "wy_davisone"
worn_state = "wy_davisone"
has_sensor = UNIFORM_HAS_SENSORS
sensor_faction = FACTION_MARINE

/obj/item/clothing/under/colonist/white_service
name = "white service uniform"
desc = "A white dress shirt and tie with sleek pants. Standard clothing for anyone on professional business."
icon_state = "CO_service"
worn_state = "CO_service"
has_sensor = UNIFORM_HAS_SENSORS
sensor_faction = FACTION_MARINE

/obj/item/clothing/under/colonist/wy_joliet_shopsteward
name = "steward utilities"
desc = "A stylish brown vest and shorts - uniforms like this are often worn by clerks and shop stewards."
icon_state = "wy_joliet_shopsteward"
worn_state = "wy_joliet_shopsteward"
has_sensor = UNIFORM_HAS_SENSORS
sensor_faction = FACTION_MARINE

/obj/item/clothing/under/tshirt
name = "T-shirt parent object"
Expand All @@ -782,7 +775,6 @@
worn_state = "tshirt_w_br"
displays_id = FALSE
has_sensor = UNIFORM_HAS_SENSORS
sensor_faction = FACTION_MARINE

/obj/item/clothing/under/tshirt/gray_blu
name = "gray T-shirt and jeans"
Expand All @@ -791,7 +783,6 @@
worn_state = "tshirt_gray_blu"
displays_id = FALSE
has_sensor = UNIFORM_HAS_SENSORS
sensor_faction = FACTION_MARINE

/obj/item/clothing/under/tshirt/r_bla
name = "red T-shirt and black pants"
Expand All @@ -800,7 +791,6 @@
worn_state = "tshirt_r_bla"
displays_id = FALSE
has_sensor = UNIFORM_HAS_SENSORS
sensor_faction = FACTION_MARINE

/obj/item/clothing/under/CM_uniform
name = "\improper Colonial Marshal uniform"
Expand Down
1 change: 0 additions & 1 deletion code/modules/clothing/under/under.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
armor_internaldamage = CLOTHING_ARMOR_NONE
w_class = SIZE_MEDIUM
blood_overlay_type = "uniform"
var/sensor_faction = FACTION_MARINE
var/has_sensor = UNIFORM_HAS_SENSORS // For the crew computer
var/sensor_mode = SENSOR_MODE_LOCATION
/*
Expand Down
4 changes: 2 additions & 2 deletions code/modules/cm_marines/dropship_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@
QDEL_IN(src, 0.5 SECONDS)

/obj/structure/ship_ammo/rocket/thermobaric
name = "\improper BLU-200 'Dragons Breath'"
desc = "The BLU-200 Dragons Breath a thermobaric fuel-air bomb. The aerosolized fuel mixture creates a vacuum when ignited causing serious damage to those in its way. Can be loaded into the LAU-444 Guided Missile Launcher."
name = "\improper BLU-200 'Dragon's Breath'"
desc = "The BLU-200 'Dragon's Breath' is a thermobaric fuel-air bomb. The aerosolized fuel mixture creates a vacuum when ignited causing serious damage to those in its way. Can be loaded into the LAU-444 Guided Missile Launcher."
icon_state = "fatty"
ammo_id = "f"
travelling_time = 50
Expand Down
2 changes: 1 addition & 1 deletion code/modules/cm_marines/vehicle_part_fabricator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
omnisentry_price += omnisentry_price_scale
icon_state = "drone_fab_active"
busy = TRUE
addtimer(CALLBACK(src, PROC_REF(do_build_part), part_type), 10 SECONDS)
addtimer(CALLBACK(src, PROC_REF(do_build_part), part_type), 3 SECONDS)

/obj/structure/machinery/part_fabricator/proc/do_build_part(part_type)
busy = FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/cm_preds/yaut_bracers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
var/charge = 1500
var/charge_max = 1500
/// The amount charged per process
var/charge_rate = 30
var/charge_rate = 60
/// Cooldown on draining power from APC
var/charge_cooldown = COOLDOWN_BRACER_CHARGE
var/cloak_timer = 0
Expand Down
Loading

0 comments on commit f431cf4

Please sign in to comment.