Skip to content

Commit

Permalink
Revert "Increases pred round chance whenever it isn't a pred round (#…
Browse files Browse the repository at this point in the history
…7201)"

This reverts commit 0bd1f47.
  • Loading branch information
harryob committed Sep 28, 2024
1 parent 7ce846c commit ad026a3
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 44 deletions.
22 changes: 0 additions & 22 deletions code/datums/entities/predround_chance.dm

This file was deleted.

23 changes: 2 additions & 21 deletions code/game/jobs/role_authority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -209,27 +209,13 @@ 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)

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
if(SSnightmare.get_scenario_value("predator_round") && !Check_WO())
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)

DB_FILTER(/datum/entity/predround_chance, DB_COMP("id", DB_EQUALS, 1), CALLBACK(src, PROC_REF(modify_pred_round_chance), pred_round))
REDIS_PUBLISH("byond.round", "type" = "predator-round", "map" = SSmapping.configs[GROUND_MAP].map_name)

// 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 @@ -837,8 +823,3 @@ 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()
1 change: 0 additions & 1 deletion colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,6 @@
#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
1 change: 1 addition & 0 deletions maps/Nightmare/scenario.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[
{ "type": "def", "values": { "predator_round": true }, "chance": 0.2 }
]

0 comments on commit ad026a3

Please sign in to comment.