diff --git a/code/game/gamemodes/vampire/vampire_helpers.dm b/code/game/gamemodes/vampire/vampire_helpers.dm
index 0ec691ec474..1e417915dea 100644
--- a/code/game/gamemodes/vampire/vampire_helpers.dm
+++ b/code/game/gamemodes/vampire/vampire_helpers.dm
@@ -68,7 +68,7 @@
return vampire
// Checks whether or not the target can be affected by a vampire's abilities.
-/mob/proc/vampire_can_affect_target(var/mob/living/carbon/human/T, var/notify = 1, var/account_loyalty_implant = 0)
+/mob/proc/vampire_can_affect_target(var/mob/living/carbon/human/T, var/notify = 1, var/account_loyalty_implant = 0, var/ignore_thrall = FALSE)
if (!T || !istype(T))
return 0
@@ -84,7 +84,7 @@
if (notify)
to_chat(src, "Your connection with the Veil is not strong enough to affect a man as devout as them.")
return 0
- else if (T.mind.vampire)
+ else if (T.mind.vampire && (!(T.mind.vampire.status & VAMP_ISTHRALL) || ((T.mind.vampire.status & VAMP_ISTHRALL) && !ignore_thrall)))
if (notify)
to_chat(src, "You lack the power required to affect another creature of the Veil.")
return 0
diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm
index ca4a10969e0..503c7d43993 100644
--- a/code/game/gamemodes/vampire/vampire_powers.dm
+++ b/code/game/gamemodes/vampire/vampire_powers.dm
@@ -815,7 +815,7 @@
return
var/mob/living/carbon/human/T = G.affecting
- if (!vampire_can_affect_target(T))
+ if (!vampire_can_affect_target(T, ignore_thrall = TRUE))
return
if (!T.client)
diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm
index bfa19dffe21..329f076f7fc 100644
--- a/code/modules/mining/mine_items.dm
+++ b/code/modules/mining/mine_items.dm
@@ -407,7 +407,7 @@
var/obj/item/stack/flag/newflag = new src.type(T)
newflag.amount = 1
newflag.upright = 1
- anchored = 1
+ newflag.anchored = 1
newflag.name = newflag.singular_name
newflag.icon_state = "[newflag.base_state]_open"
newflag.visible_message("[user] plants [newflag] firmly in the ground.")
@@ -1082,28 +1082,47 @@ var/list/total_extraction_beacons = list()
w_class = 3
force = 10
throwforce = 5
- var/on = 0
origin_tech = list(TECH_MAGNET = 4, TECH_ENGINEERING = 3)
+ var/currently_pulling = FALSE
/obj/item/weapon/oremagnet/attack_self(mob/user)
- if(!on)
- user << "You switch on the ore magnet."
- on = 1
- else
- user << "You switch off the ore magnet,"
- on = 0
- magneto()
-
-/obj/item/weapon/oremagnet/proc/magneto()
- if(!src.loc)
- on = 0
- if(!on)
+ if (use_check(user))
+ to_chat(user, "You cannot do that right now.")
return
+
+ toggle_on(user)
+
+/obj/item/weapon/oremagnet/process()
+ set waitfor = FALSE
+
+ if (currently_pulling)
+ return
+
+ currently_pulling = TRUE
+
for(var/obj/item/weapon/ore/O in oview(7,src.loc))
if(prob(80))
- step_to(O,src.loc,0)
- spawn(10)
- .()
+ step_to(O, src.loc, 0)
+
+ if (TICK_CHECK && QDELING(src))
+ return
+
+ currently_pulling = FALSE
+
+/obj/item/weapon/oremagnet/proc/toggle_on(mob/user)
+ if (!isprocessing)
+ START_PROCESSING(SSprocessing, src)
+ else
+ STOP_PROCESSING(SSprocessing, src)
+
+ if (user)
+ to_chat(user, "You switch [isprocessing ? "on" : "off"] [src].")
+
+/obj/item/weapon/oremagnet/Destroy()
+ STOP_PROCESSING(SSprocessing, src)
+ return ..()
+
+/******************************Ore Summoner*******************************/
/obj/item/weapon/oreportal
name = "ore summoner"
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index d261953f0b8..62558f97dd6 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -29,6 +29,10 @@
if (istype(src, /mob/living))
ghostize()
+ if (istype(src.loc, /atom/movable))
+ var/atom/movable/AM = src.loc
+ LAZYREMOVE(AM.contained_mobs, src)
+
return ..()
diff --git a/code/modules/multiz/hoist.dm b/code/modules/multiz/hoist.dm
index 86e6d753eb0..c9c2b7feb0a 100644
--- a/code/modules/multiz/hoist.dm
+++ b/code/modules/multiz/hoist.dm
@@ -2,6 +2,8 @@
// Dost thou even hoist? //
///////////////////////////
+#define NORMAL_LAYER 3
+
/obj/item/hoist_kit
name = "hoist kit"
desc = "A setup kit for a hoist that can be used to lift things. The hoist will deploy in the direction you're facing."
@@ -55,6 +57,7 @@
if(ismob(AM))
source_hook.buckle_mob(AM)
AM.anchored = 1 // why isn't this being set by buckle_mob for silicons?
+ source_hook.layer = AM.layer + 0.1
/obj/effect/hoist_hook/MouseDrop(atom/dest)
..()
@@ -85,6 +88,14 @@
usr.visible_message(span("danger", "[usr] detaches \the [source_hoist.hoistee] from the hoist clamp."), span("danger", "You detach \the [source_hoist.hoistee] from the hoist clamp."), span("danger", "You hear something unclamp."))
source_hoist.release_hoistee()
+// This will handle mobs unbuckling themselves.
+/obj/effect/hoist_hook/unbuckle_mob()
+ . = ..()
+ if (. && !QDELETED(source_hoist))
+ var/mob/M = .
+ source_hoist.hoistee = null
+ ADD_FALLING_ATOM(M) // fuck you, you fall now!
+
/obj/structure/hoist
icon = 'icons/obj/hoists.dmi'
icon_state = "hoist_base"
@@ -127,6 +138,7 @@
else
hoistee.anchored = 0
hoistee = null
+ layer = NORMAL_LAYER
/obj/structure/hoist/proc/break_hoist()
if(broken)
@@ -262,3 +274,5 @@
/atom/movable/proc/hoist_act(turf/dest)
forceMove(dest)
return TRUE
+
+#undef NORMAL_LAYER
diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm
index 0e034d9e765..d1bf8d2465b 100644
--- a/code/modules/surgery/organs_internal.dm
+++ b/code/modules/surgery/organs_internal.dm
@@ -357,15 +357,17 @@
if (!..())
return 0
- target.op_stage.current_organ = null
-
+ var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/obj/item/organ/brain/sponge = target.internal_organs_by_name["brain"]
- if(sponge && sponge.can_lobotomize && !sponge.lobotomized)
- target.op_stage.current_organ = sponge
- return ..()
- else
+ if (!affected || !istype(sponge) || !(sponge in affected.internal_organs))
return 0
+ if (!sponge.can_lobotomize || sponge.lobotomized)
+ return 0
+
+ target.op_stage.current_organ = sponge
+ return ..()
+
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/brain/B = target.op_stage.current_organ
user.visible_message("[user] begins to modify [target]'s [B] to remove their memory recall with \the [tool].", \
diff --git a/html/changelogs/skull132-MORE_FIXES.yml b/html/changelogs/skull132-MORE_FIXES.yml
new file mode 100644
index 00000000000..2c78d5dd8b3
--- /dev/null
+++ b/html/changelogs/skull132-MORE_FIXES.yml
@@ -0,0 +1,10 @@
+author: Skull132
+delete-after: true
+
+changes:
+ - bugfix: "Fixes the lobotomy surgery running whenever you try to create chest-cavities."
+ - bugfix: "You can now put mining flags/beacons into your backpack after using them again."
+ - bugfix: "Thralls can now be embraced, as was intended."
+ - bugfix: "Ore magnets will no longer cause hilarious amounts of lag."
+ - bugfix: "Unbuckling yourself from a hoist clamp will no longer render the hoist kit unusable."
+ - tweak: "The hoist clamp should now appear over whatever object it's clipped to while said object is clipped to it. It'll reset after unhooking."