Mimic shipping (#29872)

* mimic wrapping

* mimic shipping

* mimics only for now

* angry unwrapping

* cleanup
This commit is contained in:
Apogee-dev
2021-06-25 13:48:20 -07:00
committed by GitHub
parent 46923ce7a6
commit 156f56a1eb
3 changed files with 29 additions and 4 deletions

View File

@@ -22,10 +22,12 @@
/obj/item/weapon/winter_gift,
/obj/item/weapon/storage/evidencebag,
/obj/item/weapon/storage/backpack/holding,
/obj/item/weapon/legcuffs/bolas
/obj/item/weapon/legcuffs/bolas,
/mob/living/simple_animal/hostile/mimic/crate/item
)
var/list/wrappable_big_stuff = list(
/mob/living/simple_animal/hostile/mimic/crate,
/obj/structure/closet,
/obj/structure/vendomatpack,
/obj/structure/stackopacks
@@ -88,6 +90,10 @@
var/obj/structure/closet/C = target
if(C.opened)
return
if(istype(target, /mob/living/simple_animal/hostile/mimic/crate))
var/mob/living/simple_animal/hostile/mimic/crate/MC = target
if(MC.angry)
return
if(amount >= 3)
var/obj/item/P = new bigpath(get_turf(target.loc),target)
target.forceMove(P)
@@ -157,6 +163,9 @@
/obj/item/delivery/Destroy()
for(var/atom/movable/AM in src)
AM.forceMove(loc)
if(istype(AM, /mob/living/simple_animal/hostile/mimic/crate))
var/mob/living/simple_animal/hostile/mimic/crate/MC = AM
MC.anger()
..()
/obj/item/delivery/attack_self(mob/user as mob)
@@ -203,7 +212,7 @@
/obj/item/delivery/large/New(turf/loc, atom/movable/target)
..()
w_class = W_CLASS_GIANT
if(istype(target,/obj/structure/closet/crate) || ishuman(target))
if(istype(target,/obj/structure/closet/crate) || istype(target, /mob/living/simple_animal/hostile/mimic/crate) || ishuman(target))
icon_state = "deliverycrate"
else if(istype(target,/obj/structure/vendomatpack))
icon_state = "deliverypack"
@@ -215,6 +224,9 @@
/obj/item/delivery/large/Destroy()
for(var/atom/movable/AM in contents)
AM.forceMove(get_turf(src))
if(istype(AM, /mob/living/simple_animal/hostile/mimic/crate))
var/mob/living/simple_animal/hostile/mimic/crate/MC = AM
MC.anger()
..()
/obj/item/delivery/large/attack_paw(mob/user as mob)

View File

@@ -188,7 +188,12 @@ var/global/list/crate_mimic_disguises = list(\
/mob/living/simple_animal/hostile/mimic/crate/attackby(obj/W, mob/user)
if(angry) //If we're angry - proceed as normal
if(istype(W, /obj/item/stack/package_wrap))
to_chat(user, "<span class='warning'>You can't wrap \the [src] while it's angry!</span>")
return
return ..()
else if(istype(W, /obj/item/stack/package_wrap))
return
else
return attack_hand(user) //If we're hidden - attempt to open (same as a normal crate)
@@ -441,6 +446,12 @@ var/global/list/item_mimic_disguises = list(
copied_object = meat_type //Without this line, mimics would spawn items they're disguised as. Since they're relatively weak and can appear as gatling guns, this is required!
..(gibbed)
/mob/living/simple_animal/hostile/mimic/crate/item/attackby(obj/W, mob/user)
if(angry) //If we're angry - proceed as normal
return ..()
else
return attack_hand(user) //can't wrap these
/mob/living/simple_animal/hostile/mimic/crate/item/attack_hand(mob/user)
if(angry)
return ..()

View File

@@ -588,7 +588,7 @@
//Check for any living mobs trigger hasmob.
//hasmob effects whether the package goes to cargo or its tagged destination.
for(var/mob/living/M in D)
if(M && M.stat != 2)
if(M && M.stat != DEAD)
hasmob = 1
//Checks 1 contents level deep. This means that players can be sent through disposals...
@@ -596,7 +596,9 @@
for(var/obj/O in D)
if(O.contents)
for(var/mob/living/M in O.contents)
if(M && M.stat != 2)
if(istype(M, /mob/living/simple_animal/hostile/mimic/crate))
continue
else if(M && M.stat != DEAD)
hasmob = 1
// now everything inside the disposal gets put into the holder