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_tm
  • Loading branch information
realforest2001 committed Sep 28, 2024
2 parents fc14a55 + 7ce846c commit 5c95f6e
Show file tree
Hide file tree
Showing 17 changed files with 100 additions and 36 deletions.
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
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
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
5 changes: 5 additions & 0 deletions code/modules/cm_preds/yaut_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,8 @@
var/datum/effects/tethering/tether_effect
var/tether_range = 5
var/mob/trapped_mob
var/duration = 30 SECONDS
var/disarm_timer
layer = LOWER_ITEM_LAYER
flags_item = ITEM_PREDATOR

Expand Down Expand Up @@ -765,6 +767,7 @@
xeno.AddComponent(/datum/component/status_effect/interference, 100) // Some base interference to give pred time to get some damage in, if it cannot land a single hit during this time pred is cheeks
RegisterSignal(xeno, COMSIG_XENO_PRE_HEAL, PROC_REF(block_heal))
message_all_yautja("A hunting trap has caught something in [get_area_name(loc)]!")
disarm_timer = addtimer(CALLBACK(src, PROC_REF(disarm)), duration, TIMER_UNIQUE|TIMER_STOPPABLE)

/obj/item/hunting_trap/proc/block_heal(mob/living/carbon/xenomorph/xeno)
SIGNAL_HANDLER
Expand Down Expand Up @@ -798,6 +801,8 @@

/obj/item/hunting_trap/proc/disarm(mob/user)
SIGNAL_HANDLER
if(disarm_timer)
deltimer(disarm_timer)
armed = FALSE
anchored = FALSE
icon_state = "yauttrap[armed]"
Expand Down
4 changes: 2 additions & 2 deletions code/modules/gear_presets/_select_equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@
return

for(var/trait in real_client.prefs.traits)
var/datum/character_trait/CT = GLOB.character_traits[trait]
CT.apply_trait(new_human, src)
var/datum/character_trait/character_trait = GLOB.character_traits[trait]
character_trait.apply_trait(new_human, src)

/datum/equipment_preset/proc/get_minimap_icon(mob/living/carbon/human/user)
var/image/background = mutable_appearance('icons/ui_icons/map_blips.dmi', "background")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
ability_name = "soak"
macro_path = /datum/action/xeno_action/verb/verb_soak
action_type = XENO_ACTION_ACTIVATE
ability_primacy = XENO_PRIMARY_ACTION_5
ability_primacy = XENO_PRIMARY_ACTION_3
plasma_cost = 20
xeno_cooldown = 17 SECONDS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
)
actions_to_add = list(
/datum/action/xeno_action/activable/headbutt/steel_crest,
/datum/action/xeno_action/activable/fortify/steel_crest,
/datum/action/xeno_action/onclick/soak,
/datum/action/xeno_action/activable/fortify/steel_crest,
)

/datum/xeno_strain/steel_crest/apply_strain(mob/living/carbon/xenomorph/defender/defender)
Expand Down
7 changes: 4 additions & 3 deletions code/modules/mob/new_player/preferences_setup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@
var/J = job_pref_to_gear_preset()
if(isnull(preview_dummy))
preview_dummy = new()

preview_dummy.blocks_emissive = FALSE
preview_dummy.update_emissive_block()

clear_equipment()
if(refresh_limb_status)
for(var/obj/limb/L in preview_dummy.limbs)
Expand All @@ -200,7 +200,8 @@
copy_appearance_to(preview_dummy)
preview_dummy.update_body()
preview_dummy.update_hair()

for (var/datum/character_trait/character_trait as anything in preview_dummy.traits)
character_trait.unapply_trait(preview_dummy)
arm_equipment(preview_dummy, J, FALSE, FALSE, owner, show_job_gear)

// If the dummy was equipped with marine armor.
Expand Down
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@
#include "code\datums\entities\player_stat.dm"
#include "code\datums\entities\player_sticky_ban.dm"
#include "code\datums\entities\player_times.dm"
#include "code\datums\entities\predround_chance.dm"
#include "code\datums\entities\ticket.dm"
#include "code\datums\entities\logs\player_times_log.dm"
#include "code\datums\factions\clf.dm"
Expand Down
4 changes: 0 additions & 4 deletions html/changelogs/AutoChangeLog-pr-7190.yml

This file was deleted.

4 changes: 0 additions & 4 deletions html/changelogs/AutoChangeLog-pr-7195.yml

This file was deleted.

18 changes: 18 additions & 0 deletions html/changelogs/archive/2024-09.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,21 @@
- rscadd: Added more fortunes for fortune cookies.
stalkerino:
- balance: ' increased recharge for pred bracer'
2024-09-25:
Git-Nivrak:
- qol: Added a preference to show your tag as Queen, turned off by default.
stalkerino:
- balance: Buffed predator armor, thrall armor, bullet resistance has been raised.
Heavy clan armor has slightly less slowdown (by 1 tier)
2024-09-27:
Git-Nivrak:
- balance: Pred round chance now increases by 20% whenever it isn't a pred round
and resets back to 20% when it is a pred round
- balance: Limits hunting traps duration to 30 seconds.
GoldenDarkness55:
- bugfix: Steelcrest soak now uses primary ability 3 hotkey instead of ability 5.
Ivniinvi:
- spellcheck: Fixed BLU-200 description
2024-09-28:
QuickLode:
- rscadd: Adds USCM & Falling Falcons patches to Commanding Officer's vendor.
1 change: 0 additions & 1 deletion maps/Nightmare/scenario.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[
{ "type": "def", "values": { "predator_round": true }, "chance": 0.2 }
]
Binary file removed sound/effects/.wav
Binary file not shown.

0 comments on commit 5c95f6e

Please sign in to comment.