Skip to content

Commit 667a7ff

Browse files
authored
March Bug FIx Bday Bash (#5789)
## About The Pull Request Another grouping of bug fixes. This one addresses the dark sabre. Currently still needs hand icons but otherwise is now visible and missing icons use base sabre icons in world. Gary's runtime for going to things is hopefully silenced. A runtime was created with the wt550m9 trying to spawn with a max ammo of 0. Now a proper spawn in empty is made for this ammo and properly placed in world. One of the map helpers for air alarms was run timing due to trying to send its target when the target was already checked to be null. This now sends the proper area location. Finally due to a recent change to the smgm45 or the cr20 ammo broke its icons. A proper offset equation is applied to make its new ammo count match the current icons. ## Why It's Good For The Game More bug fixes to help make the game better for everyone. For the most part shouldn't have any issues with the main game and just applies proper checks to where they should be. ## Changelog :cl:Siro qol: Dark Sabre Sheath Icons partially restored. fixes #5692 fix: Fixed the pathology incubator and analyzer so they don't break making the machine inoperable fix: magazine/smgm45 icons now display properly in world. bal: Slasher machette when thrown does 5 damage till light mechanic fixed. map: Placed proper empty wt550m9 in ezhall and office1 ruin locations code: IS_SLASHER macro made which also silenced multiple runtimes. code: Silenced Gary's go to target pick from null list runtime. code: Silenced map helper for air alarms for null target. code: Silenced divide by 0 runtime with proper starts_empty proc for the wt550m code: Applied proper ammo offset compensate for ammo changes from: #5212 /:cl:
1 parent 4ff8501 commit 667a7ff

File tree

15 files changed

+65
-25
lines changed

15 files changed

+65
-25
lines changed

_maps/RandomRuins/SpaceRuins/abandonedunknownsite1.dmm

+3-12
Original file line numberDiff line numberDiff line change
@@ -6986,10 +6986,7 @@
69866986
/area/ruin/space/has_grav/abandonedscpsite/ezhall)
69876987
"zQ" = (
69886988
/obj/effect/mapping_helpers/broken_floor,
6989-
/obj/item/ammo_box/magazine/wt550m9{
6990-
max_ammo = 0;
6991-
icon_state = "46x30mmt-0"
6992-
},
6989+
/obj/item/ammo_box/magazine/wt550m9/starts_empty,
69936990
/obj/effect/decal/cleanable/blood/gibs/core,
69946991
/obj/structure/extinguisher_cabinet/directional/east,
69956992
/obj/effect/decal/cleanable/dirt,
@@ -8704,10 +8701,7 @@
87048701
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
87058702
/obj/structure/cable,
87068703
/obj/effect/decal/cleanable/blood,
8707-
/obj/item/ammo_box/magazine/wt550m9{
8708-
max_ammo = 0;
8709-
icon_state = "46x30mmt-0"
8710-
},
8704+
/obj/item/ammo_box/magazine/wt550m9/starts_empty,
87118705
/obj/effect/decal/cleanable/dirt,
87128706
/turf/open/floor/catwalk_floor/iron_dark,
87138707
/area/ruin/space/has_grav/abandonedscpsite/hczhall)
@@ -10295,10 +10289,7 @@
1029510289
/obj/structure/cable,
1029610290
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
1029710291
/obj/effect/mapping_helpers/broken_floor,
10298-
/obj/item/ammo_box/magazine/wt550m9{
10299-
max_ammo = 0;
10300-
icon_state = "46x30mmt-0"
10301-
},
10292+
/obj/item/ammo_box/magazine/wt550m9/starts_empty,
1030210293
/obj/effect/decal/cleanable/dirt,
1030310294
/turf/open/floor/catwalk_floor/iron_dark,
1030410295
/area/ruin/space/has_grav/abandonedscpsite/hczhall)

