diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm
index 2e8887c75f..7e4f54c8b4 100644
--- a/_maps/map_files/PubbyStation/PubbyStation.dmm
+++ b/_maps/map_files/PubbyStation/PubbyStation.dmm
@@ -47466,8 +47466,8 @@
/area/hydroponics/garden/monastery)
"cgL" = (
/obj/structure/closet/cabinet,
-/obj/item/clothing/suit/holidaypriest,
-/obj/item/clothing/suit/nun,
+/obj/item/clothing/suit/chaplain/holidaypriest,
+/obj/item/clothing/suit/chaplain/nun,
/obj/item/clothing/head/nun_hood,
/obj/machinery/button/door{
id = "Cell1";
@@ -47834,8 +47834,8 @@
/area/space/nearstation)
"cio" = (
/obj/structure/closet/cabinet,
-/obj/item/clothing/suit/holidaypriest,
-/obj/item/clothing/suit/nun,
+/obj/item/clothing/suit/chaplain/holidaypriest,
+/obj/item/clothing/suit/chaplain/nun,
/obj/item/clothing/head/nun_hood,
/obj/machinery/button/door{
id = "Cell2";
@@ -50476,8 +50476,8 @@
/obj/structure/closet,
/obj/item/storage/backpack/cultpack,
/obj/item/clothing/head/nun_hood,
-/obj/item/clothing/suit/nun,
-/obj/item/clothing/suit/holidaypriest,
+/obj/item/clothing/suit/chaplain/nun,
+/obj/item/clothing/suit/chaplain/holidaypriest,
/obj/effect/turf_decal/tile/neutral{
dir = 1
},
diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm
index d04ee2fe49..80e80cd6a9 100644
--- a/_maps/map_files/generic/CentCom.dmm
+++ b/_maps/map_files/generic/CentCom.dmm
@@ -1264,9 +1264,9 @@
/area/holodeck/rec_center/chapelcourt)
"dw" = (
/obj/structure/table/wood/fancy,
-/obj/item/clothing/suit/nun,
+/obj/item/clothing/suit/chaplain/nun,
/obj/item/clothing/head/nun_hood,
-/obj/item/clothing/suit/holidaypriest,
+/obj/item/clothing/suit/chaplain/holidaypriest,
/turf/open/floor/holofloor{
dir = 8;
icon_state = "dark"
diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm
index 4ed099d9e2..4372c4ca24 100644
--- a/code/__DEFINES/DNA.dm
+++ b/code/__DEFINES/DNA.dm
@@ -98,6 +98,13 @@
#define DRINKSBLOOD 15
#define NOEYES 16
#define MARKINGS 17
+#define MUTCOLORS2 18
+#define MUTCOLORS3 19
+#define NOAROUSAL 20 //Stops all arousal effects
+#define NOGENITALS 21 //Cannot create, use, or otherwise have genitals
+#define MATRIXED 22 //if icon is color matrix'd
+#define SKINTONE 23 //uses skin tones
+#define HORNCOLOR 24
#define ORGAN_SLOT_BRAIN "brain"
#define ORGAN_SLOT_APPENDIX "appendix"
diff --git a/code/__DEFINES/admin.dm b/code/__DEFINES/admin.dm
index fb42bc46c0..b875998f0a 100644
--- a/code/__DEFINES/admin.dm
+++ b/code/__DEFINES/admin.dm
@@ -81,3 +81,10 @@
#define SPAM_TRIGGER_WARNING 5 //Number of identical messages required before the spam-prevention will warn you to stfu
#define SPAM_TRIGGER_AUTOMUTE 10 //Number of identical messages required before the spam-prevention will automute you
+
+///Max length of a keypress command before it's considered to be a forged packet/bogus command
+#define MAX_KEYPRESS_COMMANDLENGTH 16
+///Max amount of keypress messages per second over two seconds before client is autokicked
+#define MAX_KEYPRESS_AUTOKICK 100
+///Length of held key rolling buffer
+#define HELD_KEY_BUFFER_LENGTH 15
diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm
index da5981ff8a..d966c73d23 100644
--- a/code/__DEFINES/citadel_defines.dm
+++ b/code/__DEFINES/citadel_defines.dm
@@ -89,17 +89,6 @@
//Damage stuffs
#define AROUSAL "arousal"
-//DNA stuffs. Remember to change this if upstream adds more snowflake options
-
-
-//Species stuffs. Remember to change this if upstream updates species flags
-#define MUTCOLORS2 35
-#define MUTCOLORS3 36
-#define NOAROUSAL 37 //Stops all arousal effects
-#define NOGENITALS 38 //Cannot create, use, or otherwise have genitals
-#define MATRIXED 39 //if icon is color matrix'd
-#define SKINTONE 40 //uses skin tones
-
//Citadel istypes
#define isgenital(A) (istype(A, /obj/item/organ/genital))
diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm
index 8ff40c3ef9..ef9e6a044f 100644
--- a/code/__DEFINES/is_helpers.dm
+++ b/code/__DEFINES/is_helpers.dm
@@ -56,7 +56,7 @@
#define isslimeperson(A) (is_species(A, /datum/species/jelly/slime))
#define isluminescent(A) (is_species(A, /datum/species/jelly/luminescent))
#define iszombie(A) (is_species(A, /datum/species/zombie))
-#define ismoth(A) (is_species(A, /datum/species/moth))
+#define ismoth(A) (is_species(A, /datum/species/insect))
#define ishumanbasic(A) (is_species(A, /datum/species/human))
#define iscatperson(A) (ishumanbasic(A) && istype(A.dna.species, /datum/species/human/felinid) )
diff --git a/code/__DEFINES/jobs.dm b/code/__DEFINES/jobs.dm
index dc4080a789..e6eb9f313e 100644
--- a/code/__DEFINES/jobs.dm
+++ b/code/__DEFINES/jobs.dm
@@ -48,3 +48,41 @@
#define JOB_UNAVAILABLE_PLAYTIME 3
#define JOB_UNAVAILABLE_ACCOUNTAGE 4
#define JOB_UNAVAILABLE_SLOTFULL 5
+
+#define DEFAULT_RELIGION "Christianity"
+#define DEFAULT_DEITY "Space Jesus"
+
+#define JOB_DISPLAY_ORDER_DEFAULT 0
+
+#define JOB_DISPLAY_ORDER_ASSISTANT 1
+#define JOB_DISPLAY_ORDER_CAPTAIN 2
+#define JOB_DISPLAY_ORDER_HEAD_OF_PERSONNEL 3
+#define JOB_DISPLAY_ORDER_BARTENDER 4
+#define JOB_DISPLAY_ORDER_COOK 5
+#define JOB_DISPLAY_ORDER_BOTANIST 6
+#define JOB_DISPLAY_ORDER_JANITOR 7
+#define JOB_DISPLAY_ORDER_CLOWN 8
+#define JOB_DISPLAY_ORDER_MIME 9
+#define JOB_DISPLAY_ORDER_CURATOR 10
+#define JOB_DISPLAY_ORDER_LAWYER 11
+#define JOB_DISPLAY_ORDER_CHAPLAIN 12
+#define JOB_DISPLAY_ORDER_QUARTERMASTER 13
+#define JOB_DISPLAY_ORDER_CARGO_TECHNICIAN 14
+#define JOB_DISPLAY_ORDER_SHAFT_MINER 15
+#define JOB_DISPLAY_ORDER_CHIEF_ENGINEER 16
+#define JOB_DISPLAY_ORDER_STATION_ENGINEER 17
+#define JOB_DISPLAY_ORDER_ATMOSPHERIC_TECHNICIAN 18
+#define JOB_DISPLAY_ORDER_CHIEF_MEDICAL_OFFICER 19
+#define JOB_DISPLAY_ORDER_MEDICAL_DOCTOR 20
+#define JOB_DISPLAY_ORDER_CHEMIST 21
+#define JOB_DISPLAY_ORDER_GENETICIST 22
+#define JOB_DISPLAY_ORDER_VIROLOGIST 23
+#define JOB_DISPLAY_ORDER_RESEARCH_DIRECTOR 24
+#define JOB_DISPLAY_ORDER_SCIENTIST 25
+#define JOB_DISPLAY_ORDER_ROBOTICIST 26
+#define JOB_DISPLAY_ORDER_HEAD_OF_SECURITY 27
+#define JOB_DISPLAY_ORDER_WARDEN 28
+#define JOB_DISPLAY_ORDER_DETECTIVE 29
+#define JOB_DISPLAY_ORDER_SECURITY_OFFICER 30
+#define JOB_DISPLAY_ORDER_AI 31
+#define JOB_DISPLAY_ORDER_CYBORG 32
diff --git a/code/__DEFINES/maths.dm b/code/__DEFINES/maths.dm
index d344f7f010..5bce51293f 100644
--- a/code/__DEFINES/maths.dm
+++ b/code/__DEFINES/maths.dm
@@ -201,4 +201,10 @@
return list(region_x1 & region_x2, region_y1 & region_y2)
+#define EXP_DISTRIBUTION(desired_mean) ( -(1/(1/desired_mean)) * log(rand(1, 1000) * 0.001) )
+
+#define LORENTZ_DISTRIBUTION(x, s) ( s*TAN(TODEGREES(PI*(rand()-0.5))) + x )
+#define LORENTZ_CUMULATIVE_DISTRIBUTION(x, y, s) ( (1/PI)*TORADIANS(arctan((x-y)/s)) + 1/2 )
+
+#define RULE_OF_THREE(a, b, x) ((a*x)/b)
// )
diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index c71780e7e9..b6115e93e9 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -472,6 +472,9 @@ GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_S
#define EGG_LAYING_MESSAGES list("lays an egg.","squats down and croons.","begins making a huge racket.","begins clucking raucously.")
+// list of all null rod weapons
+#define HOLY_WEAPONS /obj/item/nullrod, /obj/item/twohanded/dualsaber/hypereutactic/chaplain, /obj/item/gun/energy/laser/redtag/hitscan/chaplain, /obj/item/multitool/chaplain, /obj/item/melee/baseball_bat/chaplain
+
// Used by PDA and cartridge code to reduce repetitiveness of spritesheets
#define PDAIMG(what) {""}
diff --git a/code/__DEFINES/preferences.dm b/code/__DEFINES/preferences.dm
index 02f151dcd9..0992b2e586 100644
--- a/code/__DEFINES/preferences.dm
+++ b/code/__DEFINES/preferences.dm
@@ -69,4 +69,9 @@
//Flags in the players table in the db
#define DB_FLAG_EXEMPT 1
-#define DEFAULT_CYBORG_NAME "Default Cyborg Name"
\ No newline at end of file
+#define DEFAULT_CYBORG_NAME "Default Cyborg Name"
+
+//Job preferences levels
+#define JP_LOW 1
+#define JP_MEDIUM 2
+#define JP_HIGH 3
diff --git a/code/__HELPERS/_cit_helpers.dm b/code/__HELPERS/_cit_helpers.dm
index 8683f75b08..86d0a34e3e 100644
--- a/code/__HELPERS/_cit_helpers.dm
+++ b/code/__HELPERS/_cit_helpers.dm
@@ -94,6 +94,12 @@ GLOBAL_LIST_INIT(dildo_colors, list(//mostly neon colors
"Purple" = "#e300ff"//purple
))
+GLOBAL_LIST_INIT(meat_types, list(
+ "Mammalian" = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/mammal,
+ "Aquatic" = /obj/item/reagent_containers/food/snacks/carpmeat/aquatic,
+ "Avian" = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/avian,
+ "Inesct" = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/insect))
+
//Crew objective and miscreants stuff
GLOBAL_VAR_INIT(miscreants_allowed, FALSE)
diff --git a/code/__HELPERS/cmp.dm b/code/__HELPERS/cmp.dm
index e09ebcb10c..37f36a7e0d 100644
--- a/code/__HELPERS/cmp.dm
+++ b/code/__HELPERS/cmp.dm
@@ -81,3 +81,6 @@ GLOBAL_VAR_INIT(cmp_field, "name")
/proc/cmp_advdisease_resistance_asc(datum/disease/advance/A, datum/disease/advance/B)
return A.totalResistance() - B.totalResistance()
+
+/proc/cmp_job_display_asc(datum/job/A, datum/job/B)
+ return A.display_order - B.display_order
diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm
index ad2bedaa4e..b20122e653 100644
--- a/code/__HELPERS/global_lists.dm
+++ b/code/__HELPERS/global_lists.dm
@@ -30,7 +30,8 @@
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, GLOB.legs_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.r_wings_list,roundstart = TRUE)
init_sprite_accessory_subtypes(/datum/sprite_accessory/caps, GLOB.caps_list)
- init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_wings, GLOB.moth_wings_list)
+ init_sprite_accessory_subtypes(/datum/sprite_accessory/insect_wings, GLOB.insect_wings_list)
+ init_sprite_accessory_subtypes(/datum/sprite_accessory/insect_fluff, GLOB.insect_fluffs_list)
//CIT CHANGES START HERE, ADDS SNOWFLAKE BODYPARTS AND MORE
//mammal bodyparts (fucking furries)
@@ -44,6 +45,9 @@
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_head, GLOB.xeno_head_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_tail, GLOB.xeno_tail_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_dorsal, GLOB.xeno_dorsal_list)
+ //ipcs
+ init_sprite_accessory_subtypes(/datum/sprite_accessory/screen, GLOB.ipc_screens_list, roundstart = TRUE)
+ init_sprite_accessory_subtypes(/datum/sprite_accessory/antenna, GLOB.ipc_antennas_list, roundstart = TRUE)
//genitals
init_sprite_accessory_subtypes(/datum/sprite_accessory/penis, GLOB.cock_shapes_list)
for(var/K in GLOB.cock_shapes_list)
@@ -53,7 +57,11 @@
init_sprite_accessory_subtypes(/datum/sprite_accessory/vagina, GLOB.vagina_shapes_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/breasts, GLOB.breasts_shapes_list)
GLOB.breasts_size_list = list ("a", "b", "c", "d", "e") //We need the list to choose from initialized, but it's no longer a sprite_accessory thing.
- GLOB.gentlemans_organ_names = list("phallus", "willy", "dick", "prick", "member", "tool", "gentleman's organ", "cock", "wang", "knob", "dong", "joystick", "pecker", "johnson", "weenie", "tadger", "schlong", "thirsty ferret", "baloney pony", "schlanger")
+ GLOB.gentlemans_organ_names = list("phallus", "willy", "dick", "prick", "member", "tool", "gentleman's organ",
+ "cock", "wang", "knob", "dong", "joystick", "pecker", "johnson", "weenie", "tadger", "schlong", "thirsty ferret",
+ "baloney pony", "schlanger", "Mutton dagger", "old blind bob","Hanging Johnny", "fishing rod", "Tally whacker", "polly rocket",
+ "One eyed trouser trout", "Ding dong", "ankle spanker", "Pork sword", "engine cranker", "Harry hot dog", "Davy Crockett",
+ "Kidney cracker", "Heat seeking moisture missile", "Giggle stick", "love whistle", "Tube steak", "Uncle Dick", "Purple helmet warrior")
for(var/K in GLOB.breasts_shapes_list)
var/datum/sprite_accessory/breasts/value = GLOB.breasts_shapes_list[K]
GLOB.breasts_shapes_icons[K] = value.icon_state
@@ -62,6 +70,7 @@
for(var/K in GLOB.balls_shapes_list)
var/datum/sprite_accessory/testicles/value = GLOB.balls_shapes_list[K]
GLOB.balls_shapes_icons[K] = value.icon_state
+
//END OF CIT CHANGES
//Species
diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm
index 7ec99fa885..8f3cd4f60d 100644
--- a/code/__HELPERS/mobs.dm
+++ b/code/__HELPERS/mobs.dm
@@ -59,7 +59,7 @@
if(!GLOB.horns_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/horns, GLOB.horns_list)
if(!GLOB.ears_list.len)
- init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, GLOB.horns_list)
+ init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, GLOB.ears_list)
if(!GLOB.frills_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, GLOB.frills_list)
if(!GLOB.spines_list.len)
@@ -70,8 +70,10 @@
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, GLOB.body_markings_list)
if(!GLOB.wings_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.wings_list)
- if(!GLOB.moth_wings_list.len)
- init_sprite_accessory_subtypes(/datum/sprite_accessory/moth_wings, GLOB.moth_wings_list)
+ if(!GLOB.insect_wings_list.len)
+ init_sprite_accessory_subtypes(/datum/sprite_accessory/insect_wings, GLOB.insect_wings_list)
+ if(!GLOB.insect_fluffs_list.len)
+ init_sprite_accessory_subtypes(/datum/sprite_accessory/insect_fluff, GLOB.insect_fluffs_list)
//CIT CHANGES - genitals and such
if(!GLOB.cock_shapes_list.len)
@@ -130,22 +132,23 @@
//CIT CHANGE - changes this entire return to support cit's snowflake parts
return(list(
- "mcolor" = color1,
- "mcolor2" = color2,
- "mcolor3" = color3,
- "tail_lizard" = pick(GLOB.tails_list_lizard),
- "tail_human" = "None",
- "wings" = "None",
- "snout" = pick(GLOB.snouts_list),
- "horns" = pick(GLOB.horns_list),
- "ears" = "None",
- "frills" = pick(GLOB.frills_list),
- "spines" = pick(GLOB.spines_list),
- "body_markings" = pick(GLOB.body_markings_list),
- "legs" = pick("Normal Legs","Digitigrade Legs"),
- "caps" = pick(GLOB.caps_list),
- "moth_wings" = pick(GLOB.moth_wings_list),
- "taur" = "None",
+ "mcolor" = color1,
+ "mcolor2" = color2,
+ "mcolor3" = color3,
+ "tail_lizard" = pick(GLOB.tails_list_lizard),
+ "tail_human" = "None",
+ "wings" = "None",
+ "snout" = pick(GLOB.snouts_list),
+ "horns" = pick(GLOB.horns_list),
+ "ears" = "None",
+ "frills" = pick(GLOB.frills_list),
+ "spines" = pick(GLOB.spines_list),
+ "body_markings" = pick(GLOB.body_markings_list),
+ "legs" = pick("Plantigrade","Digitigrade"),
+ "caps" = pick(GLOB.caps_list),
+ "insect_wings" = pick(GLOB.insect_wings_list),
+ "insect_fluff" = "None",
+ "taur" = "None",
"mam_body_markings" = pick(snowflake_markings_list),
"mam_ears" = pick(snowflake_ears_list),
"mam_snouts" = pick(snowflake_mam_snouts_list),
@@ -201,9 +204,11 @@
"womb_cum_mult" = CUM_RATE_MULT,
"womb_efficiency" = CUM_EFFICIENCY,
"womb_fluid" = "femcum",
- "ipc_screen" = "Sunburst",
- "ipc_antenna" = "None",
- "flavor_text" = ""))
+ "ipc_screen" = "Sunburst",
+ "ipc_antenna" = "None",
+ "flavor_text" = "",
+ "meat_type" = "Mammalian"
+ ))
/proc/random_hair_style(gender)
switch(gender)
diff --git a/code/__HELPERS/roundend.dm b/code/__HELPERS/roundend.dm
index 55d9e7a6cd..0e9413520b 100644
--- a/code/__HELPERS/roundend.dm
+++ b/code/__HELPERS/roundend.dm
@@ -308,6 +308,13 @@
//ignore this comment, it fixes the broken sytax parsing caused by the " above
else
parts += "[GLOB.TAB]Nobody died this shift!"
+ if(istype(SSticker.mode, /datum/game_mode/dynamic))
+ var/datum/game_mode/dynamic/mode = SSticker.mode
+ parts += "[GLOB.TAB]Threat level: [mode.threat_level]"
+ parts += "[GLOB.TAB]Threat left: [mode.threat]"
+ parts += "[GLOB.TAB]Executed rules:"
+ for(var/datum/dynamic_ruleset/rule in mode.executed_rules)
+ parts += "[GLOB.TAB][GLOB.TAB][rule.ruletype] - [rule.name]: -[rule.cost] threat"
return parts.Join(" ")
/client/proc/roundend_report_file()
diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm
index b28e7b5807..f0d5a7b252 100644
--- a/code/__HELPERS/time.dm
+++ b/code/__HELPERS/time.dm
@@ -73,3 +73,11 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0)
/proc/daysSince(realtimev)
return round((world.realtime - realtimev) / (24 HOURS))
+
+/proc/worldtime2text()
+ return gameTimestamp("hh:mm:ss", world.time)
+
+/proc/gameTimestamp(format = "hh:mm:ss", wtime=null)
+ if(!wtime)
+ wtime = world.time
+ return time2text(wtime - GLOB.timezoneOffset, format)
diff --git a/code/_globalvars/lists/flavor_misc.dm b/code/_globalvars/lists/flavor_misc.dm
index d09368d7b7..c759658bd4 100644
--- a/code/_globalvars/lists/flavor_misc.dm
+++ b/code/_globalvars/lists/flavor_misc.dm
@@ -34,7 +34,8 @@ GLOBAL_LIST_EMPTY(ears_list)
GLOBAL_LIST_EMPTY(wings_list)
GLOBAL_LIST_EMPTY(wings_open_list)
GLOBAL_LIST_EMPTY(r_wings_list)
-GLOBAL_LIST_EMPTY(moth_wings_list)
+GLOBAL_LIST_EMPTY(insect_wings_list)
+GLOBAL_LIST_EMPTY(insect_fluffs_list)
GLOBAL_LIST_EMPTY(caps_list)
GLOBAL_LIST_INIT(ghost_forms_with_directions_list, list("ghost")) //stores the ghost forms that support directional sprites
diff --git a/code/controllers/subsystem/assets.dm b/code/controllers/subsystem/assets.dm
index 7285298283..7b6554bd3f 100644
--- a/code/controllers/subsystem/assets.dm
+++ b/code/controllers/subsystem/assets.dm
@@ -6,7 +6,17 @@ SUBSYSTEM_DEF(assets)
var/list/preload = list()
/datum/controller/subsystem/assets/Initialize(timeofday)
- for(var/type in typesof(/datum/asset))
+
+ var/list/priority_assets = list(
+ /datum/asset/simple/oui_theme_nano,
+ /datum/asset/simple/goonchat
+ )
+
+ for(var/type in priority_assets)
+ var/datum/asset/A = new type()
+ A.register()
+
+ for(var/type in typesof(/datum/asset) - (priority_assets | list(/datum/asset, /datum/asset/simple)))
var/datum/asset/A = type
if (type != initial(A._abstract))
get_asset_datum(type)
diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm
index 4001c666ee..a0d9226e14 100644
--- a/code/controllers/subsystem/job.dm
+++ b/code/controllers/subsystem/job.dm
@@ -116,7 +116,7 @@ SUBSYSTEM_DEF(job)
if(player.mind && job.title in player.mind.restricted_roles)
JobDebug("FOC incompatible with antagonist role, Player: [player]")
continue
- if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
+ if(player.client.prefs.job_preferences["[job.title]"] == level)
JobDebug("FOC pass, Player: [player], Level:[level]")
candidates += player
return candidates
@@ -182,7 +182,7 @@ SUBSYSTEM_DEF(job)
if((job.current_positions >= job.total_positions) && job.total_positions != -1)
continue
var/list/candidates = FindOccupationCandidates(job, level)
- if(!candidates.len)
+ if(!candidates?.len)
continue
var/mob/dead/new_player/candidate = pick(candidates)
if(AssignRole(candidate, command_position))
@@ -200,7 +200,7 @@ SUBSYSTEM_DEF(job)
if((job.current_positions >= job.total_positions) && job.total_positions != -1)
continue
var/list/candidates = FindOccupationCandidates(job, level)
- if(!candidates.len)
+ if(!candidates?.len)
continue
var/mob/dead/new_player/candidate = pick(candidates)
AssignRole(candidate, command_position)
@@ -228,7 +228,7 @@ SUBSYSTEM_DEF(job)
* fills var "assigned_role" for all ready players.
* This proc must not have any side effect besides of modifying "assigned_role".
**/
-/datum/controller/subsystem/job/proc/DivideOccupations()
+/datum/controller/subsystem/job/proc/DivideOccupations(list/required_jobs)
//Setup new player list and get the jobs list
JobDebug("Running DO")
@@ -241,14 +241,14 @@ SUBSYSTEM_DEF(job)
//Get the players who are ready
for(var/mob/dead/new_player/player in GLOB.player_list)
- if(player.ready == PLAYER_READY_TO_PLAY && player.mind && !player.mind.assigned_role)
+ if(player.ready == PLAYER_READY_TO_PLAY && player.check_preferences() && player.mind && !player.mind.assigned_role)
unassigned += player
initial_players_to_assign = unassigned.len
- JobDebug("DO, Len: [unassigned.len]")
+ JobDebug("DO, Len: [unassigned?.len]")
if(unassigned.len == 0)
- return 0
+ return validate_required_jobs(required_jobs)
//Scale number of open security officer slots to population
setup_officer_positions()
@@ -269,8 +269,8 @@ SUBSYSTEM_DEF(job)
//People who wants to be the overflow role, sure, go on.
JobDebug("DO, Running Overflow Check 1")
var/datum/job/overflow = GetJob(SSjob.overflow_role)
- var/list/overflow_candidates = FindOccupationCandidates(overflow, 3)
- JobDebug("AC1, Candidates: [overflow_candidates.len]")
+ var/list/overflow_candidates = FindOccupationCandidates(overflow, JP_LOW)
+ JobDebug("AC1, Candidates: [overflow_candidates?.len]")
for(var/mob/dead/new_player/player in overflow_candidates)
JobDebug("AC1 pass, Player: [player]")
AssignRole(player, SSjob.overflow_role)
@@ -297,7 +297,8 @@ SUBSYSTEM_DEF(job)
// Loop through all levels from high to low
var/list/shuffledoccupations = shuffle(occupations)
- for(var/level = 1 to 3)
+ var/list/levels = list(JP_HIGH,JP_MEDIUM,JP_LOW)
+ for(var/level in levels)
//Check the head jobs first each level
CheckHeadPositions(level)
@@ -332,7 +333,7 @@ SUBSYSTEM_DEF(job)
continue
// If the player wants that job on this level, then try give it to him.
- if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
+ if(player.client.prefs.job_preferences["[job.title]"] == level)
// If the job isn't filled
if((job.current_positions < job.spawn_positions) || job.spawn_positions == -1)
JobDebug("DO pass, Player: [player], Level:[level], Job:[job.title]")
@@ -351,9 +352,28 @@ SUBSYSTEM_DEF(job)
//Mop up people who can't leave.
for(var/mob/dead/new_player/player in unassigned) //Players that wanted to back out but couldn't because they're antags (can you feel the edge case?)
if(!GiveRandomJob(player))
- AssignRole(player, SSjob.overflow_role) //If everything is already filled, make them an assistant
+ if(!AssignRole(player, SSjob.overflow_role)) //If everything is already filled, make them an assistant
+ return FALSE //Living on the edge, the forced antagonist couldn't be assigned to overflow role (bans, client age) - just reroll
- return 1
+ return validate_required_jobs(required_jobs)
+
+/datum/controller/subsystem/job/proc/validate_required_jobs(list/required_jobs)
+ if(!required_jobs.len)
+ return TRUE
+ for(var/required_group in required_jobs)
+ var/group_ok = TRUE
+ for(var/rank in required_group)
+ var/datum/job/J = GetJob(rank)
+ if(!J)
+ SSticker.mode.setup_error = "Invalid job [rank] in gamemode required jobs."
+ return FALSE
+ if(J.current_positions < required_group[rank])
+ group_ok = FALSE
+ break
+ if(group_ok)
+ return TRUE
+ SSticker.mode.setup_error = "Required jobs not present."
+ return FALSE
//We couldn't find a job from prefs for this guy.
/datum/controller/subsystem/job/proc/HandleUnassigned(mob/dead/new_player/player)
@@ -406,7 +426,7 @@ SUBSYSTEM_DEF(job)
if(length(GLOB.jobspawn_overrides[rank]))
S = pick(GLOB.jobspawn_overrides[rank])
if(S)
- SendToAtom(H, S, buckle = FALSE)
+ S.JoinPlayerHere(H, FALSE)
if(!S) //if there isn't a spawnpoint send them to latejoin, if there's no latejoin go yell at your mapper
log_world("Couldn't find a round start spawn point for [rank]")
SendToLateJoin(H)
@@ -418,7 +438,7 @@ SUBSYSTEM_DEF(job)
if(job)
if(!job.dresscodecompliant)// CIT CHANGE - dress code compliance
equip_loadout(N, H) // CIT CHANGE - allows players to spawn with loadout items
- var/new_mob = job.equip(H, null, null, joined_late)
+ var/new_mob = job.equip(H, null, null, joined_late , null, M.client)
if(ismob(new_mob))
H = new_mob
if(!joined_late)
@@ -428,12 +448,18 @@ SUBSYSTEM_DEF(job)
SSpersistence.antag_rep_change[M.client.ckey] += job.GetAntagRep()
+/* if(M.client.holder)
+ if(CONFIG_GET(flag/auto_deadmin_players) || (M.client.prefs?.toggles & DEADMIN_ALWAYS))
+ M.client.holder.auto_deadmin()
+ else
+ handle_auto_deadmin_roles(M.client, rank) */
+
to_chat(M, "You are the [rank].")
if(job)
to_chat(M, "As the [rank] you answer directly to [job.supervisors]. Special circumstances may change this.")
- to_chat(M, "To speak on your departments radio, use the :h button. To see others, look closely at your headset.")
+ job.radio_help_message(M)
if(job.req_admin_notify)
- to_chat(M, "You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.")
+ to_chat(M, "You are playing a job that is important for Game Progression. If you have to disconnect immediately, please notify the admins via adminhelp. Otherwise put your locker gear back into the locker and cryo out.")
if(job.custom_spawn_text)
to_chat(M, "[job.custom_spawn_text]")
if(CONFIG_GET(number/minimal_access_threshold))
@@ -446,12 +472,24 @@ SUBSYSTEM_DEF(job)
equip_loadout(N, H, TRUE)//CIT CHANGE - makes players spawn with in-backpack loadout items properly. A little hacky but it works
return H
-
+/*
+/datum/controller/subsystem/job/proc/handle_auto_deadmin_roles(client/C, rank)
+ if(!C?.holder)
+ return TRUE
+ var/datum/job/job = GetJob(rank)
+ if(!job)
+ return
+ if((job.auto_deadmin_role_flags & DEADMIN_POSITION_HEAD) && (CONFIG_GET(flag/auto_deadmin_heads) || (C.prefs?.toggles & DEADMIN_POSITION_HEAD)))
+ return C.holder.auto_deadmin()
+ else if((job.auto_deadmin_role_flags & DEADMIN_POSITION_SECURITY) && (CONFIG_GET(flag/auto_deadmin_security) || (C.prefs?.toggles & DEADMIN_POSITION_SECURITY)))
+ return C.holder.auto_deadmin()
+ else if((job.auto_deadmin_role_flags & DEADMIN_POSITION_SILICON) && (CONFIG_GET(flag/auto_deadmin_silicons) || (C.prefs?.toggles & DEADMIN_POSITION_SILICON))) //in the event there's ever psuedo-silicon roles added, ie synths.
+ return C.holder.auto_deadmin()*/
/datum/controller/subsystem/job/proc/setup_officer_positions()
var/datum/job/J = SSjob.GetJob("Security Officer")
if(!J)
- throw EXCEPTION("setup_officer_positions(): Security officer job is missing")
+ CRASH("setup_officer_positions(): Security officer job is missing")
var/ssc = CONFIG_GET(number/security_scaling_coeff)
if(ssc > 0)
@@ -502,13 +540,15 @@ SUBSYSTEM_DEF(job)
if(job.required_playtime_remaining(player.client))
young++
continue
- if(player.client.prefs.GetJobDepartment(job, 1) & job.flag)
- high++
- else if(player.client.prefs.GetJobDepartment(job, 2) & job.flag)
- medium++
- else if(player.client.prefs.GetJobDepartment(job, 3) & job.flag)
- low++
- else never++ //not selected
+ switch(player.client.prefs.job_preferences["[job.title]"])
+ if(JP_HIGH)
+ high++
+ if(JP_MEDIUM)
+ medium++
+ if(JP_LOW)
+ low++
+ else
+ never++
SSblackbox.record_feedback("nested tally", "job_preferences", high, list("[job.title]", "high"))
SSblackbox.record_feedback("nested tally", "job_preferences", medium, list("[job.title]", "medium"))
SSblackbox.record_feedback("nested tally", "job_preferences", low, list("[job.title]", "low"))
@@ -551,51 +591,61 @@ SUBSYSTEM_DEF(job)
newjob.spawn_positions = J.spawn_positions
newjob.current_positions = J.current_positions
-/datum/controller/subsystem/job/proc/SendToAtom(mob/M, atom/A, buckle)
- if(buckle && isliving(M) && istype(A, /obj/structure/chair))
- var/obj/structure/chair/C = A
- if(C.buckle_mob(M, FALSE, FALSE))
- return
- M.forceMove(get_turf(A))
+/atom/proc/JoinPlayerHere(mob/M, buckle)
+ // By default, just place the mob on the same turf as the marker or whatever.
+ M.forceMove(get_turf(src))
+
+/obj/structure/chair/JoinPlayerHere(mob/M, buckle)
+ // Placing a mob in a chair will attempt to buckle it, or else fall back to default.
+ if (buckle && isliving(M) && buckle_mob(M, FALSE, FALSE))
+ return
+ ..()
/datum/controller/subsystem/job/proc/SendToLateJoin(mob/M, buckle = TRUE)
+ var/atom/destination
if(M.mind && M.mind.assigned_role && length(GLOB.jobspawn_overrides[M.mind.assigned_role])) //We're doing something special today.
- SendToAtom(M,pick(GLOB.jobspawn_overrides[M.mind.assigned_role]),FALSE)
+ destination = pick(GLOB.jobspawn_overrides[M.mind.assigned_role])
+ destination.JoinPlayerHere(M, FALSE)
return
if(latejoin_trackers.len)
- SendToAtom(M, pick(latejoin_trackers), buckle)
- else
- //bad mojo
- var/area/shuttle/arrival/A = GLOB.areas_by_type[/area/shuttle/arrival]
- if(A)
- //first check if we can find a chair
- var/obj/structure/chair/C = locate() in A
- if(C)
- SendToAtom(M, C, buckle)
- return
- else //last hurrah
- var/list/avail = list()
- for(var/turf/T in A)
- if(!is_blocked_turf(T, TRUE))
- avail += T
- if(avail.len)
- SendToAtom(M, pick(avail), FALSE)
- return
+ destination = pick(latejoin_trackers)
+ destination.JoinPlayerHere(M, buckle)
+ return
- //pick an open spot on arrivals and dump em
- var/list/arrivals_turfs = shuffle(get_area_turfs(/area/shuttle/arrival))
- if(arrivals_turfs.len)
- for(var/turf/T in arrivals_turfs)
- if(!is_blocked_turf(T, TRUE))
- SendToAtom(M, T, FALSE)
- return
- //last chance, pick ANY spot on arrivals and dump em
- SendToAtom(M, arrivals_turfs[1], FALSE)
- else
- var/msg = "Unable to send mob [M] to late join!"
- message_admins(msg)
- CRASH(msg)
+ //bad mojo
+ var/area/shuttle/arrival/A = GLOB.areas_by_type[/area/shuttle/arrival]
+ if(A)
+ //first check if we can find a chair
+ var/obj/structure/chair/C = locate() in A
+ if(C)
+ C.JoinPlayerHere(M, buckle)
+ return
+
+ //last hurrah
+ var/list/avail = list()
+ for(var/turf/T in A)
+ if(!is_blocked_turf(T, TRUE))
+ avail += T
+ if(avail.len)
+ destination = pick(avail)
+ destination.JoinPlayerHere(M, FALSE)
+ return
+
+ //pick an open spot on arrivals and dump em
+ var/list/arrivals_turfs = shuffle(get_area_turfs(/area/shuttle/arrival))
+ if(arrivals_turfs.len)
+ for(var/turf/T in arrivals_turfs)
+ if(!is_blocked_turf(T, TRUE))
+ T.JoinPlayerHere(M, FALSE)
+ return
+ //last chance, pick ANY spot on arrivals and dump em
+ destination = arrivals_turfs[1]
+ destination.JoinPlayerHere(M, FALSE)
+ else
+ var/msg = "Unable to send mob [M] to late join!"
+ message_admins(msg)
+ CRASH(msg)
///////////////////////////////////
@@ -637,4 +687,4 @@ SUBSYSTEM_DEF(job)
. |= player.mind
/datum/controller/subsystem/job/proc/JobDebug(message)
- log_job_debug(message)
\ No newline at end of file
+ log_job_debug(message)
diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index f2469e8f7d..14e1e86f7d 100755
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -255,7 +255,7 @@ SUBSYSTEM_DEF(ticker)
var/can_continue = 0
can_continue = src.mode.pre_setup() //Choose antagonists
CHECK_TICK
- SSjob.DivideOccupations() //Distribute jobs
+ can_continue = can_continue && SSjob.DivideOccupations(mode.required_jobs) //Distribute jobs
CHECK_TICK
if(!GLOB.Debug2)
diff --git a/code/datums/outfit.dm b/code/datums/outfit.dm
index 1f5c28d3c2..68165af956 100755
--- a/code/datums/outfit.dm
+++ b/code/datums/outfit.dm
@@ -21,6 +21,7 @@
var/l_hand = null
var/internals_slot = null //ID of slot containing a gas tank
var/list/backpack_contents = null // In the list(path=count,otherpath=count) format
+ var/box // Internals box. Will be inserted at the start of backpack_contents
var/list/implants = null
var/accessory = null
@@ -83,6 +84,13 @@
H.equip_to_slot_or_del(new l_pocket(H),SLOT_L_STORE)
if(r_pocket)
H.equip_to_slot_or_del(new r_pocket(H),SLOT_R_STORE)
+
+ if(box)
+ if(!backpack_contents)
+ backpack_contents = list()
+ backpack_contents.Insert(1, box)
+ backpack_contents[box] = 1
+
if(backpack_contents)
for(var/path in backpack_contents)
var/number = backpack_contents[path]
diff --git a/code/game/gamemodes/brother/traitor_bro.dm b/code/game/gamemodes/brother/traitor_bro.dm
index 18611ebfcb..8bbe7f54ed 100644
--- a/code/game/gamemodes/brother/traitor_bro.dm
+++ b/code/game/gamemodes/brother/traitor_bro.dm
@@ -6,7 +6,7 @@
name = "traitor+brothers"
config_tag = "traitorbro"
restricted_jobs = list("AI", "Cyborg")
- protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Quartermaster", "Chief Engineer", "Research Director")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
announce_span = "danger"
announce_text = "There are Syndicate agents and Blood Brothers on the station!\n\
diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm
index 808022d25f..51a34f4194 100644
--- a/code/game/gamemodes/clock_cult/clock_cult.dm
+++ b/code/game/gamemodes/clock_cult/clock_cult.dm
@@ -135,7 +135,7 @@ Credit where due:
required_enemies = 3
recommended_enemies = 5
enemy_minimum_age = 7
- protected_jobs = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain") //Silicons can eventually be converted
+ protected_jobs = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster") //Silicons can eventually be converted
restricted_jobs = list("Chaplain", "Captain")
announce_span = "brass"
announce_text = "Servants of Ratvar are trying to summon the Justiciar!\n\
diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm
index e7cc3c53ae..497cc2f1c3 100644
--- a/code/game/gamemodes/cult/cult.dm
+++ b/code/game/gamemodes/cult/cult.dm
@@ -35,8 +35,8 @@
config_tag = "cult"
antag_flag = ROLE_CULTIST
false_report_weight = 10
- restricted_jobs = list("Chaplain","AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel")
- protected_jobs = list()
+ restricted_jobs = list("AI", "Cyborg")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
required_players = 30
required_enemies = 3
recommended_enemies = 5
diff --git a/code/game/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm
new file mode 100644
index 0000000000..ab4ac4d5c6
--- /dev/null
+++ b/code/game/gamemodes/dynamic/dynamic.dm
@@ -0,0 +1,750 @@
+#define CURRENT_LIVING_PLAYERS 1
+#define CURRENT_LIVING_ANTAGS 2
+#define CURRENT_DEAD_PLAYERS 3
+#define CURRENT_OBSERVERS 4
+
+#define ONLY_RULESET 1
+#define HIGHLANDER_RULESET 2
+#define TRAITOR_RULESET 4
+#define MINOR_RULESET 8
+
+#define RULESET_STOP_PROCESSING 1
+
+// -- Injection delays
+GLOBAL_VAR_INIT(dynamic_latejoin_delay_min, (5 MINUTES))
+GLOBAL_VAR_INIT(dynamic_latejoin_delay_max, (25 MINUTES))
+
+GLOBAL_VAR_INIT(dynamic_midround_delay_min, (15 MINUTES))
+GLOBAL_VAR_INIT(dynamic_midround_delay_max, (35 MINUTES))
+
+// Are HIGHLANDER_RULESETs allowed to stack?
+GLOBAL_VAR_INIT(dynamic_no_stacking, TRUE)
+// A number between -5 and +5.
+// A negative value will give a more peaceful round and
+// a positive value will give a round with higher threat.
+GLOBAL_VAR_INIT(dynamic_curve_centre, 0)
+// A number between 0.5 and 4.
+// Higher value will favour extreme rounds and
+// lower value rounds closer to the average.
+GLOBAL_VAR_INIT(dynamic_curve_width, 1.8)
+// If enabled only picks a single starting rule and executes only autotraitor midround ruleset.
+GLOBAL_VAR_INIT(dynamic_classic_secret, FALSE)
+// How many roundstart players required for high population override to take effect.
+GLOBAL_VAR_INIT(dynamic_high_pop_limit, 55)
+// If enabled does not accept or execute any rulesets.
+GLOBAL_VAR_INIT(dynamic_forced_extended, FALSE)
+// How high threat is required for HIGHLANDER_RULESETs stacking.
+// This is independent of dynamic_no_stacking.
+GLOBAL_VAR_INIT(dynamic_stacking_limit, 90)
+// List of forced roundstart rulesets.
+GLOBAL_LIST_EMPTY(dynamic_forced_roundstart_ruleset)
+// Forced threat level, setting this to zero or higher forces the roundstart threat to the value.
+GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
+
+/datum/game_mode/dynamic
+ name = "dynamic mode"
+ config_tag = "dynamic"
+
+ announce_span = "danger"
+ announce_text = "Dynamic mode!" // This needs to be changed maybe
+
+ reroll_friendly = FALSE;
+
+ // Threat logging vars
+ /// The "threat cap", threat shouldn't normally go above this and is used in ruleset calculations
+ var/threat_level = 0
+ /// Set at the beginning of the round. Spent by the mode to "purchase" rules.
+ var/threat = 0
+ /// Running information about the threat. Can store text or datum entries.
+ var/list/threat_log = list()
+ /// List of roundstart rules used for selecting the rules.
+ var/list/roundstart_rules = list()
+ /// List of latejoin rules used for selecting the rules.
+ var/list/latejoin_rules = list()
+ /// List of midround rules used for selecting the rules.
+ var/list/midround_rules = list()
+ /** # Pop range per requirement.
+ * If the value is five the range is:
+ * 0-4, 5-9, 10-14, 15-19, 20-24, 25-29, 30-34, 35-39, 40-54, 45+
+ * If it is six the range is:
+ * 0-5, 6-11, 12-17, 18-23, 24-29, 30-35, 36-41, 42-47, 48-53, 54+
+ * If it is seven the range is:
+ * 0-6, 7-13, 14-20, 21-27, 28-34, 35-41, 42-48, 49-55, 56-62, 63+
+ */
+ var/pop_per_requirement = 6
+ /// The requirement used for checking if a second rule should be selected.
+ var/list/second_rule_req = list(100, 100, 80, 70, 60, 50, 30, 20, 10, 0)
+ /// The requirement used for checking if a third rule should be selected.
+ var/list/third_rule_req = list(100, 100, 100, 90, 80, 70, 60, 50, 40, 30)
+ /// Threat requirement for a second ruleset when high pop override is in effect.
+ var/high_pop_second_rule_req = 40
+ /// Threat requirement for a third ruleset when high pop override is in effect.
+ var/high_pop_third_rule_req = 60
+ /// Number of players who were ready on roundstart.
+ var/roundstart_pop_ready = 0
+ /// List of candidates used on roundstart rulesets.
+ var/list/candidates = list()
+ /// Rules that are processed, rule_process is called on the rules in this list.
+ var/list/current_rules = list()
+ /// List of executed rulesets.
+ var/list/executed_rules = list()
+ /// Associative list of current players, in order: living players, living antagonists, dead players and observers.
+ var/list/list/current_players = list(CURRENT_LIVING_PLAYERS, CURRENT_LIVING_ANTAGS, CURRENT_DEAD_PLAYERS, CURRENT_OBSERVERS)
+ /// When world.time is over this number the mode tries to inject a latejoin ruleset.
+ var/latejoin_injection_cooldown = 0
+ /// When world.time is over this number the mode tries to inject a midround ruleset.
+ var/midround_injection_cooldown = 0
+ /// When TRUE GetInjectionChance returns 100.
+ var/forced_injection = FALSE
+ /// Forced ruleset to be executed for the next latejoin.
+ var/datum/dynamic_ruleset/latejoin/forced_latejoin_rule = null
+ /// When current_players was updated last time.
+ var/pop_last_updated = 0
+ /// How many percent of the rounds are more peaceful.
+ var/peaceful_percentage = 50
+ /// If a highlander executed.
+ var/highlander_executed = FALSE
+ /// If a only ruleset has been executed.
+ var/only_ruleset_executed = FALSE
+
+/datum/game_mode/dynamic/admin_panel()
+ var/list/dat = list("
Game Mode Panel
Game Mode Panel
")
+ dat += "Dynamic Mode \[VV\] "
+ dat += "Threat Level: [threat_level] "
+
+ dat += "Threat to Spend: [threat]\[Adjust\]\[View Log\] "
+ dat += " "
+ dat += "Parameters: centre = [GLOB.dynamic_curve_centre] ; width = [GLOB.dynamic_curve_width]. "
+ dat += "On average, [peaceful_percentage]% of the rounds are more peaceful. "
+ dat += "Forced extended: [GLOB.dynamic_forced_extended ? "On" : "Off"] "
+ dat += "Classic secret (only autotraitor): [GLOB.dynamic_classic_secret ? "On" : "Off"] "
+ dat += "No stacking (only one round-ender): [GLOB.dynamic_no_stacking ? "On" : "Off"] "
+ dat += "Stacking limit: [GLOB.dynamic_stacking_limit] \[Adjust\]"
+ dat += " "
+ dat += "Executed rulesets: "
+ if (executed_rules.len > 0)
+ dat += " "
+ for (var/datum/dynamic_ruleset/DR in executed_rules)
+ dat += "[DR.ruletype] - [DR.name] "
+ else
+ dat += "none. "
+ dat += " Injection Timers: ([get_injection_chance(TRUE)]% chance) "
+ dat += "Latejoin: [(latejoin_injection_cooldown-world.time)>60*10 ? "[round((latejoin_injection_cooldown-world.time)/60/10,0.1)] minutes" : "[(latejoin_injection_cooldown-world.time)] seconds"] \[Now!\] "
+ dat += "Midround: [(midround_injection_cooldown-world.time)>60*10 ? "[round((midround_injection_cooldown-world.time)/60/10,0.1)] minutes" : "[(midround_injection_cooldown-world.time)] seconds"] \[Now!\] "
+ usr << browse(dat.Join(), "window=gamemode_panel;size=500x500")
+
+/datum/game_mode/dynamic/Topic(href, href_list)
+ if (..()) // Sanity, maybe ?
+ return
+ if(!check_rights(R_ADMIN))
+ message_admins("[usr.key] has attempted to override the game mode panel!")
+ log_admin("[key_name(usr)] tried to use the game mode panel without authorization.")
+ return
+ if (href_list["forced_extended"])
+ GLOB.dynamic_forced_extended = !GLOB.dynamic_forced_extended
+ else if (href_list["no_stacking"])
+ GLOB.dynamic_no_stacking = !GLOB.dynamic_no_stacking
+ else if (href_list["classic_secret"])
+ GLOB.dynamic_classic_secret = !GLOB.dynamic_classic_secret
+ else if (href_list["adjustthreat"])
+ var/threatadd = input("Specify how much threat to add (negative to subtract). This can inflate the threat level.", "Adjust Threat", 0) as null|num
+ if(!threatadd)
+ return
+ if(threatadd > 0)
+ create_threat(threatadd)
+ else
+ spend_threat(-threatadd)
+ else if (href_list["injectlate"])
+ latejoin_injection_cooldown = 0
+ forced_injection = TRUE
+ message_admins("[key_name(usr)] forced a latejoin injection.", 1)
+ else if (href_list["injectmid"])
+ midround_injection_cooldown = 0
+ forced_injection = TRUE
+ message_admins("[key_name(usr)] forced a midround injection.", 1)
+ else if (href_list["threatlog"])
+ show_threatlog(usr)
+ else if (href_list["stacking_limit"])
+ GLOB.dynamic_stacking_limit = input(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) as num
+
+ admin_panel() // Refreshes the window
+
+// Checks if there are HIGHLANDER_RULESETs and calls the rule's round_result() proc
+/datum/game_mode/dynamic/set_round_result()
+ for(var/datum/dynamic_ruleset/rule in executed_rules)
+ if(rule.flags & HIGHLANDER_RULESET)
+ if(rule.check_finished()) // Only the rule that actually finished the round sets round result.
+ return rule.round_result()
+ // If it got to this part, just pick one highlander if it exists
+ for(var/datum/dynamic_ruleset/rule in executed_rules)
+ if(rule.flags & HIGHLANDER_RULESET)
+ return rule.round_result()
+ return ..()
+
+/datum/game_mode/dynamic/send_intercept()
+ . = "Central Command Status Summary"
+ switch(round(threat_level))
+ if(0 to 19)
+ update_playercounts()
+ if(!current_players[CURRENT_LIVING_ANTAGS].len)
+ . += "Peaceful Waypoint "
+ . += "Your station orbits deep within controlled, core-sector systems and serves as a waypoint for routine traffic through Nanotrasen's trade empire. Due to the combination of high security, interstellar traffic, and low strategic value, it makes any direct threat of violence unlikely. Your primary enemies will be incompetence and bored crewmen: try to organize team-building events to keep staffers interested and productive."
+ else
+ . += "Core Territory "
+ . += "Your station orbits within reliably mundane, secure space. Although Nanotrasen has a firm grip on security in your region, the valuable resources and strategic position aboard your station make it a potential target for infiltrations. Monitor crew for non-loyal behavior, but expect a relatively tame shift free of large-scale destruction. We expect great things from your station."
+ if(20 to 39)
+ . += "Anomalous Exogeology "
+ . += "Although your station lies within what is generally considered Nanotrasen-controlled space, the course of its orbit has caused it to cross unusually close to exogeological features with anomalous readings. Although these features offer opportunities for our research department, it is known that these little understood readings are often correlated with increased activity from competing interstellar organizations and individuals, among them the Wizard Federation and Cult of the Geometer of Blood - all known competitors for Anomaly Type B sites. Exercise elevated caution."
+ if(40 to 65)
+ . += "Contested System "
+ . += "Your station's orbit passes along the edge of Nanotrasen's sphere of influence. While subversive elements remain the most likely threat against your station, hostile organizations are bolder here, where our grip is weaker. Exercise increased caution against elite Syndicate strike forces, or Executives forbid, some kind of ill-conceived unionizing attempt."
+ if(66 to 79)
+ . += "Uncharted Space "
+ . += "Congratulations and thank you for participating in the NT 'Frontier' space program! Your station is actively orbiting a high value system far from the nearest support stations. Little is known about your region of space, and the opportunity to encounter the unknown invites greater glory. You are encouraged to elevate security as necessary to protect Nanotrasen assets."
+ if(80 to 99)
+ . += "Black Orbit "
+ . += "As part of a mandatory security protocol, we are required to inform you that as a result of your orbital pattern directly behind an astrological body (oriented from our nearest observatory), your station will be under decreased monitoring and support. It is anticipated that your extreme location and decreased surveillance could pose security risks. Avoid unnecessary risks and attempt to keep your station in one piece."
+ if(100)
+ . += "Impending Doom "
+ . += "Your station is somehow in the middle of hostile territory, in clear view of any enemy of the corporation. Your likelihood to survive is low, and station destruction is expected and almost inevitable. Secure any sensitive material and neutralize any enemy you will come across. It is important that you at least try to maintain the station. "
+ . += "Good luck."
+
+ if(station_goals.len)
+ . += "Special Orders for [station_name()]:"
+ for(var/datum/station_goal/G in station_goals)
+ G.on_report()
+ . += G.get_report()
+
+ print_command_report(., "Central Command Status Summary", announce=FALSE)
+ priority_announce("A summary has been copied and printed to all communications consoles.", "Security level elevated.", 'sound/ai/intercept.ogg')
+ if(GLOB.security_level < SEC_LEVEL_BLUE)
+ set_security_level(SEC_LEVEL_BLUE)
+
+// Yes, this is copy pasted from game_mode
+/datum/game_mode/dynamic/check_finished(force_ending)
+ if(!SSticker.setup_done || !gamemode_ready)
+ return FALSE
+ if(replacementmode && round_converted == 2)
+ return replacementmode.check_finished()
+ if(SSshuttle.emergency && (SSshuttle.emergency.mode == SHUTTLE_ENDGAME))
+ return TRUE
+ if(station_was_nuked)
+ return TRUE
+ if(force_ending)
+ return TRUE
+ for(var/datum/dynamic_ruleset/rule in executed_rules)
+ if(rule.flags & HIGHLANDER_RULESET)
+ return rule.check_finished()
+
+/datum/game_mode/dynamic/proc/show_threatlog(mob/admin)
+ if(!SSticker.HasRoundStarted())
+ alert("The round hasn't started yet!")
+ return
+
+ if(!check_rights(R_ADMIN))
+ return
+
+ var/list/out = list("Threat LogThreat Log Starting Threat: [threat_level] ")
+
+ for(var/entry in threat_log)
+ if(istext(entry))
+ out += "[entry] "
+
+ out += "Remaining threat/threat_level: [threat]/[threat_level]"
+
+ usr << browse(out.Join(), "window=threatlog;size=700x500")
+
+/// Generates the threat level using lorentz distribution and assigns peaceful_percentage.
+/datum/game_mode/dynamic/proc/generate_threat()
+ var/relative_threat = LORENTZ_DISTRIBUTION(GLOB.dynamic_curve_centre, GLOB.dynamic_curve_width)
+ threat_level = round(lorentz_to_threat(relative_threat), 0.1)
+
+ peaceful_percentage = round(LORENTZ_CUMULATIVE_DISTRIBUTION(relative_threat, GLOB.dynamic_curve_centre, GLOB.dynamic_curve_width), 0.01)*100
+
+ threat = threat_level
+
+/datum/game_mode/dynamic/can_start()
+ /* Disabled for now, had some changes that need to be tested and this might interfere with that.
+ if(GLOB.dynamic_curve_centre == 0)
+ // 10 is when the centre starts to decrease
+ // 6 is just 1 + 5 (from the maximum value and the one decreased)
+ // 1 just makes the curve look better, I don't know.
+ // Limited between 1 and 5 then inverted and rounded
+ // With this you get a centre curve that stays at -5 until 10 then first rapidly decreases but slows down at the end
+ GLOB.dynamic_curve_centre = round(-CLAMP((10*6/GLOB.player_list.len)-1, 0, 5), 0.5)
+ */
+ message_admins("Dynamic mode parameters for the round:")
+ message_admins("Centre is [GLOB.dynamic_curve_centre], Width is [GLOB.dynamic_curve_width], Forced extended is [GLOB.dynamic_forced_extended ? "Enabled" : "Disabled"], No stacking is [GLOB.dynamic_no_stacking ? "Enabled" : "Disabled"].")
+ message_admins("Stacking limit is [GLOB.dynamic_stacking_limit], Classic secret is [GLOB.dynamic_classic_secret ? "Enabled" : "Disabled"], High population limit is [GLOB.dynamic_high_pop_limit].")
+ log_game("DYNAMIC: Dynamic mode parameters for the round:")
+ log_game("DYNAMIC: Centre is [GLOB.dynamic_curve_centre], Width is [GLOB.dynamic_curve_width], Forced extended is [GLOB.dynamic_forced_extended ? "Enabled" : "Disabled"], No stacking is [GLOB.dynamic_no_stacking ? "Enabled" : "Disabled"].")
+ log_game("DYNAMIC: Stacking limit is [GLOB.dynamic_stacking_limit], Classic secret is [GLOB.dynamic_classic_secret ? "Enabled" : "Disabled"], High population limit is [GLOB.dynamic_high_pop_limit].")
+ if(GLOB.dynamic_forced_threat_level >= 0)
+ threat_level = round(GLOB.dynamic_forced_threat_level, 0.1)
+ threat = threat_level
+ else
+ generate_threat()
+
+ var/latejoin_injection_cooldown_middle = 0.5*(GLOB.dynamic_latejoin_delay_max + GLOB.dynamic_latejoin_delay_min)
+ latejoin_injection_cooldown = round(CLAMP(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), GLOB.dynamic_latejoin_delay_min, GLOB.dynamic_latejoin_delay_max)) + world.time
+
+ var/midround_injection_cooldown_middle = 0.5*(GLOB.dynamic_midround_delay_max + GLOB.dynamic_midround_delay_min)
+ midround_injection_cooldown = round(CLAMP(EXP_DISTRIBUTION(midround_injection_cooldown_middle), GLOB.dynamic_midround_delay_min, GLOB.dynamic_midround_delay_max)) + world.time
+ message_admins("Dynamic Mode initialized with a Threat Level of... [threat_level]!")
+ log_game("DYNAMIC: Dynamic Mode initialized with a Threat Level of... [threat_level]!")
+ return TRUE
+
+/datum/game_mode/dynamic/pre_setup()
+ for (var/rule in subtypesof(/datum/dynamic_ruleset))
+ var/datum/dynamic_ruleset/ruleset = new rule()
+ // Simple check if the ruleset should be added to the lists.
+ if(ruleset.name == "")
+ continue
+ switch(ruleset.ruletype)
+ if("Roundstart")
+ roundstart_rules += ruleset
+ if ("Latejoin")
+ latejoin_rules += ruleset
+ if ("Midround")
+ if (ruleset.weight)
+ midround_rules += ruleset
+ for(var/mob/dead/new_player/player in GLOB.player_list)
+ if(player.ready == PLAYER_READY_TO_PLAY && player.mind)
+ roundstart_pop_ready++
+ candidates.Add(player)
+ log_game("DYNAMIC: Listing [roundstart_rules.len] round start rulesets, and [candidates.len] players ready.")
+ if (candidates.len <= 0)
+ return TRUE
+ if (roundstart_rules.len <= 0)
+ return TRUE
+
+ if(GLOB.dynamic_forced_roundstart_ruleset.len > 0)
+ rigged_roundstart()
+ else
+ roundstart()
+
+ var/starting_rulesets = ""
+ for (var/datum/dynamic_ruleset/roundstart/DR in executed_rules)
+ starting_rulesets += "[DR.name], "
+ candidates.Cut()
+ return TRUE
+
+/datum/game_mode/dynamic/post_setup(report)
+ update_playercounts()
+
+ for(var/datum/dynamic_ruleset/roundstart/rule in executed_rules)
+ rule.candidates.Cut() // The rule should not use candidates at this point as they all are null.
+ if(!rule.execute())
+ stack_trace("The starting rule \"[rule.name]\" failed to execute.")
+ ..()
+
+/// A simple roundstart proc used when dynamic_forced_roundstart_ruleset has rules in it.
+/datum/game_mode/dynamic/proc/rigged_roundstart()
+ message_admins("[GLOB.dynamic_forced_roundstart_ruleset.len] rulesets being forced. Will now attempt to draft players for them.")
+ log_game("DYNAMIC: [GLOB.dynamic_forced_roundstart_ruleset.len] rulesets being forced. Will now attempt to draft players for them.")
+ for (var/datum/dynamic_ruleset/roundstart/rule in GLOB.dynamic_forced_roundstart_ruleset)
+ message_admins("Drafting players for forced ruleset [rule.name].")
+ log_game("DYNAMIC: Drafting players for forced ruleset [rule.name].")
+ rule.mode = src
+ rule.candidates = candidates.Copy()
+ rule.trim_candidates()
+ if (rule.ready(TRUE))
+ picking_roundstart_rule(list(rule), forced = TRUE)
+
+/datum/game_mode/dynamic/proc/roundstart()
+ if (GLOB.dynamic_forced_extended)
+ log_game("DYNAMIC: Starting a round of forced extended.")
+ return TRUE
+ var/list/drafted_rules = list()
+ for (var/datum/dynamic_ruleset/roundstart/rule in roundstart_rules)
+ if (rule.acceptable(roundstart_pop_ready, threat_level) && threat >= rule.cost) // If we got the population and threat required
+ rule.candidates = candidates.Copy()
+ rule.trim_candidates()
+ if (rule.ready() && rule.candidates.len > 0)
+ drafted_rules[rule] = rule.weight
+
+ var/indice_pop = min(10,round(roundstart_pop_ready/pop_per_requirement)+1)
+ var/extra_rulesets_amount = 0
+ if (GLOB.dynamic_classic_secret)
+ extra_rulesets_amount = 0
+ else
+ if (roundstart_pop_ready > GLOB.dynamic_high_pop_limit)
+ message_admins("High Population Override is in effect! Threat Level will have more impact on which roles will appear, and player population less.")
+ log_game("DYNAMIC: High Population Override is in effect! Threat Level will have more impact on which roles will appear, and player population less.")
+ if (threat_level > high_pop_second_rule_req)
+ extra_rulesets_amount++
+ if (threat_level > high_pop_third_rule_req)
+ extra_rulesets_amount++
+ else
+ if (threat_level >= second_rule_req[indice_pop])
+ extra_rulesets_amount++
+ if (threat_level >= third_rule_req[indice_pop])
+ extra_rulesets_amount++
+
+ if (drafted_rules.len > 0 && picking_roundstart_rule(drafted_rules))
+ if (extra_rulesets_amount > 0) // We've got enough population and threat for a second rulestart rule
+ for (var/datum/dynamic_ruleset/roundstart/rule in drafted_rules)
+ if (rule.cost > threat)
+ drafted_rules -= rule
+ if (drafted_rules.len > 0 && picking_roundstart_rule(drafted_rules))
+ if (extra_rulesets_amount > 1) // We've got enough population and threat for a third rulestart rule
+ for (var/datum/dynamic_ruleset/roundstart/rule in drafted_rules)
+ if (rule.cost > threat)
+ drafted_rules -= rule
+ picking_roundstart_rule(drafted_rules)
+ else
+ return FALSE
+ return TRUE
+
+/// Picks a random roundstart rule from the list given as an argument and executes it.
+/datum/game_mode/dynamic/proc/picking_roundstart_rule(list/drafted_rules = list(), forced = FALSE)
+ var/datum/dynamic_ruleset/roundstart/starting_rule = pickweight(drafted_rules)
+ if(!starting_rule)
+ return FALSE
+
+ if(!forced)
+ if(only_ruleset_executed)
+ return FALSE
+ // Check if a blocking ruleset has been executed.
+ else if(check_blocking(starting_rule.blocking_rules, executed_rules))
+ drafted_rules -= starting_rule
+ if(drafted_rules.len <= 0)
+ return FALSE
+ starting_rule = pickweight(drafted_rules)
+ // Check if the ruleset is highlander and if a highlander ruleset has been executed
+ else if(starting_rule.flags & HIGHLANDER_RULESET)
+ if(threat < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking)
+ if(highlander_executed)
+ drafted_rules -= starting_rule
+ if(drafted_rules.len <= 0)
+ return FALSE
+ starting_rule = pickweight(drafted_rules)
+
+ message_admins("Picking a [istype(starting_rule, /datum/dynamic_ruleset/roundstart/delayed/) ? " delayed " : ""] ruleset [starting_rule.name]")
+ log_game("DYNAMIC: Picking a [istype(starting_rule, /datum/dynamic_ruleset/roundstart/delayed/) ? " delayed " : ""] ruleset [starting_rule.name]")
+
+ roundstart_rules -= starting_rule
+ drafted_rules -= starting_rule
+
+ if (istype(starting_rule, /datum/dynamic_ruleset/roundstart/delayed/))
+ var/datum/dynamic_ruleset/roundstart/delayed/rule = starting_rule
+ addtimer(CALLBACK(src, .proc/execute_delayed, rule), rule.delay)
+
+ starting_rule.trim_candidates()
+ if (starting_rule.pre_execute())
+ spend_threat(starting_rule.cost)
+ threat_log += "[worldtime2text()]: Roundstart [starting_rule.name] spent [starting_rule.cost]"
+ if(starting_rule.flags & HIGHLANDER_RULESET)
+ highlander_executed = TRUE
+ else if(starting_rule.flags & ONLY_RULESET)
+ only_ruleset_executed = TRUE
+ executed_rules += starting_rule
+ if (starting_rule.persistent)
+ current_rules += starting_rule
+ for(var/mob/M in starting_rule.assigned)
+ for (var/datum/dynamic_ruleset/roundstart/rule in roundstart_rules)
+ if (!rule.ready())
+ drafted_rules -= rule // And removing rules that are no longer elligible
+ return TRUE
+ else
+ stack_trace("The starting rule \"[starting_rule.name]\" failed to pre_execute.")
+ return FALSE
+
+/// Executes delayed roundstart rules and has a hack in it.
+/datum/game_mode/dynamic/proc/execute_delayed(datum/dynamic_ruleset/roundstart/delayed/rule)
+ update_playercounts()
+ rule.candidates = current_players[CURRENT_LIVING_PLAYERS].Copy()
+ rule.trim_candidates()
+ if(rule.execute())
+ executed_rules += rule
+ if (rule.persistent)
+ current_rules += rule
+ return TRUE
+ else
+ stack_trace("The delayed roundstart rule \"[rule.name]\" failed to execute.")
+ return FALSE
+
+/// Picks a random midround OR latejoin rule from the list given as an argument and executes it.
+/// Also this could be named better.
+/datum/game_mode/dynamic/proc/picking_midround_latejoin_rule(list/drafted_rules = list(), forced = FALSE)
+ var/datum/dynamic_ruleset/rule = pickweight(drafted_rules)
+ if(!rule)
+ return FALSE
+
+ if(!forced)
+ if(only_ruleset_executed)
+ return FALSE
+ // Check if a blocking ruleset has been executed.
+ else if(check_blocking(rule.blocking_rules, executed_rules))
+ drafted_rules -= rule
+ if(drafted_rules.len <= 0)
+ return FALSE
+ rule = pickweight(drafted_rules)
+ // Check if the ruleset is highlander and if a highlander ruleset has been executed
+ else if(rule.flags & HIGHLANDER_RULESET)
+ if(threat < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking)
+ if(highlander_executed)
+ drafted_rules -= rule
+ if(drafted_rules.len <= 0)
+ return FALSE
+ rule = pickweight(drafted_rules)
+
+ if(!rule.repeatable)
+ if(rule.ruletype == "Latejoin")
+ latejoin_rules = remove_from_list(latejoin_rules, rule.type)
+ else if(rule.type == "Midround")
+ midround_rules = remove_from_list(midround_rules, rule.type)
+
+ if (rule.execute())
+ log_game("DYNAMIC: Injected a [rule.ruletype == "latejoin" ? "latejoin" : "midround"] ruleset [rule.name].")
+ spend_threat(rule.cost)
+ threat_log += "[worldtime2text()]: [rule.ruletype] [rule.name] spent [rule.cost]"
+ if(rule.flags & HIGHLANDER_RULESET)
+ highlander_executed = TRUE
+ else if(rule.flags & ONLY_RULESET)
+ only_ruleset_executed = TRUE
+ if(rule.ruletype == "Latejoin")
+ var/mob/M = pick(rule.candidates)
+ message_admins("[key_name(M)] joined the station, and was selected by the [rule.name] ruleset.")
+ log_game("DYNAMIC: [key_name(M)] joined the station, and was selected by the [rule.name] ruleset.")
+ executed_rules += rule
+ rule.candidates.Cut()
+ if (rule.persistent)
+ current_rules += rule
+ return TRUE
+ else
+ stack_trace("The [rule.ruletype] rule \"[rule.name]\" failed to execute.")
+ return FALSE
+
+/// An experimental proc to allow admins to call rules on the fly or have rules call other rules.
+/datum/game_mode/dynamic/proc/picking_specific_rule(ruletype, forced = FALSE)
+ var/datum/dynamic_ruleset/midround/new_rule
+ if(ispath(ruletype))
+ new_rule = new ruletype() // You should only use it to call midround rules though.
+ else if(istype(ruletype, /datum/dynamic_ruleset))
+ new_rule = ruletype
+ else
+ return FALSE
+
+ if(!new_rule)
+ return FALSE
+
+ if(!forced)
+ if(only_ruleset_executed)
+ return FALSE
+ // Check if a blocking ruleset has been executed.
+ else if(check_blocking(new_rule.blocking_rules, executed_rules))
+ return FALSE
+ // Check if the ruleset is highlander and if a highlander ruleset has been executed
+ else if(new_rule.flags & HIGHLANDER_RULESET)
+ if(threat < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking)
+ if(highlander_executed)
+ return FALSE
+
+ update_playercounts()
+ if ((forced || (new_rule.acceptable(current_players[CURRENT_LIVING_PLAYERS].len, threat_level) && new_rule.cost <= threat)))
+ new_rule.candidates = current_players.Copy()
+ new_rule.trim_candidates()
+ if (new_rule.ready(forced))
+ spend_threat(new_rule.cost)
+ threat_log += "[worldtime2text()]: Forced rule [new_rule.name] spent [new_rule.cost]"
+ if (new_rule.execute()) // This should never fail since ready() returned 1
+ if(new_rule.flags & HIGHLANDER_RULESET)
+ highlander_executed = TRUE
+ else if(new_rule.flags & ONLY_RULESET)
+ only_ruleset_executed = TRUE
+ log_game("DYNAMIC: Making a call to a specific ruleset...[new_rule.name]!")
+ executed_rules += new_rule
+ if (new_rule.persistent)
+ current_rules += new_rule
+ return TRUE
+ else if (forced)
+ log_game("DYNAMIC: The ruleset [new_rule.name] couldn't be executed due to lack of elligible players.")
+ return FALSE
+
+/datum/game_mode/dynamic/process()
+ if (pop_last_updated < world.time - (60 SECONDS))
+ pop_last_updated = world.time
+ update_playercounts()
+
+ for (var/datum/dynamic_ruleset/rule in current_rules)
+ if(rule.rule_process() == RULESET_STOP_PROCESSING) // If rule_process() returns 1 (RULESET_STOP_PROCESSING), stop processing.
+ current_rules -= rule
+
+ if (midround_injection_cooldown < world.time)
+ if (GLOB.dynamic_forced_extended)
+ return
+
+ // Somehow it manages to trigger midround multiple times so this was moved here.
+ // There is no way this should be able to trigger an injection twice now.
+ var/midround_injection_cooldown_middle = 0.5*(GLOB.dynamic_midround_delay_max + GLOB.dynamic_midround_delay_min)
+ midround_injection_cooldown = (round(CLAMP(EXP_DISTRIBUTION(midround_injection_cooldown_middle), GLOB.dynamic_midround_delay_min, GLOB.dynamic_midround_delay_max)) + world.time)
+
+ // Time to inject some threat into the round
+ if(EMERGENCY_ESCAPED_OR_ENDGAMED) // Unless the shuttle is gone
+ return
+
+ log_game("DYNAMIC: Checking state of the round.")
+
+ update_playercounts()
+
+ if (prob(get_injection_chance()))
+ var/list/drafted_rules = list()
+ for (var/datum/dynamic_ruleset/midround/rule in midround_rules)
+ if (rule.acceptable(current_players[CURRENT_LIVING_PLAYERS].len, threat_level) && threat >= rule.cost)
+ // Classic secret : only autotraitor/minor roles
+ if (GLOB.dynamic_classic_secret && !((rule.flags & TRAITOR_RULESET) || (rule.flags & MINOR_RULESET)))
+ continue
+ rule.candidates = list()
+ rule.candidates = current_players.Copy()
+ rule.trim_candidates()
+ if (rule.ready() && rule.candidates.len > 0)
+ drafted_rules[rule] = rule.get_weight()
+ if (drafted_rules.len > 0)
+ picking_midround_latejoin_rule(drafted_rules)
+
+/// Updates current_players.
+/datum/game_mode/dynamic/proc/update_playercounts()
+ current_players[CURRENT_LIVING_PLAYERS] = list()
+ current_players[CURRENT_LIVING_ANTAGS] = list()
+ current_players[CURRENT_DEAD_PLAYERS] = list()
+ current_players[CURRENT_OBSERVERS] = list()
+ for (var/mob/M in GLOB.player_list)
+ if (istype(M, /mob/dead/new_player))
+ continue
+ if (M.stat != DEAD)
+ current_players[CURRENT_LIVING_PLAYERS].Add(M)
+ if (M.mind && (M.mind.special_role || M.mind.antag_datums?.len > 0))
+ current_players[CURRENT_LIVING_ANTAGS].Add(M)
+ else
+ if (istype(M,/mob/dead/observer))
+ var/mob/dead/observer/O = M
+ if (O.started_as_observer) // Observers
+ current_players[CURRENT_OBSERVERS].Add(M)
+ continue
+ current_players[CURRENT_DEAD_PLAYERS].Add(M) // Players who actually died (and admins who ghosted, would be nice to avoid counting them somehow)
+
+/// Gets the chance for latejoin and midround injection, the dry_run argument is only used for forced injection.
+/datum/game_mode/dynamic/proc/get_injection_chance(dry_run = FALSE)
+ if(forced_injection)
+ forced_injection = !dry_run
+ return 100
+ var/chance = 0
+ // If the high pop override is in effect, we reduce the impact of population on the antag injection chance
+ var/high_pop_factor = (current_players[CURRENT_LIVING_PLAYERS].len >= GLOB.dynamic_high_pop_limit)
+ var/max_pop_per_antag = max(5,15 - round(threat_level/10) - round(current_players[CURRENT_LIVING_PLAYERS].len/(high_pop_factor ? 10 : 5)))
+ if (!current_players[CURRENT_LIVING_ANTAGS].len)
+ chance += 50 // No antags at all? let's boost those odds!
+ else
+ var/current_pop_per_antag = current_players[CURRENT_LIVING_PLAYERS].len / current_players[CURRENT_LIVING_ANTAGS].len
+ if (current_pop_per_antag > max_pop_per_antag)
+ chance += min(50, 25+10*(current_pop_per_antag-max_pop_per_antag))
+ else
+ chance += 25-10*(max_pop_per_antag-current_pop_per_antag)
+ if (current_players[CURRENT_DEAD_PLAYERS].len > current_players[CURRENT_LIVING_PLAYERS].len)
+ chance -= 30 // More than half the crew died? ew, let's calm down on antags
+ if (threat > 70)
+ chance += 15
+ if (threat < 30)
+ chance -= 15
+ return round(max(0,chance))
+
+/// Removes type from the list
+/datum/game_mode/dynamic/proc/remove_from_list(list/type_list, type)
+ for(var/I in type_list)
+ if(istype(I, type))
+ type_list -= I
+ return type_list
+
+/// Checks if a type in blocking_list is in rule_list.
+/datum/game_mode/dynamic/proc/check_blocking(list/blocking_list, list/rule_list)
+ if(blocking_list.len > 0)
+ for(var/blocking in blocking_list)
+ for(var/datum/executed in rule_list)
+ if(blocking == executed.type)
+ return TRUE
+ return FALSE
+
+/// Checks if client age is age or older.
+/datum/game_mode/dynamic/proc/check_age(client/C, age)
+ enemy_minimum_age = age
+ if(get_remaining_days(C) == 0)
+ enemy_minimum_age = initial(enemy_minimum_age)
+ return TRUE // Available in 0 days = available right now = player is old enough to play.
+ enemy_minimum_age = initial(enemy_minimum_age)
+ return FALSE
+
+/datum/game_mode/dynamic/make_antag_chance(mob/living/carbon/human/newPlayer)
+ if (GLOB.dynamic_forced_extended)
+ return
+ if(EMERGENCY_ESCAPED_OR_ENDGAMED) // No more rules after the shuttle has left
+ return
+
+ update_playercounts()
+
+ if (forced_latejoin_rule)
+ forced_latejoin_rule.candidates = list(newPlayer)
+ forced_latejoin_rule.trim_candidates()
+ log_game("DYNAMIC: Forcing ruleset [forced_latejoin_rule]")
+ if (forced_latejoin_rule.ready(TRUE))
+ picking_midround_latejoin_rule(list(forced_latejoin_rule), forced = TRUE)
+ forced_latejoin_rule = null
+
+ else if (latejoin_injection_cooldown < world.time && prob(get_injection_chance()))
+ var/list/drafted_rules = list()
+ for (var/datum/dynamic_ruleset/latejoin/rule in latejoin_rules)
+ if (rule.acceptable(current_players[CURRENT_LIVING_PLAYERS].len, threat_level) && threat >= rule.cost)
+ // Classic secret : only autotraitor/minor roles
+ if (GLOB.dynamic_classic_secret && !((rule.flags & TRAITOR_RULESET) || (rule.flags & MINOR_RULESET)))
+ continue
+ // No stacking : only one round-enter, unless > stacking_limit threat.
+ if (threat < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking)
+ if(rule.flags & HIGHLANDER_RULESET && highlander_executed)
+ continue
+
+ rule.candidates = list(newPlayer)
+ rule.trim_candidates()
+ if (rule.ready())
+ drafted_rules[rule] = rule.get_weight()
+
+ if (drafted_rules.len > 0 && picking_midround_latejoin_rule(drafted_rules))
+ var/latejoin_injection_cooldown_middle = 0.5*(GLOB.dynamic_latejoin_delay_max + GLOB.dynamic_latejoin_delay_min)
+ latejoin_injection_cooldown = round(CLAMP(EXP_DISTRIBUTION(latejoin_injection_cooldown_middle), GLOB.dynamic_latejoin_delay_min, GLOB.dynamic_latejoin_delay_max)) + world.time
+
+/// Refund threat, but no more than threat_level.
+/datum/game_mode/dynamic/proc/refund_threat(regain)
+ threat = min(threat_level,threat+regain)
+
+/// Generate threat and increase the threat_level if it goes beyond, capped at 100
+/datum/game_mode/dynamic/proc/create_threat(gain)
+ threat = min(100, threat+gain)
+ if(threat > threat_level)
+ threat_level = threat
+
+/// Expend threat, can't fall under 0.
+/datum/game_mode/dynamic/proc/spend_threat(cost)
+ threat = max(threat-cost,0)
+
+/// Turns the value generated by lorentz distribution to threat value between 0 and 100.
+/datum/game_mode/dynamic/proc/lorentz_to_threat(x)
+ switch (x)
+ if (-INFINITY to -20)
+ return rand(0, 10)
+ if (-20 to -10)
+ return RULE_OF_THREE(-40, -20, x) + 50
+ if (-10 to -5)
+ return RULE_OF_THREE(-30, -10, x) + 50
+ if (-5 to -2.5)
+ return RULE_OF_THREE(-20, -5, x) + 50
+ if (-2.5 to -0)
+ return RULE_OF_THREE(-10, -2.5, x) + 50
+ if (0 to 2.5)
+ return RULE_OF_THREE(10, 2.5, x) + 50
+ if (2.5 to 5)
+ return RULE_OF_THREE(20, 5, x) + 50
+ if (5 to 10)
+ return RULE_OF_THREE(30, 10, x) + 50
+ if (10 to 20)
+ return RULE_OF_THREE(40, 20, x) + 50
+ if (20 to INFINITY)
+ return rand(90, 100)
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets.dm b/code/game/gamemodes/dynamic/dynamic_rulesets.dm
new file mode 100644
index 0000000000..66afcbfb92
--- /dev/null
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets.dm
@@ -0,0 +1,211 @@
+/datum/dynamic_ruleset
+ /// For admin logging and round end screen.
+ var/name = ""
+ /// For admin logging and round end screen, do not change this unless making a new rule type.
+ var/ruletype = ""
+ /// If set to TRUE, the rule won't be discarded after being executed, and dynamic will call rule_process() every time it ticks.
+ var/persistent = FALSE
+ /// If set to TRUE, dynamic mode will be able to draft this ruleset again later on. (doesn't apply for roundstart rules)
+ var/repeatable = FALSE
+ /// If set higher than 0 decreases weight by itself causing the ruleset to appear less often the more it is repeated.
+ var/repeatable_weight_decrease = 2
+ /// List of players that are being drafted for this rule
+ var/list/mob/candidates = list()
+ /// List of players that were selected for this rule
+ var/list/datum/mind/assigned = list()
+ /// Preferences flag such as ROLE_WIZARD that need to be turned on for players to be antag
+ var/antag_flag = null
+ /// The antagonist datum that is assigned to the mobs mind on ruleset execution.
+ var/datum/antagonist/antag_datum = null
+ /// The required minimum account age for this ruleset.
+ var/minimum_required_age = 7
+ /// If set, and config flag protect_roles_from_antagonist is false, then the rule will not pick players from these roles.
+ var/list/protected_roles = list()
+ /// If set, rule will deny candidates from those roles always.
+ var/list/restricted_roles = list()
+ /// If set, rule will only accept candidates from those roles, IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.
+ var/list/exclusive_roles = list()
+ /// If set, there needs to be a certain amount of players doing those roles (among the players who won't be drafted) for the rule to be drafted IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.
+ var/list/enemy_roles = list()
+ /// If enemy_roles was set, this is the amount of enemy job workers needed per threat_level range (0-10,10-20,etc) IMPORTANT: DOES NOT WORK ON ROUNDSTART RULESETS.
+ var/required_enemies = list(1,1,0,0,0,0,0,0,0,0)
+ /// The rule needs this many candidates (post-trimming) to be executed (example: Cult needs 4 players at round start)
+ var/required_candidates = 0
+ /// 1 -> 9, probability for this rule to be picked against other rules
+ var/weight = 5
+ /// Threat cost for this rule, this is decreased from the mode's threat when the rule is executed.
+ var/cost = 0
+ /// A flag that determines how the ruleset is handled
+ /// HIGHLANDER_RULESET are rulesets can end the round.
+ /// TRAITOR_RULESET and MINOR_RULESET can't end the round and have no difference right now.
+ var/flags = 0
+ /// Pop range per requirement. If zero defaults to mode's pop_per_requirement.
+ var/pop_per_requirement = 0
+ /// Requirements are the threat level requirements per pop range.
+ /// With the default values, The rule will never get drafted below 10 threat level (aka: "peaceful extended"), and it requires a higher threat level at lower pops.
+ var/list/requirements = list(40,30,20,10,10,10,10,10,10,10)
+ /// An alternative, static requirement used instead when pop is over mode's high_pop_limit.
+ var/high_population_requirement = 10
+ /// Reference to the mode, use this instead of SSticker.mode.
+ var/datum/game_mode/dynamic/mode = null
+ /// If a role is to be considered another for the purpose of banning.
+ var/antag_flag_override = null
+ /// If a ruleset type which is in this list has been executed, then the ruleset will not be executed.
+ var/list/blocking_rules = list()
+ /// The minimum amount of players required for the rule to be considered.
+ var/minimum_players = 0
+ /// The maximum amount of players required for the rule to be considered.
+ /// Anything below zero or exactly zero is ignored.
+ var/maximum_players = 0
+
+
+/datum/dynamic_ruleset/New()
+ ..()
+ if(CONFIG_GET(flag/protect_roles_from_antagonist))
+ restricted_roles += protected_roles
+ if(CONFIG_GET(flag/protect_assistant_from_antagonist))
+ restricted_roles += "Assistant"
+
+ if (istype(SSticker.mode, /datum/game_mode/dynamic))
+ mode = SSticker.mode
+ else if (GLOB.master_mode != "dynamic") // This is here to make roundstart forced ruleset function.
+ qdel(src)
+
+/datum/dynamic_ruleset/roundstart // One or more of those drafted at roundstart
+ ruletype = "Roundstart"
+
+/datum/dynamic_ruleset/roundstart/delayed/ // Executed with a 30 seconds delay
+ var/delay = 30 SECONDS
+ var/required_type = /mob/living/carbon/human // No ghosts, new players or silicons allowed.
+
+// Can be drafted when a player joins the server
+/datum/dynamic_ruleset/latejoin
+ ruletype = "Latejoin"
+
+/// By default, a rule is acceptable if it satisfies the threat level/population requirements.
+/// If your rule has extra checks, such as counting security officers, do that in ready() instead
+/datum/dynamic_ruleset/proc/acceptable(population = 0, threat_level = 0)
+ if(minimum_players > population)
+ return FALSE
+ if(maximum_players > 0 && population > maximum_players)
+ return FALSE
+ if (population >= GLOB.dynamic_high_pop_limit)
+ return (threat_level >= high_population_requirement)
+ else
+ pop_per_requirement = pop_per_requirement > 0 ? pop_per_requirement : mode.pop_per_requirement
+ var/indice_pop = min(10,round(population/pop_per_requirement)+1)
+ return (threat_level >= requirements[indice_pop])
+
+/// This is called if persistent variable is true everytime SSTicker ticks.
+/datum/dynamic_ruleset/proc/rule_process()
+ return
+
+/// Called on game mode pre_setup, used for non-delayed roundstart rulesets only.
+/// Do everything you need to do before job is assigned here.
+/// IMPORTANT: ASSIGN special_role HERE
+/datum/dynamic_ruleset/proc/pre_execute()
+ return TRUE
+
+/// Called on post_setup on roundstart and when the rule executes on midround and latejoin.
+/// Give your candidates or assignees equipment and antag datum here.
+/datum/dynamic_ruleset/proc/execute()
+ for(var/datum/mind/M in assigned)
+ M.add_antag_datum(antag_datum)
+ return TRUE
+
+/// Called after delay set in ruleset.
+/// Give your candidates or assignees equipment and antag datum here.
+/datum/dynamic_ruleset/roundstart/delayed/execute()
+ if (SSticker && SSticker.current_state < GAME_STATE_PLAYING)
+ CRASH("The delayed ruleset [name] executed before the round started.")
+
+/// Here you can perform any additional checks you want. (such as checking the map etc)
+/// Remember that on roundstart no one knows what their job is at this point.
+/// IMPORTANT: If ready() returns TRUE, that means pre_execute() or execute() should never fail!
+/datum/dynamic_ruleset/proc/ready(forced = 0)
+ if (required_candidates > candidates.len)
+ return FALSE
+ return TRUE
+
+/// Gets weight of the ruleset
+/// Note that this decreases weight if repeatable is TRUE and repeatable_weight_decrease is higher than 0
+/// Note: If you don't want repeatable rulesets to decrease their weight use the weight variable directly
+/datum/dynamic_ruleset/proc/get_weight()
+ if(repeatable && weight > 1 && repeatable_weight_decrease > 0)
+ for(var/datum/dynamic_ruleset/DR in mode.executed_rules)
+ if(istype(DR, type))
+ weight = max(weight-repeatable_weight_decrease,1)
+ return weight
+
+/// Here you can remove candidates that do not meet your requirements.
+/// This means if their job is not correct or they have disconnected you can remove them from candidates here.
+/// Usually this does not need to be changed unless you need some specific requirements from your candidates.
+/datum/dynamic_ruleset/proc/trim_candidates()
+ return
+
+/// Counts how many players are ready at roundstart.
+/// Used only by non-delayed roundstart rulesets.
+/datum/dynamic_ruleset/proc/num_players()
+ . = 0
+ for(var/mob/dead/new_player/P in GLOB.player_list)
+ if(P.client && P.ready == PLAYER_READY_TO_PLAY)
+ . ++
+
+/// Set mode result and news report here.
+/// Only called if ruleset is flagged as HIGHLANDER_RULESET
+/datum/dynamic_ruleset/proc/round_result()
+
+/// Checks if round is finished, return true to end the round.
+/// Only called if ruleset is flagged as HIGHLANDER_RULESET
+/datum/dynamic_ruleset/proc/check_finished()
+ return FALSE
+
+//////////////////////////////////////////////
+// //
+// ROUNDSTART RULESETS //
+// //
+//////////////////////////////////////////////
+
+/// Checks if candidates are connected and if they are banned or don't want to be the antagonist.
+/datum/dynamic_ruleset/roundstart/trim_candidates()
+ for(var/mob/dead/new_player/P in candidates)
+ if (!P.client || !P.mind) // Are they connected?
+ candidates.Remove(P)
+ continue
+ if(!mode.check_age(P.client, minimum_required_age))
+ candidates.Remove(P)
+ continue
+ if(P.mind.special_role) // We really don't want to give antag to an antag.
+ candidates.Remove(P)
+ continue
+ if (!(antag_flag in P.client.prefs.be_special) || jobban_isbanned(P.ckey, list(antag_flag, ROLE_SYNDICATE)) || (antag_flag_override && jobban_isbanned(P.ckey, list(antag_flag_override, ROLE_SYNDICATE))))//are they willing and not antag-banned?
+ candidates.Remove(P)
+ continue
+
+/// Checks if candidates are required mob type, connected, banned and if the job is exclusive to the role.
+/datum/dynamic_ruleset/roundstart/delayed/trim_candidates()
+ . = ..()
+ for (var/mob/P in candidates)
+ if (!istype(P, required_type))
+ candidates.Remove(P) // Can be a new_player, etc.
+ continue
+ if(!mode.check_age(P.client, minimum_required_age))
+ candidates.Remove(P)
+ continue
+ if (!P.client || !P.mind || !P.mind.assigned_role) // Are they connected?
+ candidates.Remove(P)
+ continue
+ if(P.mind.special_role || P.mind.antag_datums?.len > 0) // Are they an antag already?
+ candidates.Remove(P)
+ continue
+ if (!(antag_flag in P.client.prefs.be_special) || jobban_isbanned(P.ckey, list(antag_flag, ROLE_SYNDICATE)) || (antag_flag_override && jobban_isbanned(P.ckey, list(antag_flag_override, ROLE_SYNDICATE))))//are they willing and not antag-banned?
+ candidates.Remove(P)
+ continue
+ if ((exclusive_roles.len > 0) && !(P.mind.assigned_role in exclusive_roles)) // Is the rule exclusive to their job?
+ candidates.Remove(P)
+ continue
+
+/// Do your checks if the ruleset is ready to be executed here.
+/// Should ignore certain checks if forced is TRUE
+/datum/dynamic_ruleset/roundstart/ready(forced = FALSE)
+ return ..()
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm
new file mode 100644
index 0000000000..24b4c67357
--- /dev/null
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets_latejoin.dm
@@ -0,0 +1,110 @@
+//////////////////////////////////////////////
+// //
+// LATEJOIN RULESETS //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/latejoin/trim_candidates()
+ for(var/mob/P in candidates)
+ if (!P.client || !P.mind || !P.mind.assigned_role) // Are they connected?
+ candidates.Remove(P)
+ continue
+ if(!mode.check_age(P.client, minimum_required_age))
+ candidates.Remove(P)
+ continue
+ if (!(antag_flag in P.client.prefs.be_special) || jobban_isbanned(P.ckey, list(antag_flag, ROLE_SYNDICATE)) || (antag_flag_override && jobban_isbanned(P.ckey, list(antag_flag_override))))//are they willing and not antag-banned?
+ candidates.Remove(P)
+ continue
+ if (P.mind.assigned_role in restricted_roles) // Does their job allow for it?
+ candidates.Remove(P)
+ continue
+ if ((exclusive_roles.len > 0) && !(P.mind.assigned_role in exclusive_roles)) // Is the rule exclusive to their job?
+ candidates.Remove(P)
+ continue
+
+/datum/dynamic_ruleset/latejoin/ready(forced = 0)
+ if (!forced)
+ var/job_check = 0
+ if (enemy_roles.len > 0)
+ for (var/mob/M in mode.current_players[CURRENT_LIVING_PLAYERS])
+ if (M.stat == DEAD)
+ continue // Dead players cannot count as opponents
+ if (M.mind && M.mind.assigned_role && (M.mind.assigned_role in enemy_roles) && (!(M in candidates) || (M.mind.assigned_role in restricted_roles)))
+ job_check++ // Checking for "enemies" (such as sec officers). To be counters, they must either not be candidates to that rule, or have a job that restricts them from it
+
+ var/threat = round(mode.threat_level/10)
+ if (job_check < required_enemies[threat])
+ return FALSE
+ return ..()
+
+/datum/dynamic_ruleset/latejoin/execute()
+ var/mob/M = pick(candidates)
+ assigned += M.mind
+ M.mind.special_role = antag_flag
+ M.mind.add_antag_datum(antag_datum)
+ return TRUE
+
+//////////////////////////////////////////////
+// //
+// SYNDICATE TRAITORS //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/latejoin/infiltrator
+ name = "Syndicate Infiltrator"
+ antag_datum = /datum/antagonist/traitor
+ antag_flag = ROLE_TRAITOR
+ restricted_roles = list("AI", "Cyborg")
+ protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
+ required_candidates = 1
+ weight = 7
+ cost = 5
+ requirements = list(40,30,20,10,10,10,10,10,10,10)
+ high_population_requirement = 10
+ repeatable = TRUE
+ flags = TRAITOR_RULESET
+
+//////////////////////////////////////////////
+// //
+// REVOLUTIONARY PROVOCATEUR //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/latejoin/provocateur
+ name = "Provocateur"
+ antag_datum = /datum/antagonist/rev/head
+ antag_flag = ROLE_REV_HEAD
+ antag_flag_override = ROLE_REV
+ restricted_roles = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
+ enemy_roles = list("AI", "Cyborg", "Security Officer","Detective","Head of Security", "Captain", "Warden")
+ required_enemies = list(2,2,1,1,1,1,1,0,0,0)
+ required_candidates = 1
+ weight = 2
+ cost = 20
+ requirements = list(101,101,70,40,30,20,20,20,20,20)
+ high_population_requirement = 50
+ flags = HIGHLANDER_RULESET
+ var/required_heads = 3
+
+/datum/dynamic_ruleset/latejoin/provocateur/ready(forced=FALSE)
+ if (forced)
+ required_heads = 1
+ if(!..())
+ return FALSE
+ var/head_check = 0
+ for(var/mob/player in mode.current_players[CURRENT_LIVING_PLAYERS])
+ if (player.mind.assigned_role in GLOB.command_positions)
+ head_check++
+ return (head_check >= required_heads)
+
+/datum/dynamic_ruleset/latejoin/provocateur/execute()
+ var/mob/M = pick(candidates)
+ assigned += M.mind
+ M.mind.special_role = antag_flag
+ var/datum/antagonist/rev/head/new_head = new()
+ new_head.give_flash = TRUE
+ new_head.give_hud = TRUE
+ new_head.remove_clumsy = TRUE
+ new_head = M.mind.add_antag_datum(new_head)
+ new_head.rev_team.max_headrevs = 1 // Only one revhead if it is latejoin.
+ return TRUE
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm
new file mode 100644
index 0000000000..2acef4f06b
--- /dev/null
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm
@@ -0,0 +1,460 @@
+//////////////////////////////////////////////
+// //
+// MIDROUND RULESETS //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/midround // Can be drafted once in a while during a round
+ ruletype = "Midround"
+ /// If the ruleset should be restricted from ghost roles.
+ var/restrict_ghost_roles = TRUE
+ /// What type the ruleset is restricted to.
+ var/required_type = /mob/living/carbon/human
+ var/list/living_players = list()
+ var/list/living_antags = list()
+ var/list/dead_players = list()
+ var/list/list_observers = list()
+
+/datum/dynamic_ruleset/midround/from_ghosts
+ weight = 0
+ /// Whether the ruleset should call generate_ruleset_body or not.
+ var/makeBody = TRUE
+
+/datum/dynamic_ruleset/midround/trim_candidates()
+ // Unlike the previous two types, these rulesets are not meant for /mob/dead/new_player
+ // And since I want those rulesets to be as flexible as possible, I'm not gonna put much here,
+ //
+ // All you need to know is that here, the candidates list contains 4 lists itself, indexed with the following defines:
+ // Candidates = list(CURRENT_LIVING_PLAYERS, CURRENT_LIVING_ANTAGS, CURRENT_DEAD_PLAYERS, CURRENT_OBSERVERS)
+ // So for example you can get the list of all current dead players with var/list/dead_players = candidates[CURRENT_DEAD_PLAYERS]
+ // Make sure to properly typecheck the mobs in those lists, as the dead_players list could contain ghosts, or dead players still in their bodies.
+ // We're still gonna trim the obvious (mobs without clients, jobbanned players, etc)
+ living_players = trim_list(mode.current_players[CURRENT_LIVING_PLAYERS])
+ living_antags = trim_list(mode.current_players[CURRENT_LIVING_ANTAGS])
+ dead_players = trim_list(mode.current_players[CURRENT_DEAD_PLAYERS])
+ list_observers = trim_list(mode.current_players[CURRENT_OBSERVERS])
+
+/datum/dynamic_ruleset/midround/proc/trim_list(list/L = list())
+ var/list/trimmed_list = L.Copy()
+ var/antag_name = initial(antag_flag)
+ for(var/mob/M in trimmed_list)
+ if (!istype(M, required_type))
+ trimmed_list.Remove(M)
+ continue
+ if (!M.client) // Are they connected?
+ trimmed_list.Remove(M)
+ continue
+ if(!mode.check_age(M.client, minimum_required_age))
+ trimmed_list.Remove(M)
+ continue
+ if (!(antag_name in M.client.prefs.be_special) || jobban_isbanned(M.ckey, list(antag_name, ROLE_SYNDICATE)))//are they willing and not antag-banned?
+ trimmed_list.Remove(M)
+ continue
+ if (M.mind)
+ if (restrict_ghost_roles && M.mind.assigned_role in GLOB.exp_specialmap[EXP_TYPE_SPECIAL]) // Are they playing a ghost role?
+ trimmed_list.Remove(M)
+ continue
+ if (M.mind.assigned_role in restricted_roles || HAS_TRAIT(M, TRAIT_MINDSHIELD)) // Does their job allow it or are they mindshielded?
+ trimmed_list.Remove(M)
+ continue
+ if ((exclusive_roles.len > 0) && !(M.mind.assigned_role in exclusive_roles)) // Is the rule exclusive to their job?
+ trimmed_list.Remove(M)
+ continue
+ return trimmed_list
+
+// You can then for example prompt dead players in execute() to join as strike teams or whatever
+// Or autotator someone
+
+// IMPORTANT, since /datum/dynamic_ruleset/midround may accept candidates from both living, dead, and even antag players, you need to manually check whether there are enough candidates
+// (see /datum/dynamic_ruleset/midround/autotraitor/ready(var/forced = FALSE) for example)
+/datum/dynamic_ruleset/midround/ready(forced = FALSE)
+ if (!forced)
+ var/job_check = 0
+ if (enemy_roles.len > 0)
+ for (var/mob/M in living_players)
+ if (M.stat == DEAD)
+ continue // Dead players cannot count as opponents
+ if (M.mind && M.mind.assigned_role && (M.mind.assigned_role in enemy_roles) && (!(M in candidates) || (M.mind.assigned_role in restricted_roles)))
+ job_check++ // Checking for "enemies" (such as sec officers). To be counters, they must either not be candidates to that rule, or have a job that restricts them from it
+
+ var/threat = round(mode.threat_level/10)
+ if (job_check < required_enemies[threat])
+ return FALSE
+ return TRUE
+
+/datum/dynamic_ruleset/midround/from_ghosts/execute()
+ var/list/possible_candidates = list()
+ possible_candidates.Add(dead_players)
+ possible_candidates.Add(list_observers)
+ send_applications(possible_candidates)
+ if(assigned.len > 0)
+ return TRUE
+ else
+ return FALSE
+
+/// This sends a poll to ghosts if they want to be a ghost spawn from a ruleset.
+/datum/dynamic_ruleset/midround/from_ghosts/proc/send_applications(list/possible_volunteers = list())
+ if (possible_volunteers.len <= 0) // This shouldn't happen, as ready() should return FALSE if there is not a single valid candidate
+ message_admins("Possible volunteers was 0. This shouldn't appear, because of ready(), unless you forced it!")
+ return
+ message_admins("Polling [possible_volunteers.len] players to apply for the [name] ruleset.")
+ log_game("DYNAMIC: Polling [possible_volunteers.len] players to apply for the [name] ruleset.")
+
+ candidates = pollGhostCandidates("The mode is looking for volunteers to become [antag_flag] for [name]", antag_flag, SSticker.mode, antag_flag, poll_time = 300)
+
+ if(!candidates || candidates.len <= 0)
+ message_admins("The ruleset [name] received no applications.")
+ log_game("DYNAMIC: The ruleset [name] received no applications.")
+ mode.refund_threat(cost)
+ mode.threat_log += "[worldtime2text()]: Rule [name] refunded [cost] (no applications)"
+ mode.executed_rules -= src
+ return
+
+ message_admins("[candidates.len] players volunteered for the ruleset [name].")
+ log_game("DYNAMIC: [candidates.len] players volunteered for [name].")
+ review_applications()
+
+/// Here is where you can check if your ghost applicants are valid for the ruleset.
+/// Called by send_applications().
+/datum/dynamic_ruleset/midround/from_ghosts/proc/review_applications()
+ for (var/i = 1, i <= required_candidates, i++)
+ if(candidates.len <= 0)
+ if(i == 1)
+ // We have found no candidates so far and we are out of applicants.
+ mode.refund_threat(cost)
+ mode.threat_log += "[worldtime2text()]: Rule [name] refunded [cost] (all applications invalid)"
+ mode.executed_rules -= src
+ break
+ var/mob/applicant = pick(candidates)
+ candidates -= applicant
+ if(!isobserver(applicant))
+ if(applicant.stat == DEAD) // Not an observer? If they're dead, make them one.
+ applicant = applicant.ghostize(FALSE)
+ else // Not dead? Disregard them, pick a new applicant
+ i--
+ continue
+
+ if(!applicant)
+ i--
+ continue
+
+ var/mob/new_character = applicant
+
+ if (makeBody)
+ new_character = generate_ruleset_body(applicant)
+
+ finish_setup(new_character, i)
+ assigned += applicant
+ notify_ghosts("[new_character] has been picked for the ruleset [name]!", source = new_character, action = NOTIFY_ORBIT, header="Something Interesting!")
+
+/datum/dynamic_ruleset/midround/from_ghosts/proc/generate_ruleset_body(mob/applicant)
+ var/mob/living/carbon/human/new_character = makeBody(applicant)
+ new_character.dna.remove_all_mutations()
+ return new_character
+
+/datum/dynamic_ruleset/midround/from_ghosts/proc/finish_setup(mob/new_character, index)
+ var/datum/antagonist/new_role = new antag_datum()
+ setup_role(new_role)
+ new_character.mind.add_antag_datum(new_role)
+ new_character.mind.special_role = antag_flag
+
+/datum/dynamic_ruleset/midround/from_ghosts/proc/setup_role(datum/antagonist/new_role)
+ return
+
+//////////////////////////////////////////////
+// //
+// SYNDICATE TRAITORS //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/midround/autotraitor
+ name = "Syndicate Sleeper Agent"
+ antag_datum = /datum/antagonist/traitor
+ antag_flag = ROLE_TRAITOR
+ restricted_roles = list("AI", "Cyborg", "Positronic Brain")
+ protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
+ required_candidates = 1
+ weight = 7
+ cost = 10
+ requirements = list(50,40,30,20,10,10,10,10,10,10)
+ repeatable = TRUE
+ high_population_requirement = 10
+ flags = TRAITOR_RULESET
+
+/datum/dynamic_ruleset/midround/autotraitor/acceptable(population = 0, threat = 0)
+ var/player_count = mode.current_players[CURRENT_LIVING_PLAYERS].len
+ var/antag_count = mode.current_players[CURRENT_LIVING_ANTAGS].len
+ var/max_traitors = round(player_count / 10) + 1
+ if ((antag_count < max_traitors) && prob(mode.threat_level))//adding traitors if the antag population is getting low
+ return ..()
+ else
+ return FALSE
+
+/datum/dynamic_ruleset/midround/autotraitor/trim_candidates()
+ ..()
+ for(var/mob/living/player in living_players)
+ if(issilicon(player)) // Your assigned role doesn't change when you are turned into a silicon.
+ living_players -= player
+ continue
+ if(is_centcom_level(player.z))
+ living_players -= player // We don't autotator people in CentCom
+ continue
+ if(player.mind && (player.mind.special_role || player.mind.antag_datums?.len > 0))
+ living_players -= player // We don't autotator people with roles already
+
+/datum/dynamic_ruleset/midround/autotraitor/ready(forced = FALSE)
+ if (required_candidates > living_players.len)
+ return FALSE
+ return ..()
+
+/datum/dynamic_ruleset/midround/autotraitor/execute()
+ var/mob/M = pick(living_players)
+ assigned += M
+ living_players -= M
+ var/datum/antagonist/traitor/newTraitor = new
+ M.mind.add_antag_datum(newTraitor)
+ return TRUE
+
+
+//////////////////////////////////////////////
+// //
+// Malfunctioning AI //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/midround/malf
+ name = "Malfunctioning AI"
+ antag_datum = /datum/antagonist/traitor
+ antag_flag = ROLE_MALF
+ enemy_roles = list("Security Officer", "Warden","Detective","Head of Security", "Captain", "Scientist", "Chemist", "Research Director", "Chief Engineer")
+ exclusive_roles = list("AI")
+ required_enemies = list(4,4,4,4,4,4,2,2,2,0)
+ required_candidates = 1
+ weight = 3
+ cost = 35
+ requirements = list(101,101,80,70,60,60,50,50,40,40)
+ high_population_requirement = 35
+ required_type = /mob/living/silicon/ai
+ var/ion_announce = 33
+ var/removeDontImproveChance = 10
+
+/datum/dynamic_ruleset/midround/malf/trim_candidates()
+ ..()
+ candidates = candidates[CURRENT_LIVING_PLAYERS]
+ for(var/mob/living/player in candidates)
+ if(!isAI(player))
+ candidates -= player
+ continue
+ if(is_centcom_level(player.z))
+ candidates -= player
+ continue
+ if(player.mind && (player.mind.special_role || player.mind.antag_datums?.len > 0))
+ candidates -= player
+
+/datum/dynamic_ruleset/midround/malf/execute()
+ if(!candidates || !candidates.len)
+ return FALSE
+ var/mob/living/silicon/ai/M = pick(candidates)
+ candidates -= M
+ assigned += M.mind
+ var/datum/antagonist/traitor/AI = new
+ M.mind.special_role = antag_flag
+ M.mind.add_antag_datum(AI)
+ if(prob(ion_announce))
+ priority_announce("Ion storm detected near the station. Please check all AI-controlled equipment for errors.", "Anomaly Alert", 'sound/ai/ionstorm.ogg')
+ if(prob(removeDontImproveChance))
+ M.replace_random_law(generate_ion_law(), list(LAW_INHERENT, LAW_SUPPLIED, LAW_ION))
+ else
+ M.add_ion_law(generate_ion_law())
+ return TRUE
+
+//////////////////////////////////////////////
+// //
+// WIZARD (GHOST) //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/midround/from_ghosts/wizard
+ name = "Wizard"
+ antag_datum = /datum/antagonist/wizard
+ antag_flag = ROLE_WIZARD
+ enemy_roles = list("Security Officer","Detective","Head of Security", "Captain")
+ required_enemies = list(2,2,1,1,1,1,1,0,0,0)
+ required_candidates = 1
+ weight = 1
+ cost = 20
+ requirements = list(90,90,70,40,30,20,10,10,10,10)
+ high_population_requirement = 50
+ repeatable = TRUE
+
+/datum/dynamic_ruleset/midround/from_ghosts/wizard/ready(forced = FALSE)
+ if (required_candidates > (dead_players.len + list_observers.len))
+ return FALSE
+ if(GLOB.wizardstart.len == 0)
+ log_admin("Cannot accept Wizard ruleset. Couldn't find any wizard spawn points.")
+ message_admins("Cannot accept Wizard ruleset. Couldn't find any wizard spawn points.")
+ return FALSE
+ return ..()
+
+/datum/dynamic_ruleset/midround/from_ghosts/wizard/finish_setup(mob/new_character, index)
+ ..()
+ new_character.forceMove(pick(GLOB.wizardstart))
+
+//////////////////////////////////////////////
+// //
+// NUCLEAR OPERATIVES (MIDROUND) //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/midround/from_ghosts/nuclear
+ name = "Nuclear Assault"
+ antag_flag = ROLE_OPERATIVE
+ antag_datum = /datum/antagonist/nukeop
+ enemy_roles = list("AI", "Cyborg", "Security Officer", "Warden","Detective","Head of Security", "Captain")
+ required_enemies = list(3,3,3,3,3,2,1,1,0,0)
+ required_candidates = 5
+ weight = 5
+ cost = 35
+ requirements = list(90,90,90,80,60,40,30,20,10,10)
+ high_population_requirement = 10
+ var/operative_cap = list(2,2,3,3,4,5,5,5,5,5)
+ var/datum/team/nuclear/nuke_team
+ flags = HIGHLANDER_RULESET
+
+/datum/dynamic_ruleset/midround/from_ghosts/nuclear/acceptable(population=0, threat=0)
+ if (locate(/datum/dynamic_ruleset/roundstart/nuclear) in mode.executed_rules)
+ return FALSE // Unavailable if nuke ops were already sent at roundstart
+ var/indice_pop = min(10,round(living_players.len/5)+1)
+ required_candidates = operative_cap[indice_pop]
+ return ..()
+
+/datum/dynamic_ruleset/midround/from_ghosts/nuclear/ready(forced = FALSE)
+ if (required_candidates > (dead_players.len + list_observers.len))
+ return FALSE
+ return ..()
+
+/datum/dynamic_ruleset/midround/from_ghosts/nuclear/finish_setup(mob/new_character, index)
+ new_character.mind.special_role = "Nuclear Operative"
+ new_character.mind.assigned_role = "Nuclear Operative"
+ if (index == 1) // Our first guy is the leader
+ var/datum/antagonist/nukeop/leader/new_role = new
+ nuke_team = new_role.nuke_team
+ new_character.mind.add_antag_datum(new_role)
+ else
+ return ..()
+
+//////////////////////////////////////////////
+// //
+// BLOB (GHOST) //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/midround/from_ghosts/blob
+ name = "Blob"
+ antag_datum = /datum/antagonist/blob
+ antag_flag = ROLE_BLOB
+ enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
+ required_enemies = list(2,2,1,1,1,1,1,0,0,0)
+ required_candidates = 1
+ weight = 4
+ cost = 10
+ requirements = list(101,101,101,80,60,50,30,20,10,10)
+ high_population_requirement = 50
+ repeatable = TRUE
+
+/datum/dynamic_ruleset/midround/from_ghosts/blob/generate_ruleset_body(mob/applicant)
+ var/body = applicant.become_overmind()
+ return body
+
+//////////////////////////////////////////////
+// //
+// XENOMORPH (GHOST) //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/midround/from_ghosts/xenomorph
+ name = "Alien Infestation"
+ antag_datum = /datum/antagonist/xeno
+ antag_flag = ROLE_ALIEN
+ enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
+ required_enemies = list(2,2,1,1,1,1,1,0,0,0)
+ required_candidates = 1
+ weight = 3
+ cost = 10
+ requirements = list(101,101,101,70,50,40,20,15,10,10)
+ high_population_requirement = 50
+ repeatable = TRUE
+ var/list/vents = list()
+
+/datum/dynamic_ruleset/midround/from_ghosts/xenomorph/execute()
+ // 50% chance of being incremented by one
+ required_candidates += prob(50)
+ for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in GLOB.machines)
+ if(QDELETED(temp_vent))
+ continue
+ if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
+ var/datum/pipeline/temp_vent_parent = temp_vent.parents[1]
+ if(!temp_vent_parent)
+ continue // No parent vent
+ // Stops Aliens getting stuck in small networks.
+ // See: Security, Virology
+ if(temp_vent_parent.other_atmosmch.len > 20)
+ vents += temp_vent
+ if(!vents.len)
+ return FALSE
+ . = ..()
+
+/datum/dynamic_ruleset/midround/from_ghosts/xenomorph/generate_ruleset_body(mob/applicant)
+ var/obj/vent = pick_n_take(vents)
+ var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
+ new_xeno.key = applicant.key
+ message_admins("[ADMIN_LOOKUPFLW(new_xeno)] has been made into an alien by the midround ruleset.")
+ log_game("DYNAMIC: [key_name(new_xeno)] was spawned as an alien by the midround ruleset.")
+ return new_xeno
+
+//////////////////////////////////////////////
+// //
+// NIGHTMARE (GHOST) //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/midround/from_ghosts/nightmare
+ name = "Nightmare"
+ antag_datum = /datum/antagonist/nightmare
+ antag_flag = "Nightmare"
+ antag_flag_override = ROLE_ALIEN
+ enemy_roles = list("Security Officer", "Detective", "Head of Security", "Captain")
+ required_enemies = list(2,2,1,1,1,1,1,0,0,0)
+ required_candidates = 1
+ weight = 3
+ cost = 10
+ requirements = list(101,101,101,70,50,40,20,15,10,10)
+ high_population_requirement = 50
+ repeatable = TRUE
+ var/list/spawn_locs = list()
+
+/datum/dynamic_ruleset/midround/from_ghosts/nightmare/execute()
+ for(var/X in GLOB.xeno_spawn)
+ var/turf/T = X
+ var/light_amount = T.get_lumcount()
+ if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD)
+ spawn_locs += T
+ if(!spawn_locs.len)
+ return FALSE
+ . = ..()
+
+/datum/dynamic_ruleset/midround/from_ghosts/nightmare/generate_ruleset_body(mob/applicant)
+ var/datum/mind/player_mind = new /datum/mind(applicant.key)
+ player_mind.active = TRUE
+
+ var/mob/living/carbon/human/S = new (pick(spawn_locs))
+ player_mind.transfer_to(S)
+ player_mind.assigned_role = "Nightmare"
+ player_mind.special_role = "Nightmare"
+ player_mind.add_antag_datum(/datum/antagonist/nightmare)
+ S.set_species(/datum/species/shadow/nightmare)
+
+ playsound(S, 'sound/magic/ethereal_exit.ogg', 50, 1, -1)
+ message_admins("[ADMIN_LOOKUPFLW(S)] has been made into a Nightmare by the midround ruleset.")
+ log_game("DYNAMIC: [key_name(S)] was spawned as a Nightmare by the midround ruleset.")
+ return S
diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
new file mode 100644
index 0000000000..38ce6f68d0
--- /dev/null
+++ b/code/game/gamemodes/dynamic/dynamic_rulesets_roundstart.dm
@@ -0,0 +1,732 @@
+
+//////////////////////////////////////////////
+// //
+// SYNDICATE TRAITORS //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/roundstart/traitor
+ name = "Traitors"
+ persistent = TRUE
+ antag_flag = ROLE_TRAITOR
+ antag_datum = /datum/antagonist/traitor/
+ minimum_required_age = 0
+ protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster", "Cyborg")
+ restricted_roles = list("Cyborg")
+ required_candidates = 1
+ weight = 5
+ cost = 10
+ requirements = list(10,10,10,10,10,10,10,10,10,10)
+ high_population_requirement = 10
+ var/autotraitor_cooldown = 450 // 15 minutes (ticks once per 2 sec)
+
+/datum/dynamic_ruleset/roundstart/traitor/pre_execute()
+ var/traitor_scaling_coeff = 10 - max(0,round(mode.threat_level/10)-5) // Above 50 threat level, coeff goes down by 1 for every 10 levels
+ var/num_traitors = min(round(mode.candidates.len / traitor_scaling_coeff) + 1, candidates.len)
+ for (var/i = 1 to num_traitors)
+ var/mob/M = pick(candidates)
+ candidates -= M
+ assigned += M.mind
+ M.mind.special_role = ROLE_TRAITOR
+ M.mind.restricted_roles = restricted_roles
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/traitor/rule_process()
+ if (autotraitor_cooldown > 0)
+ autotraitor_cooldown--
+ else
+ autotraitor_cooldown = 450 // 15 minutes
+ message_admins("Checking if we can turn someone into a traitor.")
+ log_game("DYNAMIC: Checking if we can turn someone into a traitor.")
+ mode.picking_specific_rule(/datum/dynamic_ruleset/midround/autotraitor)
+
+//////////////////////////////////////////
+// //
+// BLOOD BROTHERS //
+// //
+//////////////////////////////////////////
+
+/datum/dynamic_ruleset/roundstart/traitorbro
+ name = "Blood Brothers"
+ antag_flag = ROLE_BROTHER
+ antag_datum = /datum/antagonist/brother/
+ restricted_roles = list("AI", "Cyborg")
+ protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
+ required_candidates = 2
+ weight = 4
+ cost = 10
+ requirements = list(40,30,30,20,20,15,15,15,10,10)
+ high_population_requirement = 15
+ var/list/datum/team/brother_team/pre_brother_teams = list()
+ var/const/team_amount = 2 // Hard limit on brother teams if scaling is turned off
+ var/const/min_team_size = 2
+
+/datum/dynamic_ruleset/roundstart/traitorbro/pre_execute()
+ var/num_teams = team_amount
+ var/bsc = CONFIG_GET(number/brother_scaling_coeff)
+ if(bsc)
+ num_teams = max(1, round(num_players() / bsc))
+
+ for(var/j = 1 to num_teams)
+ if(candidates.len < min_team_size || candidates.len < required_candidates)
+ break
+ var/datum/team/brother_team/team = new
+ var/team_size = prob(10) ? min(3, candidates.len) : 2
+ for(var/k = 1 to team_size)
+ var/mob/bro = pick(candidates)
+ candidates -= bro
+ assigned += bro.mind
+ team.add_member(bro.mind)
+ bro.mind.special_role = "brother"
+ bro.mind.restricted_roles = restricted_roles
+ pre_brother_teams += team
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/traitorbro/execute()
+ for(var/datum/team/brother_team/team in pre_brother_teams)
+ team.pick_meeting_area()
+ team.forge_brother_objectives()
+ for(var/datum/mind/M in team.members)
+ M.add_antag_datum(/datum/antagonist/brother, team)
+ team.update_name()
+ mode.brother_teams += pre_brother_teams
+ return TRUE
+
+//////////////////////////////////////////////
+// //
+// CHANGELINGS //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/roundstart/changeling
+ name = "Changelings"
+ antag_flag = ROLE_CHANGELING
+ antag_datum = /datum/antagonist/changeling
+ restricted_roles = list("AI", "Cyborg")
+ protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
+ required_candidates = 1
+ weight = 3
+ cost = 30
+ requirements = list(80,70,60,50,40,20,20,10,10,10)
+ high_population_requirement = 10
+ var/team_mode_probability = 30
+
+/datum/dynamic_ruleset/roundstart/changeling/pre_execute()
+ var/num_changelings = min(round(mode.candidates.len / 10) + 1, candidates.len)
+ for (var/i = 1 to num_changelings)
+ var/mob/M = pick(candidates)
+ candidates -= M
+ assigned += M.mind
+ M.mind.restricted_roles = restricted_roles
+ M.mind.special_role = ROLE_CHANGELING
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/changeling/execute()
+ var/team_mode = FALSE
+ if(prob(team_mode_probability))
+ team_mode = TRUE
+ var/list/team_objectives = subtypesof(/datum/objective/changeling_team_objective)
+ var/list/possible_team_objectives = list()
+ for(var/T in team_objectives)
+ var/datum/objective/changeling_team_objective/CTO = T
+ if(assigned.len >= initial(CTO.min_lings))
+ possible_team_objectives += T
+
+ if(possible_team_objectives.len && prob(20*assigned.len))
+ GLOB.changeling_team_objective_type = pick(possible_team_objectives)
+ for(var/datum/mind/changeling in assigned)
+ var/datum/antagonist/changeling/new_antag = new antag_datum()
+ new_antag.team_mode = team_mode
+ changeling.add_antag_datum(new_antag)
+ return TRUE
+
+//////////////////////////////////////////////
+// //
+// WIZARDS //
+// //
+//////////////////////////////////////////////
+
+// Dynamic is a wonderful thing that adds wizards to every round and then adds even more wizards during the round.
+/datum/dynamic_ruleset/roundstart/wizard
+ name = "Wizard"
+ antag_flag = ROLE_WIZARD
+ antag_datum = /datum/antagonist/wizard
+ minimum_required_age = 14
+ restricted_roles = list("Head of Security", "Captain") // Just to be sure that a wizard getting picked won't ever imply a Captain or HoS not getting drafted
+ required_candidates = 1
+ weight = 1
+ cost = 30
+ requirements = list(90,90,70,40,30,20,10,10,10,10)
+ high_population_requirement = 10
+ var/list/roundstart_wizards = list()
+
+/datum/dynamic_ruleset/roundstart/wizard/acceptable(population=0, threat=0)
+ if(GLOB.wizardstart.len == 0)
+ log_admin("Cannot accept Wizard ruleset. Couldn't find any wizard spawn points.")
+ message_admins("Cannot accept Wizard ruleset. Couldn't find any wizard spawn points.")
+ return FALSE
+ return ..()
+
+/datum/dynamic_ruleset/roundstart/wizard/pre_execute()
+ if(GLOB.wizardstart.len == 0)
+ return FALSE
+
+ var/mob/M = pick(candidates)
+ if (M)
+ candidates -= M
+ assigned += M.mind
+ M.mind.assigned_role = ROLE_WIZARD
+ M.mind.special_role = ROLE_WIZARD
+
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/wizard/execute()
+ for(var/datum/mind/M in assigned)
+ M.current.forceMove(pick(GLOB.wizardstart))
+ M.add_antag_datum(new antag_datum())
+ return TRUE
+
+//////////////////////////////////////////////
+// //
+// BLOOD CULT //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/roundstart/bloodcult
+ name = "Blood Cult"
+ antag_flag = ROLE_CULTIST
+ antag_datum = /datum/antagonist/cult
+ minimum_required_age = 14
+ restricted_roles = list("AI", "Cyborg")
+ protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
+ required_candidates = 2
+ weight = 3
+ cost = 30
+ requirements = list(100,90,80,60,40,30,10,10,10,10)
+ high_population_requirement = 10
+ pop_per_requirement = 5
+ flags = HIGHLANDER_RULESET
+ var/cultist_cap = list(2,2,2,3,3,4,4,4,4,4)
+ var/datum/team/cult/main_cult
+
+/datum/dynamic_ruleset/roundstart/bloodcult/ready(forced = FALSE)
+ var/indice_pop = min(10,round(mode.roundstart_pop_ready/pop_per_requirement)+1)
+ required_candidates = cultist_cap[indice_pop]
+ . = ..()
+
+/datum/dynamic_ruleset/roundstart/bloodcult/pre_execute()
+ var/indice_pop = min(10,round(mode.roundstart_pop_ready/pop_per_requirement)+1)
+ var/cultists = cultist_cap[indice_pop]
+ for(var/cultists_number = 1 to cultists)
+ if(candidates.len <= 0)
+ break
+ var/mob/M = pick(candidates)
+ candidates -= M
+ assigned += M.mind
+ M.mind.special_role = ROLE_CULTIST
+ M.mind.restricted_roles = restricted_roles
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/bloodcult/execute()
+ main_cult = new
+ for(var/datum/mind/M in assigned)
+ var/datum/antagonist/cult/new_cultist = new antag_datum()
+ new_cultist.cult_team = main_cult
+ new_cultist.give_equipment = TRUE
+ M.add_antag_datum(new_cultist)
+ main_cult.setup_objectives()
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/bloodcult/round_result()
+ ..()
+ if(main_cult.check_cult_victory())
+ SSticker.mode_result = "win - cult win"
+ SSticker.news_report = CULT_SUMMON
+ else
+ SSticker.mode_result = "loss - staff stopped the cult"
+ SSticker.news_report = CULT_FAILURE
+
+//////////////////////////////////////////////
+// //
+// NUCLEAR OPERATIVES //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/roundstart/nuclear
+ name = "Nuclear Emergency"
+ antag_flag = ROLE_OPERATIVE
+ antag_datum = /datum/antagonist/nukeop
+ var/datum/antagonist/antag_leader_datum = /datum/antagonist/nukeop/leader
+ minimum_required_age = 14
+ restricted_roles = list("Head of Security", "Captain") // Just to be sure that a nukie getting picked won't ever imply a Captain or HoS not getting drafted
+ required_candidates = 5
+ weight = 3
+ cost = 40
+ requirements = list(90,90,90,80,60,40,30,20,10,10)
+ high_population_requirement = 10
+ pop_per_requirement = 5
+ flags = HIGHLANDER_RULESET
+ var/operative_cap = list(2,2,2,3,3,3,4,4,5,5)
+ var/datum/team/nuclear/nuke_team
+
+/datum/dynamic_ruleset/roundstart/nuclear/ready(forced = FALSE)
+ var/indice_pop = min(10,round(mode.roundstart_pop_ready/pop_per_requirement)+1)
+ required_candidates = operative_cap[indice_pop]
+ . = ..()
+
+/datum/dynamic_ruleset/roundstart/nuclear/pre_execute()
+ // If ready() did its job, candidates should have 5 or more members in it
+
+ var/indice_pop = min(10,round(mode.roundstart_pop_ready/5)+1)
+ var/operatives = operative_cap[indice_pop]
+ for(var/operatives_number = 1 to operatives)
+ if(candidates.len <= 0)
+ break
+ var/mob/M = pick(candidates)
+ candidates -= M
+ assigned += M.mind
+ M.mind.assigned_role = "Nuclear Operative"
+ M.mind.special_role = "Nuclear Operative"
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/nuclear/execute()
+ var/leader = TRUE
+ for(var/datum/mind/M in assigned)
+ if (leader)
+ leader = FALSE
+ var/datum/antagonist/nukeop/leader/new_op = M.add_antag_datum(antag_leader_datum)
+ nuke_team = new_op.nuke_team
+ else
+ var/datum/antagonist/nukeop/new_op = new antag_datum()
+ M.add_antag_datum(new_op)
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/nuclear/round_result()
+ var result = nuke_team.get_result()
+ switch(result)
+ if(NUKE_RESULT_FLUKE)
+ SSticker.mode_result = "loss - syndicate nuked - disk secured"
+ SSticker.news_report = NUKE_SYNDICATE_BASE
+ if(NUKE_RESULT_NUKE_WIN)
+ SSticker.mode_result = "win - syndicate nuke"
+ SSticker.news_report = STATION_NUKED
+ if(NUKE_RESULT_NOSURVIVORS)
+ SSticker.mode_result = "halfwin - syndicate nuke - did not evacuate in time"
+ SSticker.news_report = STATION_NUKED
+ if(NUKE_RESULT_WRONG_STATION)
+ SSticker.mode_result = "halfwin - blew wrong station"
+ SSticker.news_report = NUKE_MISS
+ if(NUKE_RESULT_WRONG_STATION_DEAD)
+ SSticker.mode_result = "halfwin - blew wrong station - did not evacuate in time"
+ SSticker.news_report = NUKE_MISS
+ if(NUKE_RESULT_CREW_WIN_SYNDIES_DEAD)
+ SSticker.mode_result = "loss - evacuation - disk secured - syndi team dead"
+ SSticker.news_report = OPERATIVES_KILLED
+ if(NUKE_RESULT_CREW_WIN)
+ SSticker.mode_result = "loss - evacuation - disk secured"
+ SSticker.news_report = OPERATIVES_KILLED
+ if(NUKE_RESULT_DISK_LOST)
+ SSticker.mode_result = "halfwin - evacuation - disk not secured"
+ SSticker.news_report = OPERATIVE_SKIRMISH
+ if(NUKE_RESULT_DISK_STOLEN)
+ SSticker.mode_result = "halfwin - detonation averted"
+ SSticker.news_report = OPERATIVE_SKIRMISH
+ else
+ SSticker.mode_result = "halfwin - interrupted"
+ SSticker.news_report = OPERATIVE_SKIRMISH
+
+//////////////////////////////////////////////
+// //
+// REVS //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/roundstart/delayed/revs
+ name = "Revolution"
+ persistent = TRUE
+ antag_flag = ROLE_REV_HEAD
+ antag_flag_override = ROLE_REV
+ antag_datum = /datum/antagonist/rev/head
+ minimum_required_age = 14
+ restricted_roles = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
+ required_candidates = 3
+ weight = 2
+ cost = 35
+ requirements = list(101,101,70,40,30,20,10,10,10,10)
+ high_population_requirement = 10
+ delay = 5 MINUTES
+ flags = HIGHLANDER_RULESET
+ // I give up, just there should be enough heads with 35 players...
+ minimum_players = 35
+ var/datum/team/revolution/revolution
+ var/finished = 0
+
+/datum/dynamic_ruleset/roundstart/delayed/revs/execute()
+ var/max_canditates = 4
+ revolution = new()
+ for(var/i = 1 to max_canditates)
+ if(candidates.len <= 0)
+ break
+ var/mob/M = pick(candidates)
+ candidates -= M
+ assigned += M.mind
+ M.mind.restricted_roles = restricted_roles
+ M.mind.special_role = antag_flag
+ var/datum/antagonist/rev/head/new_head = new antag_datum()
+ new_head.give_flash = TRUE
+ new_head.give_hud = TRUE
+ new_head.remove_clumsy = TRUE
+ M.mind.add_antag_datum(new_head,revolution)
+
+ revolution.update_objectives()
+ revolution.update_heads()
+ SSshuttle.registerHostileEnvironment(src)
+
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/delayed/revs/rule_process()
+ if(check_rev_victory())
+ finished = 1
+ else if(check_heads_victory())
+ finished = 2
+ return
+
+/datum/dynamic_ruleset/roundstart/delayed/revs/check_finished()
+ if(CONFIG_GET(keyed_list/continuous)["revolution"])
+ if(finished)
+ SSshuttle.clearHostileEnvironment(src)
+ return ..()
+ if(finished != 0)
+ return TRUE
+ else
+ return ..()
+
+/datum/dynamic_ruleset/roundstart/delayed/revs/proc/check_rev_victory()
+ for(var/datum/objective/mutiny/objective in revolution.objectives)
+ if(!(objective.check_completion()))
+ return FALSE
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/delayed/revs/proc/check_heads_victory()
+ for(var/datum/mind/rev_mind in revolution.head_revolutionaries())
+ var/turf/T = get_turf(rev_mind.current)
+ if(!considered_afk(rev_mind) && considered_alive(rev_mind) && is_station_level(T.z))
+ if(ishuman(rev_mind.current) || ismonkey(rev_mind.current))
+ return FALSE
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/delayed/revs/round_result()
+ if(finished == 1)
+ SSticker.mode_result = "win - heads killed"
+ SSticker.news_report = REVS_WIN
+ else if(finished == 2)
+ SSticker.mode_result = "loss - rev heads killed"
+ SSticker.news_report = REVS_LOSE
+
+// Admin only rulesets. The threat requirement is 101 so it is not possible to roll them.
+
+//////////////////////////////////////////////
+// //
+// EXTENDED //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/roundstart/extended
+ name = "Extended"
+ antag_flag = null
+ antag_datum = null
+ restricted_roles = list()
+ required_candidates = 0
+ weight = 3
+ cost = 0
+ requirements = list(101,101,101,101,101,101,101,101,101,101)
+ high_population_requirement = 101
+
+/datum/dynamic_ruleset/roundstart/extended/pre_execute()
+ message_admins("Starting a round of extended.")
+ log_game("Starting a round of extended.")
+ mode.spend_threat(mode.threat)
+ return TRUE
+
+//////////////////////////////////////////////
+// //
+// CLOCKCULT //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/roundstart/clockcult
+ name = "Clockcult"
+ antag_flag = ROLE_SERVANT_OF_RATVAR
+ antag_datum = /datum/antagonist/clockcult
+ restricted_roles = list("AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
+ required_candidates = 4
+ weight = 3
+ cost = 0
+ requirements = list(101,101,101,101,101,101,101,101,101,101)
+ high_population_requirement = 101
+ flags = HIGHLANDER_RULESET
+ var/ark_time
+
+/datum/dynamic_ruleset/roundstart/clockcult/pre_execute()
+ var/list/errorList = list()
+ var/list/reebes = SSmapping.LoadGroup(errorList, "Reebe", "map_files/generic", "City_of_Cogs.dmm", default_traits = ZTRAITS_REEBE, silent = TRUE)
+ if(errorList.len)
+ message_admins("Reebe failed to load!")
+ log_game("Reebe failed to load!")
+ return FALSE
+ for(var/datum/parsed_map/PM in reebes)
+ PM.initTemplateBounds()
+
+ var/starter_servants = 4
+ var/number_players = num_players()
+ if(number_players > 30)
+ number_players -= 30
+ starter_servants += round(number_players / 10)
+ starter_servants = min(starter_servants, 8)
+ for (var/i in 1 to starter_servants)
+ var/mob/servant = pick(candidates)
+ candidates -= servant
+ assigned += servant.mind
+ servant.mind.assigned_role = ROLE_SERVANT_OF_RATVAR
+ servant.mind.special_role = ROLE_SERVANT_OF_RATVAR
+ ark_time = 30 + round((number_players / 5))
+ ark_time = min(ark_time, 35)
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/clockcult/execute()
+ var/list/spread_out_spawns = GLOB.servant_spawns.Copy()
+ for(var/datum/mind/servant in assigned)
+ var/mob/S = servant.current
+ if(!spread_out_spawns.len)
+ spread_out_spawns = GLOB.servant_spawns.Copy()
+ log_game("[key_name(servant)] was made an initial servant of Ratvar")
+ var/turf/T = pick_n_take(spread_out_spawns)
+ S.forceMove(T)
+ greet_servant(S)
+ equip_servant(S)
+ add_servant_of_ratvar(S, TRUE)
+ var/obj/structure/destructible/clockwork/massive/celestial_gateway/G = GLOB.ark_of_the_clockwork_justiciar //that's a mouthful
+ G.final_countdown(ark_time)
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/clockcult/proc/greet_servant(mob/M) //Description of their role
+ if(!M)
+ return 0
+ to_chat(M, "You are a servant of Ratvar, the Clockwork Justiciar!")
+ to_chat(M, "You have approximately [ark_time] minutes until the Ark activates.")
+ to_chat(M, "Unlock Script scripture by converting a new servant.")
+ to_chat(M, "Application scripture will be unlocked halfway until the Ark's activation.")
+ M.playsound_local(get_turf(M), 'sound/ambience/antag/clockcultalr.ogg', 100, FALSE, pressure_affected = FALSE)
+ return 1
+
+/datum/dynamic_ruleset/roundstart/clockcult/proc/equip_servant(mob/living/M) //Grants a clockwork slab to the mob, with one of each component
+ if(!M || !ishuman(M))
+ return FALSE
+ var/mob/living/carbon/human/L = M
+ L.equipOutfit(/datum/outfit/servant_of_ratvar)
+ var/obj/item/clockwork/slab/S = new
+ var/slot = "At your feet"
+ var/list/slots = list("In your left pocket" = SLOT_L_STORE, "In your right pocket" = SLOT_R_STORE, "In your backpack" = SLOT_IN_BACKPACK, "On your belt" = SLOT_BELT)
+ if(ishuman(L))
+ var/mob/living/carbon/human/H = L
+ slot = H.equip_in_one_of_slots(S, slots)
+ if(slot == "In your backpack")
+ slot = "In your [H.back.name]"
+ if(slot == "At your feet")
+ if(!S.forceMove(get_turf(L)))
+ qdel(S)
+ if(S && !QDELETED(S))
+ to_chat(L, "There is a paper in your backpack! It'll tell you if anything's changed, as well as what to expect.")
+ to_chat(L, "[slot] is a clockwork slab, a multipurpose tool used to construct machines and invoke ancient words of power. If this is your first time \
+ as a servant, you can find a concise tutorial in the Recollection category of its interface.")
+ to_chat(L, "If you want more information, you can read the wiki page to learn more.")
+ return TRUE
+ return FALSE
+
+/datum/dynamic_ruleset/roundstart/clockcult/round_result()
+ if(GLOB.clockwork_gateway_activated)
+ SSticker.news_report = CLOCK_SUMMON
+ SSticker.mode_result = "win - servants completed their objective (summon ratvar)"
+ else
+ SSticker.news_report = CULT_FAILURE
+ SSticker.mode_result = "loss - servants failed their objective (summon ratvar)"
+
+//////////////////////////////////////////////
+// //
+// CLOWN OPS //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/roundstart/nuclear/clown_ops
+ name = "Clown Ops"
+ antag_datum = /datum/antagonist/nukeop/clownop
+ antag_leader_datum = /datum/antagonist/nukeop/leader/clownop
+ requirements = list(101,101,101,101,101,101,101,101,101,101)
+ high_population_requirement = 101
+
+/datum/dynamic_ruleset/roundstart/nuclear/clown_ops/pre_execute()
+ . = ..()
+ if(.)
+ for(var/obj/machinery/nuclearbomb/syndicate/S in GLOB.nuke_list)
+ var/turf/T = get_turf(S)
+ if(T)
+ qdel(S)
+ new /obj/machinery/nuclearbomb/syndicate/bananium(T)
+ for(var/datum/mind/V in assigned)
+ V.assigned_role = "Clown Operative"
+ V.special_role = "Clown Operative"
+
+//////////////////////////////////////////////
+// //
+// DEVIL //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/roundstart/devil
+ name = "Devil"
+ antag_flag = ROLE_DEVIL
+ antag_datum = /datum/antagonist/devil
+ restricted_roles = list("Lawyer", "Curator", "Chaplain", "Head of Security", "Captain", "AI")
+ required_candidates = 1
+ weight = 3
+ cost = 0
+ requirements = list(101,101,101,101,101,101,101,101,101,101)
+ high_population_requirement = 101
+ var/devil_limit = 4 // Hard limit on devils if scaling is turned off
+
+/datum/dynamic_ruleset/roundstart/devil/pre_execute()
+ var/tsc = CONFIG_GET(number/traitor_scaling_coeff)
+ var/num_devils = 1
+
+ if(tsc)
+ num_devils = max(required_candidates, min(round(num_players() / (tsc * 3)) + 2, round(num_players() / (tsc * 1.5))))
+ else
+ num_devils = max(required_candidates, min(num_players(), devil_limit))
+
+ for(var/j = 0, j < num_devils, j++)
+ if (!candidates.len)
+ break
+ var/mob/devil = pick(candidates)
+ assigned += devil
+ candidates -= devil
+ devil.mind.special_role = ROLE_DEVIL
+ devil.mind.restricted_roles = restricted_roles
+
+ log_game("[key_name(devil)] has been selected as a devil")
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/devil/execute()
+ for(var/datum/mind/devil in assigned)
+ add_devil(devil.current, ascendable = TRUE)
+ add_devil_objectives(devil,2)
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/devil/proc/add_devil_objectives(datum/mind/devil_mind, quantity)
+ var/list/validtypes = list(/datum/objective/devil/soulquantity, /datum/objective/devil/soulquality, /datum/objective/devil/sintouch, /datum/objective/devil/buy_target)
+ var/datum/antagonist/devil/D = devil_mind.has_antag_datum(/datum/antagonist/devil)
+ for(var/i = 1 to quantity)
+ var/type = pick(validtypes)
+ var/datum/objective/devil/objective = new type(null)
+ objective.owner = devil_mind
+ D.objectives += objective
+ if(!istype(objective, /datum/objective/devil/buy_target))
+ validtypes -= type
+ else
+ objective.find_target()
+
+//////////////////////////////////////////////
+// //
+// MONKEY //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/roundstart/monkey
+ name = "Monkey"
+ antag_flag = ROLE_MONKEY
+ antag_datum = /datum/antagonist/monkey/leader
+ restricted_roles = list("Cyborg", "AI")
+ required_candidates = 1
+ weight = 3
+ cost = 0
+ requirements = list(101,101,101,101,101,101,101,101,101,101)
+ high_population_requirement = 101
+ var/players_per_carrier = 30
+ var/monkeys_to_win = 1
+ var/escaped_monkeys = 0
+ var/datum/team/monkey/monkey_team
+
+/datum/dynamic_ruleset/roundstart/monkey/pre_execute()
+ var/carriers_to_make = max(round(num_players()/players_per_carrier, 1), 1)
+
+ for(var/j = 0, j < carriers_to_make, j++)
+ if (!candidates.len)
+ break
+ var/mob/carrier = pick(candidates)
+ candidates -= carrier
+ assigned += carrier.mind
+ carrier.mind.special_role = "Monkey Leader"
+ carrier.mind.restricted_roles = restricted_roles
+ log_game("[key_name(carrier)] has been selected as a Jungle Fever carrier")
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/monkey/execute()
+ for(var/datum/mind/carrier in assigned)
+ var/datum/antagonist/monkey/M = add_monkey_leader(carrier)
+ if(M)
+ monkey_team = M.monkey_team
+ return TRUE
+
+/datum/dynamic_ruleset/roundstart/monkey/proc/check_monkey_victory()
+ if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME)
+ return FALSE
+ var/datum/disease/D = new /datum/disease/transformation/jungle_fever()
+ for(var/mob/living/carbon/monkey/M in GLOB.alive_mob_list)
+ if (M.HasDisease(D))
+ if(M.onCentCom() || M.onSyndieBase())
+ escaped_monkeys++
+ if(escaped_monkeys >= monkeys_to_win)
+ return TRUE
+ else
+ return FALSE
+
+// This does not get called. Look into making it work.
+/datum/dynamic_ruleset/roundstart/monkey/round_result()
+ if(check_monkey_victory())
+ SSticker.mode_result = "win - monkey win"
+ else
+ SSticker.mode_result = "loss - staff stopped the monkeys"
+
+//////////////////////////////////////////////
+// //
+// METEOR //
+// //
+//////////////////////////////////////////////
+
+/datum/dynamic_ruleset/roundstart/meteor
+ name = "Meteor"
+ persistent = TRUE
+ required_candidates = 0
+ weight = 3
+ cost = 0
+ requirements = list(101,101,101,101,101,101,101,101,101,101)
+ high_population_requirement = 101
+ var/meteordelay = 2000
+ var/nometeors = 0
+ var/rampupdelta = 5
+
+/datum/dynamic_ruleset/roundstart/meteor/rule_process()
+ if(nometeors || meteordelay > world.time - SSticker.round_start_time)
+ return
+
+ var/list/wavetype = GLOB.meteors_normal
+ var/meteorminutes = (world.time - SSticker.round_start_time - meteordelay) / 10 / 60
+
+ if (prob(meteorminutes))
+ wavetype = GLOB.meteors_threatening
+
+ if (prob(meteorminutes/2))
+ wavetype = GLOB.meteors_catastrophic
+
+ var/ramp_up_final = CLAMP(round(meteorminutes/rampupdelta), 1, 10)
+
+ spawn_meteors(ramp_up_final, wavetype)
diff --git a/code/game/gamemodes/dynamic/readme.md b/code/game/gamemodes/dynamic/readme.md
new file mode 100644
index 0000000000..6bd064cf7c
--- /dev/null
+++ b/code/game/gamemodes/dynamic/readme.md
@@ -0,0 +1,57 @@
+# DYNAMIC
+
+## ROUNDSTART
+
+Dynamic rolls threat based on a special sauce formula:
+"dynamic_curve_width \* tan((3.1416 \* (rand() - 0.5) \* 57.2957795)) + dynamic_curve_centre"
+
+Latejoin and midround injection cooldowns are set using exponential distribution between
+5 minutes and 25 for latejoin
+15 minutes and 35 for midround
+this value is then added to world.time and assigned to the injection cooldown variables.
+
+rigged_roundstart() is called instead if there are forced rules (an admin set the mode)
+
+can_start() -> pre_setup() -> roundstart() OR rigged_roundstart() -> picking_roundstart_rule(drafted_rules) -> post_setup()
+
+## PROCESS
+
+Calls rule_process on every rule which is in the current_rules list.
+Every sixty seconds, update_playercounts()
+Midround injection time is checked against world.time to see if an injection should happen.
+If midround injection time is lower than world.time, it updates playercounts again, then tries to inject and generates a new cooldown regardless of whether a rule is picked.
+
+## LATEJOIN
+
+make_antag_chance(newPlayer) -> [For each latespawn rule...]
+-> acceptable(living players, threat_level) -> trim_candidates() -> ready(forced=FALSE)
+**If true, add to drafted rules
+**NOTE that acceptable uses threat_level not threat!
+**NOTE Latejoin timer is ONLY reset if at least one rule was drafted.
+**NOTE the new_player.dm AttemptLateSpawn() calls OnPostSetup for all roles (unless assigned role is MODE)
+[After collecting all draftble rules...]
+-> picking_latejoin_ruleset(drafted_rules) -> spend threat -> ruleset.execute()
+## MIDROUND
+process() -> [For each midround rule...]
+-> acceptable(living players, threat_level) -> trim_candidates() -> ready(forced=FALSE)
+[After collecting all draftble rules...]
+-> picking_midround_ruleset(drafted_rules) -> spend threat -> ruleset.execute()
+## FORCED
+For latejoin, it simply sets forced_latejoin_rule
+make_antag_chance(newPlayer) -> trim_candidates() -> ready(forced=TRUE) **NOTE no acceptable() call
+For midround, calls the below proc with forced = TRUE
+picking_specific_rule(ruletype,forced) -> forced OR acceptable(living_players, threat_level) -> trim_candidates() -> ready(forced) -> spend threat -> execute()
+**NOTE specific rule can be called by RS traitor->MR autotraitor w/ forced=FALSE
+**NOTE that due to short circuiting acceptable() need not be called if forced.
+## RULESET
+acceptable(population,threat) just checks if enough threat_level for population indice.
+**NOTE that we currently only send threat_level as the second arg, not threat.
+ready(forced) checks if enough candidates and calls the map's map_ruleset(dynamic_ruleset) at the parent level
+trim_candidates() varies significantly according to the ruleset type
+Roundstart: All candidates are new_player mobs. Check them for standard stuff: connected, desire role, not banned, etc.
+**NOTE Roundstart deals with both candidates (trimmed list of valid players) and mode.candidates (everyone readied up). Don't confuse them!
+Latejoin: Only one candidate, the latejoiner. Standard checks.
+Midround: Instead of building a single list candidates, candidates contains four lists: living, dead, observing, and living antags. Standard checks in trim_list(list).
+Midround - Rulesets have additional types
+/from_ghosts: execute() -> send_applications() -> review_applications() -> finish_setup(mob/newcharacter, index) -> setup_role(role)
+**NOTE: execute() here adds dead players and observers to candidates list
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index d16cbebb2a..f790053863 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -24,6 +24,7 @@
var/list/datum/mind/antag_candidates = list() // List of possible starting antags goes here
var/list/restricted_jobs = list() // Jobs it doesn't make sense to be. I.E chaplain or AI cultist
var/list/protected_jobs = list() // Jobs that can't be traitors because
+ var/list/required_jobs = list() // alternative required job groups eg list(list(cap=1),list(hos=1,sec=2)) translates to one captain OR one hos and two secmans
var/required_players = 0
var/maximum_players = -1 // -1 is no maximum, positive numbers limit the selection of a mode on overstaffed stations
var/required_enemies = 0
@@ -355,7 +356,7 @@
// Ultimate randomizing code right here
for(var/mob/dead/new_player/player in GLOB.player_list)
- if(player.client && player.ready == PLAYER_READY_TO_PLAY)
+ if(player.client && player.ready == PLAYER_READY_TO_PLAY && player.check_preferences())
players += player
// Shuffling, the players list is now ping-independent!!!
@@ -558,3 +559,7 @@
SSticker.news_report = STATION_EVACUATED
if(SSshuttle.emergency.is_hijacked())
SSticker.news_report = SHUTTLE_HIJACK
+
+/// Mode specific admin panel.
+/datum/game_mode/proc/admin_panel()
+ return
diff --git a/code/game/gamemodes/overthrow/overthrow.dm b/code/game/gamemodes/overthrow/overthrow.dm
index 1548556515..dca0c1ade1 100644
--- a/code/game/gamemodes/overthrow/overthrow.dm
+++ b/code/game/gamemodes/overthrow/overthrow.dm
@@ -3,7 +3,8 @@
name = "overthrow"
config_tag = "overthrow"
antag_flag = ROLE_OVERTHROW
- restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
+ restricted_jobs = list("AI", "Cyborg")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
required_players = 20 // the core idea is of a swift, bloodless coup, so it shouldn't be as chaotic as revs.
required_enemies = 2 // minimum two teams, otherwise it's just nerfed revs.
recommended_enemies = 4
diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm
index 09047b05a9..8459819b5b 100644
--- a/code/game/gamemodes/revolution/revolution.dm
+++ b/code/game/gamemodes/revolution/revolution.dm
@@ -12,7 +12,8 @@
config_tag = "revolution"
antag_flag = ROLE_REV
false_report_weight = 10
- restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
+ restricted_jobs = list("AI", "Cyborg")
+ protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster")
required_players = 30
required_enemies = 2
recommended_enemies = 3
diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm
index 789737ec0f..4a6e72cf67 100644
--- a/code/game/gamemodes/traitor/traitor.dm
+++ b/code/game/gamemodes/traitor/traitor.dm
@@ -96,4 +96,4 @@
/datum/game_mode/traitor/generate_report()
return "Although more specific threats are commonplace, you should always remain vigilant for Syndicate agents aboard your station. Syndicate communications have implied that many \
- Nanotrasen employees are Syndicate agents with hidden memories that may be activated at a moment's notice, so it's possible that these agents might not even know their positions."
\ No newline at end of file
+ Nanotrasen employees are Syndicate agents with hidden memories that may be activated at a moment's notice, so it's possible that these agents might not even know their positions."
diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm
index 59806e97a4..88ab4ec6f8 100644
--- a/code/game/machinery/limbgrower.dm
+++ b/code/game/machinery/limbgrower.dm
@@ -27,8 +27,10 @@
"human",
"lizard",
"fly",
- "moth",
+ "insect",
"plasmaman",
+ "mammal",
+ "xeno",
"other"
)
diff --git a/code/game/objects/effects/spawners/bundle.dm b/code/game/objects/effects/spawners/bundle.dm
index 2fe8d2a460..b9acba70d9 100644
--- a/code/game/objects/effects/spawners/bundle.dm
+++ b/code/game/objects/effects/spawners/bundle.dm
@@ -133,7 +133,7 @@
/obj/effect/spawner/bundle/costume/holiday_priest
name = "holiday priest costume spawner"
items = list(
- /obj/item/clothing/suit/holidaypriest)
+ /obj/item/clothing/suit/chaplain/holidaypriest)
/obj/effect/spawner/bundle/costume/marisawizard
name = "marisa wizard costume spawner"
diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm
index 185875a93f..5e8250ea00 100644
--- a/code/game/objects/items/holy_weapons.dm
+++ b/code/game/objects/items/holy_weapons.dm
@@ -34,6 +34,7 @@
desc = "God wills it!"
icon_state = "knight_templar"
item_state = "knight_templar"
+ allowed = list(/obj/item/storage/book/bible, HOLY_WEAPONS, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
// CITADEL CHANGES: More variants
/obj/item/clothing/suit/armor/riot/chaplain/teutonic
@@ -122,7 +123,6 @@
icon_state = "studentuni"
item_state = "studentuni"
body_parts_covered = ARMS|CHEST
- allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
/obj/item/clothing/head/helmet/chaplain/cage
name = "cage"
@@ -166,7 +166,6 @@
icon_state = "witchhunter"
item_state = "witchhunter"
body_parts_covered = CHEST|GROIN|LEGS|ARMS
- allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
/obj/item/clothing/head/helmet/chaplain/witchunter_hat
name = "witchunter hat"
@@ -191,7 +190,7 @@
icon_state = "chaplain_hoodie"
item_state = "chaplain_hoodie"
body_parts_covered = CHEST|GROIN|LEGS|ARMS
- allowed = list(/obj/item/storage/book/bible, /obj/item/nullrod, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
+ allowed = list(/obj/item/storage/book/bible, HOLY_WEAPONS, /obj/item/reagent_containers/food/drinks/bottle/holywater, /obj/item/storage/fancy/candle_box, /obj/item/candle, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman)
hoodtype = /obj/item/clothing/head/hooded/chaplain_hood
/obj/item/clothing/head/hooded/chaplain_hood
@@ -248,12 +247,7 @@
if(GLOB.holy_weapon_type)
return
var/obj/item/holy_weapon
- var/list/holy_weapons_list = typesof(/obj/item/nullrod) + list(
- /obj/item/twohanded/dualsaber/hypereutactic/chaplain,
- /obj/item/gun/energy/laser/redtag/hitscan/chaplain,
- /obj/item/multitool/chaplain,
- /obj/item/melee/baseball_bat/chaplain
- )
+ var/list/holy_weapons_list = subtypesof(/obj/item/nullrod) + list(HOLY_WEAPONS)
var/list/display_names = list()
for(var/V in holy_weapons_list)
var/obj/item/nullrod/rodtype = V
diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm
index f9affc230d..10b84917bb 100644
--- a/code/game/objects/items/melee/misc.dm
+++ b/code/game/objects/items/melee/misc.dm
@@ -180,8 +180,13 @@
slot_flags = ITEM_SLOT_BELT
force = 12 //9 hit crit
w_class = WEIGHT_CLASS_NORMAL
- var/cooldown = 0
+ var/cooldown = 13
var/on = TRUE
+ var/last_hit = 0
+ var/stun_stam_cost_coeff = 1.25
+ var/hardstun_ds = 1
+ var/softstun_ds = 0
+ var/stam_dmg = 30
/obj/item/melee/classic_baton/attack(mob/living/target, mob/living/user)
if(!on)
@@ -207,12 +212,10 @@
if(!isliving(target))
return
if (user.a_intent == INTENT_HARM)
- if(!..())
- return
- if(!iscyborg(target))
+ if(!..() || !iscyborg(target))
return
else
- if(cooldown <= world.time)
+ if(last_hit < world.time)
if(ishuman(target))
var/mob/living/carbon/human/H = target
if (H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
@@ -220,7 +223,7 @@
if(check_martial_counter(H, user))
return
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
- target.Knockdown(60)
+ target.Knockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
log_combat(user, target, "stunned", src)
src.add_fingerprint(user)
target.visible_message("[user] has knocked down [target] with [src]!", \
@@ -229,7 +232,7 @@
target.LAssailant = null
else
target.LAssailant = user
- cooldown = world.time
+ last_hit = world.time + cooldown
user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes swinging batons cost stamina
/obj/item/melee/classic_baton/telescopic
@@ -245,7 +248,7 @@
item_flags = NONE
force = 0
on = FALSE
- total_mass = TOTAL_MASS_SMALL_ITEM
+ total_mass = TOTAL_MASS_NORMAL_ITEM
/obj/item/melee/classic_baton/telescopic/suicide_act(mob/user)
var/mob/living/carbon/human/H = user
diff --git a/code/game/objects/structures/crates_lockers/closets/job_closets.dm b/code/game/objects/structures/crates_lockers/closets/job_closets.dm
index d2ab9ea6fb..b49d0a77d5 100644
--- a/code/game/objects/structures/crates_lockers/closets/job_closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets/job_closets.dm
@@ -111,9 +111,9 @@
new /obj/item/clothing/accessory/pocketprotector/cosmetology(src)
new /obj/item/clothing/under/rank/chaplain(src)
new /obj/item/clothing/shoes/sneakers/black(src)
- new /obj/item/clothing/suit/nun(src)
+ new /obj/item/clothing/suit/chaplain/nun(src)
new /obj/item/clothing/head/nun_hood(src)
- new /obj/item/clothing/suit/holidaypriest(src)
+ new /obj/item/clothing/suit/chaplain/holidaypriest(src)
new /obj/item/storage/backpack/cultpack(src)
new /obj/item/storage/fancy/candle_box(src)
new /obj/item/storage/fancy/candle_box(src)
diff --git a/code/game/objects/structures/dresser.dm b/code/game/objects/structures/dresser.dm
index cdca354563..05e62c196f 100644
--- a/code/game/objects/structures/dresser.dm
+++ b/code/game/objects/structures/dresser.dm
@@ -79,4 +79,4 @@
var/n_color = input(H, "Choose your [garment_type]'\s color.", "Character Preference", default_color) as color|null
if(!n_color || !H.canUseTopic(src, BE_CLOSE, FALSE, NO_TK))
return default_color
- return sanitize_hexcolor(n_color)
+ return sanitize_hexcolor(n_color, 3, FALSE, default_color)
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index b400f44b98..555c35980d 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -423,6 +423,25 @@
if(GLOB.master_mode == "secret")
dat += "(Force Secret Mode) "
+ if(GLOB.master_mode == "dynamic")
+ if(SSticker.current_state <= GAME_STATE_PREGAME)
+ dat += "(Force Roundstart Rulesets) "
+ if (GLOB.dynamic_forced_roundstart_ruleset.len > 0)
+ for(var/datum/dynamic_ruleset/roundstart/rule in GLOB.dynamic_forced_roundstart_ruleset)
+ dat += {"-> [rule.name] <- "}
+ dat += "(Clear Rulesets) "
+ dat += "(Dynamic mode options) "
+ else if (SSticker.IsRoundInProgress())
+ dat += "(Force Next Latejoin Ruleset) "
+ if (SSticker && SSticker.mode && istype(SSticker.mode,/datum/game_mode/dynamic))
+ var/datum/game_mode/dynamic/mode = SSticker.mode
+ if (mode.forced_latejoin_rule)
+ dat += {"-> [mode.forced_latejoin_rule.name] <- "}
+ dat += "(Execute Midround Ruleset!) "
+ dat += ""
+ if(SSticker.IsRoundInProgress())
+ dat += "(Game Mode Panel) "
+
dat += {"
Create Object
@@ -839,6 +858,44 @@
browser.set_content(dat.Join())
browser.open()
+/datum/admins/proc/dynamic_mode_options(mob/user)
+ var/dat = {"
+
Dynamic Mode Options
+
+
Common options
+ All these options can be changed midround.
+
+ Force extended: - Option is [GLOB.dynamic_forced_extended ? "ON" : "OFF"].
+ This will force the round to be extended. No rulesets will be drafted.
+
+ No stacking: - Option is [GLOB.dynamic_no_stacking ? "ON" : "OFF"].
+ Unless the threat goes above [GLOB.dynamic_stacking_limit], only one "round-ender" ruleset will be drafted.
+
+ Classic secret mode: - Option is [GLOB.dynamic_classic_secret ? "ON" : "OFF"].
+ Only one roundstart ruleset will be drafted. Only traitors and minor roles will latespawn.
+
+
+ Forced threat level: Current value : [GLOB.dynamic_forced_threat_level].
+ The value threat is set to if it is higher than -1.
+
+ High population limit: Current value : [GLOB.dynamic_high_pop_limit].
+ The threshold at which "high population override" will be in effect.
+
+ Stacking threeshold: Current value : [GLOB.dynamic_stacking_limit].
+ The threshold at which "round-ender" rulesets will stack. A value higher than 100 ensure this never happens.
+
Advanced parameters
+ Curve centre: -> [GLOB.dynamic_curve_centre] <-
+ Curve width: -> [GLOB.dynamic_curve_width] <-
+ Latejoin injection delay:
+ Minimum: -> [GLOB.dynamic_latejoin_delay_min / 60 / 10] <- Minutes
+ Maximum: -> [GLOB.dynamic_latejoin_delay_max / 60 / 10] <- Minutes
+ Midround injection delay:
+ Minimum: -> [GLOB.dynamic_midround_delay_min / 60 / 10] <- Minutes
+ Maximum: -> [GLOB.dynamic_midround_delay_max / 60 / 10] <- Minutes
+ "}
+
+ user << browse(dat, "window=dyn_mode_options;size=900x650")
+
/datum/admins/proc/create_or_modify_area()
set category = "Debug"
set name = "Create or modify area"
diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm
index f66cda42dc..8b6f471e7d 100644
--- a/code/modules/admin/create_mob.dm
+++ b/code/modules/admin/create_mob.dm
@@ -34,7 +34,8 @@
H.dna.features["frills"] = pick(GLOB.frills_list)
H.dna.features["spines"] = pick(GLOB.spines_list)
H.dna.features["body_markings"] = pick(GLOB.body_markings_list)
- H.dna.features["moth_wings"] = pick(GLOB.moth_wings_list)
+ H.dna.features["insect_wings"] = pick(GLOB.insect_wings_list)
+ H.dna.features["insect_fluff"] = pick(GLOB.insect_fluffs_list)
H.update_body()
H.update_hair()
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index d881044757..91df9ef85c 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -291,6 +291,11 @@
else if(href_list["editrights"])
edit_rights_topic(href_list)
+ else if(href_list["gamemode_panel"])
+ if(!check_rights(R_ADMIN))
+ return
+ SSticker.mode.admin_panel()
+
else if(href_list["call_shuttle"])
if(!check_rights(R_ADMIN))
return
@@ -1342,6 +1347,291 @@
else if(href_list["f_secret"])
return HandleFSecret()
+
+ else if(href_list["f_dynamic_roundstart"])
+ if(!check_rights(R_ADMIN))
+ return
+ if(SSticker && SSticker.mode)
+ return alert(usr, "The game has already started.", null, null, null, null)
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode.", null, null, null, null)
+ var/roundstart_rules = list()
+ for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart))
+ var/datum/dynamic_ruleset/roundstart/newrule = new rule()
+ roundstart_rules[newrule.name] = newrule
+ var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in roundstart_rules
+ if (added_rule)
+ GLOB.dynamic_forced_roundstart_ruleset += roundstart_rules[added_rule]
+ log_admin("[key_name(usr)] set [added_rule] to be a forced roundstart ruleset.")
+ message_admins("[key_name(usr)] set [added_rule] to be a forced roundstart ruleset.", 1)
+ Game()
+
+ else if(href_list["f_dynamic_roundstart_clear"])
+ if(!check_rights(R_ADMIN))
+ return
+ GLOB.dynamic_forced_roundstart_ruleset = list()
+ Game()
+ log_admin("[key_name(usr)] cleared the rigged roundstart rulesets. The mode will pick them as normal.")
+ message_admins("[key_name(usr)] cleared the rigged roundstart rulesets. The mode will pick them as normal.", 1)
+
+ else if(href_list["f_dynamic_roundstart_remove"])
+ if(!check_rights(R_ADMIN))
+ return
+ var/datum/dynamic_ruleset/roundstart/rule = locate(href_list["f_dynamic_roundstart_remove"])
+ GLOB.dynamic_forced_roundstart_ruleset -= rule
+ Game()
+ log_admin("[key_name(usr)] removed [rule] from the forced roundstart rulesets.")
+ message_admins("[key_name(usr)] removed [rule] from the forced roundstart rulesets.", 1)
+
+ else if(href_list["f_dynamic_latejoin"])
+ if(!check_rights(R_ADMIN))
+ return
+ if(!SSticker || !SSticker.mode)
+ return alert(usr, "The game must start first.", null, null, null, null)
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+ var/latejoin_rules = list()
+ for (var/rule in subtypesof(/datum/dynamic_ruleset/latejoin))
+ var/datum/dynamic_ruleset/latejoin/newrule = new rule()
+ latejoin_rules[newrule.name] = newrule
+ var/added_rule = input(usr,"What ruleset do you want to force upon the next latejoiner? This will bypass threat level and population restrictions.", "Rigging Latejoin", null) as null|anything in latejoin_rules
+ if (added_rule)
+ var/datum/game_mode/dynamic/mode = SSticker.mode
+ mode.forced_latejoin_rule = latejoin_rules[added_rule]
+ log_admin("[key_name(usr)] set [added_rule] to proc on the next latejoin.")
+ message_admins("[key_name(usr)] set [added_rule] to proc on the next latejoin.", 1)
+ Game()
+
+ else if(href_list["f_dynamic_latejoin_clear"])
+ if(!check_rights(R_ADMIN))
+ return
+ if (SSticker && SSticker.mode && istype(SSticker.mode,/datum/game_mode/dynamic))
+ var/datum/game_mode/dynamic/mode = SSticker.mode
+ mode.forced_latejoin_rule = null
+ Game()
+ log_admin("[key_name(usr)] cleared the forced latejoin ruleset.")
+ message_admins("[key_name(usr)] cleared the forced latejoin ruleset.", 1)
+
+ else if(href_list["f_dynamic_midround"])
+ if(!check_rights(R_ADMIN))
+ return
+ if(!SSticker || !SSticker.mode)
+ return alert(usr, "The game must start first.", null, null, null, null)
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+ var/midround_rules = list()
+ for (var/rule in subtypesof(/datum/dynamic_ruleset/midround))
+ var/datum/dynamic_ruleset/midround/newrule = new rule()
+ midround_rules[newrule.name] = rule
+ var/added_rule = input(usr,"What ruleset do you want to force right now? This will bypass threat level and population restrictions.", "Execute Ruleset", null) as null|anything in midround_rules
+ if (added_rule)
+ var/datum/game_mode/dynamic/mode = SSticker.mode
+ log_admin("[key_name(usr)] executed the [added_rule] ruleset.")
+ message_admins("[key_name(usr)] executed the [added_rule] ruleset.", 1)
+ mode.picking_specific_rule(midround_rules[added_rule],1)
+
+ else if (href_list["f_dynamic_options"])
+ if(!check_rights(R_ADMIN))
+ return
+
+ if(SSticker && SSticker.mode)
+ return alert(usr, "The game has already started.", null, null, null, null)
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+
+ dynamic_mode_options(usr)
+
+ else if(href_list["f_dynamic_roundstart_centre"])
+ if(!check_rights(R_ADMIN))
+ return
+ if(SSticker && SSticker.mode)
+ return alert(usr, "The game has already started.", null, null, null, null)
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+
+ var/new_centre = input(usr,"Change the centre of the dynamic mode threat curve. A negative value will give a more peaceful round ; a positive value, a round with higher threat. Any number between -5 and +5 is allowed.", "Change curve centre", null) as num
+ if (new_centre < -5 || new_centre > 5)
+ return alert(usr, "Only values between -5 and +5 are allowed.", null, null, null, null)
+
+ log_admin("[key_name(usr)] changed the distribution curve center to [new_centre].")
+ message_admins("[key_name(usr)] changed the distribution curve center to [new_centre]", 1)
+ GLOB.dynamic_curve_centre = new_centre
+ dynamic_mode_options(usr)
+
+ else if(href_list["f_dynamic_roundstart_width"])
+ if(!check_rights(R_ADMIN))
+ return
+ if(SSticker && SSticker.mode)
+ return alert(usr, "The game has already started.", null, null, null, null)
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+
+ var/new_width = input(usr,"Change the width of the dynamic mode threat curve. A higher value will favour extreme rounds ; a lower value, a round closer to the average. Any Number between 0.5 and 4 are allowed.", "Change curve width", null) as num
+ if (new_width < 0.5 || new_width > 4)
+ return alert(usr, "Only values between 0.5 and +2.5 are allowed.", null, null, null, null)
+
+ log_admin("[key_name(usr)] changed the distribution curve width to [new_width].")
+ message_admins("[key_name(usr)] changed the distribution curve width to [new_width]", 1)
+ GLOB.dynamic_curve_width = new_width
+ dynamic_mode_options(usr)
+
+ else if(href_list["f_dynamic_roundstart_latejoin_min"])
+ if(!check_rights(R_ADMIN))
+ return
+ if(SSticker && SSticker.mode)
+ return alert(usr, "The game has already started.", null, null, null, null)
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+ var/new_min = input(usr,"Change the minimum delay of latejoin injection in minutes.", "Change latejoin injection delay minimum", null) as num
+ if(new_min <= 0)
+ return alert(usr, "The minimum can't be zero or lower.", null, null, null, null)
+ if((new_min MINUTES) > GLOB.dynamic_latejoin_delay_max)
+ return alert(usr, "The minimum must be lower than the maximum.", null, null, null, null)
+
+ log_admin("[key_name(usr)] changed the latejoin injection minimum delay to [new_min] minutes.")
+ message_admins("[key_name(usr)] changed the latejoin injection minimum delay to [new_min] minutes", 1)
+ GLOB.dynamic_latejoin_delay_min = (new_min MINUTES)
+ dynamic_mode_options(usr)
+
+ else if(href_list["f_dynamic_roundstart_latejoin_max"])
+ if(!check_rights(R_ADMIN))
+ return
+ if(SSticker && SSticker.mode)
+ return alert(usr, "The game has already started.", null, null, null, null)
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+ var/new_max = input(usr,"Change the maximum delay of latejoin injection in minutes.", "Change latejoin injection delay maximum", null) as num
+ if(new_max <= 0)
+ return alert(usr, "The maximum can't be zero or lower.", null, null, null, null)
+ if((new_max MINUTES) < GLOB.dynamic_latejoin_delay_min)
+ return alert(usr, "The maximum must be higher than the minimum.", null, null, null, null)
+
+ log_admin("[key_name(usr)] changed the latejoin injection maximum delay to [new_max] minutes.")
+ message_admins("[key_name(usr)] changed the latejoin injection maximum delay to [new_max] minutes", 1)
+ GLOB.dynamic_latejoin_delay_max = (new_max MINUTES)
+ dynamic_mode_options(usr)
+
+ else if(href_list["f_dynamic_roundstart_midround_min"])
+ if(!check_rights(R_ADMIN))
+ return
+ if(SSticker && SSticker.mode)
+ return alert(usr, "The game has already started.", null, null, null, null)
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+ var/new_min = input(usr,"Change the minimum delay of midround injection in minutes.", "Change midround injection delay minimum", null) as num
+ if(new_min <= 0)
+ return alert(usr, "The minimum can't be zero or lower.", null, null, null, null)
+ if((new_min MINUTES) > GLOB.dynamic_midround_delay_max)
+ return alert(usr, "The minimum must be lower than the maximum.", null, null, null, null)
+
+ log_admin("[key_name(usr)] changed the midround injection minimum delay to [new_min] minutes.")
+ message_admins("[key_name(usr)] changed the midround injection minimum delay to [new_min] minutes", 1)
+ GLOB.dynamic_midround_delay_min = (new_min MINUTES)
+ dynamic_mode_options(usr)
+
+ else if(href_list["f_dynamic_roundstart_midround_max"])
+ if(!check_rights(R_ADMIN))
+ return
+ if(SSticker && SSticker.mode)
+ return alert(usr, "The game has already started.", null, null, null, null)
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+ var/new_max = input(usr,"Change the maximum delay of midround injection in minutes.", "Change midround injection delay maximum", null) as num
+ if(new_max <= 0)
+ return alert(usr, "The maximum can't be zero or lower.", null, null, null, null)
+ if((new_max MINUTES) > GLOB.dynamic_midround_delay_max)
+ return alert(usr, "The maximum must be higher than the minimum.", null, null, null, null)
+
+ log_admin("[key_name(usr)] changed the midround injection maximum delay to [new_max] minutes.")
+ message_admins("[key_name(usr)] changed the midround injection maximum delay to [new_max] minutes", 1)
+ GLOB.dynamic_midround_delay_max = (new_max MINUTES)
+ dynamic_mode_options(usr)
+
+ else if(href_list["f_dynamic_force_extended"])
+ if(!check_rights(R_ADMIN))
+ return
+
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+
+ GLOB.dynamic_forced_extended = !GLOB.dynamic_forced_extended
+ log_admin("[key_name(usr)] set 'forced_extended' to [GLOB.dynamic_forced_extended].")
+ message_admins("[key_name(usr)] set 'forced_extended' to [GLOB.dynamic_forced_extended].")
+ dynamic_mode_options(usr)
+
+ else if(href_list["f_dynamic_no_stacking"])
+ if(!check_rights(R_ADMIN))
+ return
+
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+
+ GLOB.dynamic_no_stacking = !GLOB.dynamic_no_stacking
+ log_admin("[key_name(usr)] set 'no_stacking' to [GLOB.dynamic_no_stacking].")
+ message_admins("[key_name(usr)] set 'no_stacking' to [GLOB.dynamic_no_stacking].")
+ dynamic_mode_options(usr)
+
+ else if(href_list["f_dynamic_classic_secret"])
+ if(!check_rights(R_ADMIN))
+ return
+
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+
+ GLOB.dynamic_classic_secret = !GLOB.dynamic_classic_secret
+ log_admin("[key_name(usr)] set 'classic_secret' to [GLOB.dynamic_classic_secret].")
+ message_admins("[key_name(usr)] set 'classic_secret' to [GLOB.dynamic_classic_secret].")
+ dynamic_mode_options(usr)
+
+ else if(href_list["f_dynamic_stacking_limit"])
+ if(!check_rights(R_ADMIN))
+ return
+
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+
+ GLOB.dynamic_stacking_limit = input(usr,"Change the threat limit at which round-endings rulesets will start to stack.", "Change stacking limit", null) as num
+ log_admin("[key_name(usr)] set 'stacking_limit' to [GLOB.dynamic_stacking_limit].")
+ message_admins("[key_name(usr)] set 'stacking_limit' to [GLOB.dynamic_stacking_limit].")
+ dynamic_mode_options(usr)
+
+ else if(href_list["f_dynamic_high_pop_limit"])
+ if(!check_rights(R_ADMIN))
+ return
+
+ if(SSticker && SSticker.mode)
+ return alert(usr, "The game has already started.", null, null, null, null)
+
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+
+ var/new_value = input(usr, "Enter the high-pop override threshold for dynamic mode.", "High pop override") as num
+ if (new_value < 0)
+ return alert(usr, "Only positive values allowed!", null, null, null, null)
+ GLOB.dynamic_high_pop_limit = new_value
+
+ log_admin("[key_name(usr)] set 'high_pop_limit' to [GLOB.dynamic_high_pop_limit].")
+ message_admins("[key_name(usr)] set 'high_pop_limit' to [GLOB.dynamic_high_pop_limit].")
+ dynamic_mode_options(usr)
+
+ else if(href_list["f_dynamic_forced_threat"])
+ if(!check_rights(R_ADMIN))
+ return
+
+ if(SSticker && SSticker.mode)
+ return alert(usr, "The game has already started.", null, null, null, null)
+
+ if(GLOB.master_mode != "dynamic")
+ return alert(usr, "The game mode has to be dynamic mode!", null, null, null, null)
+
+ var/new_value = input(usr, "Enter the forced threat level for dynamic mode.", "Forced threat level") as num
+ if (new_value > 100)
+ return alert(usr, "The value must be be under 100.", null, null, null, null)
+ GLOB.dynamic_forced_threat_level = new_value
+
+ log_admin("[key_name(usr)] set 'forced_threat_level' to [GLOB.dynamic_forced_threat_level].")
+ message_admins("[key_name(usr)] set 'forced_threat_level' to [GLOB.dynamic_forced_threat_level].")
+ dynamic_mode_options(usr)
else if(href_list["c_mode2"])
if(!check_rights(R_ADMIN|R_SERVER))
diff --git a/code/modules/antagonists/abductor/equipment/gland.dm b/code/modules/antagonists/abductor/equipment/gland.dm
index 8a3ff2186a..72edb18020 100644
--- a/code/modules/antagonists/abductor/equipment/gland.dm
+++ b/code/modules/antagonists/abductor/equipment/gland.dm
@@ -167,7 +167,7 @@
/obj/item/organ/heart/gland/pop/activate()
to_chat(owner, "You feel unlike yourself.")
randomize_human(owner)
- var/species = pick(list(/datum/species/human, /datum/species/lizard, /datum/species/moth, /datum/species/fly))
+ var/species = pick(list(/datum/species/human, /datum/species/lizard, /datum/species/insect, /datum/species/fly))
owner.set_species(species)
/obj/item/organ/heart/gland/ventcrawling
diff --git a/code/modules/antagonists/changeling/powers/strained_muscles.dm b/code/modules/antagonists/changeling/powers/strained_muscles.dm
index bdbd38b92d..081b1181dc 100644
--- a/code/modules/antagonists/changeling/powers/strained_muscles.dm
+++ b/code/modules/antagonists/changeling/powers/strained_muscles.dm
@@ -34,6 +34,7 @@
return TRUE
/obj/effect/proc_holder/changeling/strained_muscles/proc/muscle_loop(mob/living/carbon/user)
+ var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
while(active)
ADD_TRAIT(user, TRAIT_GOTTAGOFAST, "changeling_muscles")
if(user.stat != CONSCIOUS || user.staminaloss >= 90)
@@ -41,6 +42,7 @@
to_chat(user, "Our muscles relax without the energy to strengthen them.")
user.Knockdown(40)
REMOVE_TRAIT(user, TRAIT_GOTTAGOFAST, "changeling_muscles")
+ changeling.chem_recharge_slowdown -= 0.5
break
stacks++
diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm
index 7216b73af6..a54584d6cc 100644
--- a/code/modules/client/client_defines.dm
+++ b/code/modules/client/client_defines.dm
@@ -75,3 +75,8 @@
var/datum/player_details/player_details //these persist between logins/logouts during the same round.
var/list/char_render_holders //Should only be a key-value list of north/south/east/west = obj/screen.
+
+ var/client_keysend_amount = 0
+ var/next_keysend_reset = 0
+ var/next_keysend_trip_reset = 0
+ var/keysend_tripped = FALSE
\ No newline at end of file
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index d487b873b1..f9fc7b9221 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -85,6 +85,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/facial_hair_color = "000" //Facial hair color
var/skin_tone = "caucasian1" //Skin color
var/eye_color = "000" //Eye color
+ var/horn_color = "85615a" //Horn color
var/datum/species/pref_species = new /datum/species/human() //Mutant race
var/list/features = list("mcolor" = "FFF",
"tail_lizard" = "Smooth",
@@ -96,8 +97,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
"frills" = "None",
"spines" = "None",
"body_markings" = "None",
- "legs" = "Normal Legs",
- "moth_wings" = "Plain",
+ "legs" = "Plantigrade",
+ "insect_wings" = "Plain",
+ "insect_fluff" = "None",
"mcolor2" = "FFF",
"mcolor3" = "FFF",
"mam_body_markings" = "Plain",
@@ -157,7 +159,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
"womb_fluid" = "femcum",
"ipc_screen" = "Sunburst",
"ipc_antenna" = "None",
- "flavor_text" = ""
+ "flavor_text" = "",
+ "meat_type" = "Mammalian"
)
var/list/custom_names = list()
@@ -172,18 +175,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/list/all_quirks = list()
var/list/character_quirks = list()
- //Jobs, uses bitflags
- var/job_civilian_high = 0
- var/job_civilian_med = 0
- var/job_civilian_low = 0
-
- var/job_medsci_high = 0
- var/job_medsci_med = 0
- var/job_medsci_low = 0
-
- var/job_engsec_high = 0
- var/job_engsec_med = 0
- var/job_engsec_low = 0
+ //Job preferences 2.0 - indexed by job title , no key or value implies never
+ var/list/job_preferences = list()
// Want randomjob if preferences already filled - Donkie
var/joblessrole = BERANDOMJOB //defaults to 1 for fewer assistants
@@ -241,7 +234,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
return
#define APPEARANCE_CATEGORY_COLUMN "
"
+ mutant_category = 0
+
+ if("meat_type" in pref_species.default_features)
+ if(!mutant_category)
+ dat += APPEARANCE_CATEGORY_COLUMN
+
+ dat += "
Meat Type
"
+
+ dat += "[features["meat_type"]]"
+
mutant_category++
if(mutant_category >= MAX_MUTANT_ROWS)
dat += ""
@@ -471,6 +477,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "
Horns
"
dat += "[features["horns"]]"
+ dat += "Change "
+
mutant_category++
if(mutant_category >= MAX_MUTANT_ROWS)
@@ -537,6 +545,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(mutant_category >= MAX_MUTANT_ROWS)
dat += ""
mutant_category = 0
+
if("ears" in pref_species.default_features)
if(!mutant_category)
dat += APPEARANCE_CATEGORY_COLUMN
@@ -549,6 +558,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(mutant_category >= MAX_MUTANT_ROWS)
dat += ""
mutant_category = 0
+
if("mam_snouts" in pref_species.default_features)
if(!mutant_category)
dat += APPEARANCE_CATEGORY_COLUMN
@@ -573,14 +583,24 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(mutant_category >= MAX_MUTANT_ROWS)
dat += ""
mutant_category = 0
- if("moth_wings" in pref_species.default_features)
+ if("insect_wings" in pref_species.default_features)
if(!mutant_category)
dat += APPEARANCE_CATEGORY_COLUMN
- dat += "
Moth wings
"
+ dat += "
Insect wings
"
- dat += "[features["moth_wings"]]"
+ dat += "[features["insect_wings"]]"
+ mutant_category++
+ if(mutant_category >= MAX_MUTANT_ROWS)
+ dat += ""
+ mutant_category = 0
+ if("insect_fluff" in pref_species.default_features)
+ if(!mutant_category)
+ dat += APPEARANCE_CATEGORY_COLUMN
+ dat += "
Insect Fluff
"
+
+ dat += "[features["insect_fluff"]]"
mutant_category++
if(mutant_category >= MAX_MUTANT_ROWS)
dat += ""
@@ -681,13 +701,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "
Clothing & Equipment
"
dat += "Underwear:[underwear]"
if(UNDIE_COLORABLE(GLOB.underwear_list[underwear]))
- dat += "Underwear Color:[undie_color]"
+ dat += "Underwear Color:Change "
dat += "Undershirt:[undershirt]"
if(UNDIE_COLORABLE(GLOB.undershirt_list[undershirt]))
- dat += "Undershirt Color:[shirt_color]"
+ dat += "Undershirt Color:Change "
dat += "Socks:[socks]"
if(UNDIE_COLORABLE(GLOB.socks_list[socks]))
- dat += "Socks Color:[socks_color]"
+ dat += "Socks Color:Change "
dat += "Backpack:[backbag]"
dat += "Jumpsuit: [jumpsuit_style] "
dat += "Uplink Location:[uplink_spawn_loc]"
@@ -992,9 +1012,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
var/datum/job/lastJob
- var/datum/job/overflow = SSjob.GetJob(SSjob.overflow_role)
-
- for(var/datum/job/job in SSjob.occupations)
+ for(var/datum/job/job in sortList(SSjob.occupations, /proc/cmp_job_display_asc))
index += 1
if((index >= limit) || (job.title in splitJobs))
@@ -1011,7 +1029,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/rank = job.title
lastJob = job
if(jobban_isbanned(user, rank))
- HTML += "[rank]
"
-
- if(!IsGuestKey(src.key))
- if (SSdbcore.Connect())
- var/isadmin = 0
- if(src.client && src.client.holder)
- isadmin = 1
- var/datum/DBQuery/query_get_new_polls = SSdbcore.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = \"[sanitizeSQL(ckey)]\") AND id NOT IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = \"[sanitizeSQL(ckey)]\")")
- var/rs = REF(src)
- if(query_get_new_polls.Execute())
- var/newpoll = 0
- if(query_get_new_polls.NextRow())
- newpoll = 1
-
- if(newpoll)
- output += "
"
+
+ if(!IsGuestKey(src.key))
+ if (SSdbcore.Connect())
+ var/isadmin = 0
+ if(src.client && src.client.holder)
+ isadmin = 1
+ var/datum/DBQuery/query_get_new_polls = SSdbcore.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = \"[sanitizeSQL(ckey)]\") AND id NOT IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = \"[sanitizeSQL(ckey)]\")")
+ var/rs = REF(src)
+ if(query_get_new_polls.Execute())
+ var/newpoll = 0
+ if(query_get_new_polls.NextRow())
+ newpoll = 1
+
+ if(newpoll)
+ output += "
"
+ for(var/jobcat in categorizedJobs)
+ if(!length(categorizedJobs[jobcat]["jobs"]))
+ continue
+ var/color = categorizedJobs[jobcat]["color"]
+ dat += " "
+ dat += "
"
+ dat += ""
+
+ var/datum/browser/popup = new(src, "latechoices", "Choose Profession", 720, 600)
+ popup.add_stylesheet("playeroptions", 'html/browser/playeroptions.css')
+ popup.set_content(jointext(dat, ""))
+ popup.open(FALSE) // FALSE is passed to open so that it doesn't use the onclose() proc
+
+/mob/dead/new_player/proc/create_character(transfer_after)
+ spawning = 1
+ close_spawn_windows()
+
+ var/mob/living/carbon/human/H = new(loc)
+
+ var/frn = CONFIG_GET(flag/force_random_names)
+ if(!frn)
+ frn = jobban_isbanned(src, "appearance")
+ if(QDELETED(src))
+ return
+ if(frn)
+ client.prefs.random_character()
+ client.prefs.real_name = client.prefs.pref_species.random_name(gender,1)
+ client.prefs.copy_to(H)
+ H.dna.update_dna_identity()
+ if(mind)
+ if(transfer_after)
+ mind.late_joiner = TRUE
+ mind.active = 0 //we wish to transfer the key manually
+ mind.transfer_to(H) //won't transfer key since the mind is not active
+
+ H.name = real_name
+
+ . = H
+ new_character = .
+ if(transfer_after)
+ transfer_character()
+
+/mob/dead/new_player/proc/transfer_character()
+ . = new_character
+ if(.)
+ new_character.key = key //Manually transfer the key to log them in
+ new_character.stop_sound_channel(CHANNEL_LOBBYMUSIC)
+ new_character = null
+ qdel(src)
+
+/mob/dead/new_player/proc/ViewManifest()
+ var/dat = ""
+ dat += "
Crew Manifest
"
+ dat += GLOB.data_core.get_manifest(OOC = 1)
+
+ src << browse(dat, "window=manifest;size=387x420;can_close=1")
+
+/mob/dead/new_player/Move()
+ return 0
+
+
+/mob/dead/new_player/proc/close_spawn_windows()
+
+ src << browse(null, "window=latechoices") //closes late choices window
+ src << browse(null, "window=playersetup") //closes the player setup window
+ src << browse(null, "window=preferences") //closes job selection
+ src << browse(null, "window=mob_occupation")
+ src << browse(null, "window=latechoices") //closes late job selection
+
+/* Used to make sure that a player has a valid job preference setup, used to knock players out of eligibility for anything if their prefs don't make sense.
+ A "valid job preference setup" in this situation means at least having one job set to low, or not having "return to lobby" enabled
+ Prevents "antag rolling" by setting antag prefs on, all jobs to never, and "return to lobby if preferences not availible"
+ Doing so would previously allow you to roll for antag, then send you back to lobby if you didn't get an antag role
+ This also does some admin notification and logging as well, as well as some extra logic to make sure things don't go wrong
+*/
+
+/mob/dead/new_player/proc/check_preferences()
+ if(!client)
+ return FALSE //Not sure how this would get run without the mob having a client, but let's just be safe.
+ if(client.prefs.joblessrole != RETURNTOLOBBY)
+ return TRUE
+ // If they have antags enabled, they're potentially doing this on purpose instead of by accident. Notify admins if so.
+ var/has_antags = FALSE
+ if(client.prefs.be_special.len > 0)
+ has_antags = TRUE
+ if(client.prefs.job_preferences.len == 0)
+ if(!ineligible_for_roles)
+ to_chat(src, "You have no jobs enabled, along with return to lobby if job is unavailable. This makes you ineligible for any round start role, please update your job preferences.")
+ ineligible_for_roles = TRUE
+ ready = PLAYER_NOT_READY
+ if(has_antags)
+ log_admin("[src.ckey] just got booted back to lobby with no jobs, but antags enabled.")
+ message_admins("[src.ckey] just got booted back to lobby with no jobs enabled, but antag rolling enabled. Likely antag rolling abuse.")
+
+ return FALSE //This is the only case someone should actually be completely blocked from antag rolling as well
+ return TRUE
diff --git a/code/modules/mob/dead/new_player/preferences_setup.dm b/code/modules/mob/dead/new_player/preferences_setup.dm
index 6e91b58506..994d082585 100644
--- a/code/modules/mob/dead/new_player/preferences_setup.dm
+++ b/code/modules/mob/dead/new_player/preferences_setup.dm
@@ -24,50 +24,35 @@
age = rand(AGE_MIN,AGE_MAX)
/datum/preferences/proc/update_preview_icon()
- // Silicons only need a very basic preview since there is no customization for them.
-// var/wide_icon = FALSE //CITDEL THINGS
-// if(features["taur"] != "None")
-// wide_icon = TRUE
- if(job_engsec_high)
- switch(job_engsec_high)
- if(AI_JF)
- parent.show_character_previews(image('icons/mob/ai.dmi', resolve_ai_icon(preferred_ai_core_display), dir = SOUTH))
- return
- if(CYBORG)
- parent.show_character_previews(image('icons/mob/robots.dmi', icon_state = "robot", dir = SOUTH))
- return
+ // Determine what job is marked as 'High' priority, and dress them up as such.
+ var/datum/job/previewJob
+ var/highest_pref = 0
+ for(var/job in job_preferences)
+ if(job_preferences["[job]"] > highest_pref)
+ previewJob = SSjob.GetJob(job)
+ highest_pref = job_preferences["[job]"]
+
+ if(previewJob)
+ // Silicons only need a very basic preview since there is no customization for them.
+ if(istype(previewJob,/datum/job/ai))
+ parent.show_character_previews(image('icons/mob/ai.dmi', icon_state = resolve_ai_icon(preferred_ai_core_display), dir = SOUTH))
+ return
+ if(istype(previewJob,/datum/job/cyborg))
+ parent.show_character_previews(image('icons/mob/robots.dmi', icon_state = "robot", dir = SOUTH))
+ return
// Set up the dummy for its photoshoot
var/mob/living/carbon/human/dummy/mannequin = generate_or_wait_for_human_dummy(DUMMY_HUMAN_SLOT_PREFERENCES)
mannequin.cut_overlays()
+ // Apply the Dummy's preview background first so we properly layer everything else on top of it.
mannequin.add_overlay(mutable_appearance('modular_citadel/icons/ui/backgrounds.dmi', bgstate, layer = SPACE_LAYER))
copy_to(mannequin)
- // Determine what job is marked as 'High' priority, and dress them up as such.
- var/datum/job/previewJob
- var/highRankFlag = job_civilian_high | job_medsci_high | job_engsec_high
-
- if(job_civilian_low & ASSISTANT)
- previewJob = SSjob.GetJob("Assistant")
- else if(highRankFlag)
- var/highDeptFlag
- if(job_civilian_high)
- highDeptFlag = CIVILIAN
- else if(job_medsci_high)
- highDeptFlag = MEDSCI
- else if(job_engsec_high)
- highDeptFlag = ENGSEC
-
- for(var/datum/job/job in SSjob.occupations)
- if(job.flag == highRankFlag && job.department_flag == highDeptFlag)
- previewJob = job
- break
-
if(previewJob)
- if(current_tab != 2)
- mannequin.job = previewJob.title
- previewJob.equip(mannequin, TRUE)
+ mannequin.job = previewJob.title
+ previewJob.equip(mannequin, TRUE, preference_source = parent)
COMPILE_OVERLAYS(mannequin)
parent.show_character_previews(new /mutable_appearance(mannequin))
unset_busy_human_dummy(DUMMY_HUMAN_SLOT_PREFERENCES)
+
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/Citadel_Snowflake.dm b/code/modules/mob/dead/new_player/sprite_accessories/Citadel_Snowflake.dm
new file mode 100644
index 0000000000..020776a75f
--- /dev/null
+++ b/code/modules/mob/dead/new_player/sprite_accessories/Citadel_Snowflake.dm
@@ -0,0 +1,53 @@
+/datum/sprite_accessory/mam_tails/shark/datashark
+ name = "DataShark"
+ icon_state = "datashark"
+ ckeys_allowed = list("rubyflamewing")
+
+/datum/sprite_accessory/mam_tails_animated/shark/datashark
+ name = "DataShark"
+ icon_state = "datashark"
+ ckeys_allowed = list("rubyflamewing")
+
+/datum/sprite_accessory/mam_body_markings/shark/datashark
+ name = "DataShark"
+ icon_state = "datashark"
+ ckeys_allowed = list("rubyflamewing")
+
+//Sabresune
+/datum/sprite_accessory/mam_ears/sabresune
+ name = "Sabresune"
+ icon_state = "sabresune"
+ ckeys_allowed = list("poojawa")
+ extra = TRUE
+ extra_color_src = MUTCOLORS3
+
+/datum/sprite_accessory/mam_tails/sabresune
+ name = "Sabresune"
+ icon_state = "sabresune"
+ ckeys_allowed = list("poojawa")
+
+/datum/sprite_accessory/mam_tails_animated/sabresune
+ name = "Sabresune"
+ icon_state = "sabresune"
+ ckeys_allowed = list("poojawa")
+
+/datum/sprite_accessory/mam_body_markings/sabresune
+ name = "Sabresune"
+ icon_state = "sabresune"
+ ckeys_allowed = list("poojawa")
+
+//Lunasune
+/datum/sprite_accessory/mam_ears/lunasune
+ name = "lunasune"
+ icon_state = "lunasune"
+ ckeys_allowed = list("invader4352")
+
+/datum/sprite_accessory/mam_tails/lunasune
+ name = "lunasune"
+ icon_state = "lunasune"
+ ckeys_allowed = list("invader4352")
+
+/datum/sprite_accessory/mam_tails_animated/lunasune
+ name = "lunasune"
+ icon_state = "lunasune"
+ ckeys_allowed = list("invader4352")
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/_sprite_accessories.dm b/code/modules/mob/dead/new_player/sprite_accessories/_sprite_accessories.dm
index 5e24d0630b..dd66f68e5d 100644
--- a/code/modules/mob/dead/new_player/sprite_accessories/_sprite_accessories.dm
+++ b/code/modules/mob/dead/new_player/sprite_accessories/_sprite_accessories.dm
@@ -61,6 +61,17 @@
var/dimension_y = 32
var/center = FALSE //Should we center the sprite?
+ //Special / holdover traits for Citadel specific sprites.
+ var/extra = FALSE
+ var/extra_color_src = MUTCOLORS2 //The color source for the extra overlay.
+ var/extra_icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ var/extra2 = FALSE
+ var/extra2_color_src = MUTCOLORS3
+ var/extra2_icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+ //for snowflake/donor specific sprites
+ var/list/ckeys_allowed
+
/datum/sprite_accessory/underwear
icon = 'icons/mob/underwear.dmi'
var/has_color = FALSE
\ No newline at end of file
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/alienpeople.dm b/code/modules/mob/dead/new_player/sprite_accessories/alienpeople.dm
new file mode 100644
index 0000000000..6c0659f851
--- /dev/null
+++ b/code/modules/mob/dead/new_player/sprite_accessories/alienpeople.dm
@@ -0,0 +1,53 @@
+
+/******************************************
+*********** Xeno Dorsal Tubes *************
+*******************************************/
+/datum/sprite_accessory/xeno_dorsal
+ icon = 'modular_citadel/icons/mob/xeno_parts_greyscale.dmi'
+
+/datum/sprite_accessory/xeno_dorsal/standard
+ name = "Standard"
+ icon_state = "standard"
+
+/datum/sprite_accessory/xeno_dorsal/royal
+ name = "Royal"
+ icon_state = "royal"
+
+/datum/sprite_accessory/xeno_dorsal/down
+ name = "Dorsal Down"
+ icon_state = "down"
+
+/******************************************
+************* Xeno Tails ******************
+*******************************************/
+/datum/sprite_accessory/xeno_tail
+ icon = 'modular_citadel/icons/mob/xeno_parts_greyscale.dmi'
+
+/datum/sprite_accessory/xeno_tail/none
+ name = "None"
+
+/datum/sprite_accessory/xeno_tail/standard
+ name = "Xenomorph Tail"
+ icon_state = "xeno"
+
+/******************************************
+************* Xeno Heads ******************
+*******************************************/
+/datum/sprite_accessory/xeno_head
+ icon = 'modular_citadel/icons/mob/xeno_parts_greyscale.dmi'
+
+/datum/sprite_accessory/xeno_head/standard
+ name = "Standard"
+ icon_state = "standard"
+
+/datum/sprite_accessory/xeno_head/royal
+ name = "royal"
+ icon_state = "royal"
+
+/datum/sprite_accessory/xeno_head/hollywood
+ name = "hollywood"
+ icon_state = "hollywood"
+
+/datum/sprite_accessory/xeno_head/warrior
+ name = "warrior"
+ icon_state = "warrior"
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/body_markings.dm b/code/modules/mob/dead/new_player/sprite_accessories/body_markings.dm
index 6bce18d7ce..2f1d48cfa7 100644
--- a/code/modules/mob/dead/new_player/sprite_accessories/body_markings.dm
+++ b/code/modules/mob/dead/new_player/sprite_accessories/body_markings.dm
@@ -1,6 +1,6 @@
-//////////.//////////////////
-// MutantParts Definitions //
-/////////////////////////////
+/******************************************
+************* Lizard Markings *************
+*******************************************/
/datum/sprite_accessory/body_markings
icon = 'icons/mob/mutant_bodyparts.dmi'
@@ -22,4 +22,271 @@
/datum/sprite_accessory/body_markings/lbelly
name = "Light Belly"
icon_state = "lbelly"
- gender_specific = 1
\ No newline at end of file
+ gender_specific = 1
+
+/******************************************
+************ Furry Markings ***************
+*******************************************/
+
+// These are all color matrixed and applied per-limb by default. you MUST comply with this if you want to have your markings work --Pooj
+// use the HumanScissors tool to break your sprite up into the zones easier.
+// Although Byond supposedly doesn't have an icon limit anymore of 512 states after 512.1478, just be careful about too many additions.
+
+/datum/sprite_accessory/mam_body_markings
+ extra = FALSE
+ extra2 = FALSE
+ color_src = MATRIXED
+ gender_specific = 0
+ icon = 'modular_citadel/icons/mob/mam_markings.dmi'
+
+/datum/sprite_accessory/mam_body_markings/none
+ name = "None"
+ icon_state = "none"
+ ckeys_allowed = list("yousshouldnteverbeseeingthisyoumeme")
+ icon = 'modular_citadel/icons/mob/markings_notmammals.dmi'
+
+/datum/sprite_accessory/mam_body_markings/plain
+ name = "Plain"
+ icon_state = "plain"
+ icon = 'modular_citadel/icons/mob/markings_notmammals.dmi'
+
+/datum/sprite_accessory/mam_body_markings/redpanda
+ name = "Redpanda"
+ icon_state = "redpanda"
+
+/datum/sprite_accessory/mam_body_markings/bee
+ name = "Bee"
+ icon_state = "bee"
+ icon = 'modular_citadel/icons/mob/markings_notmammals.dmi'
+
+/datum/sprite_accessory/mam_body_markings/belly
+ name = "Belly"
+ icon_state = "belly"
+ icon = 'modular_citadel/icons/mob/markings_notmammals.dmi'
+
+/datum/sprite_accessory/mam_body_markings/bellyslim
+ name = "Bellyslim"
+ icon_state = "bellyslim"
+ icon = 'modular_citadel/icons/mob/markings_notmammals.dmi'
+
+/datum/sprite_accessory/mam_body_markings/corgi
+ name = "Corgi"
+ icon_state = "corgi"
+
+/datum/sprite_accessory/mam_body_markings/cow
+ name = "Bovine"
+ icon_state = "bovine"
+
+/datum/sprite_accessory/mam_body_markings/corvid
+ name = "Corvid"
+ icon_state = "corvid"
+
+/datum/sprite_accessory/mam_body_markings/dalmation
+ name = "Dalmation"
+ icon_state = "dalmation"
+
+/datum/sprite_accessory/mam_body_markings/deer
+ name = "Deer"
+ icon_state = "deer"
+
+/datum/sprite_accessory/mam_body_markings/dog
+ name = "Dog"
+ icon_state = "dog"
+
+/datum/sprite_accessory/mam_body_markings/eevee
+ name = "Eevee"
+ icon_state = "eevee"
+
+/datum/sprite_accessory/mam_body_markings/fennec
+ name = "Fennec"
+ icon_state = "Fennec"
+
+/datum/sprite_accessory/mam_body_markings/fox
+ name = "Fox"
+ icon_state = "fox"
+
+/datum/sprite_accessory/mam_body_markings/frog
+ name = "Frog"
+ icon_state = "frog"
+ icon = 'modular_citadel/icons/mob/markings_notmammals.dmi'
+
+/datum/sprite_accessory/mam_body_markings/goat
+ name = "Goat"
+ icon_state = "goat"
+
+/datum/sprite_accessory/mam_body_markings/handsfeet
+ name = "Handsfeet"
+ icon_state = "handsfeet"
+ icon = 'modular_citadel/icons/mob/markings_notmammals.dmi'
+
+/datum/sprite_accessory/mam_body_markings/hawk
+ name = "Hawk"
+ icon_state = "hawk"
+
+/datum/sprite_accessory/mam_body_markings/husky
+ name = "Husky"
+ icon_state = "husky"
+
+/datum/sprite_accessory/mam_body_markings/hyena
+ name = "Hyena"
+ icon_state = "hyena"
+
+/datum/sprite_accessory/mam_body_markings/lab
+ name = "Lab"
+ icon_state = "lab"
+
+/datum/sprite_accessory/mam_body_markings/insect
+ name = "Insect"
+ icon_state = "insect"
+ icon = 'modular_citadel/icons/mob/markings_notmammals.dmi'
+
+/datum/sprite_accessory/mam_body_markings/otie
+ name = "Otie"
+ icon_state = "otie"
+
+/datum/sprite_accessory/mam_body_markings/otter
+ name = "Otter"
+ icon_state = "otter"
+
+/datum/sprite_accessory/mam_body_markings/orca
+ name = "Orca"
+ icon_state = "orca"
+
+/datum/sprite_accessory/mam_body_markings/panther
+ name = "Panther"
+ icon_state = "panther"
+
+/datum/sprite_accessory/mam_body_markings/possum
+ name = "Possum"
+ icon_state = "possum"
+
+/datum/sprite_accessory/mam_body_markings/raccoon
+ name = "Raccoon"
+ icon_state = "raccoon"
+
+/datum/sprite_accessory/mam_body_markings/pede
+ name = "Scolipede"
+ icon_state = "scolipede"
+ icon = 'modular_citadel/icons/mob/markings_notmammals.dmi'
+
+/datum/sprite_accessory/mam_body_markings/shark
+ name = "Shark"
+ icon_state = "shark"
+
+/datum/sprite_accessory/mam_body_markings/skunk
+ name = "Skunk"
+ icon_state = "skunk"
+
+/datum/sprite_accessory/mam_body_markings/sergal
+ name = "Sergal"
+ icon_state = "sergal"
+
+/datum/sprite_accessory/mam_body_markings/shepherd
+ name = "Shepherd"
+ icon_state = "shepherd"
+
+/datum/sprite_accessory/mam_body_markings/tajaran
+ name = "Tajaran"
+ icon_state = "tajaran"
+
+/datum/sprite_accessory/mam_body_markings/tiger
+ name = "Tiger"
+ icon_state = "tiger"
+
+/datum/sprite_accessory/mam_body_markings/turian
+ name = "Turian"
+ icon_state = "turian"
+ icon = 'modular_citadel/icons/mob/markings_notmammals.dmi'
+
+/datum/sprite_accessory/mam_body_markings/wolf
+ name = "Wolf"
+ icon_state = "wolf"
+
+/datum/sprite_accessory/mam_body_markings/xeno
+ name = "Xeno"
+ icon_state = "xeno"
+ icon = 'modular_citadel/icons/mob/markings_notmammals.dmi'
+
+/******************************************
+************* Insect Markings *************
+*******************************************/
+
+/datum/sprite_accessory/insect_fluff
+ icon = 'icons/mob/wings.dmi'
+ color_src = 0
+
+/datum/sprite_accessory/insect_fluff/none
+ name = "None"
+ icon_state = "none"
+
+/datum/sprite_accessory/insect_fluff/plain
+ name = "Plain"
+ icon_state = "plain"
+
+/datum/sprite_accessory/insect_fluff/reddish
+ name = "Reddish"
+ icon_state = "redish"
+
+/datum/sprite_accessory/insect_fluff/royal
+ name = "Royal"
+ icon_state = "royal"
+
+/datum/sprite_accessory/insect_fluff/gothic
+ name = "Gothic"
+ icon_state = "gothic"
+
+/datum/sprite_accessory/insect_fluff/lovers
+ name = "Lovers"
+ icon_state = "lovers"
+
+/datum/sprite_accessory/insect_fluff/whitefly
+ name = "White Fly"
+ icon_state = "whitefly"
+
+/datum/sprite_accessory/insect_fluff/punished
+ name = "Burnt Off"
+ icon_state = "punished"
+
+/datum/sprite_accessory/insect_fluff/firewatch
+ name = "Firewatch"
+ icon_state = "firewatch"
+
+/datum/sprite_accessory/insect_fluff/deathhead
+ name = "Deathshead"
+ icon_state = "deathhead"
+
+/datum/sprite_accessory/insect_fluff/poison
+ name = "Poison"
+ icon_state = "poison"
+
+/datum/sprite_accessory/insect_fluff/ragged
+ name = "Ragged"
+ icon_state = "ragged"
+
+/datum/sprite_accessory/insect_fluff/moonfly
+ name = "Moon Fly"
+ icon_state = "moonfly"
+
+/datum/sprite_accessory/insect_fluff/snow
+ name = "Snow"
+ icon_state = "snow"
+
+/datum/sprite_accessory/insect_fluff/colored
+ name = "Colored (Hair)"
+ icon_state = "snow"
+ color_src = HAIR
+
+/datum/sprite_accessory/insect_fluff/colored1
+ name = "Colored (Primary)"
+ icon_state = "snow"
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/insect_fluff/colored2
+ name = "Colored (Secondary)"
+ icon_state = "snow"
+ color_src = MUTCOLORS2
+
+/datum/sprite_accessory/insect_fluff/colored3
+ name = "Colored (Tertiary)"
+ icon_state = "snow"
+ color_src = MUTCOLORS3
\ No newline at end of file
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/ears.dm b/code/modules/mob/dead/new_player/sprite_accessories/ears.dm
index 163f8370a2..1496ca030a 100644
--- a/code/modules/mob/dead/new_player/sprite_accessories/ears.dm
+++ b/code/modules/mob/dead/new_player/sprite_accessories/ears.dm
@@ -5,8 +5,295 @@
name = "None"
icon_state = "none"
+/******************************************
+*************** Human Ears ****************
+*******************************************/
+
+/datum/sprite_accessory/ears/human/axolotl
+ name = "Axolotl"
+ icon_state = "axolotl"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+
+/datum/sprite_accessory/ears/human/bear
+ name = "Bear"
+ icon_state = "bear"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/human/bigwolf
+ name = "Big Wolf"
+ icon_state = "bigwolf"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/human/bigwolfinner
+ name = "Big Wolf (ALT)"
+ icon_state = "bigwolfinner"
+ hasinner = 1
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/human/bigwolfdark
+ name = "Dark Big Wolf"
+ icon_state = "bigwolfdark"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/human/bigwolfinnerdark
+ name = "Dark Big Wolf (ALT)"
+ icon_state = "bigwolfinnerdark"
+ hasinner = 1
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
/datum/sprite_accessory/ears/cat
name = "Cat"
icon_state = "cat"
hasinner = 1
- color_src = HAIR
\ No newline at end of file
+ color_src = HAIR
+
+/datum/sprite_accessory/ears/human/cow
+ name = "Cow"
+ icon_state = "cow"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/human/curled
+ name = "Curled Horn"
+ icon_state = "horn1"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MUTCOLORS3
+
+/datum/sprite_accessory/ears/human/eevee
+ name = "Eevee"
+ icon_state = "eevee"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/human/elephant
+ name = "Elephant"
+ icon_state = "elephant"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/human/elf
+ name = "Elf"
+ icon_state = "elf"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = SKINTONE
+
+/datum/sprite_accessory/ears/fennec
+ name = "Fennec"
+ icon_state = "fennec"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/fish
+ name = "Fish"
+ icon_state = "fish"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/fox
+ name = "Fox"
+ icon_state = "fox"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+
+/datum/sprite_accessory/ears/human/jellyfish
+ name = "Jellyfish"
+ icon_state = "jellyfish"
+ color_src = HAIR
+
+/datum/sprite_accessory/ears/lab
+ name = "Dog, Floppy"
+ icon_state = "lab"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+
+/datum/sprite_accessory/ears/murid
+ name = "Murid"
+ icon_state = "murid"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/human/otie
+ name = "Otusian"
+ icon_state = "otie"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+
+/datum/sprite_accessory/ears/human/pede
+ name = "Scolipede"
+ icon_state = "pede"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/human/rabbit
+ name = "Rabbit"
+ icon_state = "rabbit"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+
+/datum/sprite_accessory/ears/human/sergal
+ name = "Sergal"
+ icon_state = "sergal"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/human/skunk
+ name = "skunk"
+ icon_state = "skunk"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/squirrel
+ name = "Squirrel"
+ icon_state = "squirrel"
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/ears/wolf
+ name = "Wolf"
+ icon_state = "wolf"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+
+
+/******************************************
+*************** Furry Ears ****************
+*******************************************/
+
+/datum/sprite_accessory/mam_ears
+ icon = 'modular_citadel/icons/mob/mam_ears.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/mam_ears/none
+ name = "None"
+ icon_state = "none"
+
+/datum/sprite_accessory/mam_ears/axolotl
+ name = "Axolotl"
+ icon_state = "axolotl"
+
+/datum/sprite_accessory/mam_ears/bear
+ name = "Bear"
+ icon_state = "bear"
+
+/datum/sprite_accessory/mam_ears/bigwolf
+ name = "Big Wolf"
+ icon_state = "bigwolf"
+
+/datum/sprite_accessory/mam_ears/bigwolfinner
+ name = "Big Wolf (ALT)"
+ icon_state = "bigwolfinner"
+ hasinner = 1
+
+/datum/sprite_accessory/mam_ears/bigwolfdark
+ name = "Dark Big Wolf"
+ icon_state = "bigwolfdark"
+
+/datum/sprite_accessory/mam_ears/bigwolfinnerdark
+ name = "Dark Big Wolf (ALT)"
+ icon_state = "bigwolfinnerdark"
+ hasinner = 1
+
+/datum/sprite_accessory/mam_ears/cat
+ name = "Cat"
+ icon_state = "cat"
+ hasinner = 1
+ color_src = HAIR
+
+/datum/sprite_accessory/mam_ears/catbig
+ name = "Cat, Big"
+ icon_state = "catbig"
+
+/datum/sprite_accessory/mam_ears/cow
+ name = "Cow"
+ icon_state = "cow"
+
+/datum/sprite_accessory/mam_ears/curled
+ name = "Curled Horn"
+ icon_state = "horn1"
+ color_src = MUTCOLORS3
+
+/datum/sprite_accessory/mam_ears/deer
+ name = "Deer"
+ icon_state = "deer"
+ color_src = MUTCOLORS3
+
+/datum/sprite_accessory/mam_ears/eevee
+ name = "Eevee"
+ icon_state = "eevee"
+
+
+/datum/sprite_accessory/mam_ears/elf
+ name = "Elf"
+ icon_state = "elf"
+ color_src = MUTCOLORS3
+
+
+/datum/sprite_accessory/mam_ears/elephant
+ name = "Elephant"
+ icon_state = "elephant"
+
+/datum/sprite_accessory/mam_ears/fennec
+ name = "Fennec"
+ icon_state = "fennec"
+
+/datum/sprite_accessory/mam_ears/fish
+ name = "Fish"
+ icon_state = "fish"
+
+/datum/sprite_accessory/mam_ears/fox
+ name = "Fox"
+ icon_state = "fox"
+
+/datum/sprite_accessory/mam_ears/husky
+ name = "Husky"
+ icon_state = "wolf"
+
+/datum/sprite_accessory/mam_ears/kangaroo
+ name = "kangaroo"
+ icon_state = "kangaroo"
+
+/datum/sprite_accessory/mam_ears/jellyfish
+ name = "Jellyfish"
+ icon_state = "jellyfish"
+ color_src = HAIR
+
+/datum/sprite_accessory/mam_ears/lab
+ name = "Dog, Long"
+ icon_state = "lab"
+
+/datum/sprite_accessory/mam_ears/murid
+ name = "Murid"
+ icon_state = "murid"
+
+/datum/sprite_accessory/mam_ears/otie
+ name = "Otusian"
+ icon_state = "otie"
+
+/datum/sprite_accessory/mam_ears/squirrel
+ name = "Squirrel"
+ icon_state = "squirrel"
+
+/datum/sprite_accessory/mam_ears/pede
+ name = "Scolipede"
+ icon_state = "pede"
+
+/datum/sprite_accessory/mam_ears/rabbit
+ name = "Rabbit"
+ icon_state = "rabbit"
+
+/datum/sprite_accessory/mam_ears/sergal
+ name = "Sergal"
+ icon_state = "sergal"
+
+/datum/sprite_accessory/mam_ears/skunk
+ name = "skunk"
+ icon_state = "skunk"
+
+/datum/sprite_accessory/mam_ears/wolf
+ name = "Wolf"
+ icon_state = "wolf"
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/hair_face.dm b/code/modules/mob/dead/new_player/sprite_accessories/hair_face.dm
index 3566f3dea5..d11299fd5b 100644
--- a/code/modules/mob/dead/new_player/sprite_accessories/hair_face.dm
+++ b/code/modules/mob/dead/new_player/sprite_accessories/hair_face.dm
@@ -86,4 +86,45 @@
/datum/sprite_accessory/facial_hair/elvis
name = "Sideburns (Elvis)"
- icon_state = "facial_elvis"
\ No newline at end of file
+ icon_state = "facial_elvis"
+
+#define VFACE(_name, new_state) /datum/sprite_accessory/facial_hair/##new_state/icon_state=#new_state;;/datum/sprite_accessory/facial_hair/##new_state/name= #_name + " (Virgo)"
+VFACE("Watson", facial_watson_s)
+VFACE("Chaplin", facial_chaplin_s)
+VFACE("Fullbeard", facial_fullbeard_s)
+VFACE("Vandyke", facial_vandyke_s)
+VFACE("Elvis", facial_elvis_s)
+VFACE("Abe", facial_abe_s)
+VFACE("Chin", facial_chin_s)
+VFACE("GT", facial_gt_s)
+VFACE("Hip", facial_hip_s)
+VFACE("Hogan", facial_hogan_s)
+VFACE("Selleck", facial_selleck_s)
+VFACE("Neckbeard", facial_neckbeard_s)
+VFACE("Longbeard", facial_longbeard_s)
+VFACE("Dwarf", facial_dwarf_s)
+VFACE("Sideburn", facial_sideburn_s)
+VFACE("Mutton", facial_mutton_s)
+VFACE("Moustache", facial_moustache_s)
+VFACE("Pencilstache", facial_pencilstache_s)
+VFACE("Goatee", facial_goatee_s)
+VFACE("Smallstache", facial_smallstache_s)
+VFACE("Volaju", facial_volaju_s)
+VFACE("3 O\'clock", facial_3oclock_s)
+VFACE("5 O\'clock", facial_5oclock_s)
+VFACE("7 O\'clock", facial_7oclock_s)
+VFACE("5 O\'clock Moustache", facial_5oclockmoustache_s)
+VFACE("7 O\'clock", facial_7oclockmoustache_s)
+VFACE("Walrus", facial_walrus_s)
+VFACE("Muttonmus", facial_muttonmus_s)
+VFACE("Wise", facial_wise_s)
+VFACE("Martial Artist", facial_martialartist_s)
+VFACE("Dorsalfnil", facial_dorsalfnil_s)
+VFACE("Hornadorns", facial_hornadorns_s)
+VFACE("Spike", facial_spike_s)
+VFACE("Chinhorns", facial_chinhorns_s)
+VFACE("Cropped Fullbeard", facial_croppedfullbeard_s)
+VFACE("Chinless Beard", facial_chinlessbeard_s)
+VFACE("Moonshiner", facial_moonshiner_s)
+VFACE("Tribearder", facial_tribearder_s)
+#undef VFACE
\ No newline at end of file
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/hair_head.dm b/code/modules/mob/dead/new_player/sprite_accessories/hair_head.dm
index f8d8d26328..abcc90c0ee 100644
--- a/code/modules/mob/dead/new_player/sprite_accessories/hair_head.dm
+++ b/code/modules/mob/dead/new_player/sprite_accessories/hair_head.dm
@@ -461,4 +461,163 @@
/datum/sprite_accessory/hair/longestalt
name = "Very Long with Fringe"
- icon_state = "hair_vlongfringe"
\ No newline at end of file
+ icon_state = "hair_vlongfringe"
+
+/*************** VIRGO PORTED HAIRS ****************************/
+#define VHAIR(_name, new_state) /datum/sprite_accessory/hair/##new_state/icon_state=#new_state;/datum/sprite_accessory/hair/##new_state/name = #_name + " (Virgo)"
+//VIRGO PORTED HAIRS
+VHAIR("Short Hair Rosa", hair_rosa_s)
+VHAIR("Short Hair 80s", hair_80s_s)
+VHAIR("Long Bedhead", hair_long_bedhead_s)
+VHAIR("Dave", hair_dave_s)
+VHAIR("Country", hair_country_s)
+VHAIR("Shy", hair_shy_s)
+VHAIR("Unshaven Mohawk", hair_unshaven_mohawk_s)
+VHAIR("Manbun", hair_manbun_s)
+VHAIR("Longer Bedhead", hair_longer_bedhead_s)
+VHAIR("Ponytail", hair_ponytail_s)
+VHAIR("Ziegler", hair_ziegler_s)
+VHAIR("Emo Fringe", hair_emofringe_s)
+VHAIR("Very Short Over Eye Alt", hair_veryshortovereyealternate_s)
+VHAIR("Shorthime", hair_shorthime_s)
+VHAIR("High Tight", hair_hightight_s)
+VHAIR("Thinning Front", hair_thinningfront_s)
+VHAIR("Big Afro", hair_bigafro_s)
+VHAIR("Afro", hair_afro_s)
+VHAIR("High Braid", hair_hbraid_s)
+VHAIR("Braid", hair_braid_s)
+VHAIR("Sargeant", hair_sargeant_s)
+VHAIR("Gelled", hair_gelled_s)
+VHAIR("Kagami", hair_kagami_s)
+VHAIR("ShortTail", hair_stail_s)
+VHAIR("Gentle", hair_gentle_s)
+VHAIR("Grande", hair_grande_s)
+VHAIR("Bobcurl", hair_bobcurl_s)
+VHAIR("Pompadeur", hair_pompadour_s)
+VHAIR("Plait", hair_plait_s)
+VHAIR("Long", hair_long_s)
+VHAIR("Rattail", hair_rattail_s)
+VHAIR("Tajspiky", hair_tajspiky_s)
+VHAIR("Messy", hair_messy_s)
+VHAIR("Bangs", hair_bangs_s)
+VHAIR("TBraid", hair_tbraid_s)
+VHAIR("Toriyama2", hair_toriyama2_s)
+VHAIR("CIA", hair_cia_s)
+VHAIR("Mulder", hair_mulder_s)
+VHAIR("Scully", hair_scully_s)
+VHAIR("Nitori", hair_nitori_s)
+VHAIR("Joestar", hair_joestar_s)
+VHAIR("Ponytail4", hair_ponytail4_s)
+VHAIR("Ponytail5", hair_ponytail5_s)
+VHAIR("Beehive2", hair_beehive2_s)
+VHAIR("Short Braid", hair_shortbraid_s)
+VHAIR("Reverse Mohawk", hair_reversemohawk_s)
+VHAIR("SHort Bangs", hair_shortbangs_s)
+VHAIR("Half Shaved", hair_halfshaved_s)
+VHAIR("Longer Alt 2", hair_longeralt2_s)
+VHAIR("Bun", hair_bun_s)
+VHAIR("Curly", hair_curly_s)
+VHAIR("Victory", hair_victory_s)
+VHAIR("Ponytail6", hair_ponytail6_s)
+VHAIR("Undercut3", hair_undercut3_s)
+VHAIR("Bobcut Alt", hair_bobcultalt_s)
+VHAIR("Fingerwave", hair_fingerwave_s)
+VHAIR("Oxton", hair_oxton_s)
+VHAIR("Poofy2", hair_poofy2_s)
+VHAIR("Fringe Tail", hair_fringetail_s)
+VHAIR("Bun3", hair_bun3_s)
+VHAIR("Wisp", hair_wisp_s)
+VHAIR("Undercut2", hair_undercut2_s)
+VHAIR("TBob", hair_tbob_s)
+VHAIR("Spiky Ponytail", hair_spikyponytail_s)
+VHAIR("Rowbun", hair_rowbun_s)
+VHAIR("Rowdualtail", hair_rowdualtail_s)
+VHAIR("Rowbraid", hair_rowbraid_s)
+VHAIR("Shaved Mohawk", hair_shavedmohawk_s)
+VHAIR("Topknot", hair_topknot_s)
+VHAIR("Ronin", hair_ronin_s)
+VHAIR("Bowlcut2", hair_bowlcut2_s)
+VHAIR("Thinning Rear", hair_thinningrear_s)
+VHAIR("Thinning", hair_thinning_s)
+VHAIR("Jade", hair_jade_s)
+VHAIR("Bedhead", hair_bedhead_s)
+VHAIR("Dreadlocks", hair_dreads_s)
+VHAIR("Very Long", hair_vlong_s)
+VHAIR("Jensen", hair_jensen_s)
+VHAIR("Halfbang", hair_halfbang_s)
+VHAIR("Kusangi", hair_kusangi_s)
+VHAIR("Ponytail", hair_ponytail_s)
+VHAIR("Ponytail3", hair_ponytail3_s)
+VHAIR("Halfbang Alt", hair_halfbang_alt_s)
+VHAIR("Bedhead V2", hair_bedheadv2_s)
+VHAIR("Long Fringe", hair_longfringe_s)
+VHAIR("Flair", hair_flair_s)
+VHAIR("Bedhead V3", hair_bedheadv3_s)
+VHAIR("Himecut", hair_himecut_s)
+VHAIR("Curls", hair_curls_s)
+VHAIR("Very Long Fringe", hair_vlongfringe_s)
+VHAIR("Longest", hair_longest_s)
+VHAIR("Father", hair_father_s)
+VHAIR("Emo Long", hair_emolong_s)
+VHAIR("Short Hair 3", hair_shorthair3_s)
+VHAIR("Double Bun", hair_doublebun_s)
+VHAIR("Sleeze", hair_sleeze_s)
+VHAIR("Twintail", hair_twintail_s)
+VHAIR("Emo 2", hair_emo2_s)
+VHAIR("Low Fade", hair_lowfade_s)
+VHAIR("Med Fade", hair_medfade_s)
+VHAIR("High Fade", hair_highfade_s)
+VHAIR("Bald Fade", hair_baldfade_s)
+VHAIR("No Fade", hair_nofade_s)
+VHAIR("Trim Flat", hair_trimflat_s)
+VHAIR("Shaved", hair_shaved_s)
+VHAIR("Trimmed", hair_trimmed_s)
+VHAIR("Tight Bun", hair_tightbun_s)
+VHAIR("Short Hair 4", hair_d_s)
+VHAIR("Short Hair 5", hair_e_s)
+VHAIR("Short Hair 6", hair_f_s)
+VHAIR("Skinhead", hair_skinhead_s)
+VHAIR("Afro2", hair_afro2_s)
+VHAIR("Bobcut", hair_bobcut_s)
+VHAIR("Emo", hair_emo_s)
+VHAIR("Long Over Eye", hair_longovereye_s)
+VHAIR("Feather", hair_feather_s)
+VHAIR("Hitop", hair_hitop_s)
+VHAIR("Short Over Eye", hair_shortoverye_s)
+VHAIR("Straight", hair_straight_s)
+VHAIR("Buzzcut", hair_buzzcut_s)
+VHAIR("Combover", hair_combover_s)
+VHAIR("Crewcut", hair_crewcut_s)
+VHAIR("Devillock", hair_devilock_s)
+VHAIR("Clean", hair_clean_s)
+VHAIR("Shaggy", hair_shaggy_s)
+VHAIR("Updo", hair_updo_s)
+VHAIR("Mohawk", hair_mohawk_s)
+VHAIR("Odango", hair_odango_s)
+VHAIR("Ombre", hair_ombre_s)
+VHAIR("Parted", hair_parted_s)
+VHAIR("Quiff", hair_quiff_s)
+VHAIR("Volaju", hair_volaju_s)
+VHAIR("Bun2", hair_bun2_s)
+VHAIR("Rows1", hair_rows1_s)
+VHAIR("Rows2", hair_rows2_s)
+VHAIR("Dandy Pompadour", hair_dandypompadour_s)
+VHAIR("Poofy", hair_poofy_s)
+VHAIR("Toriyama", hair_toriyama_s)
+VHAIR("Drillruru", hair_drillruru_s)
+VHAIR("Bowlcut", hair_bowlcut_s)
+VHAIR("Coffee House", hair_coffeehouse_s)
+VHAIR("Family Man", hair_thefamilyman_s)
+VHAIR("Shaved Part", hair_shavedpart_s)
+VHAIR("Modern", hair_modern_s)
+VHAIR("One Shoulder", hair_oneshoulder_s)
+VHAIR("Very Short Over Eye", hair_veryshortovereye_s)
+VHAIR("Unkept", hair_unkept_s)
+VHAIR("Wife", hair_wife_s)
+VHAIR("Nia", hair_nia_s)
+VHAIR("Undercut", hair_undercut_s)
+VHAIR("Bobcut Alt", hair_bobcutalt_s)
+VHAIR("Short Hair 4 alt", hair_shorthair4_s)
+VHAIR("Tressshoulder", hair_tressshoulder_s)
+ //END
+#undef VHAIR
\ No newline at end of file
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/horns.dm b/code/modules/mob/dead/new_player/sprite_accessories/horns.dm
index 607ad650e3..a630ead7b3 100644
--- a/code/modules/mob/dead/new_player/sprite_accessories/horns.dm
+++ b/code/modules/mob/dead/new_player/sprite_accessories/horns.dm
@@ -1,5 +1,6 @@
/datum/sprite_accessory/horns
icon = 'icons/mob/mutant_bodyparts.dmi'
+ color_src = HORNCOLOR
/datum/sprite_accessory/horns/none
name = "None"
@@ -23,4 +24,13 @@
/datum/sprite_accessory/horns/angler
name = "Angeler"
- icon_state = "angler"
\ No newline at end of file
+ icon_state = "angler"
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/horns/antler
+ name = "Deer Antlers"
+ icon_state = "deer"
+
+/datum/sprite_accessory/horns/guilmon
+ name = "Guilmon"
+ icon_state = "guilmon"
\ No newline at end of file
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/ipc_synths.dm b/code/modules/mob/dead/new_player/sprite_accessories/ipc_synths.dm
new file mode 100644
index 0000000000..6d2ab1a39b
--- /dev/null
+++ b/code/modules/mob/dead/new_player/sprite_accessories/ipc_synths.dm
@@ -0,0 +1,158 @@
+
+/******************************************
+************** IPC SCREENS ****************
+*******************************************/
+/datum/sprite_accessory/screen
+ icon = 'modular_citadel/icons/mob/ipc_screens.dmi'
+ color_src = null
+
+/datum/sprite_accessory/screen/blank
+ name = "Blank"
+ icon_state = "blank"
+
+/datum/sprite_accessory/screen/pink
+ name = "Pink"
+ icon_state = "pink"
+
+/datum/sprite_accessory/screen/green
+ name = "Green"
+ icon_state = "green"
+
+/datum/sprite_accessory/screen/red
+ name = "Red"
+ icon_state = "red"
+
+/datum/sprite_accessory/screen/blue
+ name = "Blue"
+ icon_state = "blue"
+
+/datum/sprite_accessory/screen/yellow
+ name = "Yellow"
+ icon_state = "yellow"
+
+/datum/sprite_accessory/screen/shower
+ name = "Shower"
+ icon_state = "shower"
+
+/datum/sprite_accessory/screen/nature
+ name = "Nature"
+ icon_state = "nature"
+
+/datum/sprite_accessory/screen/eight
+ name = "Eight"
+ icon_state = "eight"
+
+/datum/sprite_accessory/screen/goggles
+ name = "Goggles"
+ icon_state = "goggles"
+
+/datum/sprite_accessory/screen/heart
+ name = "Heart"
+ icon_state = "heart"
+
+/datum/sprite_accessory/screen/monoeye
+ name = "Mono eye"
+ icon_state = "monoeye"
+
+/datum/sprite_accessory/screen/breakout
+ name = "Breakout"
+ icon_state = "breakout"
+
+/datum/sprite_accessory/screen/purple
+ name = "Purple"
+ icon_state = "purple"
+
+/datum/sprite_accessory/screen/scroll
+ name = "Scroll"
+ icon_state = "scroll"
+
+/datum/sprite_accessory/screen/console
+ name = "Console"
+ icon_state = "console"
+
+/datum/sprite_accessory/screen/rgb
+ name = "RGB"
+ icon_state = "rgb"
+
+/datum/sprite_accessory/screen/golglider
+ name = "Gol Glider"
+ icon_state = "golglider"
+
+/datum/sprite_accessory/screen/rainbow
+ name = "Rainbow"
+ icon_state = "rainbow"
+
+/datum/sprite_accessory/screen/sunburst
+ name = "Sunburst"
+ icon_state = "sunburst"
+
+/datum/sprite_accessory/screen/static
+ name = "Static"
+ icon_state = "static"
+
+//Oracle Station sprites
+
+/datum/sprite_accessory/screen/bsod
+ name = "BSOD"
+ icon_state = "bsod"
+
+/datum/sprite_accessory/screen/redtext
+ name = "Red Text"
+ icon_state = "retext"
+
+/datum/sprite_accessory/screen/sinewave
+ name = "Sine wave"
+ icon_state = "sinewave"
+
+/datum/sprite_accessory/screen/squarewave
+ name = "Square wave"
+ icon_state = "squarwave"
+
+/datum/sprite_accessory/screen/ecgwave
+ name = "ECG wave"
+ icon_state = "ecgwave"
+
+/datum/sprite_accessory/screen/eyes
+ name = "Eyes"
+ icon_state = "eyes"
+
+/datum/sprite_accessory/screen/textdrop
+ name = "Text drop"
+ icon_state = "textdrop"
+
+/datum/sprite_accessory/screen/stars
+ name = "Stars"
+ icon_state = "stars"
+
+
+/******************************************
+************** IPC Antennas ***************
+*******************************************/
+
+/datum/sprite_accessory/antenna
+ icon = 'modular_citadel/icons/mob/ipc_antennas.dmi'
+ color_src = MUTCOLORS2
+
+/datum/sprite_accessory/antenna/none
+ name = "None"
+ icon_state = "None"
+
+/datum/sprite_accessory/antenna/antennae
+ name = "Angled Antennae"
+ icon_state = "antennae"
+
+/datum/sprite_accessory/antenna/tvantennae
+ name = "TV Antennae"
+ icon_state = "tvantennae"
+
+/datum/sprite_accessory/antenna/cyberhead
+ name = "Cyberhead"
+ icon_state = "cyberhead"
+
+/datum/sprite_accessory/antenna/antlers
+ name = "Antlers"
+ icon_state = "antlers"
+
+/datum/sprite_accessory/antenna/crowned
+ name = "Crowned"
+ icon_state = "crowned"
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/legs.dm b/code/modules/mob/dead/new_player/sprite_accessories/legs.dm
deleted file mode 100644
index 7663100822..0000000000
--- a/code/modules/mob/dead/new_player/sprite_accessories/legs.dm
+++ /dev/null
@@ -1,8 +0,0 @@
-/datum/sprite_accessory/legs //legs are a special case, they aren't actually sprite_accessories but are updated with them.
- icon = null //These datums exist for selecting legs on preference, and little else
-
-/datum/sprite_accessory/legs/none
- name = "Normal Legs"
-
-/datum/sprite_accessory/legs/digitigrade_lizard
- name = "Digitigrade Legs"
\ No newline at end of file
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/legs_and_taurs.dm b/code/modules/mob/dead/new_player/sprite_accessories/legs_and_taurs.dm
new file mode 100644
index 0000000000..15640a2699
--- /dev/null
+++ b/code/modules/mob/dead/new_player/sprite_accessories/legs_and_taurs.dm
@@ -0,0 +1,124 @@
+/datum/sprite_accessory/legs //legs are a special case, they aren't actually sprite_accessories but are updated with them. -- OR SO THEY USED TO BE
+ icon = null //These datums exist for selecting legs on preference, and little else
+
+/******************************************
+***************** Leggy *******************
+*******************************************/
+
+/datum/sprite_accessory/legs/none
+ name = "Plantigrade"
+
+/datum/sprite_accessory/legs/digitigrade_lizard
+ name = "Digitigrade"
+
+/datum/sprite_accessory/legs/digitigrade_bird
+ name = "Avian"
+
+
+/******************************************
+************** Taur Bodies ****************
+*******************************************/
+
+/datum/sprite_accessory/taur
+ icon = 'modular_citadel/icons/mob/mam_taur.dmi'
+ extra_icon = 'modular_citadel/icons/mob/mam_taur.dmi'
+ extra = TRUE
+ extra2_icon = 'modular_citadel/icons/mob/mam_taur.dmi'
+ extra2 = TRUE
+ center = TRUE
+ dimension_x = 64
+ var/taur_mode = NOT_TAURIC
+ color_src = MATRIXED
+
+/datum/sprite_accessory/taur/none
+ name = "None"
+ icon_state = "None"
+
+/datum/sprite_accessory/taur/cow
+ name = "Cow"
+ icon_state = "cow"
+ taur_mode = HOOF_TAURIC
+
+/datum/sprite_accessory/taur/deer
+ name = "Deer"
+ icon_state = "deer"
+ taur_mode = HOOF_TAURIC
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/taur/drake
+ name = "Drake"
+ icon_state = "drake"
+ taur_mode = PAW_TAURIC
+
+/datum/sprite_accessory/taur/drider
+ name = "Drider"
+ icon_state = "drider"
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/taur/eevee
+ name = "Eevee"
+ icon_state = "eevee"
+ taur_mode = PAW_TAURIC
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/taur/fox
+ name = "Fox"
+ icon_state = "fox"
+ taur_mode = PAW_TAURIC
+
+/datum/sprite_accessory/taur/husky
+ name = "Husky"
+ icon_state = "husky"
+ taur_mode = PAW_TAURIC
+
+/datum/sprite_accessory/taur/horse
+ name = "Horse"
+ icon_state = "horse"
+ taur_mode = HOOF_TAURIC
+
+/datum/sprite_accessory/taur/lab
+ name = "Lab"
+ icon_state = "lab"
+ taur_mode = PAW_TAURIC
+
+/datum/sprite_accessory/taur/naga
+ name = "Naga"
+ icon_state = "naga"
+ taur_mode = SNEK_TAURIC
+
+/datum/sprite_accessory/taur/otie
+ name = "Otie"
+ icon_state = "otie"
+ taur_mode = PAW_TAURIC
+
+/datum/sprite_accessory/taur/pede
+ name = "Scolipede"
+ icon_state = "pede"
+ taur_mode = PAW_TAURIC
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/taur/panther
+ name = "Panther"
+ icon_state = "panther"
+ taur_mode = PAW_TAURIC
+
+/datum/sprite_accessory/taur/shepherd
+ name = "Shepherd"
+ icon_state = "shepherd"
+ taur_mode = PAW_TAURIC
+
+/datum/sprite_accessory/taur/tentacle
+ name = "Tentacle"
+ icon_state = "tentacle"
+ taur_mode = SNEK_TAURIC
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/taur/tiger
+ name = "Tiger"
+ icon_state = "tiger"
+ taur_mode = PAW_TAURIC
+
+/datum/sprite_accessory/taur/wolf
+ name = "Wolf"
+ icon_state = "wolf"
+ taur_mode = PAW_TAURIC
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/moth_wings.dm b/code/modules/mob/dead/new_player/sprite_accessories/moth_wings.dm
deleted file mode 100644
index 6b8036bd69..0000000000
--- a/code/modules/mob/dead/new_player/sprite_accessories/moth_wings.dm
+++ /dev/null
@@ -1,68 +0,0 @@
-/datum/sprite_accessory/moth_wings
- icon = 'icons/mob/wings.dmi'
- color_src = null
-
-/datum/sprite_accessory/moth_wings/plain
- name = "Plain"
- icon_state = "plain"
-
-/datum/sprite_accessory/moth_wings/monarch
- name = "Monarch"
- icon_state = "monarch"
-
-/datum/sprite_accessory/moth_wings/luna
- name = "Luna"
- icon_state = "luna"
-
-/datum/sprite_accessory/moth_wings/atlas
- name = "Atlas"
- icon_state = "atlas"
-
-/datum/sprite_accessory/moth_wings/reddish
- name = "Reddish"
- icon_state = "redish"
-
-/datum/sprite_accessory/moth_wings/royal
- name = "Royal"
- icon_state = "royal"
-
-/datum/sprite_accessory/moth_wings/gothic
- name = "Gothic"
- icon_state = "gothic"
-
-/datum/sprite_accessory/moth_wings/lovers
- name = "Lovers"
- icon_state = "lovers"
-
-/datum/sprite_accessory/moth_wings/whitefly
- name = "White Fly"
- icon_state = "whitefly"
-
-/datum/sprite_accessory/moth_wings/punished
- name = "Burnt Off"
- icon_state = "punished"
- locked = TRUE
-
-/datum/sprite_accessory/moth_wings/firewatch
- name = "Firewatch"
- icon_state = "firewatch"
-
-/datum/sprite_accessory/moth_wings/deathhead
- name = "Deathshead"
- icon_state = "deathhead"
-
-/datum/sprite_accessory/moth_wings/poison
- name = "Poison"
- icon_state = "poison"
-
-/datum/sprite_accessory/moth_wings/ragged
- name = "Ragged"
- icon_state = "ragged"
-
-/datum/sprite_accessory/moth_wings/moonfly
- name = "Moon Fly"
- icon_state = "moonfly"
-
-/datum/sprite_accessory/moth_wings/snow
- name = "Snow"
- icon_state = "snow"
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/snouts.dm b/code/modules/mob/dead/new_player/sprite_accessories/snouts.dm
index c663c08d69..7252f85324 100644
--- a/code/modules/mob/dead/new_player/sprite_accessories/snouts.dm
+++ b/code/modules/mob/dead/new_player/sprite_accessories/snouts.dm
@@ -15,4 +15,359 @@
/datum/sprite_accessory/snouts/roundlight
name = "Round + Light"
- icon_state = "roundlight"
\ No newline at end of file
+ icon_state = "roundlight"
+
+/datum/sprite_accessory/snout/guilmon
+ name = "Guilmon"
+ icon_state = "guilmon"
+ color_src = MATRIXED
+
+//christ this was a mistake, but it's here just in case someone wants to selectively fix -- Pooj
+/************* Lizard compatable snoots ***********
+/datum/sprite_accessory/snouts/bird
+ name = "Beak"
+ icon_state = "bird"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/bigbeak
+ name = "Big Beak"
+ icon_state = "bigbeak"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/bug
+ name = "Bug"
+ icon_state = "bug"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ extra2 = TRUE
+ extra2_color_src = MUTCOLORS3
+
+/datum/sprite_accessory/snouts/elephant
+ name = "Elephant"
+ icon_state = "elephant"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+ extra = TRUE
+ extra_color_src = MUTCOLORS3
+
+/datum/sprite_accessory/snouts/lcanid
+ name = "Mammal, Long"
+ icon_state = "lcanid"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/lcanidalt
+ name = "Mammal, Long ALT"
+ icon_state = "lcanidalt"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/scanid
+ name = "Mammal, Short"
+ icon_state = "scanid"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/scanidalt
+ name = "Mammal, Short ALT"
+ icon_state = "scanidalt"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/wolf
+ name = "Mammal, Thick"
+ icon_state = "wolf"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/wolfalt
+ name = "Mammal, Thick ALT"
+ icon_state = "wolfalt"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/redpanda
+ name = "WahCoon"
+ icon_state = "wah"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/rhino
+ name = "Horn"
+ icon_state = "rhino"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+ extra = TRUE
+ extra = MUTCOLORS3
+
+/datum/sprite_accessory/snouts/rodent
+ name = "Rodent"
+ icon_state = "rodent"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/husky
+ name = "Husky"
+ icon_state = "husky"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/otie
+ name = "Otie"
+ icon_state = "otie"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/pede
+ name = "Scolipede"
+ icon_state = "pede"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/sergal
+ name = "Sergal"
+ icon_state = "sergal"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/snouts/shark
+ name = "Shark"
+ icon_state = "shark"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+
+/datum/sprite_accessory/snouts/toucan
+ name = "Toucan"
+ icon_state = "toucan"
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+ color_src = MATRIXED
+*/
+
+/******************************************
+************** Mammal Snouts **************
+*******************************************/
+
+/datum/sprite_accessory/mam_snouts
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_snouts.dmi'
+
+/datum/sprite_accessory/mam_snouts/none
+ name = "None"
+ icon_state = "none"
+
+
+/datum/sprite_accessory/mam_snouts/bird
+ name = "Beak"
+ icon_state = "bird"
+
+/datum/sprite_accessory/mam_snouts/bigbeak
+ name = "Big Beak"
+ icon_state = "bigbeak"
+
+/datum/sprite_accessory/mam_snouts/bug
+ name = "Bug"
+ icon_state = "bug"
+ color_src = MUTCOLORS
+ extra2 = TRUE
+ extra2_color_src = MUTCOLORS3
+
+/datum/sprite_accessory/mam_snouts/elephant
+ name = "Elephant"
+ icon_state = "elephant"
+ extra = TRUE
+ extra_color_src = MUTCOLORS3
+
+/datum/sprite_accessory/mam_snouts/lcanid
+ name = "Mammal, Long"
+ icon_state = "lcanid"
+
+/datum/sprite_accessory/mam_snouts/lcanidalt
+ name = "Mammal, Long ALT"
+ icon_state = "lcanidalt"
+
+/datum/sprite_accessory/mam_snouts/scanid
+ name = "Mammal, Short"
+ icon_state = "scanid"
+
+/datum/sprite_accessory/mam_snouts/scanidalt
+ name = "Mammal, Short ALT"
+ icon_state = "scanidalt"
+
+/datum/sprite_accessory/mam_snouts/wolf
+ name = "Mammal, Thick"
+ icon_state = "wolf"
+
+/datum/sprite_accessory/mam_snouts/wolfalt
+ name = "Mammal, Thick ALT"
+ icon_state = "wolfalt"
+
+/datum/sprite_accessory/mam_snouts/redpanda
+ name = "WahCoon"
+ icon_state = "wah"
+
+/datum/sprite_accessory/mam_snouts/redpandaalt
+ name = "WahCoon ALT"
+ icon_state = "wahalt"
+
+/datum/sprite_accessory/mam_snouts/rhino
+ name = "Horn"
+ icon_state = "rhino"
+ extra = TRUE
+ extra = MUTCOLORS3
+
+/datum/sprite_accessory/mam_snouts/rodent
+ name = "Rodent"
+ icon_state = "rodent"
+
+/datum/sprite_accessory/mam_snouts/husky
+ name = "Husky"
+ icon_state = "husky"
+
+/datum/sprite_accessory/mam_snouts/otie
+ name = "Otie"
+ icon_state = "otie"
+
+/datum/sprite_accessory/mam_snouts/pede
+ name = "Scolipede"
+ icon_state = "pede"
+
+/datum/sprite_accessory/mam_snouts/sergal
+ name = "Sergal"
+ icon_state = "sergal"
+
+/datum/sprite_accessory/mam_snouts/shark
+ name = "Shark"
+ icon_state = "shark"
+
+/datum/sprite_accessory/mam_snouts/toucan
+ name = "Toucan"
+ icon_state = "toucan"
+
+/datum/sprite_accessory/mam_snouts/sharp
+ name = "Sharp"
+ icon_state = "sharp"
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/mam_snouts/round
+ name = "Round"
+ icon_state = "round"
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/mam_snouts/sharplight
+ name = "Sharp + Light"
+ icon_state = "sharplight"
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/mam_snouts/roundlight
+ name = "Round + Light"
+ icon_state = "roundlight"
+ color_src = MUTCOLORS
+
+
+/******************************************
+**************** Snouts *******************
+*************but higher up*****************/
+
+/datum/sprite_accessory/mam_snouts/fbird
+ name = "Beak (Top)"
+ icon_state = "fbird"
+
+/datum/sprite_accessory/mam_snouts/fbigbeak
+ name = "Big Beak (Top)"
+ icon_state = "fbigbeak"
+
+/datum/sprite_accessory/mam_snouts/fbug
+ name = "Bug (Top)"
+ icon_state = "fbug"
+ color_src = MUTCOLORS
+ extra2 = TRUE
+ extra2_color_src = MUTCOLORS3
+
+/datum/sprite_accessory/mam_snouts/felephant
+ name = "Elephant (Top)"
+ icon_state = "felephant"
+ extra = TRUE
+ extra_color_src = MUTCOLORS3
+
+/datum/sprite_accessory/mam_snouts/flcanid
+ name = "Mammal, Long (Top)"
+ icon_state = "flcanid"
+
+/datum/sprite_accessory/mam_snouts/flcanidalt
+ name = "Mammal, Long ALT (Top)"
+ icon_state = "flcanidalt"
+
+/datum/sprite_accessory/mam_snouts/fscanid
+ name = "Mammal, Short (Top)"
+ icon_state = "fscanid"
+
+/datum/sprite_accessory/mam_snouts/fscanidalt
+ name = "Mammal, Short ALT (Top)"
+ icon_state = "fscanidalt"
+
+/datum/sprite_accessory/mam_snouts/fwolf
+ name = "Mammal, Thick (Top)"
+ icon_state = "fwolf"
+
+/datum/sprite_accessory/mam_snouts/fwolfalt
+ name = "Mammal, Thick ALT (Top)"
+ icon_state = "fwolfalt"
+
+/datum/sprite_accessory/mam_snouts/fredpanda
+ name = "WahCoon (Top)"
+ icon_state = "fwah"
+
+/datum/sprite_accessory/mam_snouts/frhino
+ name = "Horn (Top)"
+ icon_state = "frhino"
+ extra = TRUE
+ extra = MUTCOLORS3
+
+/datum/sprite_accessory/mam_snouts/frodent
+ name = "Rodent (Top)"
+ icon_state = "frodent"
+
+/datum/sprite_accessory/mam_snouts/fhusky
+ name = "Husky (Top)"
+ icon_state = "fhusky"
+
+/datum/sprite_accessory/mam_snouts/fotie
+ name = "Otie (Top)"
+ icon_state = "fotie"
+
+/datum/sprite_accessory/mam_snouts/fpede
+ name = "Scolipede (Top)"
+ icon_state = "fpede"
+
+/datum/sprite_accessory/mam_snouts/fsergal
+ name = "Sergal (Top)"
+ icon_state = "fsergal"
+
+/datum/sprite_accessory/mam_snouts/fshark
+ name = "Shark (Top)"
+ icon_state = "fshark"
+
+/datum/sprite_accessory/mam_snouts/ftoucan
+ name = "Toucan (Top)"
+ icon_state = "ftoucan"
+
+/datum/sprite_accessory/mam_snouts/fsharp
+ name = "Sharp (Top)"
+ icon_state = "fsharp"
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/mam_snouts/fround
+ name = "Round (Top)"
+ icon_state = "fround"
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/mam_snouts/fsharplight
+ name = "Sharp + Light (Top)"
+ icon_state = "fsharplight"
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/mam_snouts/froundlight
+ name = "Round + Light (Top)"
+ icon_state = "froundlight"
+ color_src = MUTCOLORS
\ No newline at end of file
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/tails.dm b/code/modules/mob/dead/new_player/sprite_accessories/tails.dm
index 31faabf663..6042d97247 100644
--- a/code/modules/mob/dead/new_player/sprite_accessories/tails.dm
+++ b/code/modules/mob/dead/new_player/sprite_accessories/tails.dm
@@ -4,6 +4,10 @@
/datum/sprite_accessory/tails_animated
icon = 'icons/mob/mutant_bodyparts.dmi'
+/******************************************
+************* Lizard Tails ****************
+*******************************************/
+
/datum/sprite_accessory/tails/lizard/smooth
name = "Smooth"
icon_state = "smooth"
@@ -36,6 +40,48 @@
name = "Spikes"
icon_state = "spikes"
+/datum/sprite_accessory/tails/lizard/none
+ name = "None"
+ icon_state = "None"
+
+/datum/sprite_accessory/tails_animated/lizard/none
+ name = "None"
+ icon_state = "None"
+
+/datum/sprite_accessory/tails/lizard/axolotl
+ name = "Axolotl"
+ icon_state = "axolotl"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/lizard/axolotl
+ name = "Axolotl"
+ icon_state = "axolotl"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/body_markings/guilmon
+ name = "Guilmon"
+ icon_state = "guilmon"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/markings_notmammals.dmi'
+
+/datum/sprite_accessory/tails/lizard/guilmon
+ name = "Guilmon"
+ icon_state = "guilmon"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/lizard/guilmon
+ name = "Guilmon"
+ icon_state = "guilmon"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/******************************************
+************** Human Tails ****************
+*******************************************/
+
/datum/sprite_accessory/tails/human/none
name = "None"
icon_state = "none"
@@ -43,13 +89,626 @@
/datum/sprite_accessory/tails_animated/human/none
name = "None"
icon_state = "none"
-/*
+
+/datum/sprite_accessory/tails/human/ailurus
+ name = "Red Panda"
+ icon_state = "wah"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails_animated/human/ailurus
+ name = "Red Panda"
+ icon_state = "wah"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails/human/axolotl
+ name = "Axolotl"
+ icon_state = "axolotl"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails_animated/human/axolotl
+ name = "Axolotl"
+ icon_state = "axolotl"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails/human/bee
+ name = "Bee"
+ icon_state = "bee"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails_animated/human/bee
+ name = "Bee"
+ icon_state = "bee"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
/datum/sprite_accessory/tails/human/cat
name = "Cat"
icon_state = "cat"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
color_src = HAIR
/datum/sprite_accessory/tails_animated/human/cat
name = "Cat"
icon_state = "cat"
- color_src = HAIR*/
\ No newline at end of file
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = HAIR
+
+/datum/sprite_accessory/tails/human/catbig
+ name = "Cat, Big"
+ icon_state = "catbig"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails_animated/human/catbig
+ name = "Cat, Big"
+ icon_state = "catbig"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails/human/cow
+ name = "Cow"
+ icon_state = "cow"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails_animated/human/cow
+ name = "Cow"
+ icon_state = "cow"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails/human/corvid
+ name = "Corvid"
+ icon_state = "crow"
+
+/datum/sprite_accessory/tails_animated/human/corvid
+ name = "Corvid"
+ icon_state = "crow"
+
+/datum/sprite_accessory/tails/human/eevee
+ name = "Eevee"
+ icon_state = "eevee"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails_animated/human/eevee
+ name = "Eevee"
+ icon_state = "eevee"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails/human/fennec
+ name = "Fennec"
+ icon_state = "fennec"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails_animated/human/fennec
+ name = "Fennec"
+ icon_state = "fennec"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails/human/fish
+ name = "Fish"
+ icon_state = "fish"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails_animated/human/fish
+ name = "Fish"
+ icon_state = "fish"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails/human/fox
+ name = "Fox"
+ icon_state = "fox"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails_animated/human/fox
+ name = "Fox"
+ icon_state = "fox"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails/human/horse
+ name = "Horse"
+ icon_state = "horse"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = HAIR
+
+/datum/sprite_accessory/tails_animated/human/horse
+ name = "Horse"
+ icon_state = "horse"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = HAIR
+
+/datum/sprite_accessory/tails/human/husky
+ name = "Husky"
+ icon_state = "husky"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails_animated/human/husky
+ name = "Husky"
+ icon_state = "husky"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails/human/insect
+ name = "Insect"
+ icon_state = "insect"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails_animated/human/insect
+ name = "insect"
+ icon_state = "insect"
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+ color_src = MATRIXED
+
+/datum/sprite_accessory/tails/human/kitsune
+ name = "Kitsune"
+ icon_state = "kitsune"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/human/kitsune
+ name = "Kitsune"
+ icon_state = "kitsune"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails/human/murid
+ name = "Murid"
+ icon_state = "murid"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/human/murid
+ name = "Murid"
+ icon_state = "murid"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails/human/otie
+ name = "Otusian"
+ icon_state = "otie"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/human/otie
+ name = "Otusian"
+ icon_state = "otie"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails/orca
+ name = "Orca"
+ icon_state = "orca"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/orca
+ name = "Orca"
+ icon_state = "orca"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails/human/pede
+ name = "Scolipede"
+ icon_state = "pede"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/human/pede
+ name = "Scolipede"
+ icon_state = "pede"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails/human/rabbit
+ name = "Rabbit"
+ icon_state = "rabbit"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/human/rabbit
+ name = "Rabbit"
+ icon_state = "rabbit"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails/human/sergal
+ name = "Sergal"
+ icon_state = "sergal"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/human/sergal
+ name = "Sergal"
+ icon_state = "sergal"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails/human/skunk
+ name = "skunk"
+ icon_state = "skunk"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/human/skunk
+ name = "skunk"
+ icon_state = "skunk"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails/human/shark
+ name = "Shark"
+ icon_state = "shark"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/human/shark
+ name = "Shark"
+ icon_state = "shark"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails/human/datashark
+ name = "datashark"
+ icon_state = "datashark"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/human/datashark
+ name = "datashark"
+ icon_state = "datashark"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails/human/straighttail
+ name = "Straight Tail"
+ icon_state = "straighttail"
+
+/datum/sprite_accessory/tails_animated/human/straighttail
+ name = "Straight Tail"
+ icon_state = "straighttail"
+
+/datum/sprite_accessory/tails/human/squirrel
+ name = "Squirrel"
+ icon_state = "squirrel"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/human/squirrel
+ name = "Squirrel"
+ icon_state = "squirrel"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails/human/tentacle
+ name = "Tentacle"
+ icon_state = "tentacle"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/human/tentacle
+ name = "Tentacle"
+ icon_state = "tentacle"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails/human/tiger
+ name = "Tiger"
+ icon_state = "tiger"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/human/tiger
+ name = "Tiger"
+ icon_state = "tiger"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails/human/wolf
+ name = "Wolf"
+ icon_state = "wolf"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/tails_animated/human/wolf
+ name = "Wolf"
+ icon_state = "wolf"
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/******************************************
+************** Furry Tails ****************
+*******************************************/
+
+/datum/sprite_accessory/mam_tails
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/mam_tails/none
+ name = "None"
+ icon_state = "none"
+
+/datum/sprite_accessory/mam_tails_animated
+ color_src = MATRIXED
+ icon = 'modular_citadel/icons/mob/mam_tails.dmi'
+
+/datum/sprite_accessory/mam_tails_animated/none
+ name = "None"
+ icon_state = "none"
+ color_src = MATRIXED
+
+/datum/sprite_accessory/mam_tails/ailurus
+ name = "Red Panda"
+ icon_state = "wah"
+ extra = TRUE
+
+/datum/sprite_accessory/mam_tails_animated/ailurus
+ name = "Red Panda"
+ icon_state = "wah"
+ extra = TRUE
+
+/datum/sprite_accessory/mam_tails/axolotl
+ name = "Axolotl"
+ icon_state = "axolotl"
+
+/datum/sprite_accessory/mam_tails_animated/axolotl
+ name = "Axolotl"
+ icon_state = "axolotl"
+
+/datum/sprite_accessory/mam_tails/bee
+ name = "Bee"
+ icon_state = "bee"
+
+/datum/sprite_accessory/mam_tails_animated/bee
+ name = "Bee"
+ icon_state = "bee"
+
+/datum/sprite_accessory/mam_tails/cat
+ name = "Cat"
+ icon_state = "cat"
+ color_src = HAIR
+
+/datum/sprite_accessory/mam_tails_animated/cat
+ name = "Cat"
+ icon_state = "cat"
+ color_src = HAIR
+
+/datum/sprite_accessory/mam_tails/catbig
+ name = "Cat, Big"
+ icon_state = "catbig"
+
+/datum/sprite_accessory/mam_tails_animated/catbig
+ name = "Cat, Big"
+ icon_state = "catbig"
+
+/datum/sprite_accessory/mam_tails/corvid
+ name = "Corvid"
+ icon_state = "crow"
+
+/datum/sprite_accessory/mam_tails_animated/corvid
+ name = "Corvid"
+ icon_state = "crow"
+
+/datum/sprite_accessory/mam_tail/cow
+ name = "Cow"
+ icon_state = "cow"
+
+/datum/sprite_accessory/mam_tails_animated/cow
+ name = "Cow"
+ icon_state = "cow"
+
+/datum/sprite_accessory/mam_tails/eevee
+ name = "Eevee"
+ icon_state = "eevee"
+
+/datum/sprite_accessory/mam_tails_animated/eevee
+ name = "Eevee"
+ icon_state = "eevee"
+
+/datum/sprite_accessory/mam_tails/fennec
+ name = "Fennec"
+ icon_state = "fennec"
+
+/datum/sprite_accessory/mam_tails_animated/fennec
+ name = "Fennec"
+ icon_state = "fennec"
+
+/datum/sprite_accessory/mam_tails/human/fish
+ name = "Fish"
+ icon_state = "fish"
+
+/datum/sprite_accessory/mam_tails_animated/human/fish
+ name = "Fish"
+ icon_state = "fish"
+
+/datum/sprite_accessory/mam_tails/fox
+ name = "Fox"
+ icon_state = "fox"
+
+/datum/sprite_accessory/mam_tails_animated/fox
+ name = "Fox"
+ icon_state = "fox"
+
+/datum/sprite_accessory/mam_tails/hawk
+ name = "Hawk"
+ icon_state = "hawk"
+
+/datum/sprite_accessory/mam_tails_animated/hawk
+ name = "Hawk"
+ icon_state = "hawk"
+
+/datum/sprite_accessory/mam_tails/horse
+ name = "Horse"
+ icon_state = "horse"
+ color_src = HAIR
+
+/datum/sprite_accessory/mam_tails_animated/horse
+ name = "Horse"
+ icon_state = "Horse"
+ color_src = HAIR
+
+/datum/sprite_accessory/mam_tails/husky
+ name = "Husky"
+ icon_state = "husky"
+
+/datum/sprite_accessory/mam_tails_animated/husky
+ name = "Husky"
+ icon_state = "husky"
+
+datum/sprite_accessory/mam_tails/insect
+ name = "Insect"
+ icon_state = "insect"
+
+/datum/sprite_accessory/mam_tails_animated/insect
+ name = "Insect"
+ icon_state = "insect"
+
+/datum/sprite_accessory/mam_tails/kangaroo
+ name = "kangaroo"
+ icon_state = "kangaroo"
+
+/datum/sprite_accessory/mam_tails_animated/kangaroo
+ name = "kangaroo"
+ icon_state = "kangaroo"
+
+/datum/sprite_accessory/mam_tails/kitsune
+ name = "Kitsune"
+ icon_state = "kitsune"
+
+/datum/sprite_accessory/mam_tails_animated/kitsune
+ name = "Kitsune"
+ icon_state = "kitsune"
+
+/datum/sprite_accessory/mam_tails/lab
+ name = "Lab"
+ icon_state = "lab"
+
+/datum/sprite_accessory/mam_tails_animated/lab
+ name = "Lab"
+ icon_state = "lab"
+
+/datum/sprite_accessory/mam_tails/murid
+ name = "Murid"
+ icon_state = "murid"
+
+/datum/sprite_accessory/mam_tails_animated/murid
+ name = "Murid"
+ icon_state = "murid"
+
+/datum/sprite_accessory/mam_tails/otie
+ name = "Otusian"
+ icon_state = "otie"
+
+/datum/sprite_accessory/mam_tails_animated/otie
+ name = "Otusian"
+ icon_state = "otie"
+
+/datum/sprite_accessory/mam_tails/orca
+ name = "Orca"
+ icon_state = "orca"
+
+/datum/sprite_accessory/mam_tails_animated/orca
+ name = "Orca"
+ icon_state = "orca"
+
+/datum/sprite_accessory/mam_tails/pede
+ name = "Scolipede"
+ icon_state = "pede"
+
+/datum/sprite_accessory/mam_tails_animated/pede
+ name = "Scolipede"
+ icon_state = "pede"
+
+/datum/sprite_accessory/mam_tails/rabbit
+ name = "Rabbit"
+ icon_state = "rabbit"
+
+/datum/sprite_accessory/mam_tails_animated/rabbit
+ name = "Rabbit"
+ icon_state = "rabbit"
+
+/datum/sprite_accessory/mam_tails/sergal
+ name = "Sergal"
+ icon_state = "sergal"
+
+/datum/sprite_accessory/mam_tails_animated/sergal
+ name = "Sergal"
+ icon_state = "sergal"
+
+/datum/sprite_accessory/mam_tails/skunk
+ name = "Skunk"
+ icon_state = "skunk"
+
+/datum/sprite_accessory/mam_tails_animated/skunk
+ name = "Skunk"
+ icon_state = "skunk"
+
+/datum/sprite_accessory/mam_tails/shark
+ name = "Shark"
+ icon_state = "shark"
+
+/datum/sprite_accessory/mam_tails_animated/shark
+ name = "Shark"
+ icon_state = "shark"
+
+/datum/sprite_accessory/mam_tails/shepherd
+ name = "Shepherd"
+ icon_state = "shepherd"
+
+/datum/sprite_accessory/mam_tails_animated/shepherd
+ name = "Shepherd"
+ icon_state = "shepherd"
+
+/datum/sprite_accessory/mam_tails/straighttail
+ name = "Straight Tail"
+ icon_state = "straighttail"
+
+/datum/sprite_accessory/mam_tails_animated/straighttail
+ name = "Straight Tail"
+ icon_state = "straighttail"
+
+/datum/sprite_accessory/mam_tails/squirrel
+ name = "Squirrel"
+ icon_state = "squirrel"
+
+/datum/sprite_accessory/mam_tails_animated/squirrel
+ name = "Squirrel"
+ icon_state = "squirrel"
+
+/datum/sprite_accessory/mam_tails/tentacle
+ name = "Tentacle"
+ icon_state = "tentacle"
+
+/datum/sprite_accessory/mam_tails_animated/tentacle
+ name = "Tentacle"
+ icon_state = "tentacle"
+
+/datum/sprite_accessory/mam_tails/tiger
+ name = "Tiger"
+ icon_state = "tiger"
+
+/datum/sprite_accessory/mam_tails_animated/tiger
+ name = "Tiger"
+ icon_state = "tiger"
+
+/datum/sprite_accessory/mam_tails/wolf
+ name = "Wolf"
+ icon_state = "wolf"
+
+/datum/sprite_accessory/mam_tails_animated/wolf
+ name = "Wolf"
+ icon_state = "wolf"
diff --git a/code/modules/mob/dead/new_player/sprite_accessories/wings.dm b/code/modules/mob/dead/new_player/sprite_accessories/wings.dm
index d051b2f07a..dc0e0222bf 100644
--- a/code/modules/mob/dead/new_player/sprite_accessories/wings.dm
+++ b/code/modules/mob/dead/new_player/sprite_accessories/wings.dm
@@ -1,3 +1,5 @@
+//Angel Wings
+
/datum/sprite_accessory/wings/none
name = "None"
icon_state = "none"
@@ -23,4 +25,120 @@
dimension_x = 46
center = TRUE
dimension_y = 34
- locked = TRUE
\ No newline at end of file
+ locked = TRUE
+
+//INSECT WINGS
+
+/datum/sprite_accessory/insect_wings
+ icon = 'icons/mob/wings.dmi'
+ color_src = null
+
+/datum/sprite_accessory/insect_wings/none
+ name = "None"
+ icon_state = "none"
+
+/datum/sprite_accessory/insect_wings/plain
+ name = "Plain"
+ icon_state = "plain"
+
+/datum/sprite_accessory/insect_wings/monarch
+ name = "Monarch"
+ icon_state = "monarch"
+
+/datum/sprite_accessory/insect_wings/luna
+ name = "Luna"
+ icon_state = "luna"
+
+/datum/sprite_accessory/insect_wings/atlas
+ name = "Atlas"
+ icon_state = "atlas"
+
+/datum/sprite_accessory/insect_wings/reddish
+ name = "Reddish"
+ icon_state = "redish"
+
+/datum/sprite_accessory/insect_wings/royal
+ name = "Royal"
+ icon_state = "royal"
+
+/datum/sprite_accessory/insect_wings/gothic
+ name = "Gothic"
+ icon_state = "gothic"
+
+/datum/sprite_accessory/insect_wings/lovers
+ name = "Lovers"
+ icon_state = "lovers"
+
+/datum/sprite_accessory/insect_wings/whitefly
+ name = "White Fly"
+ icon_state = "whitefly"
+
+/datum/sprite_accessory/insect_wings/punished
+ name = "Burnt Off"
+ icon_state = "punished"
+ locked = TRUE
+
+/datum/sprite_accessory/insect_wings/firewatch
+ name = "Firewatch"
+ icon_state = "firewatch"
+
+/datum/sprite_accessory/insect_wings/deathhead
+ name = "Deathshead"
+ icon_state = "deathhead"
+
+/datum/sprite_accessory/insect_wings/poison
+ name = "Poison"
+ icon_state = "poison"
+
+/datum/sprite_accessory/insect_wings/ragged
+ name = "Ragged"
+ icon_state = "ragged"
+
+/datum/sprite_accessory/insect_wings/moonfly
+ name = "Moon Fly"
+ icon_state = "moonfly"
+
+/datum/sprite_accessory/insect_wings/snow
+ name = "Snow"
+ icon_state = "snow"
+
+/datum/sprite_accessory/insect_wings/colored
+ name = "Colored (Hair)"
+ icon_state = "snowplain"
+ color_src = HAIR
+
+/datum/sprite_accessory/insect_fluff/colored1
+ name = "Colored (Primary)"
+ icon_state = "snowplain"
+ color_src = MUTCOLORS
+
+/datum/sprite_accessory/insect_fluff/colored2
+ name = "Colored (Secondary)"
+ icon_state = "snowplain"
+ color_src = MUTCOLORS2
+
+/datum/sprite_accessory/insect_fluff/colored3
+ name = "Colored (Tertiary)"
+ icon_state = "snowplain"
+ color_src = MUTCOLORS3
+
+/datum/sprite_accessory/insect_wings/bee
+ name = "Bee"
+ icon_state = "bee"
+
+/datum/sprite_accessory/insect_wings/bee_color
+ name = "Bee (Hair colored)"
+ icon_state = "bee"
+ color_src = HAIR
+
+/datum/sprite_accessory/insect_wings/fairy
+ name = "Fairy"
+ icon_state = "fairy"
+
+/datum/sprite_accessory/insect_wings/bat
+ name = "Bat"
+ icon_state = "bat"
+
+/datum/sprite_accessory/insect_wings/feathery
+ name = "Feathery"
+ icon_state = "feathery"
diff --git a/code/modules/mob/living/carbon/alien/larva/emote.dm b/code/modules/mob/living/carbon/alien/larva/emote.dm
deleted file mode 100644
index 62cb620ee4..0000000000
--- a/code/modules/mob/living/carbon/alien/larva/emote.dm
+++ /dev/null
@@ -1,113 +0,0 @@
-/mob/living/carbon/alien/larva/emote(act,m_type=1,message = null)
-
- var/param = null
- if (findtext(act, "-", 1, null))
- var/t1 = findtext(act, "-", 1, null)
- param = copytext(act, t1 + 1, length(act) + 1)
- act = copytext(act, 1, t1)
-
- var/muzzled = is_muzzled()
-
- switch(act) //Alphabetically sorted please.
- if ("burp","burps")
- if (!muzzled)
- message = "[src] burps."
- m_type = 2
- if ("choke","chokes")
- message = "[src] chokes."
- m_type = 2
- if ("collapse","collapses")
- Paralyse(2)
- message = "[src] collapses!"
- m_type = 2
- if ("dance","dances")
- if (!src.restrained())
- message = "[src] dances around happily."
- m_type = 1
- if ("deathgasp","deathgasps")
- message = "[src] lets out a sickly hiss of air and falls limply to the floor..."
- m_type = 2
- if ("drool","drools")
- message = "[src] drools."
- m_type = 1
- if ("gasp","gasps")
- message = "[src] gasps."
- m_type = 2
- if ("gnarl","gnarls")
- if (!muzzled)
- message = "[src] gnarls and shows its teeth.."
- m_type = 2
- if ("hiss","hisses")
- message = "[src] hisses softly."
- m_type = 1
- if ("jump","jumps")
- message = "[src] jumps!"
- m_type = 1
- if ("me")
- ..()
- return
- if ("moan","moans")
- message = "[src] moans!"
- m_type = 2
- if ("nod","nods")
- message = "[src] nods its head."
- m_type = 1
- if ("roar","roars")
- if (!muzzled)
- message = "[src] softly roars."
- m_type = 2
- if ("roll","rolls")
- if (!src.restrained())
- message = "[src] rolls."
- m_type = 1
- if ("scratch","scratches")
- if (!src.restrained())
- message = "[src] scratches."
- m_type = 1
- if ("screech","screeches") //This orignally was called scretch, changing it. -Sum99
- if (!muzzled)
- message = "[src] screeches."
- m_type = 2
- if ("shake","shakes")
- message = "[src] shakes its head."
- m_type = 1
- if ("shiver","shivers")
- message = "[src] shivers."
- m_type = 2
- if ("sign","signs")
- if (!src.restrained())
- message = text("[src] signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
- m_type = 1
- if ("snore","snores")
- message = "[src] snores."
- m_type = 2
- if ("sulk","sulks")
- message = "[src] sulks down sadly."
- m_type = 1
- if ("sway","sways")
- message = "[src] sways around dizzily."
- m_type = 1
- if ("tail")
- message = "[src] waves its tail."
- m_type = 1
- if ("twitch")
- message = "[src] twitches violently."
- m_type = 1
- if ("whimper","whimpers")
- if (!muzzled)
- message = "[src] whimpers."
- m_type = 2
-
- if ("help") //"The exception"
- src << "Help for larva emotes. You can use these emotes with say \"*emote\":\n\nburp, choke, collapse, dance, deathgasp, drool, gasp, gnarl, hiss, jump, me, moan, nod, roll, roar, scratch, screech, shake, shiver, sign-#, sulk, sway, tail, twitch, whimper"
-
- else
- src << "Unusable emote '[act]'. Say *help for a list."
-
- if ((message && src.stat == 0))
- log_emote("[name]/[key] : [message]")
- if (m_type & 1)
- visible_message(message)
- else
- audible_message(message)
- return
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 528b55c921..f02689c481 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -802,6 +802,11 @@
else
hud_used.healthdoll.icon_state = "healthdoll_DEAD"
+ if(hud_used.staminas)
+ hud_used.staminas.icon_state = staminahudamount()
+ if(hud_used.staminabuffer)
+ hud_used.staminabuffer.icon_state = staminabufferhudamount()
+
/mob/living/carbon/human/fully_heal(admin_revive = 0)
if(admin_revive)
regenerate_limbs()
@@ -1029,8 +1034,8 @@
/mob/living/carbon/human/species/lizard/ashwalker
race = /datum/species/lizard/ashwalker
-/mob/living/carbon/human/species/moth
- race = /datum/species/moth
+/mob/living/carbon/human/species/insect
+ race = /datum/species/insect
/mob/living/carbon/human/species/mush
race = /datum/species/mush
diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm
index 35b0384145..2425fcf14d 100644
--- a/code/modules/mob/living/carbon/human/human_defines.dm
+++ b/code/modules/mob/living/carbon/human/human_defines.dm
@@ -17,6 +17,8 @@
//Eye colour
var/eye_color = "000"
+ var/horn_color = "85615a" //specific horn colors, because why not?
+
var/skin_tone = "caucasian1" //Skin tone
var/lip_style = null //no lipstick by default- arguably misleading, as it could be used for general makeup
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 1af9dbc5f5..b1c31ffdff 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -39,6 +39,10 @@
//Stuff jammed in your limbs hurts
handle_embedded_objects()
+ if(stat != DEAD)
+ //process your dick energy
+ handle_arousal()
+
//Update our name based on whether our face is obscured/disfigured
name = get_visible_name()
@@ -54,7 +58,7 @@
var/obj/item/clothing/CH = head
if (CS.clothing_flags & CH.clothing_flags & STOPSPRESSUREDAMAGE)
return ONE_ATMOSPHERE
- if(istype(loc, /obj/belly)) //START OF CIT CHANGES - Makes it so you don't suffocate while inside vore organs. Remind me to modularize this some time - Bhijn
+ if(isbelly(loc)) //START OF CIT CHANGES - Makes it so you don't suffocate while inside vore organs. Remind me to modularize this some time - Bhijn
return ONE_ATMOSPHERE
if(istype(loc, /obj/item/dogborg/sleeper))
return ONE_ATMOSPHERE //END OF CIT CHANGES
diff --git a/code/modules/mob/living/carbon/human/login.dm b/code/modules/mob/living/carbon/human/login.dm
deleted file mode 100644
index 1ac24cffa9..0000000000
--- a/code/modules/mob/living/carbon/human/login.dm
+++ /dev/null
@@ -1,9 +0,0 @@
-/mob/living/carbon/human/Login()
- ..()
- if(src.martial_art == default_martial_art && mind.stored_martial_art) //If the mind has a martial art stored and the body has the default one.
- src.mind.stored_martial_art.teach(src) //Running teach so that it deals with help verbs.
- else if(src.martial_art != default_martial_art && src.martial_art != mind.stored_martial_art) //If the body has a martial art which is not the default one and is not stored in the mind.
- if(src.martial_art_owner != mind)
- src.martial_art.remove(src)
- else
- src.mind.stored_martial_art = src.martial_art
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index 0f83e675fc..7855e9f4fa 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1,6 +1,7 @@
// This code handles different species in the game.
GLOBAL_LIST_EMPTY(roundstart_races)
+GLOBAL_LIST_EMPTY(roundstart_race_names)
/datum/species
var/id // if the game needs to manually check your race to do something not included in a proc here, it will use this
@@ -15,6 +16,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/hair_color // this allows races to have specific hair colors... if null, it uses the H's hair/facial hair colors. if "mutcolor", it uses the H's mutant_color
var/hair_alpha = 255 // the alpha used by the hair. 255 is completely solid, 0 is transparent.
+ var/horn_color //specific horn colors, because why not?
+
var/use_skintones = 0 // does it use skintones or not? (spoiler alert this is only used by humans)
var/exotic_blood = "" // If your race wants to bleed something other than bog standard blood, change this to reagent id.
var/exotic_bloodtype = "" //If your race uses a non standard bloodtype (A+, O-, AB-, etc)
@@ -79,7 +82,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/fixed_mut_color3 = ""
var/whitelisted = 0 //Is this species restricted to certain players?
var/whitelist = list() //List the ckeys that can use this species, if it's whitelisted.: list("John Doe", "poopface666", "SeeALiggerPullTheTrigger") Spaces & capitalization can be included or ignored entirely for each key as it checks for both.
-
+ var/should_draw_citadel = FALSE
///////////
// PROCS //
@@ -98,6 +101,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/datum/species/S = new I
if(S.check_roundstart_eligible())
GLOB.roundstart_races += S.id
+ GLOB.roundstart_race_names["[S.name]"] = S.id
qdel(S)
if(!GLOB.roundstart_races.len)
GLOB.roundstart_races += "human"
@@ -260,7 +264,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
C.hud_used.update_locked_slots()
// this needs to be FIRST because qdel calls update_body which checks if we have DIGITIGRADE legs or not and if not then removes DIGITIGRADE from species_traits
- if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Digitigrade Legs")
+ if(("legs" in C.dna.species.mutant_bodyparts) && (C.dna.features["legs"] == "Digitigrade" || C.dna.features["legs"] == "Avian"))
species_traits += DIGITIGRADE
if(DIGITIGRADE in species_traits)
C.Digitigrade_Leg_Swap(FALSE)
@@ -294,8 +298,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
for(var/datum/disease/A in C.diseases)
A.cure(FALSE)
- SEND_SIGNAL(C, COMSIG_SPECIES_GAIN, src, old_species)
-
//CITADEL EDIT
if(NOAROUSAL in species_traits)
C.canbearoused = FALSE
@@ -306,6 +308,11 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/mob/living/carbon/human/H = C
if(NOGENITALS in H.dna.species.species_traits)
H.give_genitals(TRUE) //call the clean up proc to delete anything on the mob then return.
+ if("meat_type" in default_features) //I can't believe it's come to the meat
+ H.type_of_meat = GLOB.meat_types[H.dna.features["meat_type"]]
+
+ SEND_SIGNAL(C, COMSIG_SPECIES_GAIN, src, old_species)
+
// EDIT ENDS
@@ -317,6 +324,11 @@ GLOBAL_LIST_EMPTY(roundstart_races)
for(var/X in inherent_traits)
REMOVE_TRAIT(C, X, SPECIES_TRAIT)
+ if("meat_type" in default_features)
+ C.type_of_meat = GLOB.meat_types[C.dna.features["meat_type"]]
+ else
+ C.type_of_meat = initial(meat)
+
SEND_SIGNAL(C, COMSIG_SPECIES_LOSS, src)
/datum/species/proc/handle_hair(mob/living/carbon/human/H, forced_colour)
@@ -612,6 +624,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
else if ("wings" in mutant_bodyparts)
bodyparts_to_add -= "wings_open"
+ if("insect_fluff" in mutant_bodyparts)
+ if(!H.dna.features["insect_fluff"] || H.dna.features["insect_fluff"] == "None" || H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT))
+ bodyparts_to_add -= "insect_fluff"
+
//CITADEL EDIT
//Race specific bodyparts:
//Xenos
@@ -717,8 +733,10 @@ GLOBAL_LIST_EMPTY(roundstart_races)
S = GLOB.wings_open_list[H.dna.features["wings"]]
if("legs")
S = GLOB.legs_list[H.dna.features["legs"]]
- if("moth_wings")
- S = GLOB.moth_wings_list[H.dna.features["moth_wings"]]
+ if("insect_wings")
+ S = GLOB.insect_wings_list[H.dna.features["insect_wings"]]
+ if("insect_fluff")
+ S = GLOB.insect_fluffs_list[H.dna.features["insect_fluff"]]
if("caps")
S = GLOB.caps_list[H.dna.features["caps"]]
if("ipc_screen")
@@ -815,6 +833,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
accessory_overlay.color = "#[H.facial_hair_color]"
if(EYECOLOR)
accessory_overlay.color = "#[H.eye_color]"
+ if(HORNCOLOR)
+ accessory_overlay.color = "#[H.horn_color]"
else
accessory_overlay.color = forced_colour
else
@@ -880,6 +900,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
extra_accessory_overlay.color = "#[H.facial_hair_color]"
if(EYECOLOR)
extra_accessory_overlay.color = "#[H.eye_color]"
+
+ if(HORNCOLOR)
+ extra_accessory_overlay.color = "#[H.horn_color]"
standing += extra_accessory_overlay
if(S.extra2) //apply the extra overlay, if there is one
@@ -912,6 +935,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
extra2_accessory_overlay.color = "#[H.dna.features["mcolor"]]"
else
extra2_accessory_overlay.color = "#[H.hair_color]"
+ if(HORNCOLOR)
+ extra2_accessory_overlay.color = "#[H.horn_color]"
standing += extra2_accessory_overlay
@@ -1732,6 +1757,161 @@ GLOBAL_LIST_EMPTY(roundstart_races)
H.forcesay(GLOB.hit_appends) //forcesay checks stat already.
return TRUE
+/datum/species/proc/alt_spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
+ if(!istype(M))
+ return TRUE
+ CHECK_DNA_AND_SPECIES(M)
+ CHECK_DNA_AND_SPECIES(H)
+
+ if(!istype(M)) //sanity check for drones.
+ return TRUE
+ if(M.mind)
+ attacker_style = M.mind.martial_art
+ if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(M, 0, M.name, attack_type = UNARMED_ATTACK))
+ log_combat(M, H, "attempted to touch")
+ H.visible_message("[M] attempted to touch [H]!")
+ return TRUE
+ switch(M.a_intent)
+ if(INTENT_HELP)
+ if(M == H)
+ althelp(M, H, attacker_style)
+ return TRUE
+ return FALSE
+ if(INTENT_DISARM)
+ altdisarm(M, H, attacker_style)
+ return TRUE
+ return FALSE
+
+/datum/species/proc/althelp(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
+ if(user == target && istype(user))
+ if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)
+ to_chat(user, "You're too exhausted for that.")
+ return
+ if(!user.resting)
+ to_chat(user, "You can only force yourself up if you're on the ground.")
+ return
+ user.visible_message("[user] forces [p_them()]self up to [p_their()] feet!", "You force yourself up to your feet!")
+ user.resting = 0
+ user.update_canmove()
+ user.adjustStaminaLossBuffered(user.stambuffer) //Rewards good stamina management by making it easier to instantly get up from resting
+ playsound(user, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+
+/datum/species/proc/altdisarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
+ if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)
+ to_chat(user, "You're too exhausted.")
+ return FALSE
+ if(target.check_block())
+ target.visible_message("[target] blocks [user]'s shoving attempt!")
+ return FALSE
+ if(attacker_style && attacker_style.disarm_act(user,target))
+ return TRUE
+ if(user.resting)
+ return FALSE
+ else
+ if(user == target)
+ return
+ user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
+ user.adjustStaminaLossBuffered(4)
+ playsound(target, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1)
+
+ if(target.w_uniform)
+ target.w_uniform.add_fingerprint(user)
+ SEND_SIGNAL(target, COMSIG_HUMAN_DISARM_HIT, user, user.zone_selected)
+
+ if(!target.resting)
+ target.adjustStaminaLoss(5)
+
+
+ var/turf/target_oldturf = target.loc
+ var/shove_dir = get_dir(user.loc, target_oldturf)
+ var/turf/target_shove_turf = get_step(target.loc, shove_dir)
+ var/mob/living/carbon/human/target_collateral_human
+ var/obj/structure/table/target_table
+ var/shove_blocked = FALSE //Used to check if a shove is blocked so that if it is knockdown logic can be applied
+
+ //Thank you based whoneedsspace
+ target_collateral_human = locate(/mob/living/carbon/human) in target_shove_turf.contents
+ if(target_collateral_human)
+ shove_blocked = TRUE
+ else
+ target.Move(target_shove_turf, shove_dir)
+ if(get_turf(target) == target_oldturf)
+ if(target_shove_turf.density)
+ shove_blocked = TRUE
+ else
+ var/thoushallnotpass = FALSE
+ for(var/obj/O in target_shove_turf)
+ if(istype(O, /obj/structure/table))
+ target_table = O
+ else if(!O.CanPass(src, target_shove_turf))
+ shove_blocked = TRUE
+ thoushallnotpass = TRUE
+ if(thoushallnotpass)
+ target_table = null
+
+ if(target.is_shove_knockdown_blocked())
+ return
+
+ if(shove_blocked || target_table)
+ var/directional_blocked = FALSE
+ if(shove_dir in GLOB.cardinals) //Directional checks to make sure that we're not shoving through a windoor or something like that
+ var/target_turf = get_turf(target)
+ for(var/obj/O in target_turf)
+ if(O.flags_1 & ON_BORDER_1 && O.dir == shove_dir && O.density)
+ directional_blocked = TRUE
+ break
+ if(target_turf != target_shove_turf) //Make sure that we don't run the exact same check twice on the same tile
+ for(var/obj/O in target_shove_turf)
+ if(O.flags_1 & ON_BORDER_1 && O.dir == turn(shove_dir, 180) && O.density)
+ directional_blocked = TRUE
+ break
+ var/targetatrest = target.resting
+ if(((!target_table && !target_collateral_human) || directional_blocked) && !targetatrest)
+ target.Knockdown(SHOVE_KNOCKDOWN_SOLID)
+ user.visible_message("[user.name] shoves [target.name], knocking them down!",
+ "You shove [target.name], knocking them down!", null, COMBAT_MESSAGE_RANGE)
+ log_combat(user, target, "shoved", "knocking them down")
+ else if(target_table)
+ if(!targetatrest)
+ target.Knockdown(SHOVE_KNOCKDOWN_TABLE)
+ user.visible_message("[user.name] shoves [target.name] onto \the [target_table]!",
+ "You shove [target.name] onto \the [target_table]!", null, COMBAT_MESSAGE_RANGE)
+ target.forceMove(target_shove_turf)
+ log_combat(user, target, "shoved", "onto [target_table]")
+ else if(target_collateral_human && !targetatrest)
+ target.Knockdown(SHOVE_KNOCKDOWN_HUMAN)
+ if(!target_collateral_human.resting)
+ target_collateral_human.Knockdown(SHOVE_KNOCKDOWN_COLLATERAL)
+ user.visible_message("[user.name] shoves [target.name] into [target_collateral_human.name]!",
+ "You shove [target.name] into [target_collateral_human.name]!", null, COMBAT_MESSAGE_RANGE)
+ log_combat(user, target, "shoved", "into [target_collateral_human.name]")
+
+ else
+ user.visible_message("[user.name] shoves [target.name]!",
+ "You shove [target.name]!", null, COMBAT_MESSAGE_RANGE)
+ var/target_held_item = target.get_active_held_item()
+ var/knocked_item = FALSE
+ if(!is_type_in_typecache(target_held_item, GLOB.shove_disarming_types))
+ target_held_item = null
+ if(!target.has_movespeed_modifier(SHOVE_SLOWDOWN_ID))
+ target.add_movespeed_modifier(SHOVE_SLOWDOWN_ID, multiplicative_slowdown = SHOVE_SLOWDOWN_STRENGTH)
+ if(target_held_item)
+ target.visible_message("[target.name]'s grip on \the [target_held_item] loosens!",
+ "Your grip on \the [target_held_item] loosens!", null, COMBAT_MESSAGE_RANGE)
+ addtimer(CALLBACK(target, /mob/living/carbon/human/proc/clear_shove_slowdown), SHOVE_SLOWDOWN_LENGTH)
+ else if(target_held_item)
+ target.dropItemToGround(target_held_item)
+ knocked_item = TRUE
+ target.visible_message("[target.name] drops \the [target_held_item]!!",
+ "You drop \the [target_held_item]!!", null, COMBAT_MESSAGE_RANGE)
+ var/append_message = ""
+ if(target_held_item)
+ if(knocked_item)
+ append_message = "causing them to drop [target_held_item]"
+ else
+ append_message = "loosening their grip on [target_held_item]"
+ log_combat(user, target, "shoved", append_message)
+
/datum/species/proc/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked, mob/living/carbon/human/H)
var/hit_percent = (100-(blocked+armor))/100
hit_percent = (hit_percent * (100-H.physiology.damage_resistance))/100
diff --git a/code/modules/mob/living/carbon/human/species_types/bugmen.dm b/code/modules/mob/living/carbon/human/species_types/bugmen.dm
new file mode 100644
index 0000000000..94dba550b6
--- /dev/null
+++ b/code/modules/mob/living/carbon/human/species_types/bugmen.dm
@@ -0,0 +1,64 @@
+/datum/species/insect
+ name = "Anthromorphic Insect"
+ id = "insect"
+ say_mod = "flutters"
+ default_color = "00FF00"
+ species_traits = list(LIPS,NOEYES,HAIR,FACEHAIR,MUTCOLORS,HORNCOLOR)
+ inherent_biotypes = list(MOB_ORGANIC, MOB_HUMANOID, MOB_BUG)
+ mutant_bodyparts = list("mam_ears", "mam_snout", "mam_tail", "taur", "insect_wings", "mam_snouts", "insect_fluff","horns")
+ default_features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "mam_tail" = "None", "mam_ears" = "None",
+ "insect_wings" = "None", "insect_fluff" = "None", "mam_snouts" = "None", "taur" = "None","horns" = "None")
+ attack_verb = "slash"
+ attack_sound = 'sound/weapons/slash.ogg'
+ miss_sound = 'sound/weapons/slashmiss.ogg'
+ meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/insect
+ liked_food = VEGETABLES | DAIRY
+ disliked_food = FRUIT | GROSS
+ toxic_food = MEAT | RAW
+ mutanteyes = /obj/item/organ/eyes/insect
+ should_draw_citadel = TRUE
+
+/datum/species/insect/on_species_gain(mob/living/carbon/C)
+ . = ..()
+ if(ishuman(C))
+ var/mob/living/carbon/human/H = C
+ if(!H.dna.features["insect_wings"])
+ H.dna.features["insect_wings"] = "[(H.client && H.client.prefs && LAZYLEN(H.client.prefs.features) && H.client.prefs.features["insect_wings"]) ? H.client.prefs.features["insect_wings"] : "None"]"
+ handle_mutant_bodyparts(H)
+
+/datum/species/insect/random_name(gender,unique,lastname)
+ if(unique)
+ return random_unique_moth_name()
+
+ var/randname = moth_name()
+
+ if(lastname)
+ randname += " [lastname]"
+
+ return randname
+
+/datum/species/insect/handle_fire(mob/living/carbon/human/H, no_protection = FALSE)
+ ..()
+ if(H.dna.features["insect_wings"] != "Burnt Off" && H.dna.features["insect_wings"] != "None" && H.bodytemperature >= 800 && H.fire_stacks > 0) //do not go into the extremely hot light. you will not survive
+ to_chat(H, "Your precious wings burn to a crisp!")
+ if(H.dna.features["insect_wings"] != "None")
+ H.dna.features["insect_wings"] = "Burnt Off"
+ handle_mutant_bodyparts(H)
+
+/datum/species/insect/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
+ . = ..()
+ if(chem.id == "pestkiller")
+ H.adjustToxLoss(3)
+ H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
+
+/datum/species/insect/check_weakness(obj/item/weapon, mob/living/attacker)
+ if(istype(weapon, /obj/item/melee/flyswatter))
+ return 9 //flyswatters deal 10x damage to insects
+ return 0
+
+/datum/species/insect/space_move(mob/living/carbon/human/H)
+ . = ..()
+ if(H.loc && !isspaceturf(H.loc) && (H.dna.features["insect_wings"] != "Burnt Off" && H.dna.features["insect_wings"] != "None"))
+ var/datum/gas_mixture/current = H.loc.return_air()
+ if(current && (current.return_pressure() >= ONE_ATMOSPHERE*0.85)) //as long as there's reasonable pressure and no gravity, flight is possible
+ return TRUE
diff --git a/code/modules/mob/living/carbon/human/species_types/flypeople.dm b/code/modules/mob/living/carbon/human/species_types/flypeople.dm
index 6f05eb393d..043ee4fde1 100644
--- a/code/modules/mob/living/carbon/human/species_types/flypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/flypeople.dm
@@ -1,5 +1,5 @@
/datum/species/fly
- name = "Flyperson"
+ name = "Anthromorphic Fly"
id = "fly"
say_mod = "buzzes"
species_traits = list(NOEYES)
diff --git a/code/modules/mob/living/carbon/human/species_types/furrypeople.dm b/code/modules/mob/living/carbon/human/species_types/furrypeople.dm
new file mode 100644
index 0000000000..e726d45347
--- /dev/null
+++ b/code/modules/mob/living/carbon/human/species_types/furrypeople.dm
@@ -0,0 +1,98 @@
+/datum/species/mammal
+ name = "Anthromorph"
+ id = "mammal"
+ default_color = "4B4B4B"
+ should_draw_citadel = TRUE
+ species_traits = list(MUTCOLORS,EYECOLOR,LIPS,HAIR,HORNCOLOR)
+ inherent_biotypes = list(MOB_ORGANIC, MOB_HUMANOID)
+ mutant_bodyparts = list("mam_tail", "mam_ears", "mam_body_markings", "mam_snouts", "taur", "horns", "legs")
+ default_features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "mam_snouts" = "Husky", "mam_tail" = "Husky", "mam_ears" = "Husky",
+ "mam_body_markings" = "Husky", "taur" = "None", "horns" = "None", "legs" = "Plantigrade", "meat_type" = "Mammalian")
+ attack_verb = "claw"
+ attack_sound = 'sound/weapons/slash.ogg'
+ miss_sound = 'sound/weapons/slashmiss.ogg'
+ meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/mammal
+ liked_food = MEAT | FRIED
+ disliked_food = TOXIC
+
+//Curiosity killed the cat's wagging tail.
+/datum/species/mammal/spec_death(gibbed, mob/living/carbon/human/H)
+ if(H)
+ stop_wagging_tail(H)
+
+/datum/species/mammal/spec_stun(mob/living/carbon/human/H,amount)
+ if(H)
+ stop_wagging_tail(H)
+ . = ..()
+
+/datum/species/mammal/can_wag_tail(mob/living/carbon/human/H)
+ return ("mam_tail" in mutant_bodyparts) || ("mam_waggingtail" in mutant_bodyparts)
+
+/datum/species/mammal/is_wagging_tail(mob/living/carbon/human/H)
+ return ("mam_waggingtail" in mutant_bodyparts)
+
+/datum/species/mammal/start_wagging_tail(mob/living/carbon/human/H)
+ if("mam_tail" in mutant_bodyparts)
+ mutant_bodyparts -= "mam_tail"
+ mutant_bodyparts |= "mam_waggingtail"
+ H.update_body()
+
+/datum/species/mammal/stop_wagging_tail(mob/living/carbon/human/H)
+ if("mam_waggingtail" in mutant_bodyparts)
+ mutant_bodyparts -= "mam_waggingtail"
+ mutant_bodyparts |= "mam_tail"
+ H.update_body()
+
+
+/datum/species/mammal/qualifies_for_rank(rank, list/features)
+ return TRUE
+
+
+//Alien//
+/datum/species/xeno
+ // A cloning mistake, crossing human and xenomorph DNA
+ name = "Xenomorph Hybrid"
+ id = "xeno"
+ say_mod = "hisses"
+ default_color = "00FF00"
+ should_draw_citadel = TRUE
+ species_traits = list(MUTCOLORS,EYECOLOR,LIPS)
+ inherent_biotypes = list(MOB_ORGANIC, MOB_HUMANOID)
+ mutant_bodyparts = list("xenotail", "xenohead", "xenodorsal", "mam_body_markings", "taur", "legs")
+ default_features = list("xenotail"="Xenomorph Tail","xenohead"="Standard","xenodorsal"="Standard", "mam_body_markings" = "Xeno","mcolor" = "0F0","mcolor2" = "0F0","mcolor3" = "0F0","taur" = "None", "legs" = "Digitigrade")
+ attack_verb = "slash"
+ attack_sound = 'sound/weapons/slash.ogg'
+ miss_sound = 'sound/weapons/slashmiss.ogg'
+ meat = /obj/item/reagent_containers/food/snacks/meat/slab/xeno
+ skinned_type = /obj/item/stack/sheet/animalhide/xeno
+ exotic_bloodtype = "L"
+ damage_overlay_type = "xeno"
+ liked_food = MEAT
+
+/datum/species/xeno/on_species_gain(mob/living/carbon/human/C, datum/species/old_species)
+ if(("legs" in C.dna.species.mutant_bodyparts) && (C.dna.features["legs"] == "Digitigrade" || C.dna.features["legs"] == "Avian"))
+ species_traits += DIGITIGRADE
+ if(DIGITIGRADE in species_traits)
+ C.Digitigrade_Leg_Swap(FALSE)
+ . = ..()
+
+/datum/species/xeno/on_species_loss(mob/living/carbon/human/C, datum/species/new_species)
+ if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Plantigrade")
+ species_traits -= DIGITIGRADE
+ if(DIGITIGRADE in species_traits)
+ C.Digitigrade_Leg_Swap(TRUE)
+ . = ..()
+
+//Praise the Omnissiah, A challange worthy of my skills - HS
+
+//EXOTIC//
+//These races will likely include lots of downsides and upsides. Keep them relatively balanced.//
+
+//misc
+/mob/living/carbon/human/dummy
+ no_vore = TRUE
+
+/mob/living/carbon/human/vore
+ devourable = TRUE
+ digestable = TRUE
+ feeding = TRUE
diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm
index 88dd59749c..84c44ea81c 100644
--- a/code/modules/mob/living/carbon/human/species_types/golems.dm
+++ b/code/modules/mob/living/carbon/human/species_types/golems.dm
@@ -45,7 +45,7 @@
return golem_name
/datum/species/golem/random
- name = "Random Golem"
+ name = "Golem Mutant"
blacklisted = FALSE
dangerous_existence = FALSE
var/static/list/random_golem_types
diff --git a/modular_citadel/code/modules/mob/living/carbon/human/species_types/ipc.dm b/code/modules/mob/living/carbon/human/species_types/ipc.dm
similarity index 98%
rename from modular_citadel/code/modules/mob/living/carbon/human/species_types/ipc.dm
rename to code/modules/mob/living/carbon/human/species_types/ipc.dm
index 25b8daf2cb..95b924ea18 100644
--- a/modular_citadel/code/modules/mob/living/carbon/human/species_types/ipc.dm
+++ b/code/modules/mob/living/carbon/human/species_types/ipc.dm
@@ -1,5 +1,5 @@
/datum/species/ipc
- name = "IPC"
+ name = "I.P.C."
id = "ipc"
say_mod = "beeps"
default_color = "00FF00"
diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
index 66586744fb..03cd514300 100644
--- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm
@@ -118,7 +118,7 @@
//Slime people are able to split like slimes, retaining a single mind that can swap between bodies at will, even after death.
/datum/species/jelly/slime
- name = "Slimeperson"
+ name = "Xenobiological Slime Entity"
id = "slime"
default_color = "00FFFF"
species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,NOBLOOD)
@@ -389,12 +389,268 @@
"...and move this one instead.")
+////////////////////////////////////////////////////////Round Start Slimes///////////////////////////////////////////////////////////////////
+
+/datum/species/jelly/roundstartslime
+ name = "Xenobiological Slime Hybrid"
+ id = "slimeperson"
+ limbs_id = "slime"
+ default_color = "00FFFF"
+ species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,NOBLOOD)
+ inherent_traits = list(TRAIT_TOXINLOVER)
+ mutant_bodyparts = list("mam_tail", "mam_ears", "mam_body_markings", "mam_snouts", "taur")
+ default_features = list("mcolor" = "FFF", "mcolor2" = "FFF","mcolor3" = "FFF", "mam_tail" = "None", "mam_ears" = "None", "mam_body_markings" = "Plain", "mam_snouts" = "None", "taur" = "None")
+ say_mod = "says"
+ hair_color = "mutcolor"
+ hair_alpha = 160 //a notch brighter so it blends better.
+ coldmod = 3
+ heatmod = 1
+ burnmod = 1
+
+/datum/species/jelly/roundstartslime/spec_death(gibbed, mob/living/carbon/human/H)
+ if(H)
+ stop_wagging_tail(H)
+
+/datum/species/jelly/roundstartslime/spec_stun(mob/living/carbon/human/H,amount)
+ if(H)
+ stop_wagging_tail(H)
+ . = ..()
+
+/datum/species/jelly/roundstartslime/can_wag_tail(mob/living/carbon/human/H)
+ return ("mam_tail" in mutant_bodyparts) || ("mam_waggingtail" in mutant_bodyparts)
+
+/datum/species/jelly/roundstartslime/is_wagging_tail(mob/living/carbon/human/H)
+ return ("mam_waggingtail" in mutant_bodyparts)
+
+/datum/species/jelly/roundstartslime/start_wagging_tail(mob/living/carbon/human/H)
+ if("mam_tail" in mutant_bodyparts)
+ mutant_bodyparts -= "mam_tail"
+ mutant_bodyparts |= "mam_waggingtail"
+ H.update_body()
+
+/datum/species/jelly/roundstartslime/stop_wagging_tail(mob/living/carbon/human/H)
+ if("mam_waggingtail" in mutant_bodyparts)
+ mutant_bodyparts -= "mam_waggingtail"
+ mutant_bodyparts |= "mam_tail"
+ H.update_body()
+
+
+/datum/action/innate/slime_change
+ name = "Alter Form"
+ check_flags = AB_CHECK_CONSCIOUS
+ button_icon_state = "alter_form" //placeholder
+ icon_icon = 'modular_citadel/icons/mob/actions/actions_slime.dmi'
+ background_icon_state = "bg_alien"
+
+/datum/action/innate/slime_change/Activate()
+ var/mob/living/carbon/human/H = owner
+ if(!isjellyperson(H))
+ return
+ else
+ H.visible_message("[owner] gains a look of \
+ concentration while standing perfectly still.\
+ Their body seems to shift and starts getting more goo-like.",
+ "You focus intently on altering your body while \
+ standing perfectly still...")
+ change_form()
+
+/datum/action/innate/slime_change/proc/change_form()
+ var/mob/living/carbon/human/H = owner
+ var/select_alteration = input(owner, "Select what part of your form to alter", "Form Alteration", "cancel") in list("Hair Style", "Genitals", "Tail", "Snout", "Markings", "Ears", "Taur body", "Penis", "Vagina", "Penis Length", "Breast Size", "Breast Shape", "Cancel")
+ if(select_alteration == "Hair Style")
+ if(H.gender == MALE)
+ var/new_style = input(owner, "Select a facial hair style", "Hair Alterations") as null|anything in GLOB.facial_hair_styles_list
+ if(new_style)
+ H.facial_hair_style = new_style
+ else
+ H.facial_hair_style = "Shaved"
+ //handle normal hair
+ var/new_style = input(owner, "Select a hair style", "Hair Alterations") as null|anything in GLOB.hair_styles_list
+ if(new_style)
+ H.hair_style = new_style
+ H.update_hair()
+ else if (select_alteration == "Genitals")
+ var/list/organs = list()
+ var/operation = input("Select organ operation.", "Organ Manipulation", "cancel") in list("add sexual organ", "remove sexual organ", "cancel")
+ switch(operation)
+ if("add sexual organ")
+ var/new_organ = input("Select sexual organ:", "Organ Manipulation") in list("Penis", "Testicles", "Breasts", "Vagina", "Womb", "Cancel")
+ if(new_organ == "Penis")
+ H.give_penis()
+ else if(new_organ == "Testicles")
+ H.give_balls()
+ else if(new_organ == "Breasts")
+ H.give_breasts()
+ else if(new_organ == "Vagina")
+ H.give_vagina()
+ else if(new_organ == "Womb")
+ H.give_womb()
+ else
+ return
+ if("remove sexual organ")
+ for(var/obj/item/organ/genital/X in H.internal_organs)
+ var/obj/item/organ/I = X
+ organs["[I.name] ([I.type])"] = I
+ var/obj/item/organ = input("Select sexual organ:", "Organ Manipulation", null) in organs
+ organ = organs[organ]
+ if(!organ)
+ return
+ var/obj/item/organ/genital/O
+ if(isorgan(organ))
+ O = organ
+ O.Remove(H)
+ organ.forceMove(get_turf(H))
+ qdel(organ)
+ H.update_genitals()
+
+ else if (select_alteration == "Ears")
+ var/list/snowflake_ears_list = list("Normal" = null)
+ for(var/path in GLOB.mam_ears_list)
+ var/datum/sprite_accessory/mam_ears/instance = GLOB.mam_ears_list[path]
+ if(istype(instance, /datum/sprite_accessory))
+ var/datum/sprite_accessory/S = instance
+ if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey)))
+ snowflake_ears_list[S.name] = path
+ var/new_ears
+ new_ears = input(owner, "Choose your character's ears:", "Ear Alteration") as null|anything in snowflake_ears_list
+ if(new_ears)
+ H.dna.features["mam_ears"] = new_ears
+ H.update_body()
+
+ else if (select_alteration == "Snout")
+ var/list/snowflake_snouts_list = list("Normal" = null)
+ for(var/path in GLOB.mam_snouts_list)
+ var/datum/sprite_accessory/mam_snouts/instance = GLOB.mam_snouts_list[path]
+ if(istype(instance, /datum/sprite_accessory))
+ var/datum/sprite_accessory/S = instance
+ if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey)))
+ snowflake_snouts_list[S.name] = path
+ var/new_snout
+ new_snout = input(owner, "Choose your character's face:", "Face Alteration") as null|anything in snowflake_snouts_list
+ if(new_snout)
+ H.dna.features["mam_snouts"] = new_snout
+ H.update_body()
+
+ else if (select_alteration == "Markings")
+ var/list/snowflake_markings_list = list()
+ for(var/path in GLOB.mam_body_markings_list)
+ var/datum/sprite_accessory/mam_body_markings/instance = GLOB.mam_body_markings_list[path]
+ if(istype(instance, /datum/sprite_accessory))
+ var/datum/sprite_accessory/S = instance
+ if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey)))
+ snowflake_markings_list[S.name] = path
+ var/new_mam_body_markings
+ new_mam_body_markings = input(H, "Choose your character's body markings:", "Marking Alteration") as null|anything in snowflake_markings_list
+ if(new_mam_body_markings)
+ H.dna.features["mam_body_markings"] = new_mam_body_markings
+ if(new_mam_body_markings == "None")
+ H.dna.features["mam_body_markings"] = "Plain"
+ for(var/X in H.bodyparts) //propagates the markings changes
+ var/obj/item/bodypart/BP = X
+ BP.update_limb(FALSE, H)
+ H.update_body()
+
+ else if (select_alteration == "Tail")
+ var/list/snowflake_tails_list = list("Normal" = null)
+ for(var/path in GLOB.mam_tails_list)
+ var/datum/sprite_accessory/mam_tails/instance = GLOB.mam_tails_list[path]
+ if(istype(instance, /datum/sprite_accessory))
+ var/datum/sprite_accessory/S = instance
+ if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey)))
+ snowflake_tails_list[S.name] = path
+ var/new_tail
+ new_tail = input(owner, "Choose your character's Tail(s):", "Tail Alteration") as null|anything in snowflake_tails_list
+ if(new_tail)
+ H.dna.features["mam_tail"] = new_tail
+ if(new_tail != "None")
+ H.dna.features["taur"] = "None"
+ H.update_body()
+
+ else if (select_alteration == "Taur body")
+ var/list/snowflake_taur_list = list("Normal" = null)
+ for(var/path in GLOB.taur_list)
+ var/datum/sprite_accessory/taur/instance = GLOB.taur_list[path]
+ if(istype(instance, /datum/sprite_accessory))
+ var/datum/sprite_accessory/S = instance
+ if((!S.ckeys_allowed) || (S.ckeys_allowed.Find(H.client.ckey)))
+ snowflake_taur_list[S.name] = path
+ var/new_taur
+ new_taur = input(owner, "Choose your character's tauric body:", "Tauric Alteration") as null|anything in snowflake_taur_list
+ if(new_taur)
+ H.dna.features["taur"] = new_taur
+ if(new_taur != "None")
+ H.dna.features["mam_tail"] = "None"
+ H.update_body()
+
+ else if (select_alteration == "Penis")
+ for(var/obj/item/organ/genital/penis/X in H.internal_organs)
+ qdel(X)
+ var/new_shape
+ new_shape = input(owner, "Choose your character's dong", "Genital Alteration") as null|anything in GLOB.cock_shapes_list
+ if(new_shape)
+ H.dna.features["cock_shape"] = new_shape
+ H.update_genitals()
+ H.give_balls()
+ H.give_penis()
+ H.apply_overlay()
+
+
+ else if (select_alteration == "Vagina")
+ for(var/obj/item/organ/genital/vagina/X in H.internal_organs)
+ qdel(X)
+ var/new_shape
+ new_shape = input(owner, "Choose your character's pussy", "Genital Alteration") as null|anything in GLOB.vagina_shapes_list
+ if(new_shape)
+ H.dna.features["vag_shape"] = new_shape
+ H.update_genitals()
+ H.give_womb()
+ H.give_vagina()
+ H.apply_overlay()
+
+ else if (select_alteration == "Penis Length")
+ for(var/obj/item/organ/genital/penis/X in H.internal_organs)
+ qdel(X)
+ var/new_length
+ new_length = input(owner, "Penis length in inches:\n([COCK_SIZE_MIN]-[COCK_SIZE_MAX])", "Genital Alteration") as num|null
+ if(new_length)
+ H.dna.features["cock_length"] = max(min( round(text2num(new_length)), COCK_SIZE_MAX),COCK_SIZE_MIN)
+ H.update_genitals()
+ H.apply_overlay()
+ H.give_balls()
+ H.give_penis()
+
+ else if (select_alteration == "Breast Size")
+ for(var/obj/item/organ/genital/breasts/X in H.internal_organs)
+ qdel(X)
+ var/new_size
+ new_size = input(owner, "Breast Size", "Genital Alteration") as null|anything in GLOB.breasts_size_list
+ if(new_size)
+ H.dna.features["breasts_size"] = new_size
+ H.update_genitals()
+ H.apply_overlay()
+ H.give_breasts()
+
+ else if (select_alteration == "Breast Shape")
+ for(var/obj/item/organ/genital/breasts/X in H.internal_organs)
+ qdel(X)
+ var/new_shape
+ new_shape = input(owner, "Breast Shape", "Genital Alteration") as null|anything in GLOB.breasts_shapes_list
+ if(new_shape)
+ H.dna.features["breasts_shape"] = new_shape
+ H.update_genitals()
+ H.apply_overlay()
+ H.give_breasts()
+
+ else
+ return
+
+
///////////////////////////////////LUMINESCENTS//////////////////////////////////////////
//Luminescents are able to consume and use slime extracts, without them decaying.
/datum/species/jelly/luminescent
- name = "Luminescent"
+ name = "Luminescent Slime Entity"
id = "lum"
say_mod = "says"
var/glow_intensity = LUMINESCENT_DEFAULT_GLOW
@@ -561,7 +817,7 @@
//Stargazers are the telepathic branch of jellypeople, able to project psychic messages and to link minds with willing participants.
/datum/species/jelly/stargazer
- name = "Stargazer"
+ name = "Stargazer Slime Entity"
id = "stargazer"
var/datum/action/innate/project_thought/project_thought
var/datum/action/innate/link_minds/link_minds
diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
index 30bf705547..4dbfd23df8 100644
--- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm
@@ -1,17 +1,19 @@
/datum/species/lizard
// Reptilian humanoids with scaled skin and tails.
- name = "Lizardperson"
+ name = "Anthromorphic Lizard"
id = "lizard"
say_mod = "hisses"
default_color = "00FF00"
- species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,LIPS)
+ species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,LIPS,HORNCOLOR)
inherent_biotypes = list(MOB_ORGANIC, MOB_HUMANOID, MOB_REPTILE)
mutant_bodyparts = list("tail_lizard", "snout", "spines", "horns", "frills", "body_markings", "legs", "taur")
mutanttongue = /obj/item/organ/tongue/lizard
mutanttail = /obj/item/organ/tail/lizard
coldmod = 1.5
heatmod = 0.67
- default_features = list("mcolor" = "0F0", "mcolor2" = "0F0", "mcolor3" = "0F0", "tail_lizard" = "Smooth", "snout" = "Round", "horns" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None", "legs" = "Normal Legs", "taur" = "None")
+ default_features = list("mcolor" = "0F0", "mcolor2" = "0F0", "mcolor3" = "0F0", "tail_lizard" = "Smooth", "snout" = "Round",
+ "horns" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None",
+ "legs" = "Digitigrade", "taur" = "None")
attack_verb = "slash"
attack_sound = 'sound/weapons/slash.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
@@ -71,14 +73,14 @@
H.update_body()
/datum/species/lizard/on_species_gain(mob/living/carbon/human/C, datum/species/old_species)
- if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Digitigrade Legs")
+ if(("legs" in C.dna.species.mutant_bodyparts) && (C.dna.features["legs"] == "Digitigrade" || C.dna.features["legs"] == "Avian"))
species_traits += DIGITIGRADE
if(DIGITIGRADE in species_traits)
C.Digitigrade_Leg_Swap(FALSE)
return ..()
/datum/species/lizard/on_species_loss(mob/living/carbon/human/C, datum/species/new_species)
- if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Normal Legs")
+ if(("legs" in C.dna.species.mutant_bodyparts) && C.dna.features["legs"] == "Plantigrade")
species_traits -= DIGITIGRADE
if(DIGITIGRADE in species_traits)
C.Digitigrade_Leg_Swap(TRUE)
diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm
deleted file mode 100644
index d15d989384..0000000000
--- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm
+++ /dev/null
@@ -1,61 +0,0 @@
-/datum/species/moth
- name = "Mothman"
- id = "moth"
- say_mod = "flutters"
- default_color = "00FF00"
- species_traits = list(LIPS, NOEYES)
- inherent_biotypes = list(MOB_ORGANIC, MOB_HUMANOID, MOB_BUG)
- mutant_bodyparts = list("moth_wings")
- default_features = list("moth_wings" = "Plain")
- attack_verb = "slash"
- attack_sound = 'sound/weapons/slash.ogg'
- miss_sound = 'sound/weapons/slashmiss.ogg'
- meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/moth
- liked_food = VEGETABLES | DAIRY
- disliked_food = FRUIT | GROSS
- toxic_food = MEAT | RAW
- mutanteyes = /obj/item/organ/eyes/moth
-
-/datum/species/moth/on_species_gain(mob/living/carbon/C)
- . = ..()
- if(ishuman(C))
- var/mob/living/carbon/human/H = C
- if(!H.dna.features["moth_wings"])
- H.dna.features["moth_wings"] = "[(H.client && H.client.prefs && LAZYLEN(H.client.prefs.features) && H.client.prefs.features["moth_wings"]) ? H.client.prefs.features["moth_wings"] : "Plain"]"
- handle_mutant_bodyparts(H)
-
-/datum/species/moth/random_name(gender,unique,lastname)
- if(unique)
- return random_unique_moth_name()
-
- var/randname = moth_name()
-
- if(lastname)
- randname += " [lastname]"
-
- return randname
-
-/datum/species/moth/handle_fire(mob/living/carbon/human/H, no_protection = FALSE)
- ..()
- if(H.dna.features["moth_wings"] != "Burnt Off" && H.bodytemperature >= 800 && H.fire_stacks > 0) //do not go into the extremely hot light. you will not survive
- to_chat(H, "Your precious wings burn to a crisp!")
- H.dna.features["moth_wings"] = "Burnt Off"
- handle_mutant_bodyparts(H)
-
-/datum/species/moth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H)
- . = ..()
- if(chem.id == "pestkiller")
- H.adjustToxLoss(3)
- H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
-
-/datum/species/moth/check_weakness(obj/item/weapon, mob/living/attacker)
- if(istype(weapon, /obj/item/melee/flyswatter))
- return 9 //flyswatters deal 10x damage to moths
- return 0
-
-/datum/species/moth/space_move(mob/living/carbon/human/H)
- . = ..()
- if(H.loc && !isspaceturf(H.loc) && H.dna.features["moth_wings"] != "Burnt Off")
- var/datum/gas_mixture/current = H.loc.return_air()
- if(current && (current.return_pressure() >= ONE_ATMOSPHERE*0.85)) //as long as there's reasonable pressure and no gravity, flight is possible
- return TRUE
diff --git a/code/modules/mob/living/carbon/human/species_types/mushpeople.dm b/code/modules/mob/living/carbon/human/species_types/mushpeople.dm
index 7be0265cba..ceadb28115 100644
--- a/code/modules/mob/living/carbon/human/species_types/mushpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/mushpeople.dm
@@ -1,5 +1,5 @@
/datum/species/mush //mush mush codecuck
- name = "Mushroomperson"
+ name = "Anthromorphic Mushroom"
id = "mush"
mutant_bodyparts = list("caps")
default_features = list("caps" = "Round")
diff --git a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
index d7bb151ddc..b4d47033f3 100644
--- a/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
+++ b/code/modules/mob/living/carbon/human/species_types/plasmamen.dm
@@ -1,5 +1,5 @@
/datum/species/plasmaman
- name = "Plasmaman"
+ name = "Phoronoid"
id = "plasmaman"
say_mod = "rattles"
sexes = 0
diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
index 0da4073f1d..46207e5e60 100644
--- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm
+++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm
@@ -1,6 +1,6 @@
/datum/species/pod
// A mutation caused by a human being ressurected in a revival pod. These regain health in light, and begin to wither in darkness.
- name = "Podperson"
+ name = "Anthromorphic Plant"
id = "pod"
default_color = "59CE00"
species_traits = list(MUTCOLORS,EYECOLOR)
@@ -71,6 +71,7 @@
H.nutrition = min(H.nutrition+30, NUTRITION_LEVEL_FULL)
/datum/species/pod/pseudo_weak
+ name = "Anthromorphic Plant"
id = "podweak"
limbs_id = "pod"
species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,MUTCOLORS)
diff --git a/code/modules/mob/living/carbon/human/species_types/synths.dm b/code/modules/mob/living/carbon/human/species_types/synths.dm
index 0ebd6e795b..e325cbb4f4 100644
--- a/code/modules/mob/living/carbon/human/species_types/synths.dm
+++ b/code/modules/mob/living/carbon/human/species_types/synths.dm
@@ -1,5 +1,5 @@
/datum/species/synth
- name = "Synth" //inherited from the real species, for health scanners and things
+ name = "Synthetic" //inherited from the real species, for health scanners and things
id = "synth"
say_mod = "beep boops" //inherited from a user's real species
sexes = 0
diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm
deleted file mode 100644
index 51c7ad9d25..0000000000
--- a/code/modules/mob/living/carbon/human/whisper.dm
+++ /dev/null
@@ -1,91 +0,0 @@
-/mob/living/carbon/human/whisper_verb(message as text)
- whisper(message)
-
-/mob/living/carbon/human/whisper(message, datum/language/language=null)
- if(!IsVocal())
- return
- if(!message)
- return
- if(!language)
- language = get_default_language()
-
- if(GLOB.say_disabled) //This is here to try to identify lag problems
- to_chat(usr, "Speech is currently admin-disabled.")
- return
-
- if(stat == DEAD)
- return
-
-
- message = trim(html_encode(message))
- if(!can_speak(message))
- return
-
- message = "[message]"
- log_whisper("[src.name]/[src.key] : [message]")
-
- if (src.client)
- if (src.client.prefs.muted & MUTE_IC)
- to_chat(src, "You cannot whisper (muted).")
- return
-
- log_whisper("[src.name]/[src.key] : [message]")
-
- var/alt_name = get_alt_name()
-
- var/whispers = "whispers"
- var/critical = InCritical()
-
- // We are unconscious but not in critical, so don't allow them to whisper.
- if(stat == UNCONSCIOUS && !critical)
- return
-
- // If whispering your last words, limit the whisper based on how close you are to death.
- if(critical)
- var/health_diff = round(-HEALTH_THRESHOLD_DEAD + health)
- // If we cut our message short, abruptly end it with a-..
- var/message_len = length(message)
- message = copytext(message, 1, health_diff) + "[message_len > health_diff ? "-.." : "..."]"
- message = Ellipsis(message, 10, 1)
-
- message = treat_message(message)
- if(!message)
- return
-
- var/list/listening_dead = list()
- for(var/mob/M in GLOB.player_list)
- if(M.stat == DEAD && M.client && ((M.client.prefs.chat_toggles & CHAT_GHOSTWHISPER) || (get_dist(M, src) <= 7)))
- listening_dead |= M
-
- var/list/listening = get_hearers_in_view(1, src)
- listening |= listening_dead
- var/list/eavesdropping = get_hearers_in_view(2, src)
- eavesdropping -= listening
- var/list/watching = hearers(5, src)
- watching -= listening
- watching -= eavesdropping
-
- var/rendered
- whispers = critical ? "whispers something in [p_their()] final breath." : "whispers something."
- rendered = "[src.name] [whispers]"
- for(var/mob/M in watching)
- M.show_message(rendered, 2)
-
- var/spans = list(SPAN_ITALICS)
- whispers = critical ? "whispers in [p_their()] final breath" : "whispers"
- rendered = "[GetVoice()][alt_name] [whispers], \"[attach_spans(message, spans)]\""
-
- for(var/atom/movable/AM in listening)
- if(istype(AM,/obj/item/radio))
- continue
- AM.Hear(rendered, src, language, message, , spans)
-
- message = stars(message)
- rendered = "[GetVoice()][alt_name] [whispers], \"[attach_spans(message, spans)]\""
- for(var/atom/movable/AM in eavesdropping)
- if(istype(AM,/obj/item/radio))
- continue
- AM.Hear(rendered, src, language, message, , spans)
-
- if(critical) //Dying words.
- succumb()
diff --git a/code/modules/oracle_ui/README.md b/code/modules/oracle_ui/README.md
new file mode 100644
index 0000000000..bc96eb1f51
--- /dev/null
+++ b/code/modules/oracle_ui/README.md
@@ -0,0 +1,233 @@
+# `/datum/oracle_ui`
+
+This datum is a replacement for tgui which does not use any Node.js dependencies, and works entirely through raw HTML, JS and CSS. It's designed to be reasonably easy to port something from tgui to oracle_ui.
+
+### How to create a UI
+
+For this example, we're going to port the disposals bin from tgui to oracle_ui.
+
+#### Step 1
+
+In order to create a UI, you will first need to create an instance of `/datum/oracle_ui` or one of its subclasses, in this case `/datum/oracle_ui/themed/nano`.
+
+You need to pass in `src`, the width of the window, the height of the window, and the template to render from. You can optionally set some flags to disallow window resizing and whether to automatically refresh the UI.
+
+`code/modules/recycling/disposal-unit.dm`
+```dm
+/obj/machinery/disposal/bin/Initialize(mapload, obj/structure/disposalconstruct/make_from)
+ . = ..()
+ ui = new /datum/oracle_ui/themed/nano(src, 330, 190, "disposal_bin")
+ ui.auto_refresh = TRUE
+ ui.can_resize = FALSE
+```
+
+#### Step 2
+
+You will now need to make a template in `html/oracle_ui/content/{template_name}`.
+
+Values defined as `@{value}` will get replaced at runtime by oracle_ui.
+
+`html/oracle_ui/content/disposal_bin/index.html`
+```html
+
+
+ State:
+
@{full_pressure}
+
+
+ Pressure:
+
+
+
+
@{per}
+
+
+
+
+ Handle:
+
@{flush}
+
+
+ Eject:
+
@{contents}
+
+
+ Compressor:
+
@{pressure_charging}
+
+
+```
+
+#### Step 3
+
+Now you need to implement the methods that provide data to oracle_ui. `oui_data` can be adapted from the `ui_data` proc that tgui uses.
+
+The `act` proc generates a hyperlink that will result in `oui_act` getting called on your object when clicked. The `class` argument defines a css class to be added to the hyperlink, and disabled determines whether the hyperlink will be disabled or not.
+
+Calling `soft_update_fields` will result in the UI being updated on all clients, which is useful when the object changes state.
+
+`code/modules/recycling/disposal-unit.dm`
+```dm
+/obj/machinery/disposal/bin/oui_data(mob/user)
+ var/list/data = list()
+ data["flush"] = flush ? ui.act("Disengage", user, "handle-0", class="active") : ui.act("Engage", user, "handle-1")
+ data["full_pressure"] = full_pressure ? "Ready" : (pressure_charging ? "Pressurizing" : "Off")
+ data["pressure_charging"] = pressure_charging ? ui.act("Turn Off", user, "pump-0", class="active", disabled=full_pressure) : ui.act("Turn On", user, "pump-1", disabled=full_pressure)
+ var/per = full_pressure ? 100 : Clamp(100* air_contents.return_pressure() / (SEND_PRESSURE), 0, 99)
+ data["per"] = "[round(per, 1)]%"
+ data["contents"] = ui.act("Eject Contents", user, "eject", disabled=contents.len < 1)
+ data["isai"] = isAI(user)
+ return data
+/obj/machinery/disposal/bin/oui_act(mob/user, action, list/params)
+ if(..())
+ return
+ switch(action)
+ if("handle-0")
+ flush = FALSE
+ update_icon()
+ . = TRUE
+ if("handle-1")
+ if(!panel_open)
+ flush = TRUE
+ update_icon()
+ . = TRUE
+ if("pump-0")
+ if(pressure_charging)
+ pressure_charging = FALSE
+ update_icon()
+ . = TRUE
+ if("pump-1")
+ if(!pressure_charging)
+ pressure_charging = TRUE
+ update_icon()
+ . = TRUE
+ if("eject")
+ eject()
+ . = TRUE
+ ui.soft_update_fields()
+```
+
+#### Step 4
+
+You now need to hook in and ensure oracle_ui is invoked upon clicking. `render` should be used to open the UI for a user, typically on click.
+
+`code/modules/recycling/disposal-unit.dm`
+```dm
+/obj/machinery/disposal/bin/ui_interact(mob/user, state)
+ if(stat & BROKEN)
+ return
+ if(user.loc == src)
+ to_chat(user, "You cannot reach the controls from inside!")
+ return
+ ui.render(user)
+```
+
+#### Done
+
+
+
+You should have a functional UI at this point. Some additional odds and ends can be discovered throughout `code/modules/recycling/disposal-unit.dm`. For a full diff of the changes made to it, refer to [the original pull request on GitHub](https://github.com/OracleStation/OracleStation/pull/702/files#diff-4b6c20ec7d37222630e7524d9577e230).
+
+### API Reference
+
+#### `/datum/oracle_ui`
+
+The main datum which handles the UI.
+
+##### `get_content(mob/target)`
+Returns the HTML that should be displayed for a specified target mob. Calls `oui_getcontent` on the datasource to get the return value. *This proc is not used in the themed subclass.*
+
+##### `can_view(mob/target)`
+Returns whether the specified target mob can view the UI. Calls `oui_canview` on the datasource to get the return value.
+
+##### `test_viewer(mob/target, updating)`
+Tests whether the client is valid and can view the UI. If updating is TRUE, checks to see if they still have the UI window open.
+
+##### `render(mob/target, updating = FALSE)`
+Opens the UI for a target mob, sending HTML. If updating is TRUE, will only do it to clients which still have the window open.
+
+##### `render_all()`
+Does the above, but for all viewers and with updating set to TRUE.
+
+##### `close(mob/target)`
+Closes the UI for the specified target mob.
+
+##### `close_all()`
+Does the above, but for all viewers.
+
+##### `check_view(mob/target)`
+Checks if the specified target mob can view the UI, and if they can't closes their UI
+
+##### `check_view_all()`
+Does the above, but for all viewers.
+
+##### `call_js(mob/target, js_func, list/parameters = list())`
+Invokes `js_func` in the UI of the specified target mob with the specified parameters.
+
+##### `call_js_all(js_func, list/parameters = list()))`
+Does the above, but for all viewers.
+
+##### `steal_focus(mob/target)`
+Causes the UI to steal focus for the specified target mob.
+
+##### `steal_focus_all()`
+Does the above, but for all viewers.
+
+##### `flash(mob/target, times = -1)`
+Causes the UI to flash for the specified target mob the specified number of times, the default keeps the element flashing until focused.
+
+##### `flash_all()`
+Does the above, but for all viewers.
+
+##### `href(mob/user, action, list/parameters = list())`
+Generates a href for the specified user which will invoke `oui_act` on the datasource with the specified action and parameters.
+
+#### `/datum/oracle_ui/themed`
+
+A subclass which supports templating and theming.
+
+##### `get_file(path)`
+Loads a file from disk and returns the contents. Caches files loaded from disk for you.
+
+##### `get_content_file(filename)`
+Loads a file from the current content folder and returns the contents.
+
+##### `get_themed_file(filename)`
+Loads a file from the current theme folder and returns the contents.
+
+##### `process_template(template, variables)`
+Processes a template and populates it with the provided variables.
+
+##### `get_inner_content(mob/target)`
+Returns the templated content to be inserted into the main template for the specified target mob.
+
+##### `soft_update_fields()`
+For all viewers, updates the fields in the template via the `updateFields` javaScript function.
+
+##### `soft_update_all()`
+For all viewers, updates the content body in the template via the `replaceContent` javaScript function.
+
+##### `change_page(var/newpage)`
+Changes the template to use to draw the page and forces an update to all viewers
+
+##### `act(label, mob/user, action, list/parameters = list(), class = "", disabled = FALSE`
+Returns a fully formatted hyperlink for the specified user. `label` will be the hyperlink label, `action` and `parameters` are what will be passed to `oui_act`, `class` is any CSS classes to apply to the hyperlink and `disabled` will disable the hyperlink.
+
+#### `/datum`
+
+Functions built into all objects to support oracle_ui. There are default implementations for most major superclasses.
+
+##### `oui_canview(mob/user)`
+Returns whether the specified user view the UI at this time.
+
+##### `oui_getcontent(mob/user)`
+Returns the raw HTML to be sent to the specified user. *This proc is not used in the themed subclass of oracle_ui.*
+
+##### `oui_data(mob/user)`
+Returns templating data for the specified user. *This proc is only used in the themed subclass of oracle_ui.*
+
+##### `oui_data_debug(mob/user)`
+Returns the above, but JSON-encoded and escaped, for copy pasting into the web IDE. *This proc is only used for debugging purposes.*
+
+##### `oui_act(mob/user, action, list/params)`
+Called when a hyperlink is clicked in the UI.
diff --git a/code/modules/oracle_ui/assets.dm b/code/modules/oracle_ui/assets.dm
new file mode 100644
index 0000000000..5d26d80a81
--- /dev/null
+++ b/code/modules/oracle_ui/assets.dm
@@ -0,0 +1,8 @@
+/datum/asset/simple/oui_theme_nano
+ assets = list(
+ // JavaScript
+ "sui-nano-common.js" = 'html/oracle_ui/themes/nano/sui-nano-common.js',
+ "sui-nano-jquery.min.js" = 'html/oracle_ui/themes/nano/sui-nano-jquery.min.js',
+ // Stylesheets
+ "sui-nano-common.css" = 'html/oracle_ui/themes/nano/sui-nano-common.css',
+ )
diff --git a/code/modules/oracle_ui/hookup_procs.dm b/code/modules/oracle_ui/hookup_procs.dm
new file mode 100644
index 0000000000..e6038744c1
--- /dev/null
+++ b/code/modules/oracle_ui/hookup_procs.dm
@@ -0,0 +1,44 @@
+/datum/proc/oui_canview(mob/user)
+ return TRUE
+
+/datum/proc/oui_getcontent(mob/user)
+ return "Default Implementation"
+
+/datum/proc/oui_canuse(mob/user)
+ if(isobserver(user) && !user.has_unlimited_silicon_privilege)
+ return FALSE
+ return oui_canview(user)
+
+/datum/proc/oui_data(mob/user)
+ return list()
+
+/datum/proc/oui_data_debug(mob/user)
+ return html_encode(json_encode(oui_data(user)))
+
+/datum/proc/oui_act(mob/user, action, list/params)
+ // No Implementation
+
+/atom/oui_canview(mob/user)
+ if(isobserver(user))
+ return TRUE
+ if(user.incapacitated())
+ return FALSE
+ if(isturf(src.loc) && Adjacent(user))
+ return TRUE
+ return FALSE
+
+/obj/item/oui_canview(mob/user)
+ if(src.loc == user)
+ return src in user.held_items
+ return ..()
+
+/obj/machinery/oui_canview(mob/user)
+ if(user.has_unlimited_silicon_privilege)
+ return TRUE
+ if(!can_interact())
+ return FALSE
+ if(iscyborg(user))
+ return can_see(user, src, 7)
+ if(isAI(user))
+ return GLOB.cameranet.checkTurfVis(get_turf_pixel(src))
+ return ..()
diff --git a/code/modules/oracle_ui/oracle_ui.dm b/code/modules/oracle_ui/oracle_ui.dm
new file mode 100644
index 0000000000..5e8d6b9c7b
--- /dev/null
+++ b/code/modules/oracle_ui/oracle_ui.dm
@@ -0,0 +1,134 @@
+/datum/oracle_ui
+ var/width = 512
+ var/height = 512
+ var/can_close = TRUE
+ var/can_minimize = FALSE
+ var/can_resize = TRUE
+ var/titlebar = TRUE
+ var/window_id = null
+ var/viewers[0]
+ var/auto_check_view = TRUE
+ var/auto_refresh = FALSE
+ var/atom/datasource = null
+ var/datum/asset/assets = null
+
+/datum/oracle_ui/New(atom/n_datasource, n_width = 512, n_height = 512, n_assets = null)
+ datasource = n_datasource
+ window_id = REF(src)
+ width = n_width
+ height = n_height
+
+/datum/oracle_ui/Destroy()
+ close_all()
+ if(src.datum_flags & DF_ISPROCESSING)
+ STOP_PROCESSING(SSobj, src)
+ return ..()
+
+/datum/oracle_ui/process()
+ if(auto_check_view)
+ check_view_all()
+ if(auto_refresh)
+ render_all()
+
+/datum/oracle_ui/proc/get_content(mob/target)
+ return call(datasource, "oui_getcontent")(target)
+
+/datum/oracle_ui/proc/can_view(mob/target)
+ return call(datasource, "oui_canview")(target)
+
+/datum/oracle_ui/proc/test_viewer(mob/target, updating)
+ //If the target is null or does not have a client, remove from viewers and return
+ if(!target | !target.client | !can_view(target))
+ viewers -= target
+ if(viewers.len < 1 && (src.datum_flags & DF_ISPROCESSING))
+ STOP_PROCESSING(SSobj, src) //No more viewers, stop polling
+ close(target)
+ return FALSE
+ //If this is an update, and they have closed the window, remove from viewers and return
+ if(updating && winget(target, window_id, "is-visible") != "true")
+ viewers -= target
+ if(viewers.len < 1 && (src.datum_flags & DF_ISPROCESSING))
+ STOP_PROCESSING(SSobj, src) //No more viewers, stop polling
+ return FALSE
+ return TRUE
+
+/datum/oracle_ui/proc/render(mob/target, updating = FALSE)
+ set waitfor = FALSE //Makes this an async call
+ if(!can_view(target))
+ return
+ //Check to see if they have the window open still if updating
+ if(updating && !test_viewer(target, updating))
+ return
+ //Send assets
+ if(!updating && assets)
+ assets.send(target)
+ //Add them to the viewers if they aren't there already
+ viewers |= target
+ if(!(src.datum_flags & DF_ISPROCESSING) && (auto_refresh | auto_check_view))
+ START_PROCESSING(SSobj, src) //Start processing to poll for viewability
+ //Send the content
+ if(updating)
+ target << output(get_content(target), "[window_id].browser")
+ else
+ target << browse(get_content(target), "window=[window_id];size=[width]x[height];can_close=[can_close];can_minimize=[can_minimize];can_resize=[can_resize];titlebar=[titlebar];focus=false;")
+ steal_focus(target)
+
+/datum/oracle_ui/proc/render_all()
+ for(var/viewer in viewers)
+ render(viewer, TRUE)
+
+/datum/oracle_ui/proc/close(mob/target)
+ if(target && target.client)
+ target << browse(null, "window=[window_id]")
+
+/datum/oracle_ui/proc/close_all()
+ for(var/viewer in viewers)
+ close(viewer)
+ viewers = list()
+
+/datum/oracle_ui/proc/check_view_all()
+ for(var/viewer in viewers)
+ check_view(viewer)
+
+/datum/oracle_ui/proc/check_view(mob/target)
+ set waitfor = FALSE //Makes this an async call
+ if(!test_viewer(target, TRUE))
+ close(target)
+
+/datum/oracle_ui/proc/call_js(mob/target, js_func, list/parameters = list())
+ set waitfor = FALSE //Makes this an async call
+ if(!test_viewer(target, TRUE))
+ return
+ target << output(list2params(parameters),"[window_id].browser:[js_func]")
+
+/datum/oracle_ui/proc/call_js_all(js_func, list/parameters = list())
+ for(var/viewer in viewers)
+ call_js(viewer, js_func, parameters)
+
+/datum/oracle_ui/proc/steal_focus(mob/target)
+ set waitfor = FALSE //Makes this an async call
+ winset(target, "[window_id]","focus=true")
+
+/datum/oracle_ui/proc/steal_focus_all()
+ for(var/viewer in viewers)
+ steal_focus(viewer)
+
+/datum/oracle_ui/proc/flash(mob/target, times = -1)
+ set waitfor = FALSE //Makes this an async call
+ winset(target, "[window_id]","flash=[times]")
+
+/datum/oracle_ui/proc/flash_all(times = -1)
+ for(var/viewer in viewers)
+ flash(viewer, times)
+
+/datum/oracle_ui/proc/href(mob/user, action, list/parameters = list())
+ var/params_string = replacetext(list2params(parameters),"&",";")
+ return "?src=[REF(src)];sui_action=[action];sui_user=[REF(user)];[params_string]"
+
+/datum/oracle_ui/Topic(href, parameters)
+ var/action = parameters["sui_action"]
+ var/mob/current_user = locate(parameters["sui_user"])
+ if(!call(datasource, "oui_canuse")(current_user))
+ return
+ if(datasource)
+ call(datasource, "oui_act")(current_user, action, parameters);
diff --git a/code/modules/oracle_ui/themed.dm b/code/modules/oracle_ui/themed.dm
new file mode 100644
index 0000000000..56b82c2647
--- /dev/null
+++ b/code/modules/oracle_ui/themed.dm
@@ -0,0 +1,82 @@
+/datum/oracle_ui/themed
+ var/theme = ""
+ var/content_root = ""
+ var/current_page = "index.html"
+ var/root_template = ""
+
+/datum/oracle_ui/themed/New(atom/n_datasource, n_width = 512, n_height = 512, n_content_root = "")
+ root_template = get_themed_file("index.html")
+ content_root = n_content_root
+ return ..(n_datasource, n_width, n_height, get_asset_datum(/datum/asset/simple/oui_theme_nano))
+
+/datum/oracle_ui/themed/process()
+ if(auto_check_view)
+ check_view_all()
+ if(auto_refresh)
+ soft_update_fields()
+
+GLOBAL_LIST_EMPTY(oui_template_variables)
+GLOBAL_LIST_EMPTY(oui_file_cache)
+
+/datum/oracle_ui/themed/proc/get_file(path)
+ if(GLOB.oui_file_cache[path])
+ return GLOB.oui_file_cache[path]
+ else if(fexists(path))
+ var/data = file2text(path)
+ GLOB.oui_file_cache[path] = data
+ return data
+ else
+ var/errormsg = "MISSING PATH '[path]'"
+#ifndef UNIT_TESTS
+ log_world(errormsg) //Because Travis absolutely hates these procs
+#endif
+ return errormsg
+
+/datum/oracle_ui/themed/proc/get_content_file(filename)
+ return get_file("./html/oracle_ui/content/[content_root]/[filename]")
+
+/datum/oracle_ui/themed/proc/get_themed_file(filename)
+ return get_file("./html/oracle_ui/themes/[theme]/[filename]")
+
+/datum/oracle_ui/themed/proc/process_template(template, variables)
+ var/regex/pattern = regex("\\@\\{(\\w+)\\}","gi")
+ GLOB.oui_template_variables = variables
+ var/replaced = pattern.Replace(template, /proc/oui_process_template_replace)
+ GLOB.oui_template_variables = null
+ return replaced
+
+/proc/oui_process_template_replace(match, group1)
+ var/value = GLOB.oui_template_variables[group1]
+ return "[value]"
+
+/datum/oracle_ui/themed/proc/get_inner_content(mob/target)
+ var/list/data = call(datasource, "oui_data")(target)
+ return process_template(get_content_file(current_page), data)
+
+/datum/oracle_ui/themed/get_content(mob/target)
+ var/list/template_data = list("title" = datasource.name, "body" = get_inner_content(target))
+ return process_template(root_template, template_data)
+
+/datum/oracle_ui/themed/proc/soft_update_fields()
+ for(var/viewer in viewers)
+ var/json = json_encode(call(datasource, "oui_data")(viewer))
+ call_js(viewer, "updateFields", list(json))
+
+/datum/oracle_ui/themed/proc/soft_update_all()
+ for(var/viewer in viewers)
+ call_js(viewer, "replaceContent", list(get_inner_content(viewer)))
+
+/datum/oracle_ui/themed/proc/change_page(newpage)
+ if(newpage == current_page)
+ return
+ current_page = newpage
+ render_all()
+
+/datum/oracle_ui/themed/proc/act(label, mob/user, action, list/parameters = list(), class = "", disabled = FALSE)
+ if(disabled)
+ return "[label]"
+ else
+ return "[label]"
+
+/datum/oracle_ui/themed/nano
+ theme = "nano"
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index 37877ffb09..059a42bb36 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -31,6 +31,7 @@
var/spam_flag = 0
var/contact_poison // Reagent ID to transfer on contact
var/contact_poison_volume = 0
+ var/datum/oracle_ui/ui = null
/obj/item/paper/pickup(user)
@@ -40,16 +41,40 @@
if(!istype(G) || G.transfer_prints)
H.reagents.add_reagent(contact_poison,contact_poison_volume)
contact_poison = null
+ ui.check_view_all()
..()
+/obj/item/paper/dropped(mob/user)
+ ui.check_view(user)
+ return ..()
+
/obj/item/paper/Initialize()
. = ..()
pixel_y = rand(-8, 8)
pixel_x = rand(-9, 9)
+ ui = new /datum/oracle_ui(src, 420, 600, get_asset_datum(/datum/asset/spritesheet/simple/paper))
+ ui.can_resize = FALSE
update_icon()
updateinfolinks()
+/obj/item/paper/oui_getcontent(mob/target)
+ if(!target.is_literate())
+ return "[name][stars(info)][stamps]"
+ else if(istype(target.get_active_held_item(), /obj/item/pen) | istype(target.get_active_held_item(), /obj/item/toy/crayon))
+ return "[name][info_links][stamps]