mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] Fix mob holders not being able to be thrown into disposals (#10901)
Co-authored-by: eghughguhhhhhh <Hawoogabooga@gmail.com> Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
c15e5ade7b
commit
e43da22eab
@@ -142,20 +142,16 @@
|
||||
|
||||
user.drop_item()
|
||||
if(I)
|
||||
if(istype(I, /obj/item/holder/micro))
|
||||
log_and_message_admins("placed [I.name] inside \the [src]", user)
|
||||
var/obj/item/holder/H = I
|
||||
H.held_mob.forceMove(src)
|
||||
qdel(I)
|
||||
else
|
||||
I.forceMove(src)
|
||||
if(istype(I, /obj/item/holder))
|
||||
var/obj/item/holder/holder = I
|
||||
var/mob/victim = holder.held_mob
|
||||
if(ishuman(victim) || victim.client)
|
||||
log_and_message_admins("placed [victim] inside \the [src]", user)
|
||||
victim.forceMove(src)
|
||||
|
||||
to_chat(user, "You place \the [I] into the [src].")
|
||||
for(var/mob/M in viewers(src))
|
||||
if(M == user)
|
||||
continue
|
||||
M.show_message("[user.name] places \the [I] into the [src].", 3)
|
||||
I.forceMove(src)
|
||||
|
||||
user.visible_message("[user] places \the [I] into the [src].", "You place \the [I] into the [src].","Ca-Clunk")
|
||||
update()
|
||||
|
||||
// mouse drop another mob or self
|
||||
@@ -539,45 +535,23 @@
|
||||
H.vent_gas(loc)
|
||||
qdel(H)
|
||||
|
||||
|
||||
/obj/machinery/disposal/hitby(atom/movable/AM)
|
||||
. = ..()
|
||||
//CHOMPEdit: fixes thrown disposal dunking with mobs~ - Reo
|
||||
if((istype(AM, /obj/item) || istype(AM, /mob/living)) && !istype(AM, /obj/item/projectile))
|
||||
if(istype(AM, /obj/item) && !istype(AM, /obj/item/projectile))
|
||||
if(prob(75))
|
||||
AM.forceMove(src)
|
||||
if(istype(AM, /obj/item/holder/micro) || istype(AM, /mob/living))
|
||||
log_and_message_admins("[AM] was thrown into \the [src]", null)
|
||||
visible_message("\The [AM] lands in \the [src]!")
|
||||
//flush() //Away they go! //Uncomment this for proper autoflush. Compromising with autopull to avoid possible disposal dunking abuse
|
||||
//flush = 1 //1984. No autoflush, no autopull. Leaving this here incase someone wants to revisit this in the future when the mood on this changes
|
||||
else
|
||||
visible_message("\The [AM] lands in \the [src].")
|
||||
update_icon() //Yogs did this, so it probably doesnt hurt..
|
||||
visible_message("\The [AM] lands in \the [src].")
|
||||
else
|
||||
visible_message("\The [AM] bounces off of \the [src]'s rim!")
|
||||
return ..() //...Yogs also did this! it's probably good to stop it from flying after clonking the thing. Also prevents trying to insert the mob repeatedly due to it the throw not ending.
|
||||
return ..()
|
||||
//CHOMPEdit End.
|
||||
|
||||
/obj/machinery/disposal/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /obj/item/projectile))
|
||||
return 1
|
||||
if (istype(mover,/obj/item) && mover.throwing)
|
||||
var/obj/item/I = mover
|
||||
if(istype(I, /obj/item/projectile))
|
||||
return
|
||||
if(istype(AM,/mob/living))
|
||||
if(prob(75))
|
||||
I.forceMove(src)
|
||||
if(istype(I, /obj/item/holder/micro))
|
||||
log_and_message_admins("[I.name] was thrown into \the [src]", null)
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("\The [I] lands in \the [src].", 3)
|
||||
else
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("\The [I] bounces off of \the [src]'s rim!", 3)
|
||||
return 0
|
||||
else
|
||||
return ..(mover, target)
|
||||
var/mob/living/to_be_dunked = AM
|
||||
if(ishuman(AM) ||to_be_dunked.client)
|
||||
log_and_message_admins("[AM] was thrown into \the [src]", null)
|
||||
AM.forceMove(src)
|
||||
visible_message("\The [AM] lands in \the [src].")
|
||||
|
||||
/obj/machinery/disposal/wall
|
||||
name = "inset disposal unit"
|
||||
|
||||
Reference in New Issue
Block a user