From 9d9026c32bd966cadd94df8989c034f8d5fbb4e8 Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Wed, 20 Mar 2019 15:13:32 +0100
Subject: [PATCH 1/6] PORT ATTEMPT
Porting Mob capsules
---
code/modules/mining/mobcapsule_ch.dm | 110 +++++++++++++++++++++++++++
1 file changed, 110 insertions(+)
create mode 100644 code/modules/mining/mobcapsule_ch.dm
diff --git a/code/modules/mining/mobcapsule_ch.dm b/code/modules/mining/mobcapsule_ch.dm
new file mode 100644
index 0000000000..ba6b9cdf0d
--- /dev/null
+++ b/code/modules/mining/mobcapsule_ch.dm
@@ -0,0 +1,110 @@
+/*********************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"
+ throwforce = 00
+ throw_speed = 4
+ throw_range = 20
+ force = 0
+ var/storage_capacity = 1
+ var/mob/living/capsuleowner = null
+ var/tripped = 0
+ var/colorindex = 0
+ var/mob/contained_mob
+
+/obj/item/device/mobcapsule/attackby(obj/item/W, mob/user)
+ if(istype(W, /obj/item/weapon/pen))
+ if(user != capsuleowner)
+ to_chat(user, "\The [src] briefly flashes an error.")
+ return 0
+ spawn()
+ var/mname = sanitize(input("Choose a name for your friend.", "Name your friend", contained_mob.name) as text|null)
+ if(mname)
+ contained_mob.name = mname
+ to_chat(user, "Renaming successful, say hello to [contained_mob]!")
+ name = "lazarus capsule - [mname]"
+ ..()
+
+/obj/item/device/mobcapsule/throw_impact(atom/A, speed, mob/user)
+ ..()
+ if(!tripped)
+ if(contained_mob)
+ dump_contents(user)
+ tripped = 1
+ else
+ take_contents(user)
+ tripped = 1
+
+/obj/item/device/mobcapsule/proc/insert(var/atom/movable/AM, mob/user)
+ if(contained_mob)
+ return -1
+
+ if(istype(AM, /mob/living))
+ var/mob/living/L = AM
+ if(L.locked_to)
+ return 0
+ if(L.client)
+ L.client.perspective = EYE_PERSPECTIVE
+ L.client.eye = src
+ else if(!istype(AM, /obj/item) && !istype(AM, /obj/effect/dummy/chameleon))
+ return 0
+ else if(AM.density || AM.anchored)
+ return 0
+ AM.forceMove(src)
+ contained_mob = AM
+ name = "lazarus capsule - [AM.name]"
+ return 1
+
+/obj/item/device/mobcapsule/pickup(mob/user)
+ tripped = 0
+ capsuleowner = user
+
+/obj/item/device/mobcapsule/proc/dump_contents(mob/user)
+ /*
+ //Cham Projector Exception
+ for(var/obj/effect/dummy/chameleon/AD in src)
+ AD.forceMove(src.loc)
+ for(var/obj/O in src)
+ O.forceMove(src.loc)
+ for(var/mob/M in src)
+ M.forceMove(src.loc)
+ if(M.client)
+ M.client.eye = M.client.mob
+ M.client.perspective = MOB_PERSPECTIVE
+*/
+ if(contained_mob)
+ contained_mob.forceMove(src.loc)
+
+ var/turf/turf = get_turf(src)
+ log_attack("[key_name(user)] has released hostile mob [contained_mob] with a capsule in area [turf.loc] ([x],[y],[z]).")
+ contained_mob.attack_log += "\[[time_stamp()]\] Released by [key_name(user)] in area [turf.loc] ([x],[y],[z])."
+ user.attack_log += "\[[time_stamp()]\] Released hostile mob [contained_mob] in area [turf.loc] ([x],[y],[z])."
+ msg_admin_attack("[key_name(user)] has released hostile mob [contained_mob] with a capsule in area [turf.loc] ([x],[y],[z]) (JMP).")
+
+ if(contained_mob.client)
+ contained_mob.client.eye = contained_mob.client.mob
+ contained_mob.client.perspective = MOB_PERSPECTIVE
+ contained_mob = null
+ name = "lazarus capsule"
+
+/obj/item/device/mobcapsule/attack_self(mob/user)
+ colorindex += 1
+ if(colorindex >= 6)
+ colorindex = 0
+ icon_state = "mobcap[colorindex]"
+ update_icon()
+
+/obj/item/device/mobcapsule/proc/take_contents(mob/user)
+ for(var/mob/living/simple_animal/AM in src.loc)
+ if(istype(AM))
+ var/mob/living/simple_animal/M = AM
+ var/mob/living/simple_animal/hostile/H = M
+ if(!istype(H))
+ continue
+ for(var/things in H.friends)
+ if(capsuleowner in H.friends)
+ if(insert(AM, user) == -1) //Limit reached
+ break
From dff91189f670b92c9034defe71ddfd0d4e8ec98a Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Wed, 20 Mar 2019 15:15:15 +0100
Subject: [PATCH 2/6] Add files via upload
---
icons/obj/mobcap.dmi | Bin 0 -> 471 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 icons/obj/mobcap.dmi
diff --git a/icons/obj/mobcap.dmi b/icons/obj/mobcap.dmi
new file mode 100644
index 0000000000000000000000000000000000000000..c1be239e874f9c7f5c881e50db37b67362a218dc
GIT binary patch
literal 471
zcmV;|0Vw{7P))Gyl0EfGPk000DGTPE!Ct=GbNc004e^R9JLG
zWpiV4X>fFDZ*Bkpc$`yKaB_9`^iy#0_2eo`Eh^5;&r`5fFwryM;w;ZhDainGjE%TB
zGg33tGfE(w;*!LYR3K9+H$N#kvA{ryi!&v&s2C_>$iy{2`aD`2YX_-AP12R7l6|l`RefArOV(1`Pd|gIM2i
zf+k#`f&*aISE1{$mE5)rW`~-xS+j!YJ~A)lO$bkjp&dyAs8y_uLDkPf8w8F0ER8wX
zyHSjf?$PkcKNl_sXsy+30G)FUd+!&f8_9r-$-tQmxW!O2uz{L^Gi6u|P`6;9mxV?s
zdxp@
gqIL}3)pM@+ZLG|A4E%d117|Ye7DLUz`+zcVrVOJWMn4Sw=nG|tZ7uA!1tS0e
N002ovPDHLkV1hX1#v1?t
literal 0
HcmV?d00001
From cf16ff7c3140f2d60b0a615dd7e36bff52c0bf23 Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Wed, 20 Mar 2019 15:17:39 +0100
Subject: [PATCH 3/6] DME include
---
vorestation.dme | 1 +
1 file changed, 1 insertion(+)
diff --git a/vorestation.dme b/vorestation.dme
index 27160c0c14..fc1f9ef529 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -1874,6 +1874,7 @@
#include "code\modules\metric\department.dm"
#include "code\modules\metric\metric.dm"
#include "code\modules\mining\abandonedcrates.dm"
+#include "code\modules\mining\mobcapsule_ch.dm"
#include "code\modules\mining\abandonedcrates_vr.dm"
#include "code\modules\mining\alloys.dm"
#include "code\modules\mining\coins.dm"
From 47b0b50bc5df8f38a23925e337839559ba2afb72 Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Wed, 20 Mar 2019 15:32:05 +0100
Subject: [PATCH 4/6] Patch 1
---
code/modules/mining/mobcapsule_ch.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/modules/mining/mobcapsule_ch.dm b/code/modules/mining/mobcapsule_ch.dm
index ba6b9cdf0d..1d3765f580 100644
--- a/code/modules/mining/mobcapsule_ch.dm
+++ b/code/modules/mining/mobcapsule_ch.dm
@@ -44,8 +44,8 @@
if(istype(AM, /mob/living))
var/mob/living/L = AM
- if(L.locked_to)
- return 0
+ //if(L.locked_to)//locked_to doesnt seem to exist in our code/game/atoms_movable.dm
+ // return 0
if(L.client)
L.client.perspective = EYE_PERSPECTIVE
L.client.eye = src
From ddfc2e8b14f852073ce26cdd18c6193b2310abcc Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Wed, 20 Mar 2019 15:37:59 +0100
Subject: [PATCH 5/6] Update mobcapsule_ch.dm
---
code/modules/mining/mobcapsule_ch.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/modules/mining/mobcapsule_ch.dm b/code/modules/mining/mobcapsule_ch.dm
index 1d3765f580..af364b37a1 100644
--- a/code/modules/mining/mobcapsule_ch.dm
+++ b/code/modules/mining/mobcapsule_ch.dm
@@ -1,8 +1,8 @@
/*********************Mob Capsule*************************/
/obj/item/device/mobcapsule
- name = "lazarus capsule"
- desc = "It allows you to store and deploy lazarus-injected creatures easier."
+ name = "Morpheus capsule" //Whats a lazarus
+ desc = "It allows you to store and deploy Morpheus-injected creatures easier."
icon = 'icons/obj/mobcap.dmi'
icon_state = "mobcap0"
throwforce = 00
From 10871fec612d18df00453943375997b1be5fd05a Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Wed, 20 Mar 2019 15:48:29 +0100
Subject: [PATCH 6/6] Removed all instances of lazarus
Replaced with Morpheus
---
code/modules/mining/mobcapsule_ch.dm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/code/modules/mining/mobcapsule_ch.dm b/code/modules/mining/mobcapsule_ch.dm
index af364b37a1..073d215538 100644
--- a/code/modules/mining/mobcapsule_ch.dm
+++ b/code/modules/mining/mobcapsule_ch.dm
@@ -25,7 +25,7 @@
if(mname)
contained_mob.name = mname
to_chat(user, "Renaming successful, say hello to [contained_mob]!")
- name = "lazarus capsule - [mname]"
+ name = "Morpheus capsule - [mname]"
..()
/obj/item/device/mobcapsule/throw_impact(atom/A, speed, mob/user)
@@ -55,7 +55,7 @@
return 0
AM.forceMove(src)
contained_mob = AM
- name = "lazarus capsule - [AM.name]"
+ name = "Morpheus capsule - [AM.name]"
return 1
/obj/item/device/mobcapsule/pickup(mob/user)
@@ -88,7 +88,7 @@
contained_mob.client.eye = contained_mob.client.mob
contained_mob.client.perspective = MOB_PERSPECTIVE
contained_mob = null
- name = "lazarus capsule"
+ name = "Morpheus capsule"
/obj/item/device/mobcapsule/attack_self(mob/user)
colorindex += 1