code/__DEFINES/~monkestation/antagonists.dm

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
///Whether a mob is a Monster Hunter
66
#define IS_MONSTERHUNTER(mob) (mob?.mind?.has_antag_datum(/datum/antagonist/monsterhunter))
77

8+
/// Checks if the given mob is a slasher.
9+
#define IS_SLASHER(mob) (mob?.mind?.has_antag_datum(/datum/antagonist/slasher))
10+
811
/// List of areas blacklisted from area based traitor objectives
912
#define TRAITOR_OBJECTIVE_BLACKLISTED_AREAS list(/area/station/engineering/hallway, \
1013
/area/station/engineering/lobby, \

code/modules/mapping/mapping_helpers.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@
265265

266266
var/obj/machinery/airalarm/target = locate(/obj/machinery/airalarm) in loc
267267
if(isnull(target))
268-
var/area/target_area = get_area(target)
268+
var/area/target_area = get_area(src)
269269
log_mapping("[src] failed to find an air alarm at [AREACOORD(src)] ([target_area.type]).")
270270
else
271271
payload(target)

code/modules/mob/living/living_defense.dm

+11-1
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,18 @@
212212
emote("scream", intentional=FALSE)
213213
//MONKESTATION EDIT END
214214
return
215+
215216
var/armor = run_armor_check(zone, MELEE, "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].", thrown_item.armour_penetration, "", FALSE, thrown_item.weak_against_armour)
216-
apply_damage(thrown_item.throwforce, thrown_item.damtype, zone, armor, sharpness = thrown_item.get_sharpness(), wound_bonus = (nosell_hit * CANT_WOUND))
217+
//MONKESTATION EDIT START
218+
if(istype(AM, /obj/item/slasher_machette))
219+
if(istype(thrown_by) && IS_SLASHER(thrown_by)) // Must be slasher must have a mind and slasher antag datum.
220+
apply_damage(5, thrown_item.damtype, zone, armor, sharpness = thrown_item.get_sharpness(), wound_bonus = (nosell_hit * CANT_WOUND))
221+
else
222+
return // Cancels the damage. Hope this works and doesn't cause a runtime.
223+
else
224+
apply_damage(thrown_item.throwforce, thrown_item.damtype, zone, armor, sharpness = thrown_item.get_sharpness(), wound_bonus = (nosell_hit * CANT_WOUND))
225+
//MONKESTATION EDIT END
226+
217227
if(QDELETED(src)) //Damage can delete the mob.
218228
return
219229
if(body_position == LYING_DOWN) // physics says it's significantly harder to push someone by constantly chucking random furniture at them if they are down on the floor.

code/modules/projectiles/boxes_magazines/external/smg.dm

+13-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
caliber = CALIBER_46X30MM
77
max_ammo = 20
88

9+
//MONKESTATION ADDITION START
10+
/obj/item/ammo_box/magazine/wt550m9/starts_empty
11+
start_empty = TRUE
12+
//MONKESTATION ADDITION END
13+
914
/obj/item/ammo_box/magazine/wt550m9/update_icon_state()
1015
. = ..()
1116
icon_state = "[base_icon_state]-[round(ammo_count(), 4)]"
@@ -84,7 +89,14 @@
8489

8590
/obj/item/ammo_box/magazine/smgm45/update_icon_state()
8691
. = ..()
87-
icon_state = "[base_icon_state]-[round(ammo_count(), 2)]"
92+
//monke edit start
93+
var/old_ammo = 24 // From the old 24 ammo count.
94+
var/icon_steps = 2 // Number of steps each icon changed. If 2 with 24 ammo then 24->22->20 etc
95+
var/scaled_ammo = round((ammo_count() / max_ammo) * old_ammo, icon_steps) // Required offest without altering icons.
96+
if(ammo_count() > 0 && ammo_count() < 2) // Force last bullet icon till the last bullet is actually used.
97+
scaled_ammo = icon_steps // icon_steps is usually also your last icon before 0
98+
icon_state = "[base_icon_state]-[scaled_ammo]"
99+
//monke edit end
88100

