Skip to content

Commit

Permalink
Merge branch 'master' into f-smooth-vendors-scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Dec 3, 2023
2 parents 98a822d + c46d754 commit 23c24bc
Show file tree
Hide file tree
Showing 80 changed files with 7,246 additions and 4,899 deletions.
4 changes: 4 additions & 0 deletions code/__DEFINES/radio.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@
#define RADIO_CHANNEL_PMC_CCT "PMC CCT"
#define RADIO_CHANNEL_WY_WO "SpecOps"

//Listening Devices
#define RADIO_CHANNEL_BUG_A "Listening Device A"
#define RADIO_CHANNEL_BUG_B "Listening Device B"

//1-Channel ERTs
#define RADIO_CHANNEL_DUTCH_DOZEN "DD"
#define RADIO_CHANNEL_VAI "VAI"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#define SKILL_SPEC_DEFAULT 0
/// Is trained to use specialist gear, but hasn't picked a kit.
#define SKILL_SPEC_TRAINED 1
/// Is trained to use specialist gear & HAS picked a kit. (Functionally same as SPEC_ROCKET)
#define SKILL_SPEC_KITTED 2
/// Can use RPG
#define SKILL_SPEC_ROCKET 2
/// Can use thermal cloaks and custom M4RA rifle
Expand Down
7 changes: 7 additions & 0 deletions code/__DEFINES/vendors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,10 @@
/// Vendors with this flag will fill retroactively based on latejoining players,
/// and expect a scale multiplier instead of amount of items
#define VEND_STOCK_DYNAMIC (1<<10)

// Redemption Tokens
#define VEND_TOKEN_ENGINEER "Engineer"
#define VEND_TOKEN_SPEC "Specialist"
#define VEND_TOKEN_SYNTH "Synthetic"
/// Token invalid/unrecognised.
#define VEND_TOKEN_VOID "Void"
5 changes: 5 additions & 0 deletions code/__HELPERS/text.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
text = replacetext(text, char, repl_chars[char])
return text

///Helper for only alphanumeric characters plus common punctuation, spaces, underscore and hyphen _ -.
/proc/replace_non_alphanumeric_plus(text)
var/regex/alphanumeric = regex(@{"[^a-z0-9 ,.?!\-_&]"}, "gi")
return alphanumeric.Replace(text, "")

/proc/readd_quotes(text)
var/list/repl_chars = list("&#34;" = "\"", "&#39;" = "'")
for(var/char in repl_chars)
Expand Down
5 changes: 5 additions & 0 deletions code/controllers/configuration/entries/game_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,8 @@
min_val = 1
config_entry_value = 450
integer = TRUE

