mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 01:53:35 +01:00
Adds in mob capsules
This commit is contained in:
@@ -332,6 +332,8 @@
|
||||
new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 800),
|
||||
new /datum/data/mining_equipment("Lazarus Injector", /obj/item/weapon/lazarus_injector, 1000),
|
||||
new /datum/data/mining_equipment("Silver Pickaxe", /obj/item/weapon/pickaxe/silver, 1000),
|
||||
new /datum/data/mining_equipment("Lazarus Capsule", /obj/item/device/mobcapsule, 800),
|
||||
new /datum/data/mining_equipment("Lazarus Capsule belt",/obj/item/weapon/storage/belt/lazarus, 200),
|
||||
new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack/carbondioxide/mining, 2000),
|
||||
new /datum/data/mining_equipment("Space Cash", /obj/item/weapon/spacecash/c1000, 2000),
|
||||
new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/weapon/pickaxe/diamond, 2000),
|
||||
|
||||
@@ -192,3 +192,56 @@
|
||||
icon_opened = "miningcaropen"
|
||||
icon_closed = "miningcar"
|
||||
|
||||
/*********************Mob Capsule*************************/
|
||||
|
||||
/obj/item/device/mobcapsule
|
||||
name = "lazarus capsule"
|
||||
desc = "It allows you to store and deploy lazarus-injected creatures easier."
|
||||
icon = 'icons/obj/mobcap.dmi'
|
||||
icon_state = "mobcap0"
|
||||
w_class = 1.0
|
||||
throw_range = 20
|
||||
var/mob/living/captured = null
|
||||
var/colorindex = 0
|
||||
|
||||
/obj/item/device/mobcapsule/attack(var/atom/A, mob/user, prox_flag)
|
||||
if(!istype(A, /mob/living/simple_animal))
|
||||
return ..()
|
||||
capture(A, user)
|
||||
return 1
|
||||
|
||||
/obj/item/device/mobcapsule/proc/capture(var/mob/target, var/mob/U as mob)
|
||||
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)
|
||||
T.name = "[U.name]'s [initial(T.name)]"
|
||||
T.cancel_camera()
|
||||
name = "Lazarus Capsule: [initial(T.name)]"
|
||||
U << "<span class='notice'>You placed a [T.name] inside the Lazarus Capsule!</span>"
|
||||
captured = T
|
||||
else
|
||||
U << "You can't capture that mob!"
|
||||
|
||||
/obj/item/device/mobcapsule/throw_impact(atom/A, mob/user)
|
||||
..()
|
||||
if(captured)
|
||||
dump_contents(user)
|
||||
|
||||
/obj/item/device/mobcapsule/proc/dump_contents(mob/user)
|
||||
if(captured)
|
||||
captured.loc = src.loc
|
||||
if(captured.client)
|
||||
captured.client.eye = captured.client.mob
|
||||
captured.client.perspective = MOB_PERSPECTIVE
|
||||
captured = null
|
||||
|
||||
/obj/item/device/mobcapsule/attack_self(mob/user)
|
||||
colorindex += 1
|
||||
if(colorindex >= 6)
|
||||
colorindex = 0
|
||||
icon_state = "mobcap[colorindex]"
|
||||
update_icon()
|
||||
Reference in New Issue
Block a user