From 849dbc7fb3bb4082d04ab1a3db49312e3eedaf4e Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sat, 18 Sep 2021 19:37:24 -0700 Subject: [PATCH 01/10] sigh --- code/__DEFINES/configuration.dm | 8 ++++++++ code/modules/jobs/job_types/prisoner.dm | 11 ++++++++++- .../hostile/mining_mobs/elites/elite.dm | 18 ++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/configuration.dm b/code/__DEFINES/configuration.dm index 9915563cab..8c9b270f43 100644 --- a/code/__DEFINES/configuration.dm +++ b/code/__DEFINES/configuration.dm @@ -24,3 +24,11 @@ #define POLICYCONFIG_ON_PYROCLASTIC_SENTIENT "PYROCLASTIC_SLIME" /// Displayed to pAIs on spawn #define POLICYCONFIG_PAI "PAI_SPAWN" +/// displayed to lavaland elites on spawn, overriding the default if set +#define POLICYCONFIG_ELITE_SPAWN "ELITE_FAUNA_SPAWN" +/// displayed to lavaland elites on sentience potion, overriding the default if set +#define POLICYCONFIG_ELITE_SENTIENCE "ELITE_FAUNA_SENTIENCE" +/// displayed to lavaland elites on winning the fight, overriding the default if set +#define POLICYCONFIG_ELITE_WIN "ELITE_FAUNA_WIN" +/// displayed to prisoners on spawn, overriding the default if set +#define POLICYCONFIG_JOB_PRISONER "JOB_PRISONER" diff --git a/code/modules/jobs/job_types/prisoner.dm b/code/modules/jobs/job_types/prisoner.dm index 13c18c21ca..277f53b0db 100644 --- a/code/modules/jobs/job_types/prisoner.dm +++ b/code/modules/jobs/job_types/prisoner.dm @@ -1,4 +1,4 @@ -datum/job/prisoner +/datum/job/prisoner title = "Prisoner" flag = PRISONER department_head = list("The Security Team") @@ -13,6 +13,15 @@ datum/job/prisoner display_order = JOB_DISPLAY_ORDER_PRISONER +/datum/job/prisoner/after_spawn(mob/living/carbon/human/H, mob/M) + var/list/policies = CONFIG_GET(keyed_list/policy) + var/policy = policies[POLICYCONFIG_JOB_PRISONER] + if(policy) + var/mob/found = (M?.client && M) || (H?.client && H) + to_chat(found, "
!!READ THIS!!
The following is server-specific policy configuration and overrides anything said above if conflicting.") + to_chat(found, "

") + to_chat(found, "[policy]") + /datum/outfit/job/prisoner name = "Prisoner" jobtype = /datum/job/prisoner diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm index d677f59440..de6b858f79 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs/elites/elite.dm @@ -176,6 +176,12 @@ While using this makes the system rely on OnFire, it still gives options for tim elitemind = pick(candidates) elitemind.playsound_local(get_turf(elitemind), 'sound/effects/magic.ogg', 40, 0) to_chat(elitemind, "You have been chosen to play as a Lavaland Elite.\nIn a few seconds, you will be summoned on Lavaland as a monster to fight your activator, in a fight to the death.\nYour attacks can be switched using the buttons on the top left of the HUD, and used by clicking on targets or tiles similar to a gun.\nWhile the opponent might have an upper hand with powerful mining equipment and tools, you have great power normally limited by AI mobs.\nIf you want to win, you'll have to use your powers in creative ways to ensure the kill. It's suggested you try using them all as soon as possible.\nShould you win, you'll receive extra information regarding what to do after. Good luck!") + var/list/policies = CONFIG_GET(keyed_list/policy) + var/policy = policies[POLICYCONFIG_ELITE_SPAWN] + if(policy) + to_chat(elitemind, "
!!READ THIS!!
The following is server-specific policy configuration and overrides anything said above if conflicting.") + to_chat(elitemind, "