/datum/config_entry/number/whiskey_required_players
min_val = 0
config_entry_value = 140
integer = TRUE
15 changes: 14 additions & 1 deletion code/controllers/subsystem/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ Radiochat range: 1441 to 1489 (most devices refuse to be tune to other frequency
//Misc channels
#define YAUT_FREQ 1205
#define DUT_FREQ 1210
#define CMB_FREQ 1220
#define VAI_FREQ 1215
#define RMC_FREQ 1216
#define CMB_FREQ 1220

//WY Channels (1230-1249)
#define WY_FREQ 1231
Expand All @@ -99,6 +99,11 @@ Radiochat range: 1441 to 1489 (most devices refuse to be tune to other frequency
#define CLF_MED_FREQ 1274
#define CLF_CCT_FREQ 1275

//Listening Bugs (1290-1291)
#define BUG_A_FREQ 1290
#define BUG_B_FREQ 1291

//General Radio
#define MIN_FREQ 1460 // ------------------------------------------------------
#define PUB_FREQ 1461
#define MAX_FREQ 1468 // ------------------------------------------------------
Expand Down Expand Up @@ -191,6 +196,9 @@ GLOBAL_LIST_INIT(radiochannels, list(
RADIO_CHANNEL_CLF_ENGI = CLF_ENGI_FREQ,
RADIO_CHANNEL_CLF_MED = CLF_MED_FREQ,
RADIO_CHANNEL_CLF_CCT = CLF_CCT_FREQ,

RADIO_CHANNEL_BUG_A = BUG_A_FREQ,
RADIO_CHANNEL_BUG_B = BUG_B_FREQ,
))

// Response Teams
Expand All @@ -205,6 +213,9 @@ GLOBAL_LIST_INIT(radiochannels, list(
// PMC Frequencies
#define PMC_FREQS list(PMC_FREQ, PMC_CMD_FREQ, PMC_ENGI_FREQ, PMC_MED_FREQ, PMC_CCT_FREQ, WY_WO_FREQ, WY_FREQ)

//Listening Device Frequencies
#define BUG_FREQS list(BUG_A_FREQ, BUG_B_FREQ)

//Depts - used for colors in headset.dm, as well as deciding what the marine comms tower can listen into
#define DEPT_FREQS list(COMM_FREQ, MED_FREQ, ENG_FREQ, SEC_FREQ, SENTRY_FREQ, ALPHA_FREQ, BRAVO_FREQ, CHARLIE_FREQ, DELTA_FREQ, ECHO_FREQ, CRYO_FREQ, REQ_FREQ, JTAC_FREQ, INTEL_FREQ, WY_FREQ)

Expand Down Expand Up @@ -269,6 +280,8 @@ SUBSYSTEM_DEF(radio)
"[HC_FREQ]" = "hcradio",
"[PVST_FREQ]" = "pvstradio",
"[COLONY_FREQ]" = "deptradio",
"[BUG_A_FREQ]" = "airadio",
"[BUG_B_FREQ]" = "aiprivradio",
)

/datum/controller/subsystem/radio/proc/add_object(obj/device as obj, new_frequency as num, filter = null as text|null)
Expand Down
3 changes: 2 additions & 1 deletion code/controllers/subsystem/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ SUBSYSTEM_DEF(vote)
var/datum/game_mode/M = mode_type
if(initial(M.config_tag))
var/vote_cycle_met = !initial(M.vote_cycle) || (text2num(SSperf_logging?.round?.id) % initial(M.vote_cycle) == 0)
if(initial(M.votable) && vote_cycle_met)
var/min_players_met = length(GLOB.clients) >= M.required_players
if(initial(M.votable) && vote_cycle_met && min_players_met)
choices += initial(M.config_tag)
if("groundmap")
question = "Ground map vote"
Expand Down
5 changes: 5 additions & 0 deletions code/datums/ASRS.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,8 @@
buyable = 0
group = "ASRS"
cost = ASRS_VERY_LOW_WEIGHT

/datum/supply_packs/ingredient/asrs
buyable = 0
group = "ASRS"
cost = ASRS_LOW_WEIGHT
31 changes: 17 additions & 14 deletions code/datums/components/healing_reduction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,36 @@ Humans will take continuous damage instead.
src.healing_reduction_dissipation = healing_reduction_dissipation
src.max_buildup = max_buildup

/datum/component/healing_reduction/InheritComponent(datum/component/healing_reduction/C, i_am_original, healing_reduction)
/datum/component/healing_reduction/InheritComponent(datum/component/healing_reduction/inherit_component, i_am_original, healing_reduction)
. = ..()
if(!C)
if(!inherit_component)
src.healing_reduction += healing_reduction
else
src.healing_reduction += C.healing_reduction
src.healing_reduction += inherit_component.healing_reduction

src.healing_reduction = min(src.healing_reduction, max_buildup)

/datum/component/healing_reduction/process(delta_time)
if(!parent)
qdel(src)
healing_reduction = max(healing_reduction - healing_reduction_dissipation * delta_time, 0)
return

if(ishuman(parent)) //deals brute to humans
var/mob/living/carbon/human/H = parent
H.apply_damage(healing_reduction_dissipation * delta_time, BRUTE)
healing_reduction = max(healing_reduction - healing_reduction_dissipation * delta_time, 0)

if(healing_reduction <= 0)
qdel(src)
return

if(ishuman(parent)) //deals brute to humans
var/mob/living/carbon/human/human_parent = parent
human_parent.apply_damage(healing_reduction_dissipation * delta_time, BRUTE)

var/color = GLOW_COLOR
var/intensity = healing_reduction/max_buildup
color += num2text(MAX_ALPHA*intensity, 2, 16)

var/atom/A = parent
A.add_filter("healing_reduction", 2, list("type" = "outline", "color" = color, "size" = 1))
var/atom/parent_atom = parent
parent_atom.add_filter("healing_reduction", 2, list("type" = "outline", "color" = color, "size" = 1))

/datum/component/healing_reduction/RegisterWithParent()
START_PROCESSING(SSdcs, src)
Expand All @@ -64,14 +67,14 @@ Humans will take continuous damage instead.
COMSIG_XENO_ON_HEAL_WOUNDS,
COMSIG_XENO_APPEND_TO_STAT
))
var/atom/A = parent
A.remove_filter("healing_reduction")
var/atom/parent_atom = parent
parent_atom.remove_filter("healing_reduction")

/datum/component/healing_reduction/proc/stat_append(mob/M, list/L)
/datum/component/healing_reduction/proc/stat_append(mob/target_mob, list/stat_list)
SIGNAL_HANDLER
L += "Healing Reduction: [healing_reduction]/[max_buildup]"
stat_list += "Healing Reduction: [healing_reduction]/[max_buildup]"

/datum/component/healing_reduction/proc/apply_healing_reduction(mob/living/carbon/xenomorph/X, list/healing)
/datum/component/healing_reduction/proc/apply_healing_reduction(mob/living/carbon/xenomorph/xeno, list/healing)
SIGNAL_HANDLER
healing["healing"] -= healing_reduction

Expand Down
Loading

0 comments on commit 23c24bc

Please sign in to comment.