89101
/obj/item/ammo_box/magazine/smgm45/ap
90102
name = "SMG magazine (Armour Piercing .45)"

monkestation/code/modules/blood_for_the_blood_gods/slasher/abilities/recall_machette.dm

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
return
2020
if(!stored_machette || QDELETED(stored_machette))
2121
stored_machette = new /obj/item/slasher_machette
22-
var/datum/antagonist/slasher/slasherdatum = owner.mind.has_antag_datum(/datum/antagonist/slasher)
22+
var/datum/antagonist/slasher/slasherdatum = IS_SLASHER(owner)
2323
if(!slasherdatum)
2424
return
2525
slasherdatum.linked_machette = stored_machette
@@ -66,7 +66,7 @@
6666
/obj/item/slasher_machette/proc/pre_throw(obj/item/source, list/arguments)
6767
SIGNAL_HANDLER
6868
var/mob/living/thrower = arguments[4]
69-
if(!istype(thrower) || !thrower.mind.has_antag_datum(/datum/antagonist/slasher))
69+
if(!istype(thrower) || !IS_SLASHER(thrower))
7070
// Just in case our thrower isn't actually a slasher (somehow). This shouldn't ever come up,
7171
// but if it does, then we just prevent the throw.
7272
return COMPONENT_CANCEL_THROW
@@ -102,27 +102,27 @@
102102
living_user.adjustBruteLoss(force)
103103
to_chat(user, span_warning("You scream out in pain as you hold the [src]!"))
104104
return FALSE
105-
var/datum/antagonist/slasher/slasherdatum = user.mind?.has_antag_datum(/datum/antagonist/slasher)
105+
var/datum/antagonist/slasher/slasherdatum = IS_SLASHER(user)
106106
if(slasherdatum?.active_action && istype(slasherdatum.active_action, /datum/action/cooldown/slasher/soul_steal))
107107
return FALSE // Blocks the attack
108108
return ..() // Proceeds with normal attack if no soul steal is active
109109

110110
/obj/item/slasher_machette/attack(mob/living/target_mob, mob/living/user, params)
111111
if(isliving(user))
112112
var/mob/living/living_user = user
113-
if(!user.mind.has_antag_datum(/datum/antagonist/slasher))
113+
if(!IS_SLASHER(user))
114114
forceMove(get_turf(user))
115115
user.emote("scream")
116116
living_user.adjustBruteLoss(force)
117117
to_chat(user, span_warning("You scream out in pain as you hold the [src]!"))
118118
return
119-
var/datum/antagonist/slasher/slasherdatum = user.mind?.has_antag_datum(/datum/antagonist/slasher)
119+
var/datum/antagonist/slasher/slasherdatum = IS_SLASHER(user)
120120
if(slasherdatum?.active_action)
121121
return TRUE // Blocks the attack
122122
return ..()
123123

124124
/obj/machinery/door/airlock/proc/attack_slasher_machete(atom/target, mob/living/user)
125-
if(!user.mind.has_antag_datum(/datum/antagonist/slasher))
125+
if(!IS_SLASHER(user))
126126
return
127127
if(isElectrified() && shock(user, 100)) //Mmm, fried slasher!
128128
add_fingerprint(user)

monkestation/code/modules/clothing/~donator/clothing.dm

+4-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@
410410
righthand_file = 'monkestation/icons/donator/mob/inhands/donator_right.dmi'
411411

412412
/obj/item/toy/darksabre/get_belt_overlay()
413-
return mutable_appearance('monkestation/icons/donator/obj/custom.dmi', "darksheath-darksabre")
413+
return mutable_appearance('monkestation/icons/donator/obj/custom.dmi', "darksheath-sabre")
414414

