A dynamic rework: target threat levels (#11515)

* Starting a replacement of how threat works.

* no, we do it this way

* Added threat levels to jobs

* Added threat to... a lot.

* Updated for traitor classes.

* Fixed errors, except for one.

It's consistently giving me "maximum number of internal arrays exceeded (65535)". I have no idea what could be causing this.

* Added type annotation to GetJob.

* This one I should change though

* wow how'd that happen

* spammable means low threat

* Made story threat have initial threat level on average

* Made somet rulesets force if they won the vote

* )

* Gave EVERY job threat, added a config for it.

* Rebalanced some numbers

* Update code/game/gamemodes/dynamic/dynamic_storytellers.dm

Co-Authored-By: Ghom <42542238+Ghommie@users.noreply.github.com>

* Removes mush threat

* Makes devil threat scale with form

* reviewing reviewer's review of reviewer

* Gutlunches can be friendly spawned, so no

* Also made forced-friendly mobs not count

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
Putnam3145
2020-03-25 09:40:37 -07:00
committed by GitHub
parent 6f9e9d0be7
commit 3d8084709b
146 changed files with 434 additions and 194 deletions
@@ -396,6 +396,10 @@
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/keyed_list/job_threat
key_mode = KEY_MODE_TEXT
value_mode = VALUE_MODE_NUM
/datum/config_entry/number/monkeycap
config_entry_value = 64
min_val = 0
+2 -1
View File
@@ -66,6 +66,7 @@ SUBSYSTEM_DEF(job)
/datum/controller/subsystem/job/proc/GetJob(rank)
RETURN_TYPE(/datum/job)
if(!occupations.len)
SetupOccupations()
return name_occupations[rank]
@@ -738,4 +739,4 @@ SUBSYSTEM_DEF(job)
. |= player.mind
/datum/controller/subsystem/job/proc/JobDebug(message)
log_job_debug(message)
log_job_debug(message)
+6 -2
View File
@@ -354,11 +354,15 @@ SUBSYSTEM_DEF(vote)
return message_admins("A vote has tried to change the gamemode, but the game has already started. Aborting.")
GLOB.master_mode = "dynamic"
var/list/runnable_storytellers = config.get_runnable_storytellers()
var/datum/dynamic_storyteller/picked
for(var/T in runnable_storytellers)
var/datum/dynamic_storyteller/S = T
if(stored_gamemode_votes[initial(S.name)] == 1 && CHECK_BITFIELD(initial(S.flags), FORCE_IF_WON))
picked = S
runnable_storytellers[S] *= round(stored_gamemode_votes[initial(S.name)]*100000,1)
var/datum/dynamic_storyteller/S = pickweightAllowZero(runnable_storytellers)
GLOB.dynamic_storyteller_type = S
if(!picked)
picked = pickweightAllowZero(runnable_storytellers)
GLOB.dynamic_storyteller_type = picked
if("map")
var/datum/map_config/VM = config.maplist[.]
message_admins("The map has been voted for and will change to: [VM.map_name]")