Added Eigenlockers. I love them.

This commit is contained in:
Thalpy
2019-07-25 20:51:09 +01:00
parent 15ab1a26a4
commit 123c9199ba
2 changed files with 37 additions and 1 deletions
@@ -34,6 +34,8 @@
var/delivery_icon = "deliverycloset" //which icon to use when packagewrapped. null to be unwrappable.
var/anchorable = TRUE
var/icon_welded = "welded"
var/eigen_teleport = FALSE //If the closet leads to Mr Tumnus.
var/obj/structure/closet/eigen_target //Where you go to.
/obj/structure/closet/Initialize(mapload)
@@ -148,7 +150,12 @@
if(contents.len >= storage_capacity)
return -1
if(insertion_allowed(AM))
AM.forceMove(src)
if(eigen_teleport) // For teleporting people with linked lockers.
do_teleport(AM, get_turf(eigen_target), 0)
if(eigen_target.opened == FALSE)
eigen_target.open()
else
AM.forceMove(src)
return TRUE
else
return FALSE
@@ -171,4 +171,33 @@
SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "[id]_overdose")//holdover until above fix works
..()
/datum/reagent/fermi/eigenstate/reaction_turf(turf/T, reac_volume)
//if(cached_purity < 0.99) To add with next batch of fixes and tweaks.
var/obj/structure/closet/First
var/obj/structure/closet/Previous
for(var/obj/structure/closet/C in T.contents)
if(C.eigen_teleport == TRUE)
C.visible_message("[C] fizzes, it's already linked to something else!")
continue
if(!Previous)
First = C
Previous = C
continue
C.eigen_teleport = TRUE
C.eigen_target = Previous
C.color = "#9999FF" //Tint the locker slightly.
C.alpha = 200
do_sparks(5,FALSE,C)
Previous = C
if(!First)
return
if(Previous == First)
return
First.eigen_teleport = TRUE
First.eigen_target = Previous
First.color = "#9999FF"
First.alpha = 200
do_sparks(5,FALSE,First)
First.visible_message("The lockers' eigenstates spilt and merge, linking each of their contents together.")
//eigenstate END