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/_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) diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 78a5c9ece9..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) diff --git a/code/modules/jobs/job_types/prisoner.dm b/code/modules/jobs/job_types/prisoner.dm index 2ad2f32537..48c7afe304 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." 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 diff --git a/code/modules/surgery/bodyparts/parts.dm b/code/modules/surgery/bodyparts/parts.dm index 3a08a764d3..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.25 + 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.25 + 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.25 + 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.25 + body_damage_coeff = 0.75 px_x = 2 px_y = 12 max_stamina_damage = 50 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" 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" 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"