From a44d0af4dc352b9468c0582eb1e4a838f1ebdc20 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Wed, 9 Mar 2022 07:49:02 -0800 Subject: [PATCH 1/8] hackish supermatter dying on spaced nearby turfs --- code/modules/power/supermatter/supermatter.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 201200a95d..fb5e63c372 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -469,15 +469,20 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) //((((some value between 0.5 and 1 * temp - ((273.15 + 40) * some values between 1 and 10)) * some number between 0.25 and knock your socks off / 150) * 0.25 //Heat and mols account for each other, a lot of hot mols are more damaging then a few //Mols start to have a positive effect on damage after 350 + var/spaced = 0 + for(var/turf/open/space/T in range(2,src)) + spaced++ damage = max(damage + (max(clamp(removed.total_moles() / 200, 0.5, 1) * removed.return_temperature() - ((T0C + HEAT_PENALTY_THRESHOLD)*dynamic_heat_resistance), 0) * mole_heat_penalty / 150 ) * DAMAGE_INCREASE_MULTIPLIER, 0) //Power only starts affecting damage when it is above 5000 damage = max(damage + (max(power - POWER_PENALTY_THRESHOLD, 0)/500) * DAMAGE_INCREASE_MULTIPLIER, 0) //Molar count only starts affecting damage when it is above 1800 damage = max(damage + (max(combined_gas - MOLE_PENALTY_THRESHOLD, 0)/80) * DAMAGE_INCREASE_MULTIPLIER, 0) + damage = max(damage + spaced * 0.1 * DAMAGE_INCREASE_MULTIPLIER, 0) + //There might be a way to integrate healing and hurting via heat //healing damage - if(combined_gas < MOLE_PENALTY_THRESHOLD) + if(combined_gas < MOLE_PENALTY_THRESHOLD && !spaced) //Only has a net positive effect when the temp is below 313.15, heals up to 2 damage. Psycologists increase this temp min by up to 45 damage = max(damage + (min(removed.return_temperature() - (T0C + HEAT_PENALTY_THRESHOLD), 0) / 150), 0) From 9b4c3a5be3f26e2131d65f183b0f9c17e82c91a9 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Thu, 10 Mar 2022 21:35:08 -0800 Subject: [PATCH 2/8] Adds a minimum greater vote count to extend rounds --- code/__DEFINES/vote.dm | 3 +++ code/controllers/subsystem/vote.dm | 21 ++++++++++++++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/code/__DEFINES/vote.dm b/code/__DEFINES/vote.dm index 88e70b884e..bbe6ddf2b7 100644 --- a/code/__DEFINES/vote.dm +++ b/code/__DEFINES/vote.dm @@ -5,6 +5,9 @@ #define HIGHEST_MEDIAN_VOTING "HIGHEST_MEDIAN" #define INSTANT_RUNOFF_VOTING "IRV" +#define VOTE_TRANSFER "Initiate Crew Transfer" +#define VOTE_CONTINUE "Continue Playing" + #define SHOW_RESULTS (1<<0) #define SHOW_VOTES (1<<1) #define SHOW_WINNER (1<<2) diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 868351a833..9196c5f4a1 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -32,6 +32,8 @@ SUBSYSTEM_DEF(vote) var/list/stored_modetier_results = list() // The aggregated tier list of the modes available in secret. + var/transfer_votes_done = 0 + /datum/controller/subsystem/vote/fire() //called by master_controller if(mode) if(end_time < world.time) @@ -248,8 +250,17 @@ SUBSYSTEM_DEF(vote) if(vote_system == SCORE_VOTING) calculate_scores(vote_title_text) if(vote_system == HIGHEST_MEDIAN_VOTING) - calculate_highest_median(vote_title_text) // nothing uses this at the moment - var/list/winners = vote_system == INSTANT_RUNOFF_VOTING ? get_runoff_results() : get_result() + calculate_highest_median(vote_title_text) + var/list/winners = list() + if(mode == "transfer") + var/greater_amount_required = 2 + transfer_votes_done + text += "\nExtending requires [greater_amount_required] more votes to win." + if(choices[VOTE_TRANSFER] + greater_amount_required >= choices[VOTE_CONTINUE]) + winners = list(VOTE_TRANSFER) + else + winners = list(VOTE_CONTINUE) + else + winners = vote_system == INSTANT_RUNOFF_VOTING ? get_runoff_results() : get_result() var/was_roundtype_vote = mode == "roundtype" || mode == "dynamic" if(winners.len > 0) if(was_roundtype_vote) @@ -305,7 +316,7 @@ SUBSYSTEM_DEF(vote) if(vote_system == SCHULZE_VOTING) admintext += "\nIt should be noted that this is not a raw tally of votes (impossible in ranked choice) but the score determined by the schulze method of voting, so the numbers will look weird!" else if(vote_system == HIGHEST_MEDIAN_VOTING) - admintext += "\nIt should be noted that this is not a raw tally of votes but the number of runoffs done by majority judgement!" + admintext += "\nIt should be noted that this is not a raw tally of votes but rather the median score plus a tiebreaker!" for(var/i=1,i<=choices.len,i++) var/votes = choices[choices[i]] admintext += "\n[choices[i]]: [votes]" @@ -339,7 +350,7 @@ SUBSYSTEM_DEF(vote) if(SSmapping.changemap(config.maplist[.])) to_chat(world, "The map vote has chosen [VM.map_name] for next round!") if("transfer") // austation begin -- Crew autotransfer vote - if(. == "Initiate Crew Transfer") + if(. == VOTE_TRANSFER) SSshuttle.autoEnd() var/obj/machinery/computer/communications/C = locate() in GLOB.machines if(C) @@ -446,7 +457,7 @@ SUBSYSTEM_DEF(vote) continue choices |= M if("transfer") // austation begin -- Crew autotranfer vote - choices.Add("Initiate Crew Transfer","Continue Playing") // austation end + choices.Add(VOTE_TRANSFER,VOTE_CONTINUE) // austation end if("roundtype") //CIT CHANGE - adds the roundstart secret/extended vote choices.Add("dynamic", "extended") if("custom") From 2abe8f1ed6a7fbf8f4040dd0f97330012ee2c679 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Thu, 10 Mar 2022 21:38:39 -0800 Subject: [PATCH 3/8] Actually, no, just a minimum extend vote count --- code/controllers/subsystem/vote.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 9196c5f4a1..57d4a5f7cc 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -253,9 +253,9 @@ SUBSYSTEM_DEF(vote) calculate_highest_median(vote_title_text) var/list/winners = list() if(mode == "transfer") - var/greater_amount_required = 2 + transfer_votes_done - text += "\nExtending requires [greater_amount_required] more votes to win." - if(choices[VOTE_TRANSFER] + greater_amount_required >= choices[VOTE_CONTINUE]) + var/amount_required = 3 + transfer_votes_done + text += "\nExtending requires at least [amount_required] votes to win." + if(choices[VOTE_CONTINUE] < amount_required || choices[VOTE_TRANSFER] >= choices[VOTE_CONTINUE]) winners = list(VOTE_TRANSFER) else winners = list(VOTE_CONTINUE) From 857253a07b9f1c9290ab6abc7392df2db3fcb3ce Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Thu, 10 Mar 2022 21:42:27 -0800 Subject: [PATCH 4/8] who names a var T. --- code/modules/power/supermatter/supermatter.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index fb5e63c372..22ce4e7ce5 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -470,7 +470,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal) //Heat and mols account for each other, a lot of hot mols are more damaging then a few //Mols start to have a positive effect on damage after 350 var/spaced = 0 - for(var/turf/open/space/T in range(2,src)) + for(var/turf/open/space/_space_turf in range(2,src)) spaced++ damage = max(damage + (max(clamp(removed.total_moles() / 200, 0.5, 1) * removed.return_temperature() - ((T0C + HEAT_PENALTY_THRESHOLD)*dynamic_heat_resistance), 0) * mole_heat_penalty / 150 ) * DAMAGE_INCREASE_MULTIPLIER, 0) //Power only starts affecting damage when it is above 5000 From 4e2b8949fa493266e18d05d435a60cdeda615bc4 Mon Sep 17 00:00:00 2001 From: Putnam3145 Date: Thu, 10 Mar 2022 21:47:21 -0800 Subject: [PATCH 5/8] it is important that we actually keep track --- code/controllers/subsystem/vote.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 57d4a5f7cc..772d7f7b8d 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -254,6 +254,7 @@ SUBSYSTEM_DEF(vote) var/list/winners = list() if(mode == "transfer") var/amount_required = 3 + transfer_votes_done + transfer_votes_done += 1 text += "\nExtending requires at least [amount_required] votes to win." if(choices[VOTE_CONTINUE] < amount_required || choices[VOTE_TRANSFER] >= choices[VOTE_CONTINUE]) winners = list(VOTE_TRANSFER) From 2c5a3736e074c8813109bebc21cec1ed6664eb6c Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Mon, 14 Mar 2022 13:47:12 -0500 Subject: [PATCH 6/8] Automatic changelog generation for PR #15546 [ci skip] --- html/changelogs/AutoChangeLog-pr-15546.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-15546.yml diff --git a/html/changelogs/AutoChangeLog-pr-15546.yml b/html/changelogs/AutoChangeLog-pr-15546.yml new file mode 100644 index 0000000000..a451b8863b --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-15546.yml @@ -0,0 +1,4 @@ +author: "Putnam3145" +delete-after: True +changes: + - balance: "Supermatter now takes damage when near space tiles" From 2331a30220cc6223536e8f92f3aaac99a69b5737 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Mon, 14 Mar 2022 13:48:13 -0500 Subject: [PATCH 7/8] Automatic changelog generation for PR #15547 [ci skip] --- html/changelogs/AutoChangeLog-pr-15547.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-15547.yml diff --git a/html/changelogs/AutoChangeLog-pr-15547.yml b/html/changelogs/AutoChangeLog-pr-15547.yml new file mode 100644 index 0000000000..0c14f8a9bb --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-15547.yml @@ -0,0 +1,4 @@ +author: "Putnam3145" +delete-after: True +changes: + - rscadd: "Round continuation limitations based on population voting for continuation" From 9f0ebe17ab15edf9f83294cf82516d2212a3a210 Mon Sep 17 00:00:00 2001 From: Changelogs Date: Tue, 15 Mar 2022 00:36:30 +0000 Subject: [PATCH 8/8] Automatic changelog compile [ci skip] --- html/changelogs/AutoChangeLog-pr-15546.yml | 4 ---- html/changelogs/AutoChangeLog-pr-15547.yml | 4 ---- html/changelogs/AutoChangeLog-pr-15550.yml | 4 ---- 3 files changed, 12 deletions(-) delete mode 100644 html/changelogs/AutoChangeLog-pr-15546.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-15547.yml delete mode 100644 html/changelogs/AutoChangeLog-pr-15550.yml diff --git a/html/changelogs/AutoChangeLog-pr-15546.yml b/html/changelogs/AutoChangeLog-pr-15546.yml deleted file mode 100644 index a451b8863b..0000000000 --- a/html/changelogs/AutoChangeLog-pr-15546.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Putnam3145" -delete-after: True -changes: - - balance: "Supermatter now takes damage when near space tiles" diff --git a/html/changelogs/AutoChangeLog-pr-15547.yml b/html/changelogs/AutoChangeLog-pr-15547.yml deleted file mode 100644 index 0c14f8a9bb..0000000000 --- a/html/changelogs/AutoChangeLog-pr-15547.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Putnam3145" -delete-after: True -changes: - - rscadd: "Round continuation limitations based on population voting for continuation" diff --git a/html/changelogs/AutoChangeLog-pr-15550.yml b/html/changelogs/AutoChangeLog-pr-15550.yml deleted file mode 100644 index 171df9bb0c..0000000000 --- a/html/changelogs/AutoChangeLog-pr-15550.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Putnam3145" -delete-after: True -changes: - - bugfix: "atmos equalization config now works properly"