mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Makes Mob Capsule code better.
This commit is contained in:
@@ -250,12 +250,12 @@
|
||||
|
||||
/obj/item/weapon/storage/belt/lazarus
|
||||
name = "trainer's belt"
|
||||
desc = "For the pokemo- mining master, holds your lazarus capsules."
|
||||
desc = "For the mining master, holds your lazarus capsules."
|
||||
icon_state = "lazarusbelt"
|
||||
item_state = "lazbelt"
|
||||
w_class = 4
|
||||
max_w_class = 4
|
||||
max_combined_w_class = 28
|
||||
max_w_class = 1
|
||||
max_combined_w_class = 6
|
||||
storage_slots = 6
|
||||
can_hold = list("/obj/item/device/mobcapsule")
|
||||
|
||||
|
||||
@@ -201,9 +201,15 @@
|
||||
icon_state = "mobcap0"
|
||||
w_class = 1.0
|
||||
throw_range = 20
|
||||
var/mob/living/captured = null
|
||||
var/mob/living/simple_animal/captured = null
|
||||
var/colorindex = 0
|
||||
|
||||
/obj/item/device/mobcapsule/Destroy()
|
||||
if(captured)
|
||||
qdel(captured)
|
||||
captured = null
|
||||
return ..()
|
||||
|
||||
/obj/item/device/mobcapsule/attack(var/atom/A, mob/user, prox_flag)
|
||||
if(!istype(A, /mob/living/simple_animal))
|
||||
return ..()
|
||||
@@ -214,7 +220,6 @@
|
||||
var/mob/living/simple_animal/T = target
|
||||
if(captured)
|
||||
U << "<span class='notice'>Capture failed!</span>: The capsule already has a mob registered to it!"
|
||||
return
|
||||
else
|
||||
if(istype(T) && "neutral" in T.faction)
|
||||
T.forceMove(src)
|
||||
@@ -233,7 +238,7 @@
|
||||
|
||||
/obj/item/device/mobcapsule/proc/dump_contents(mob/user)
|
||||
if(captured)
|
||||
captured.loc = src.loc
|
||||
captured.forceMove(get_turf(src))
|
||||
if(captured.client)
|
||||
captured.client.eye = captured.client.mob
|
||||
captured.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
Reference in New Issue
Block a user