415415
// Donation reward for inferno707
416416
/obj/item/storage/belt/sabre/darksabre
@@ -420,6 +420,9 @@
420420
worn_icon = 'monkestation/icons/donator/mob/clothing/custom_w.dmi'
421421
icon_state = "darksheath"
422422
worn_icon_state = "darksheath"
423+
inhand_icon_state = "darksheath"
424+
lefthand_file = 'monkestation/icons/donator/mob/inhands/donator_left.dmi'
425+
righthand_file = 'monkestation/icons/donator/mob/inhands/donator_right.dmi'
423426

424427
/obj/item/storage/belt/sabre/darksabre/Initialize(mapload)
425428
. = ..()

monkestation/code/modules/ranching/chickens/ai/gary/gary_behaviours.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
continue
193193
mobs += mob
194194

195-
controller.blackboard[BB_TRAVEL_DESTINATION] = pick(mobs)
195+
controller.blackboard[BB_TRAVEL_DESTINATION] = (length(mobs) > 0) ? pick(mobs) : null //pick() cries if theres nothing in the list.
196196
controller.blackboard[BB_GARY_WANDER_COOLDOWN] = world.time + 5 MINUTES
197197
. = ..()
198198

monkestation/code/modules/virology/machines/analyzer.dm

+7
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,17 @@
113113

114114
if(do_after(user, 5 SECONDS, src))
115115
if(machine_stat & (BROKEN|NOPOWER))
116+
processing = FALSE // Make sure to return the machine to normal operation if power outage
117+
update_appearance()
118+
scanner = null
116119
return
117120
if(!istype(dish.contained_virus, /datum/disease/acute))
118121
QDEL_NULL(dish)
119122
say("ERROR:Bad Pathogen detected PURGING")
123+
processing = FALSE // Make sure to return the machine to normal operation after purge
124+
update_appearance()
125+
scanner = null
126+
return
120127
if (dish.contained_virus.addToDB())
121128
say("Added new pathogen to database.")
122129
var/datum/data/record/v = GLOB.virusDB["[dish.contained_virus.uniqueID]-[dish.contained_virus.subID]"]

monkestation/code/modules/virology/machines/incubator.dm

+2-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@
253253

254254
var/list/symptom_data = list()
255255
var/obj/item/weapon/virusdish/dish = dish_datum.dish
256-
for(var/datum/symptom/symptom in dish.contained_virus.symptoms)
256+
dish_ui_datum["contains_disease"] = istype(dish.contained_virus) ? TRUE : FALSE
257+
for(var/datum/symptom/symptom in dish.contained_virus?.symptoms)
257258
if(!(dish.contained_virus.disease_flags & DISEASE_ANALYZED))
258259
symptom_data += list(list("name" = "Unknown", "desc" = "Unknown", "strength" = symptom.multiplier, "max_strength" = symptom.max_multiplier, "chance" = symptom.chance, "max_chance" = symptom.max_chance, "stage" = symptom.stage))
259260
continue
Binary file not shown.
Binary file not shown.
Binary file not shown.
23 Bytes
Binary file not shown.

tgui/packages/tgui/interfaces/DiseaseIncubator.jsx

+14-1
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,21 @@ export const DiseaseIncubator = (props) => {
144144
))}
145145
</LabeledList>
146146
</Collapsible>
147+
) : dish.inserted ? (
148+
dish.contains_disease ? (
149+
Array.isArray(dish.symptom_data) &&
150+
!dish.symptom_data.length > 0 && (
151+
<NoticeBox info>
152+
Disease does not contain any symptoms.
153+
</NoticeBox>
154+
)
155+
) : (
156+
<NoticeBox warning>
157+
Dish does not contain a viable disease!
158+
</NoticeBox>
159+
)
147160
) : (
148-
<NoticeBox warn>No symptom data available.</NoticeBox>
161+
<NoticeBox danger>Please insert a growth dish!</NoticeBox>
149162
)}
150163
</Section>
151164
))}

0 commit comments

Comments
 (0)