") + to_chat(elitemind, "[policy]") addtimer(CALLBACK(src, .proc/spawn_elite, elitemind), 100) else visible_message("The stirring stops, and nothing emerges. Perhaps try again later.") @@ -304,6 +310,12 @@ While using this makes the system rely on OnFire, it still gives options for tim to_chat(mychild, "As the life in the activator's eyes fade, the forcefield around you dies out and you feel your power subside.\nDespite this inferno being your home, you feel as if you aren't welcome here anymore.\nWithout any guidance, your purpose is now for you to decide.") to_chat(mychild, "Your max health has been halved, but can now heal by standing on your tumor. Note, it's your only way to heal.\nBear in mind, if anyone interacts with your tumor, you'll be resummoned here to carry out another fight. In such a case, you will regain your full max health.\nAlso, be weary of your fellow inhabitants, they likely won't be happy to see you!") to_chat(mychild, "Note that you are a lavaland monster, and thus not allied to the station. You should not cooperate or act friendly with any station crew unless under extreme circumstances!") + var/list/policies = CONFIG_GET(keyed_list/policy) + var/policy = policies[POLICYCONFIG_ELITE_WIN] + if(policy) + to_chat(mychild, "
!!READ THIS!!
The following is server-specific policy configuration and overrides anything said above if conflicting.") + to_chat(mychild, "

") + to_chat(mychild, "[policy]") /obj/item/tumor_shard name = "tumor shard" @@ -332,6 +344,12 @@ While using this makes the system rely on OnFire, it still gives options for tim E.playsound_local(get_turf(E), 'sound/effects/magic.ogg', 40, 0) to_chat(E, "You have been revived by [user]. While you can't speak to them, you owe [user] a great debt. Assist [user.p_them()] in achieving [user.p_their()] goals, regardless of risk.Note that you now share the loyalties of [user]. You are expected not to intentionally sabotage their faction unless commanded to!") + var/list/policies = CONFIG_GET(keyed_list/policy) + var/policy = policies[POLICYCONFIG_ELITE_SENTIENCE] + if(policy) + to_chat(E, "
!!READ THIS!!
The following is server-specific policy configuration and overrides anything said above if conflicting.") + to_chat(E, "

