From a0f4d4a5031f047200c29d49fc3fe177d87a4f24 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 16:45:35 +1000 Subject: [PATCH 01/14] Standardizes take_damage() parameters. --- code/game/atoms_damage.dm | 2 +- code/game/gamemodes/cult/runes.dm | 2 +- code/game/machinery/_machines_base/machinery_damage.dm | 2 +- .../game/machinery/_machines_base/stock_parts/_stock_parts.dm | 2 +- code/game/machinery/doors/_door.dm | 2 +- code/game/machinery/doors/airlock.dm | 2 +- code/game/machinery/doors/windowdoor.dm | 2 +- code/game/machinery/portable_turret.dm | 2 +- code/game/objects/items/_item_damage.dm | 2 +- code/game/objects/items/weapons/storage/wall_mirror.dm | 2 +- code/game/objects/structures/__structure.dm | 2 +- code/game/objects/structures/defensive_barrier.dm | 2 +- code/game/objects/structures/flora/tree.dm | 2 +- code/game/objects/structures/window.dm | 4 ++-- code/game/turfs/walls/_wall.dm | 2 +- code/modules/blob/blob.dm | 2 +- code/modules/mob/living/living_defense.dm | 4 ++-- code/modules/mob/living/simple_animal/simple_animal.dm | 2 +- code/modules/mob/mob_damage.dm | 2 +- code/modules/shield_generators/shield.dm | 2 +- 20 files changed, 22 insertions(+), 22 deletions(-) diff --git a/code/game/atoms_damage.dm b/code/game/atoms_damage.dm index 97a18d76691..e73c65f800f 100644 --- a/code/game/atoms_damage.dm +++ b/code/game/atoms_damage.dm @@ -1,2 +1,2 @@ -/atom/proc/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0) +/atom/proc/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) return diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 1003b121fc5..8c522911d75 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -322,7 +322,7 @@ take_damage(Proj.damage, Proj.atom_damage_type) ..() -/obj/effect/cultwall/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0) +/obj/effect/cultwall/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) current_health -= damage if(current_health <= 0) visible_message("\The [src] dissipates.") diff --git a/code/game/machinery/_machines_base/machinery_damage.dm b/code/game/machinery/_machines_base/machinery_damage.dm index 1a0b0781910..96b81329d5a 100644 --- a/code/game/machinery/_machines_base/machinery_damage.dm +++ b/code/game/machinery/_machines_base/machinery_damage.dm @@ -1,4 +1,4 @@ -/obj/machinery/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent = FALSE) +/obj/machinery/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) //Let's not bother initializing all the components for nothing if(damage <= 0) return diff --git a/code/game/machinery/_machines_base/stock_parts/_stock_parts.dm b/code/game/machinery/_machines_base/stock_parts/_stock_parts.dm index d34d7404dd8..f4aab2938f7 100644 --- a/code/game/machinery/_machines_base/stock_parts/_stock_parts.dm +++ b/code/game/machinery/_machines_base/stock_parts/_stock_parts.dm @@ -63,7 +63,7 @@ // RefreshParts has been called, likely meaning other componenets were added/removed. /obj/item/stock_parts/proc/on_refresh(var/obj/machinery/machine) -/obj/item/stock_parts/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0) +/obj/item/stock_parts/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) if(damage_type in ignore_damage_types) return . = ..() diff --git a/code/game/machinery/doors/_door.dm b/code/game/machinery/doors/_door.dm index 631a2353acb..53f580f385b 100644 --- a/code/game/machinery/doors/_door.dm +++ b/code/game/machinery/doors/_door.dm @@ -342,7 +342,7 @@ return TRUE return FALSE -/obj/machinery/door/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent = FALSE) +/obj/machinery/door/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) if(!current_health) ..(damage, damage_type) update_icon() diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 1d39a839320..8aed6105df0 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1073,7 +1073,7 @@ About the new airlock wires panel: return // Braces can act as an extra layer of armor - they will take damage first. -/obj/machinery/door/airlock/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent = FALSE) +/obj/machinery/door/airlock/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) if(brace) brace.take_damage(damage) else diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index ce34e17cfa2..63d9e92bfef 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -132,7 +132,7 @@ return TRUE -/obj/machinery/door/window/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent = FALSE) +/obj/machinery/door/window/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) current_health = max(0, current_health - damage) if (current_health <= 0) shatter() diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 166d3dff957..6bf44daf084 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -315,7 +315,7 @@ var/global/list/turret_icons enabled = 1 //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here return 1 -/obj/machinery/porta_turret/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent = FALSE) +/obj/machinery/porta_turret/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) if(!raised && !raising) damage = damage / 8 if(damage < 5) diff --git a/code/game/objects/items/_item_damage.dm b/code/game/objects/items/_item_damage.dm index 33cd36a1fba..7da51db9ef1 100644 --- a/code/game/objects/items/_item_damage.dm +++ b/code/game/objects/items/_item_damage.dm @@ -1,5 +1,5 @@ /**Basic damage handling for items. Returns the amount of damage taken after armor if the item was damaged.*/ -/obj/item/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0) +/obj/item/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) if(!can_take_damage()) // This object does not take damage. return 0 //Must return a number if(damage < 0) diff --git a/code/game/objects/items/weapons/storage/wall_mirror.dm b/code/game/objects/items/weapons/storage/wall_mirror.dm index 36215e0a7ff..f86be796183 100644 --- a/code/game/objects/items/weapons/storage/wall_mirror.dm +++ b/code/game/objects/items/weapons/storage/wall_mirror.dm @@ -38,7 +38,7 @@ . = ..() flick("mirror_open",src) -/obj/structure/mirror/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0) +/obj/structure/mirror/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) if(prob(damage)) visible_message(SPAN_WARNING("[src] shatters!")) shatter() diff --git a/code/game/objects/structures/__structure.dm b/code/game/objects/structures/__structure.dm index fc27cf6d4f0..5d5d9fb88ce 100644 --- a/code/game/objects/structures/__structure.dm +++ b/code/game/objects/structures/__structure.dm @@ -121,7 +121,7 @@ set waitfor = FALSE return FALSE -/obj/structure/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0) +/obj/structure/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) if(current_health == -1) // This object does not take damage. return diff --git a/code/game/objects/structures/defensive_barrier.dm b/code/game/objects/structures/defensive_barrier.dm index 9aae3a81815..21e95d7fd56 100644 --- a/code/game/objects/structures/defensive_barrier.dm +++ b/code/game/objects/structures/defensive_barrier.dm @@ -141,7 +141,7 @@ . = ..() -/obj/structure/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0) +/obj/structure/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) if(damage) playsound(src.loc, 'sound/effects/bang.ogg', 75, 1) damage = round(damage * 0.5) diff --git a/code/game/objects/structures/flora/tree.dm b/code/game/objects/structures/flora/tree.dm index 6ea1444b028..fd1d4960d61 100644 --- a/code/game/objects/structures/flora/tree.dm +++ b/code/game/objects/structures/flora/tree.dm @@ -52,7 +52,7 @@ for(var/turf/T in turfs_to_update) T.update_ambient_light_from_z_or_area() -/obj/structure/flora/tree/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0) +/obj/structure/flora/tree/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) . = ..() if(!QDELETED(src) && damage >= 5) shake() diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 419cd5e058e..6c8d05acbb8 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -77,7 +77,7 @@ SHOULD_CALL_PARENT(FALSE) . = shatter() -/obj/structure/window/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0) +/obj/structure/window/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) . = ..() if(. && damage_type == BRUTE) playsound(loc, "glasscrack", 100, 1) @@ -569,7 +569,7 @@ SHOULD_CALL_PARENT(FALSE) return FALSE -/obj/structure/window/reinforced/crescent/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0) +/obj/structure/window/reinforced/crescent/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) return /obj/structure/window/reinforced/crescent/shatter() diff --git a/code/game/turfs/walls/_wall.dm b/code/game/turfs/walls/_wall.dm index bdbb46a6a7f..3fd1d0b8604 100644 --- a/code/game/turfs/walls/_wall.dm +++ b/code/game/turfs/walls/_wall.dm @@ -184,7 +184,7 @@ var/global/list/wall_fullblend_objects = list( F.icon_state = "wall_thermite" visible_message(SPAN_DANGER("\The [src] spontaneously combusts!")) -/turf/wall/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0) +/turf/wall/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) if(damage) src.damage = max(0, src.damage + damage) update_damage() diff --git a/code/modules/blob/blob.dm b/code/modules/blob/blob.dm index 65dbc8c0233..ed4c4624104 100644 --- a/code/modules/blob/blob.dm +++ b/code/modules/blob/blob.dm @@ -56,7 +56,7 @@ return attempt_attack(global.alldirs) -/obj/effect/blob/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0) +/obj/effect/blob/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) current_health -= damage if(current_health < 0) playsound(loc, 'sound/effects/splat.ogg', 50, 1) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 558f1d72ea1..e4d23c889a8 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -208,7 +208,7 @@ if(!affecting) affecting = get_organ(def_zone) - if(affecting && supplied_wound?.is_open() && dtype == BRUTE) // Can't embed in a small bruise. + if(affecting && istype(supplied_wound) && supplied_wound.is_open() && dtype == BRUTE) // Can't embed in a small bruise. var/obj/item/I = O var/sharp = is_sharp(I) embed_damage *= (1 - get_blocked_ratio(def_zone, BRUTE, O.damage_flags(), O.armor_penetration, I.force)) @@ -221,7 +221,7 @@ //Sharp objects will always embed if they do enough damage. //Thrown sharp objects have some momentum already and have a small chance to embed even if the damage is below the threshold if((sharp && prob(sharp_embed_chance)) || (embed_damage > embed_threshold && prob(embed_chance))) - affecting.embed_in_organ(I, supplied_wound = supplied_wound) + affecting.embed_in_organ(I, supplied_wound = (istype(supplied_wound) ? supplied_wound : null)) I.has_embedded(src) . = TRUE diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index ef327c6de07..aee0476c808 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -386,7 +386,7 @@ var/global/list/simplemob_icon_bitflag_cache = list() return 1 -/mob/living/simple_animal/take_damage(damage, damagetype, def_zone, damage_flags, obj/item/used_weapon, armor_pen, silent, do_update_health) +/mob/living/simple_animal/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) . = ..() if((damagetype == BRUTE) && damage_flags & (DAM_EDGE | DAM_SHARP | DAM_BULLET)) // damage flags that should cause bleeding adjustBleedTicks(damage) diff --git a/code/modules/mob/mob_damage.dm b/code/modules/mob/mob_damage.dm index c53658f5982..26b684a8e2d 100644 --- a/code/modules/mob/mob_damage.dm +++ b/code/modules/mob/mob_damage.dm @@ -39,7 +39,7 @@ //if(ELECTROCUTE) return 0 -/mob/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, do_update_health) +/mob/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) switch(damage_type) if(BRUTE) return adjustBruteLoss(damage, do_update_health) diff --git a/code/modules/shield_generators/shield.dm b/code/modules/shield_generators/shield.dm index 5b9ca7c6bf7..844395bbc36 100644 --- a/code/modules/shield_generators/shield.dm +++ b/code/modules/shield_generators/shield.dm @@ -130,7 +130,7 @@ // The closer we are to impact site, the longer it takes for shield to come back up. S.fail(-(-range + get_dist(src, S)) * 2) -/obj/effect/shield/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0) +/obj/effect/shield/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) if(!gen) qdel(src) return From 577c0df575b13ec2d0462f8bce20ddc6bc333fc1 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 16:48:38 +1000 Subject: [PATCH 02/14] Correcting simple_animal take_damage() call. --- .../mob/living/simple_animal/simple_animal.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index aee0476c808..d13d2b45e39 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -333,17 +333,17 @@ var/global/list/simplemob_icon_bitflag_cache = list() if(!.) var/dealt_damage = harm_intent_damage var/harm_verb = response_harm - var/damageflags - var/damagetype + var/damage_flags + var/damage_type if(ishuman(user)) var/mob/living/carbon/human/H = user var/decl/natural_attack/attack = H.get_unarmed_attack(src) if(istype(attack)) dealt_damage = attack.damage <= dealt_damage ? dealt_damage : attack.damage harm_verb = pick(attack.attack_verb) - damageflags = attack.get_damage_flags() - damagetype = attack.get_damage_type() - take_damage(dealt_damage, damagetype, damageflags, user) + damage_flags = attack.get_damage_flags() + damage_type = attack.get_damage_type() + take_damage(dealt_damage, damage_type, damage_flags = damage_flags, used_weapon = user) user.visible_message(SPAN_DANGER("\The [user] [harm_verb] \the [src]!")) user.do_attack_animation(src) return TRUE @@ -388,7 +388,7 @@ var/global/list/simplemob_icon_bitflag_cache = list() /mob/living/simple_animal/take_damage(damage, damage_type = BRUTE, damage_flags, inflicter, armor_pen = 0, silent, do_update_health) . = ..() - if((damagetype == BRUTE) && damage_flags & (DAM_EDGE | DAM_SHARP | DAM_BULLET)) // damage flags that should cause bleeding + if((damage_type == BRUTE) && (damage_flags & (DAM_EDGE | DAM_SHARP | DAM_BULLET))) // damage flags that should cause bleeding adjustBleedTicks(damage) /mob/living/simple_animal/get_movement_delay(var/travel_dir) From 510818fa0f4fe88b0480824ec995094f6b53704f Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 16:50:15 +1000 Subject: [PATCH 03/14] Corrects a couple of emotes. --- code/modules/emotes/definitions/audible_whistle.dm | 2 +- mods/species/drakes/drake_emotes.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/emotes/definitions/audible_whistle.dm b/code/modules/emotes/definitions/audible_whistle.dm index fed0842b6f7..585ca85e95f 100644 --- a/code/modules/emotes/definitions/audible_whistle.dm +++ b/code/modules/emotes/definitions/audible_whistle.dm @@ -1,7 +1,7 @@ /decl/emote/audible/whistle key = "whistle" emote_message_1p = "You whistle a tune." - emote_message_3p = "whistles a tune." + emote_message_3p = "$USER$ whistles a tune." emote_message_muffled = "$USER$ makes a light spitting noise, a poor attempt at a whistle." emote_message_synthetic_1p = "You whistle a robotic tune." emote_message_synthetic_3p = "$USER$ whistles a robotic tune." diff --git a/mods/species/drakes/drake_emotes.dm b/mods/species/drakes/drake_emotes.dm index fc2c8befe28..14af84c05cf 100644 --- a/mods/species/drakes/drake_emotes.dm +++ b/mods/species/drakes/drake_emotes.dm @@ -19,7 +19,7 @@ /decl/emote/audible/drake_warble key = "dwarble" - emote_message_3p = "warbles happily." + emote_message_3p = "$USER$ warbles happily." /decl/emote/audible/drake_purr key = "dpurr" From 01f3cca932630b0aba096931b5693fd5b48c7b7d Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 16:52:28 +1000 Subject: [PATCH 04/14] Adding shorthand to kobold and hnoll languages. --- mods/content/fantasy/datum/hnoll/language.dm | 1 + mods/content/fantasy/datum/kobaloi/language.dm | 1 + 2 files changed, 2 insertions(+) diff --git a/mods/content/fantasy/datum/hnoll/language.dm b/mods/content/fantasy/datum/hnoll/language.dm index 4ade4417fed..2cefb494174 100644 --- a/mods/content/fantasy/datum/hnoll/language.dm +++ b/mods/content/fantasy/datum/hnoll/language.dm @@ -1,5 +1,6 @@ /decl/language/hnoll name = "Hnoll Tongue" + shorthand = "HN" desc = "While every hnoll culture across the Nine Mothers and beyond has their own \ local dialect, the matriarches over the years have taken great care to cultivate and \ maintain a shared tongue used at the yearly gatherings and for inter-settlement trade. \ diff --git a/mods/content/fantasy/datum/kobaloi/language.dm b/mods/content/fantasy/datum/kobaloi/language.dm index 880741b0de9..c4f4f714d1b 100644 --- a/mods/content/fantasy/datum/kobaloi/language.dm +++ b/mods/content/fantasy/datum/kobaloi/language.dm @@ -1,5 +1,6 @@ /decl/language/kobaloi name = "Kobaloi Tongue" + shorthand = "KB" desc = "The kobaloi have a huge variety of languages, sometimes differing even between groups in the same cave system, but all of them have some degree of overlap to allow mutual intelligibility." speech_verb = "says" ask_verb = "asks" From 6eab72fe1b87bfee51be5ac9c27e7f1a49106bfa Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 16:56:58 +1000 Subject: [PATCH 05/14] Shaded Hills indoor areas no longer have fish. --- maps/shaded_hills/areas/downlands.dm | 17 ++++++++++++++--- maps/shaded_hills/areas/swamp.dm | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/maps/shaded_hills/areas/downlands.dm b/maps/shaded_hills/areas/downlands.dm index 8fa019ee5d9..cc5d7d06d7d 100644 --- a/maps/shaded_hills/areas/downlands.dm +++ b/maps/shaded_hills/areas/downlands.dm @@ -6,25 +6,36 @@ /area/shaded_hills/inn name = "\improper Inn" + fishing_failure_prob = "100" + fishing_results = list() /area/shaded_hills/inn/porch name = "\improper Inn Porch" interior_ambient_light_modifier = -0.3 // night is pitch-black on the porch + fishing_failure_prob = "100" + fishing_results = list() /area/shaded_hills/stable name = "\improper Stable" + fishing_failure_prob = "100" + fishing_results = list() /area/shaded_hills/farmhouse name = "\improper Farmhouse" + fishing_failure_prob = "100" + fishing_results = list() /area/shaded_hills/slaughterhouse name = "\improper Slaughterhouse" + fishing_failure_prob = "100" + fishing_results = list() /area/shaded_hills/tannery name = "\improper Tannery" + fishing_failure_prob = "100" + fishing_results = list() /area/shaded_hills/general_store name = "\improper General Store" - -/area/shaded_hills/forester_hut - name = "\improper Foresters' Hut" + fishing_failure_prob = "100" + fishing_results = list() diff --git a/maps/shaded_hills/areas/swamp.dm b/maps/shaded_hills/areas/swamp.dm index f26e7893ea8..a8b0e19ca1f 100644 --- a/maps/shaded_hills/areas/swamp.dm +++ b/maps/shaded_hills/areas/swamp.dm @@ -1,6 +1,8 @@ // Swamp areas. /area/shaded_hills/witch_hut name = "Witches' Hut" + fishing_failure_prob = "100" + fishing_results = list() /area/shaded_hills/caves/river/swamp name = "Southern Silent River" From 4a896f6ace4bd84ba7b34ef1c97ebdd94fea9b1c Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 16:57:43 +1000 Subject: [PATCH 06/14] Craftable gown is no longer imaginary silk. --- code/modules/clothing/dresses/misc.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/dresses/misc.dm b/code/modules/clothing/dresses/misc.dm index b768de812b6..20085a74b6c 100644 --- a/code/modules/clothing/dresses/misc.dm +++ b/code/modules/clothing/dresses/misc.dm @@ -59,6 +59,6 @@ body_parts_covered = SLOT_UPPER_BODY|SLOT_LOWER_BODY|SLOT_LEGS|SLOT_ARMS /obj/item/clothing/dress/gown - name = "silk gown" - desc = "A long silky sleeveless gown with a flared hem." + name = "gown" + desc = "A long sleeveless gown with a flared hem." icon = 'icons/clothing/dresses/dress_gown.dmi' From 4bbb633d6d5f5384677a56de24c6f4a9520957f0 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 17:06:37 +1000 Subject: [PATCH 07/14] Adding guards to crafting to avoid letting people use regular grass instead of dried. --- code/game/objects/items/weapons/material/stick.dm | 4 ++++ code/modules/crafting/stack_recipes/recipes_grass.dm | 5 +++++ code/modules/fishing/fishing_rod.dm | 6 ++++++ code/modules/materials/_material_stack.dm | 3 +++ code/modules/materials/material_stack_misc.dm | 4 ++++ maps/shaded_hills/areas/woods.dm | 5 +++++ 6 files changed, 27 insertions(+) diff --git a/code/game/objects/items/weapons/material/stick.dm b/code/game/objects/items/weapons/material/stick.dm index 6684af58921..e1c16a7b476 100644 --- a/code/game/objects/items/weapons/material/stick.dm +++ b/code/game/objects/items/weapons/material/stick.dm @@ -26,7 +26,11 @@ if(!sharp && (istype(W, /obj/item/stack/material/bolt) || istype(W, /obj/item/stack/material/bundle))) + // Ugly way to check for dried grass vs regular grass. var/obj/item/stack/material/fuel = W + if(!fuel.special_crafting_check()) + return ..() + if(fuel.get_amount() < 5) to_chat(user, SPAN_WARNING("You need at least five units of flammable material to create a torch.")) return TRUE diff --git a/code/modules/crafting/stack_recipes/recipes_grass.dm b/code/modules/crafting/stack_recipes/recipes_grass.dm index a46a659ad9f..d6f262e90bc 100644 --- a/code/modules/crafting/stack_recipes/recipes_grass.dm +++ b/code/modules/crafting/stack_recipes/recipes_grass.dm @@ -3,6 +3,11 @@ craft_stack_types = /obj/item/stack/material/bundle category = "woven items" +/decl/stack_recipe/woven/can_be_made_from(stack_type, tool_type, decl/material/mat, decl/material/reinf_mat) + if((istype(mat) ? mat.type : mat) == /decl/material/solid/organic/plantmatter/grass) + return FALSE + return ..() + /decl/stack_recipe/woven/basket result_type = /obj/item/basket diff --git a/code/modules/fishing/fishing_rod.dm b/code/modules/fishing/fishing_rod.dm index cb184834f0d..90dfbe79088 100644 --- a/code/modules/fishing/fishing_rod.dm +++ b/code/modules/fishing/fishing_rod.dm @@ -293,6 +293,12 @@ if(!new_line || !is_type_in_list(new_line, valid_line_types)) return FALSE + // TODO: better solution for grass vs dried grass + if(istype(new_line, /obj/item/stack/material)) + var/obj/item/stack/material/stack = new_line + if(!stack.special_crafting_check()) + return FALSE + if(!new_line.material?.tensile_strength) to_chat(user, SPAN_WARNING("\The [new_line] isn't suitable for the rigors of fishing.")) return TRUE diff --git a/code/modules/materials/_material_stack.dm b/code/modules/materials/_material_stack.dm index 763f81ac7e0..4ea3840e334 100644 --- a/code/modules/materials/_material_stack.dm +++ b/code/modules/materials/_material_stack.dm @@ -63,6 +63,9 @@ LAZYSET(matter, reinf_material.type, MATTER_AMOUNT_REINFORCEMENT) // No matter_multiplier as this is applied in parent. ..() +/obj/item/stack/material/proc/special_crafting_check() + return TRUE + /obj/item/stack/material/proc/update_strings() var/prefix_name = name_modifier ? "[name_modifier] " : "" if(amount>1) diff --git a/code/modules/materials/material_stack_misc.dm b/code/modules/materials/material_stack_misc.dm index 0d263397283..6ac557a3969 100644 --- a/code/modules/materials/material_stack_misc.dm +++ b/code/modules/materials/material_stack_misc.dm @@ -141,6 +141,10 @@ craft_verb = "weave" craft_verbing = "weaving" +// Hacky fix for grass crafting. +/obj/item/stack/material/bundle/special_crafting_check() + return !dried_type || drying_wetness <= 0 + /obj/item/stack/material/strut name = "struts" singular_name = "strut" diff --git a/maps/shaded_hills/areas/woods.dm b/maps/shaded_hills/areas/woods.dm index e1dee0bed35..fdaec01adc1 100644 --- a/maps/shaded_hills/areas/woods.dm +++ b/maps/shaded_hills/areas/woods.dm @@ -26,3 +26,8 @@ /area/shaded_hills/caves/unexplored/woods name = "Trackless Deeps - Far North" + +/area/shaded_hills/forester_hut + name = "\improper Foresters' Hut" + fishing_failure_prob = "100" + fishing_results = list() From 66bee3fb9be289a155b0cd6dc4bcfee991a8016e Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 17:16:38 +1000 Subject: [PATCH 08/14] Attempting to fix issues with weather overlays. --- code/game/turfs/turf.dm | 9 +++++---- code/modules/weather/_weather.dm | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index ee3cfba5e23..afd6cc22bac 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -500,18 +500,17 @@ // We have a weather system and we are exposed to it; update our vis contents. if(istype(new_weather) && is_outside()) if(weather != new_weather) - if(weather) - remove_vis_contents(weather.vis_contents_additions) weather = new_weather - add_vis_contents(weather.vis_contents_additions) . = TRUE // We are indoors or there is no local weather system, clear our vis contents. else if(weather) - remove_vis_contents(weather.vis_contents_additions) weather = null . = TRUE + if(.) + update_vis_contents() + // Propagate our weather downwards if we permit it. if(force_update_below || (is_open() && .)) var/turf/below = GetBelow(src) @@ -607,6 +606,8 @@ LAZYDISTINCTADD(., air_graphic) if(weather) LAZYADD(., weather) + if(length(weather.vis_contents_additions)) + LAZYADD(., weather.vis_contents_additions) if(flooded) var/flood_object = get_flood_overlay(flooded) if(flood_object) diff --git a/code/modules/weather/_weather.dm b/code/modules/weather/_weather.dm index 420c6b755fb..3feea9f4366 100644 --- a/code/modules/weather/_weather.dm +++ b/code/modules/weather/_weather.dm @@ -62,8 +62,8 @@ for(var/tz in affecting_zs) for(var/turf/T as anything in block(locate(1, 1, tz), locate(world.maxx, world.maxy, tz))) if(T.weather == src) - T.remove_vis_contents(vis_contents_additions) T.weather = null + T.update_vis_contents() vis_contents_additions.Cut() SSweather.unregister_weather_system(src) QDEL_NULL(lightning_overlay) @@ -99,3 +99,4 @@ alpha = 0 invisibility = INVISIBILITY_NONE is_spawnable_type = FALSE + appearance_flags = RESET_COLOR | KEEP_APART From af3e6fb3c17dfce75d5fd7c4302d8138ff9407ed Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 17:20:59 +1000 Subject: [PATCH 09/14] Fixes grammar for drake age categories. --- mods/species/drakes/species_bodytypes.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mods/species/drakes/species_bodytypes.dm b/mods/species/drakes/species_bodytypes.dm index 11affa222bb..a61937f619d 100644 --- a/mods/species/drakes/species_bodytypes.dm +++ b/mods/species/drakes/species_bodytypes.dm @@ -2,12 +2,12 @@ chargen_min_index = 2 chargen_max_index = 6 standalone_value_descriptors = list( - "a hatchling" = 1, - "an juvenile" = 2, - "an adolescent" = 4, - "an adult" = 6, - "aging" = 20, - "elderly" = 30 + "a hatchling" = 1, + "a juvenile" = 2, + "an adolescent" = 4, + "an adult" = 6, + "aging" = 20, + "elderly" = 30 ) /datum/appearance_descriptor/age/grafadreka/hatchling From ef390eee3bd3b7ebb85707a069d4e9992e3ddf1e Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 17:28:07 +1000 Subject: [PATCH 10/14] Removed overly zealous blacklist setting from map code. --- maps/~mapsystem/maps.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/maps/~mapsystem/maps.dm b/maps/~mapsystem/maps.dm index ed512725201..62e68926985 100644 --- a/maps/~mapsystem/maps.dm +++ b/maps/~mapsystem/maps.dm @@ -270,7 +270,6 @@ var/global/const/MAP_HAS_RANK = 2 //Rank system, also togglable for(var/datum/job/job as anything in SSjobs.primary_job_datums) if((species.type in job_to_species_whitelist[job.type]) || (job.type in species_to_job_whitelist[species.type])) LAZYDISTINCTADD(species_to_job_whitelist[species.type], job.type) - LAZYDISTINCTADD(job_to_species_whitelist[job.type], species.type) found_whitelisted_job = TRUE else LAZYDISTINCTADD(species_to_job_blacklist[species.type], job.type) From d0389c2a05f471e824439a02c35e53f32ba48cc4 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 17:29:31 +1000 Subject: [PATCH 11/14] Added join flags to drakes. --- code/modules/mob/living/simple_animal/simple_animal.dm | 2 +- maps/~mapsystem/maps.dm | 1 - mods/species/drakes/species.dm | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index d13d2b45e39..25014bb4509 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -343,7 +343,7 @@ var/global/list/simplemob_icon_bitflag_cache = list() harm_verb = pick(attack.attack_verb) damage_flags = attack.get_damage_flags() damage_type = attack.get_damage_type() - take_damage(dealt_damage, damage_type, damage_flags = damage_flags, used_weapon = user) + take_damage(dealt_damage, damage_type, damage_flags = damage_flags, inflicter = user) user.visible_message(SPAN_DANGER("\The [user] [harm_verb] \the [src]!")) user.do_attack_animation(src) return TRUE diff --git a/maps/~mapsystem/maps.dm b/maps/~mapsystem/maps.dm index 62e68926985..767da60083e 100644 --- a/maps/~mapsystem/maps.dm +++ b/maps/~mapsystem/maps.dm @@ -269,7 +269,6 @@ var/global/const/MAP_HAS_RANK = 2 //Rank system, also togglable var/found_whitelisted_job = FALSE for(var/datum/job/job as anything in SSjobs.primary_job_datums) if((species.type in job_to_species_whitelist[job.type]) || (job.type in species_to_job_whitelist[species.type])) - LAZYDISTINCTADD(species_to_job_whitelist[species.type], job.type) found_whitelisted_job = TRUE else LAZYDISTINCTADD(species_to_job_blacklist[species.type], job.type) diff --git a/mods/species/drakes/species.dm b/mods/species/drakes/species.dm index e37b7c89253..145cfbacd6e 100644 --- a/mods/species/drakes/species.dm +++ b/mods/species/drakes/species.dm @@ -41,7 +41,11 @@ traits = list( /decl/trait/sivian_biochemistry = TRAIT_LEVEL_EXISTS ) + + // Drakes must be whitelisted for jobs to be able to join as them, see maps.dm. job_blacklist_by_default = TRUE + spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED + var/list/adult_pain_emotes_with_pain_level = list( list(/decl/emote/audible/drake_huff, /decl/emote/audible/drake_rattle) = 20 ) From 25a9aac1a17c06ced9f359e634aee50b06a9e9fd Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 18:19:08 +1000 Subject: [PATCH 12/14] Removes duplicate src provided to weather update. --- code/game/turfs/turf.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index afd6cc22bac..746f4360215 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -604,10 +604,8 @@ var/air_graphic = get_air_graphic() if(length(air_graphic)) LAZYDISTINCTADD(., air_graphic) - if(weather) - LAZYADD(., weather) - if(length(weather.vis_contents_additions)) - LAZYADD(., weather.vis_contents_additions) + if(length(weather?.vis_contents_additions)) + LAZYADD(., weather.vis_contents_additions) if(flooded) var/flood_object = get_flood_overlay(flooded) if(flood_object) From 370f1e99ee8a124a6841494b60852abac49ad585 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 18:35:57 +1000 Subject: [PATCH 13/14] Allowed maps to override event containers. --- code/controllers/subsystems/event.dm | 20 ++++++++++++++------ maps/shaded_hills/shaded_hills.dm | 1 + maps/shaded_hills/shaded_hills_events.dm | 20 ++++++++++++++++++++ maps/~mapsystem/maps_events.dm | 4 ++++ nebula.dme | 1 + 5 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 maps/shaded_hills/shaded_hills_events.dm create mode 100644 maps/~mapsystem/maps_events.dm diff --git a/code/controllers/subsystems/event.dm b/code/controllers/subsystems/event.dm index f3a5bd29ca3..59d7eac1c20 100644 --- a/code/controllers/subsystems/event.dm +++ b/code/controllers/subsystems/event.dm @@ -26,14 +26,22 @@ SUBSYSTEM_DEF(event) //Subsystem procs /datum/controller/subsystem/event/Initialize() - if(!all_events) - all_events = subtypesof(/datum/event) + if(!event_containers) event_containers = list( - EVENT_LEVEL_MUNDANE = new/datum/event_container/mundane, - EVENT_LEVEL_MODERATE = new/datum/event_container/moderate, - EVENT_LEVEL_MAJOR = new/datum/event_container/major - ) + EVENT_LEVEL_MUNDANE = new global.using_map.event_container_mundane, + EVENT_LEVEL_MODERATE = new global.using_map.event_container_moderate, + EVENT_LEVEL_MAJOR = new global.using_map.event_container_major + ) + all_events = null + + if(!all_events) + all_events = list() + for(var/datum/event_container/container in event_containers) + for(var/datum/event_meta/event in container.available_events) + if(event.event_type) + all_events |= event.event_type + global.using_map.populate_overmap_events() . = ..() diff --git a/maps/shaded_hills/shaded_hills.dm b/maps/shaded_hills/shaded_hills.dm index 87513297c5e..25767113d6a 100644 --- a/maps/shaded_hills/shaded_hills.dm +++ b/maps/shaded_hills/shaded_hills.dm @@ -42,6 +42,7 @@ #include "outfits/wilderness.dm" #include "shaded_hills_currency.dm" + #include "shaded_hills_events.dm" #include "shaded_hills_locks.dm" #include "shaded_hills_map.dm" #include "shaded_hills_names.dm" diff --git a/maps/shaded_hills/shaded_hills_events.dm b/maps/shaded_hills/shaded_hills_events.dm new file mode 100644 index 00000000000..cd2b3aa8673 --- /dev/null +++ b/maps/shaded_hills/shaded_hills_events.dm @@ -0,0 +1,20 @@ +/datum/map/shaded_hills + event_container_mundane = /datum/event_container/mundane/fantasy + event_container_moderate = /datum/event_container/moderate/fantasy + event_container_major = /datum/event_container/major/fantasy + +// TODO: more appropriate events. +/datum/event_container/mundane/fantasy + available_events = list( + new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Nothing", /datum/event/nothing, 100) + ) + +/datum/event_container/moderate/fantasy + available_events = list( + new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Nothing", /datum/event/nothing, 100) + ) + +/datum/event_container/major/fantasy + available_events = list( + new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Nothing", /datum/event/nothing, 100) + ) diff --git a/maps/~mapsystem/maps_events.dm b/maps/~mapsystem/maps_events.dm new file mode 100644 index 00000000000..6740542eb6a --- /dev/null +++ b/maps/~mapsystem/maps_events.dm @@ -0,0 +1,4 @@ +/datum/map + var/event_container_mundane = /datum/event_container/mundane + var/event_container_moderate = /datum/event_container/moderate + var/event_container_major = /datum/event_container/major diff --git a/nebula.dme b/nebula.dme index f40b844a618..be9f524b6fe 100644 --- a/nebula.dme +++ b/nebula.dme @@ -4113,6 +4113,7 @@ #include "maps\~mapsystem\maps_areas.dm" #include "maps\~mapsystem\maps_comms.dm" #include "maps\~mapsystem\maps_currency.dm" +#include "maps\~mapsystem\maps_events.dm" #include "maps\~mapsystem\maps_jobs.dm" #include "maps\~mapsystem\maps_unit_testing.dm" #include "maps\~unit_tests\unit_testing.dm" From 86bdecdd8010ff830c49f59e33d12f3da80b6589 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Sat, 15 Jun 2024 20:20:27 +1000 Subject: [PATCH 14/14] Fixes roofing tiles (again). --- code/game/turfs/floors/floor_attackby.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/turfs/floors/floor_attackby.dm b/code/game/turfs/floors/floor_attackby.dm index 2ef3d2d6806..ae06cfbdf21 100644 --- a/code/game/turfs/floors/floor_attackby.dm +++ b/code/game/turfs/floors/floor_attackby.dm @@ -12,8 +12,8 @@ if(!C || !user) return 0 - if(IS_COIL(C) || (flooring && istype(C, /obj/item/stack/material/rods))) - return ..(C, user) + if(istype(C, /obj/item/stack/tile/roof) || IS_COIL(C) || (flooring && istype(C, /obj/item/stack/material/rods))) + return ..() if(!(IS_SCREWDRIVER(C) && flooring && (flooring.flags & TURF_REMOVE_SCREWDRIVER)) && try_graffiti(user, C)) return TRUE