Skip to content

Commit

Permalink
Batch of TG PRs 10/11 part II (#4469) (#5095)
Browse files Browse the repository at this point in the history
## About The Pull Request

Some bugfixes that got pushed while I was working on the previous batch,
might as well get them in too.

## Changelog

See autochangelogs

Co-authored-by: Bloop <[email protected]>
  • Loading branch information
FeenieRU and vinylspiders authored Oct 12, 2024
1 parent 73fe225 commit dc64f58
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 9 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ GLOBAL_LIST_INIT(turfs_pass_meteor, typecacheof(list(

#define ismecha(A) (istype(A, /obj/vehicle/sealed/mecha))

#define ismopable(A) (A && ((A.plane == FLOOR_PLANE) ? (A.layer <= FLOOR_CLEAN_LAYER) : (A.layer <= GAME_CLEAN_LAYER))) //If something can be cleaned by floor-cleaning devices such as mops or clean bots
#define ismopable(A) (A && ((PLANE_TO_TRUE(A.plane) == FLOOR_PLANE) ? (A.layer <= FLOOR_CLEAN_LAYER) : (A.layer <= GAME_CLEAN_LAYER))) //If something can be cleaned by floor-cleaning devices such as mops or clean bots

#define isorgan(A) (istype(A, /obj/item/organ))

Expand Down
9 changes: 2 additions & 7 deletions code/modules/mob/living/basic/farm_animals/bee/_bee.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,8 @@
return ..()

/mob/living/basic/bee/death(gibbed)
if(beehome)
beehome.bees -= src
beehome = null
beegent = null
if(flags_1 & HOLOGRAM_1 || gibbed)
return ..()
spawn_corpse()
if(!(flags_1 & HOLOGRAM_1) && !gibbed)
spawn_corpse()
return ..()

/// Leave something to remember us by
Expand Down
2 changes: 1 addition & 1 deletion code/modules/reagents/reagent_containers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
/// The icon file to take fill icon appearances from
var/fill_icon = 'icons/obj/medical/reagent_fillings.dmi'
///The sound this container makes when picked up, dropped if there is liquid inside.
var/reagent_container_liquid_sound = SFX_DEFAULT_LIQUID_SLOSH
var/reagent_container_liquid_sound = null

/obj/item/reagent_containers/apply_fantasy_bonuses(bonus)
. = ..()
Expand Down
1 change: 1 addition & 0 deletions code/modules/reagents/reagent_containers/cups/_cup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
icon_state = "bottle"
lefthand_file = 'icons/mob/inhands/items/drinks_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items/drinks_righthand.dmi'
reagent_container_liquid_sound = SFX_DEFAULT_LIQUID_SLOSH

///Like Edible's food type, what kind of drink is this?
var/drink_type = NONE
Expand Down
1 change: 1 addition & 0 deletions code/modules/reagents/reagent_containers/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
has_variable_transfer_amount = FALSE
volume = 5
spillable = FALSE
reagent_container_liquid_sound = null

/obj/item/reagent_containers/cup/rag/Initialize(mapload)
. = ..()
Expand Down
1 change: 1 addition & 0 deletions code/modules/reagents/reagent_containers/spray.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
volume = 250
possible_transfer_amounts = list(5,10)
var/spray_sound = 'sound/effects/spray2.ogg'
reagent_container_liquid_sound = SFX_DEFAULT_LIQUID_SLOSH

/obj/item/reagent_containers/spray/ranged_interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
return try_spray(interacting_with, user) ? ITEM_INTERACT_SUCCESS : ITEM_INTERACT_BLOCKING
Expand Down
1 change: 1 addition & 0 deletions code/modules/unit_tests/_unit_tests.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
#include "bake_a_cake.dm"
#include "barsigns.dm"
#include "baseturfs.dm"
#include "bee.dm"
#include "bespoke_id.dm"
#include "binary_insert.dm"
#include "bitrunning.dm"
Expand Down
15 changes: 15 additions & 0 deletions code/modules/unit_tests/bee.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/// Test beegent transfer
/datum/unit_test/beegent

/datum/unit_test/beegent/Run()
var/mob/living/basic/bee/bee = allocate(__IMPLIED_TYPE__)
var/turf/bee_turf = get_turf(bee)
var/datum/reagent/picked = GLOB.chemical_reagents_list[/datum/reagent/toxin/fentanyl]
bee.assign_reagent(picked)
bee.death()
var/obj/item/trash/bee/dead_bee = locate() in bee_turf
TEST_ASSERT_NOTNULL(dead_bee, "The bee did not leave a corpse.")
TEST_ASSERT_EQUAL(dead_bee.beegent, picked, "The bee's corpse did not have the correct beegent assigned.")
TEST_ASSERT(dead_bee.reagents.has_reagent(/datum/reagent/toxin/fentanyl), "The bee's corpse did not contain any of the beegent.")
// clean up, we aren't allocated
QDEL_NULL(dead_bee)
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-87150.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "Melbert"
delete-after: True
changes:
- bugfix: "Dead bees maintain their color and reagents"
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-87151.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "grungussuss"
delete-after: True
changes:
- bugfix: "a lot of items that shouldn't slosh when picked up will no longer slosh"
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-87163.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "FlufflesTheDog"
delete-after: True
changes:
- bugfix: "Mops and similar work properly on multi-z stations"

0 comments on commit dc64f58

Please sign in to comment.