") + to_chat(E, "[policy]") E.maxHealth = E.maxHealth * 0.5 E.health = E.maxHealth E.desc = "[E.desc] However, this one appears appears less wild in nature, and calmer around people." From 147903f654fafe0ae249feb13ba4cebecff25cd7 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 19 Sep 2021 10:57:58 -0700 Subject: [PATCH 02/10] sigh --- code/_globalvars/lists/typecache.dm | 13 +++++++++++++ code/game/objects/items/dice.dm | 5 +++++ 2 files changed, 18 insertions(+) diff --git a/code/_globalvars/lists/typecache.dm b/code/_globalvars/lists/typecache.dm index 1ec3de0bc5..d380816bbf 100644 --- a/code/_globalvars/lists/typecache.dm +++ b/code/_globalvars/lists/typecache.dm @@ -12,3 +12,16 @@ GLOBAL_LIST_INIT(typecache_stack, typecacheof(/obj/item/stack)) GLOBAL_LIST_INIT(typecache_machine_or_structure, typecacheof(list(/obj/machinery, /obj/structure))) GLOBAL_LIST_INIT(freezing_objects, typecacheof(list(/obj/structure/closet/crate/freezer, /obj/structure/closet/secure_closet/freezer, /obj/structure/bodycontainer, /obj/item/autosurgeon, /obj/machinery/smartfridge/organ))) //list of all cold objects, that freeze organs when inside + +GLOBAL_LIST_EMPTY(typecaches) + +/** + * Makes a typecache of a single typecache + * + * Obviously in BYOND we don't have the efficiency around here to have proper enforcement so + * If you use this you better know what you're doing. The list you get back is globally cached and if it's modified, you might break multiple things. + */ +/proc/single_path_typecache_immutable(path) + if(!GLOB.typecaches[path]) + GLOB.typecaches[path] = typecacheof(path) + return GLOB.typecaches[path] diff --git a/code/game/objects/items/dice.dm b/code/game/objects/items/dice.dm index bbc493672f..53b0860def 100644 --- a/code/game/objects/items/dice.dm +++ b/code/game/objects/items/dice.dm @@ -17,6 +17,11 @@ /obj/item/dice/d100 ) +/obj/item/storage/dice/ComponentInitialize() + . = ..() + var/datum/component/storage/STR = GetComponent(/datum/component/storage) + STR.can_hold = single_path_typecache_immutable(/obj/item/dice) + /obj/item/storage/dice/PopulateContents() new /obj/item/dice/d4(src) new /obj/item/dice/d6(src) From c9662f76ed5fe064dff94919f5a56fa863cd9eba Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 19 Sep 2021 11:35:52 -0700 Subject: [PATCH 03/10] Update parts.dm --- code/modules/surgery/bodyparts/parts.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/surgery/bodyparts/parts.dm b/code/modules/surgery/bodyparts/parts.dm index 3a08a764d3..39e81ea3bc 100644 --- a/code/modules/surgery/bodyparts/parts.dm +++ b/code/modules/surgery/bodyparts/parts.dm @@ -65,7 +65,7 @@ body_zone = BODY_ZONE_L_ARM body_part = ARM_LEFT aux_icons = list(BODY_ZONE_PRECISE_L_HAND = HANDS_PART_LAYER, "l_hand_behind" = BODY_BEHIND_LAYER) - body_damage_coeff = 0.25 + body_damage_coeff = 0.5 held_index = 1 px_x = -6 px_y = 0 @@ -126,7 +126,7 @@ body_zone = BODY_ZONE_R_ARM body_part = ARM_RIGHT aux_icons = list(BODY_ZONE_PRECISE_R_HAND = HANDS_PART_LAYER, "r_hand_behind" = BODY_BEHIND_LAYER) - body_damage_coeff = 0.25 + body_damage_coeff = 0.5 held_index = 2 px_x = 6 px_y = 0 @@ -188,7 +188,7 @@ disable_threshold = 75 body_zone = BODY_ZONE_L_LEG body_part = LEG_LEFT - body_damage_coeff = 0.25 + body_damage_coeff = 0.5 px_x = -2 px_y = 12 stam_heal_tick = STAM_RECOVERY_LIMB @@ -247,7 +247,7 @@ disable_threshold = 75 body_zone = BODY_ZONE_R_LEG body_part = LEG_RIGHT - body_damage_coeff = 0.25 + body_damage_coeff = 0.5 px_x = 2 px_y = 12 max_stamina_damage = 50 From b752cb0af27fb5b2498c7c02a217590f348b5428 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 19 Sep 2021 11:38:12 -0700 Subject: [PATCH 04/10] Update parts.dm --- code/modules/surgery/bodyparts/parts.dm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/code/modules/surgery/bodyparts/parts.dm b/code/modules/surgery/bodyparts/parts.dm index 39e81ea3bc..e66f14da93 100644 --- a/code/modules/surgery/bodyparts/parts.dm +++ b/code/modules/surgery/bodyparts/parts.dm @@ -59,13 +59,13 @@ one though." icon_state = "default_human_l_arm" attack_verb = list("slapped", "punched") - max_damage = 150 + max_damage = 50 disable_threshold = 75 max_stamina_damage = 50 body_zone = BODY_ZONE_L_ARM body_part = ARM_LEFT aux_icons = list(BODY_ZONE_PRECISE_L_HAND = HANDS_PART_LAYER, "l_hand_behind" = BODY_BEHIND_LAYER) - body_damage_coeff = 0.5 + body_damage_coeff = 0.75 held_index = 1 px_x = -6 px_y = 0 @@ -121,12 +121,12 @@ among humans missing their right arm." icon_state = "default_human_r_arm" attack_verb = list("slapped", "punched") - max_damage = 150 + max_damage = 50 disable_threshold = 75 body_zone = BODY_ZONE_R_ARM body_part = ARM_RIGHT aux_icons = list(BODY_ZONE_PRECISE_R_HAND = HANDS_PART_LAYER, "r_hand_behind" = BODY_BEHIND_LAYER) - body_damage_coeff = 0.5 + body_damage_coeff = 0.75 held_index = 2 px_x = 6 px_y = 0 @@ -184,11 +184,11 @@ luck. In this instance, it probably would not have helped." icon_state = "default_human_l_leg" attack_verb = list("kicked", "stomped") - max_damage = 150 + max_damage = 50 disable_threshold = 75 body_zone = BODY_ZONE_L_LEG body_part = LEG_LEFT - body_damage_coeff = 0.5 + body_damage_coeff = 0.75 px_x = -2 px_y = 12 stam_heal_tick = STAM_RECOVERY_LIMB @@ -243,11 +243,10 @@ // alternative spellings of 'pokey' are availible icon_state = "default_human_r_leg" attack_verb = list("kicked", "stomped") - max_damage = 150 - disable_threshold = 75 + max_damage = 50 body_zone = BODY_ZONE_R_LEG body_part = LEG_RIGHT - body_damage_coeff = 0.5 + body_damage_coeff = 0.75 px_x = 2 px_y = 12 max_stamina_damage = 50 From 17cd5c5d849e796c5b8ba946c9de4e5e8f4d1f44 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 19 Sep 2021 13:46:08 -0700 Subject: [PATCH 05/10] Update mobs.dm --- code/modules/movespeed/modifiers/mobs.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/movespeed/modifiers/mobs.dm b/code/modules/movespeed/modifiers/mobs.dm index 7e857a4e0d..153d7dd973 100644 --- a/code/modules/movespeed/modifiers/mobs.dm +++ b/code/modules/movespeed/modifiers/mobs.dm @@ -113,6 +113,7 @@ multiplicative_slowdown = CRAWLING_ADD_SLOWDOWN movetypes = CRAWLING flags = IGNORE_NOSLOW + priority = 20000 /datum/movespeed_modifier/mob_config_speedmod variable = TRUE From 84a26eeabdc7e813fa4851314ea749cb0a27d329 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 19 Sep 2021 14:45:24 -0700 Subject: [PATCH 06/10] Update obj_defense.dm --- code/game/objects/obj_defense.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 78a5c9ece9..d9111d6c3b 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -22,7 +22,7 @@ //returns the damage value of the attack after processing the obj's various armor protections /obj/proc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir, armour_penetration = 0) - if(damage_flag == MELEE && damage_amount < damage_deflection) + if(damage_flag == "melee" && damage_amount < damage_deflection) return 0 switch(damage_type) if(BRUTE) From 6d99bca184f0ec5cf525ad2334a2942cf7de6d9a Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Sun, 19 Sep 2021 14:46:09 -0700 Subject: [PATCH 07/10] Update obj_defense.dm --- code/game/objects/obj_defense.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index d9111d6c3b..15fd102878 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -22,7 +22,7 @@ //returns the damage value of the attack after processing the obj's various armor protections /obj/proc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir, armour_penetration = 0) - if(damage_flag == "melee" && damage_amount < damage_deflection) + if(damage_flag == "melee" && damage_amount < damage_deflection) // TODO: Refactor armor datums and types entirely jfc return 0 switch(damage_type) if(BRUTE) From ff64050f8ae568ba96fa93e60eccfb0b1bcd940c Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Mon, 20 Sep 2021 23:53:29 -0500 Subject: [PATCH 08/10] Automatic changelog generation for PR #15184 [ci skip] --- html/changelogs/AutoChangeLog-pr-15184.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-15184.yml diff --git a/html/changelogs/AutoChangeLog-pr-15184.yml b/html/changelogs/AutoChangeLog-pr-15184.yml new file mode 100644 index 0000000000..0e4115ec31 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-15184.yml @@ -0,0 +1,4 @@ +author: "silicons" +delete-after: True +changes: + - bugfix: "crawling can't be adrenals'd" From c73455da7a6fa7948bd8cd8226c20c166ede5441 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Mon, 20 Sep 2021 23:59:56 -0500 Subject: [PATCH 09/10] Automatic changelog generation for PR #15181 [ci skip] --- html/changelogs/AutoChangeLog-pr-15181.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-15181.yml diff --git a/html/changelogs/AutoChangeLog-pr-15181.yml b/html/changelogs/AutoChangeLog-pr-15181.yml new file mode 100644 index 0000000000..9b8e2d63a7 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-15181.yml @@ -0,0 +1,4 @@ +author: "silicons" +delete-after: True +changes: + - bugfix: "dice bags can only hold dice" From a81238f50de25553c361fb5990ded01805e6f07f Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 21 Sep 2021 00:00:22 -0500 Subject: [PATCH 10/10] Automatic changelog generation for PR #15182 [ci skip] --- html/changelogs/AutoChangeLog-pr-15182.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-15182.yml diff --git a/html/changelogs/AutoChangeLog-pr-15182.yml b/html/changelogs/AutoChangeLog-pr-15182.yml new file mode 100644 index 0000000000..c6e05740b6 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-15182.yml @@ -0,0 +1,4 @@ +author: "silicons" +delete-after: True +changes: + - rscdel: "limb damage changes reverted"