Fixes exploit (#25101)

This commit is contained in:
Mikhail Dzianishchyts
2024-04-22 22:04:38 +00:00
committed by GitHub
parent 7fa44a31fb
commit 2cfa9d620f
6 changed files with 34 additions and 21 deletions
+11 -10
View File
@@ -23,9 +23,7 @@
effect_in = effect
if(isnull(effect_out))
effect_out = effect
if(D.start(atom_to_teleport, destination, variance_range, force_teleport, effect_in, effect_out, sound_in, sound_out, bypass_area_flag, safe_turf_pick, do_effect))
return TRUE
return FALSE
return D.start(atom_to_teleport, destination, variance_range, force_teleport, effect_in, effect_out, sound_in, sound_out, bypass_area_flag, safe_turf_pick, do_effect)
/datum/teleport
var/atom/movable/teleatom //atom to teleport
@@ -166,6 +164,16 @@
playSpecials(curturf,effectin,soundin)
if(isliving(teleatom))
var/mob/living/target_mob = teleatom
if(target_mob.buckled)
target_mob.buckled.unbuckle_mob(target_mob, force = TRUE)
if(target_mob.has_buckled_mobs())
target_mob.unbuckle_all_mobs(force = TRUE)
if(ismachinery(target_mob.loc) || istype(target_mob.loc, /obj/item/mecha_parts/mecha_equipment/medical/sleeper))
var/obj/location = target_mob.loc
location.force_eject_occupant(target_mob)
if(force_teleport)
teleatom.forceMove(destturf)
playSpecials(destturf,effectout,soundout)
@@ -173,13 +181,6 @@
if(teleatom.Move(destturf))
playSpecials(destturf,effectout,soundout)
if(isliving(teleatom))
var/mob/living/L = teleatom
if(L.buckled)
L.buckled.unbuckle_mob(L, force = TRUE)
if(L.has_buckled_mobs())
L.unbuckle_all_mobs(force = TRUE)
destarea.Entered(teleatom)
return TRUE
@@ -216,6 +216,9 @@
occupant = null
update_icon(UPDATE_ICON_STATE)
/obj/machinery/abductor/experiment/force_eject_occupant(mob/target)
eject_abductee()
/obj/machinery/abductor/experiment/broken
stat = BROKEN
+10 -7
View File
@@ -60,7 +60,7 @@
if(console)
console.scanner = null
if(occupant)
remove_mob(occupant)
remove_mob()
return ..()
/obj/machinery/clonescanner/MouseDrop_T(atom/movable/O, mob/user)
@@ -84,16 +84,16 @@
if(!occupant)
return
if(issilicon(user))
remove_mob(occupant)
remove_mob()
return
if(!Adjacent(user) || !ishuman(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
return
remove_mob(occupant)
remove_mob()
/obj/machinery/clonescanner/relaymove(mob/user)
if(user.stat)
return
remove_mob(user)
remove_mob()
/obj/machinery/clonescanner/proc/try_scan(mob/living/carbon/human/scanned)
if(!scanned)
@@ -158,10 +158,10 @@
occupant = inserted
update_icon(UPDATE_ICON_STATE)
/obj/machinery/clonescanner/proc/remove_mob(mob/living/carbon/human/removed)
if(!istype(removed))
/obj/machinery/clonescanner/proc/remove_mob()
if(!occupant)
return
removed.forceMove(get_turf(loc))
occupant.forceMove(get_turf(loc))
occupant = null
update_scan_status()
update_icon(UPDATE_ICON_STATE)
@@ -192,3 +192,6 @@
return
var/obj/item/multitool/M = I
M.set_multitool_buffer(user, src)
/obj/machinery/clonescanner/force_eject_occupant(mob/target)
remove_mob()
+6 -3
View File
@@ -613,6 +613,9 @@
/obj/machinery/cryopod/blob_act()
return //Sorta gamey, but we don't really want these to be destroyed.
/obj/machinery/cryopod/force_eject_occupant(mob/target)
go_out()
/obj/machinery/cryopod/offstation
// Won't announce when used for cryoing.
silent = TRUE
@@ -667,7 +670,7 @@
/proc/cryo_ssd(mob/living/person_to_cryo)
if(istype(person_to_cryo.loc, /obj/machinery/cryopod))
return 0
return FALSE
if(isobj(person_to_cryo.loc))
var/obj/O = person_to_cryo.loc
O.force_eject_occupant(person_to_cryo)
@@ -685,8 +688,8 @@
var/obj/effect/portal/SP = new /obj/effect/portal(T, null, null, 40, create_sparks = FALSE)
SP.name = "NT SSD Teleportation Portal"
target_cryopod.take_occupant(person_to_cryo, 1)
return 1
return 0
return TRUE
return FALSE
/proc/force_cryo_human(mob/living/carbon/person_to_cryo)
if(!istype(person_to_cryo))
@@ -233,6 +233,8 @@
chassis.use_power(energy_drain)
update_equip_info()
/obj/item/mecha_parts/mecha_equipment/medical/sleeper/force_eject_occupant(mob/target)
go_out()
/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun
name = "exosuit syringe gun"
@@ -321,7 +321,8 @@
operating = FALSE
update_icon(UPDATE_OVERLAYS | UPDATE_ICON_STATE)
/obj/machinery/gibber/force_eject_occupant(mob/target)
go_out()
/* AUTOGIBBER */