mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Fix merge conflicts
🖕 map conflicts over lines that weren't even edited by both upstream
and this branch.
This commit is contained in:
@@ -427,7 +427,7 @@ steam.start() -- spawns the effect
|
||||
if(seed_name && plant_controller)
|
||||
seed = plant_controller.seeds[seed_name]
|
||||
if(!seed)
|
||||
del(src)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
//TODO: Flash range does nothing currently
|
||||
|
||||
//A very crude linear approximatiaon of pythagoras theorem.
|
||||
/proc/cheap_pythag(var/dx, var/dy)
|
||||
dx = abs(dx); dy = abs(dy);
|
||||
if(dx>=dy) return dx + (0.5*dy) //The longest side add half the shortest side approximates the hypotenuse
|
||||
else return dy + (0.5*dx)
|
||||
|
||||
/proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY processes turfs and thus less intensive)
|
||||
if(Center==null) return
|
||||
|
||||
@@ -73,10 +67,12 @@
|
||||
far_volume += (dist <= far_dist * 0.5 ? 50 : 0) // add 50 volume if the mob is pretty close to the explosion
|
||||
M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', far_volume, 1, frequency, falloff = 5)
|
||||
|
||||
|
||||
//Pause the lighting updates for a bit
|
||||
var/datum/controller/process/lighting = processScheduler.getProcess("lighting")
|
||||
lighting.disable()
|
||||
var/close = range(world.view+round(devastation_range,1), epicenter)
|
||||
// to all distanced mobs play a different sound
|
||||
for(var/mob/M in world) if(M.z == epicenter.z) if(!(M in close))
|
||||
// check if the mob can hear
|
||||
if(M.ear_deaf <= 0 || !M.ear_deaf) if(!istype(M.loc,/turf/space))
|
||||
M << 'sound/effects/explosionfar.ogg'
|
||||
|
||||
if(heavy_impact_range > 1)
|
||||
var/datum/effect/system/explosion/E = new/datum/effect/system/explosion()
|
||||
@@ -89,7 +85,7 @@
|
||||
|
||||
for(var/turf/T in trange(max_range, epicenter))
|
||||
|
||||
var/dist = cheap_pythag(T.x - x0,T.y - y0)
|
||||
var/dist = cheap_hypotenuse(T.x, T.y, x0, y0)
|
||||
|
||||
if(config.reactionary_explosions)
|
||||
var/turf/Trajectory = T
|
||||
@@ -103,7 +99,7 @@
|
||||
dist += D.explosion_block
|
||||
|
||||
var/flame_dist = 0
|
||||
var/throw_dist = max_range - dist
|
||||
// var/throw_dist = max_range - dist
|
||||
|
||||
if(dist < flame_range)
|
||||
flame_dist = 1
|
||||
@@ -125,7 +121,7 @@
|
||||
T.ex_act(dist)
|
||||
|
||||
//--- THROW ITEMS AROUND ---
|
||||
|
||||
/*
|
||||
if(throw_dist > 0)
|
||||
var/throw_dir = get_dir(epicenter,T)
|
||||
for(var/obj/item/I in T)
|
||||
@@ -135,8 +131,8 @@
|
||||
var/throw_range = round((throw_dist + 1) * throw_mult) // Roughly 50% to 100% of throw_dist
|
||||
if(throw_range > 0)
|
||||
var/turf/throw_at = get_ranged_target_turf(I, throw_dir, throw_range)
|
||||
I.throw_at(throw_at, throw_range, 2, no_spin = 1)//Throw it at 2 speed, this is purely visual anyway.
|
||||
|
||||
I.throw_at(throw_at, throw_range, 2, no_spin = 1) //Throw it at 2 speed, this is purely visual anyway; don't spin the thrown items, it's very costly.
|
||||
*/
|
||||
var/took = (world.timeofday-start)/10
|
||||
//You need to press the DebugGame verb to see these now....they were getting annoying and we've collected a fair bit of data. Just -test- changes to explosion code using this please so we can compare
|
||||
if(Debug2) world.log << "## DEBUG: Explosion([x0],[y0],[z0])(d[devastation_range],h[heavy_impact_range],l[light_impact_range]): Took [took] seconds."
|
||||
@@ -147,10 +143,6 @@
|
||||
if(Array)
|
||||
Array.sense_explosion(x0,y0,z0,devastation_range,heavy_impact_range,light_impact_range,took,orig_dev_range,orig_heavy_range,orig_light_range)
|
||||
|
||||
sleep(8)
|
||||
|
||||
lighting.enable()
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
@@ -199,7 +191,7 @@
|
||||
var/list/wipe_colours = list()
|
||||
for(var/turf/T in trange(max_range, epicenter))
|
||||
wipe_colours += T
|
||||
var/dist = cheap_pythag(T.x - x0, T.y - y0)
|
||||
var/dist = cheap_hypotenuse(T.x, T.y, x0, y0)
|
||||
|
||||
if(newmode == "Yes")
|
||||
var/turf/TT = T
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/w_class = 3.0
|
||||
var/slot_flags = 0 //This is used to determine on which slots an item can fit.
|
||||
pass_flags = PASSTABLE
|
||||
pressure_resistance = 5
|
||||
pressure_resistance = 3
|
||||
// causeerrorheresoifixthis
|
||||
var/obj/item/master = null
|
||||
|
||||
|
||||
@@ -82,12 +82,14 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/structure/closet/bodybag/update_icon()
|
||||
if(!opened)
|
||||
icon_state = icon_closed
|
||||
else
|
||||
icon_state = icon_opened
|
||||
/obj/structure/closet/body_bag/relaymove(mob/user as mob)
|
||||
if(user.stat)
|
||||
return
|
||||
|
||||
// Make it possible to escape from bodybags in morgues and crematoriums
|
||||
if(loc && (isturf(loc) || istype(loc, /obj/structure/morgue) || istype(loc, /obj/structure/crematorium)))
|
||||
if(!open())
|
||||
user << "<span class='notice'>It won't budge!</span>"
|
||||
|
||||
/obj/item/bodybag/cryobag
|
||||
name = "stasis bag"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
var/datum/data/record/active1 = null //General
|
||||
var/datum/data/record/active2 = null //Medical
|
||||
var/datum/data/record/active3 = null //Security
|
||||
var/obj/machinery/power/monitor/powmonitor = null // Power Monitor
|
||||
var/obj/machinery/computer/monitor/powmonitor = null // Power Monitor
|
||||
var/list/powermonitors = list()
|
||||
var/message1 // used for status_displays
|
||||
var/message2
|
||||
@@ -196,18 +196,18 @@
|
||||
access_reagent_scanner = 1
|
||||
access_status_display = 1
|
||||
access_atmos = 1
|
||||
|
||||
|
||||
/obj/item/weapon/cartridge/captain/New()
|
||||
..()
|
||||
spawn(5)
|
||||
radio = new /obj/item/radio/integrated/beepsky(src)
|
||||
|
||||
|
||||
/obj/item/weapon/cartridge/supervisor
|
||||
name = "Easy-Record DELUXE"
|
||||
icon_state = "cart-h"
|
||||
access_status_display = 1
|
||||
access_security = 1
|
||||
|
||||
|
||||
/obj/item/weapon/cartridge/centcom
|
||||
name = "Value-PAK Cartridge"
|
||||
desc = "Now with 200% more value!"
|
||||
@@ -220,7 +220,7 @@
|
||||
access_reagent_scanner = 1
|
||||
access_status_display = 1
|
||||
access_atmos = 1
|
||||
|
||||
|
||||
/obj/item/weapon/cartridge/centcom/New()
|
||||
..()
|
||||
spawn(5)
|
||||
@@ -294,7 +294,7 @@
|
||||
/* Power Monitor (Mode: 43 / 433) */
|
||||
if(mode==43 || mode==433)
|
||||
var/pMonData[0]
|
||||
for(var/obj/machinery/power/monitor/pMon in world)
|
||||
for(var/obj/machinery/computer/monitor/pMon in world)
|
||||
if(!(pMon.stat & (NOPOWER|BROKEN)) )
|
||||
pMonData[++pMonData.len] = list ("Name" = pMon.name, "ref" = "\ref[pMon]")
|
||||
if(isnull(powmonitor)) powmonitor = pMon
|
||||
|
||||
@@ -67,6 +67,8 @@
|
||||
|
||||
if( !H.shoes && ( !H.wear_suit || !(H.wear_suit.body_parts_covered & FEET) ) )
|
||||
var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
|
||||
if(!affecting)
|
||||
return
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
return
|
||||
H.Weaken(3)
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
usr.client.screen -= S
|
||||
S.dropped(usr)
|
||||
if(!S.amount)
|
||||
del S
|
||||
del(S)
|
||||
else
|
||||
S.loc = src
|
||||
|
||||
@@ -286,7 +286,7 @@
|
||||
N.amount = stacksize
|
||||
S.amount -= stacksize
|
||||
if(!S.amount)
|
||||
del S // todo: there's probably something missing here
|
||||
del(S) // todo: there's probably something missing here
|
||||
orient2hud(usr)
|
||||
if(usr.s_active)
|
||||
usr.s_active.show_to(usr)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
/obj/structure
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
pressure_resistance = 8
|
||||
var/climbable
|
||||
var/mob/climber
|
||||
|
||||
|
||||
@@ -188,6 +188,7 @@
|
||||
new /obj/item/weapon/storage/belt/security/sec(src)
|
||||
new /obj/item/clothing/mask/gas/sechailer(src)
|
||||
new /obj/item/clothing/glasses/sunglasses/sechud(src)
|
||||
new /obj/item/clothing/head/helmet(src)
|
||||
new /obj/item/weapon/melee/baton/loaded(src)
|
||||
new /obj/item/taperoll/police(src)
|
||||
return
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
icon = 'icons/obj/janitor.dmi'
|
||||
icon_state = "mopbucket"
|
||||
density = 1
|
||||
pressure_resistance = 5
|
||||
flags = OPENCONTAINER
|
||||
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
|
||||
|
||||
@@ -12,7 +11,7 @@
|
||||
var/datum/reagents/R = new/datum/reagents(100)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
|
||||
|
||||
/obj/structure/mopbucket/full/New()
|
||||
..()
|
||||
reagents.add_reagent("water", 100)
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
anchored = 1.0
|
||||
|
||||
/obj/structure/morgue/proc/update()
|
||||
if(src.connected)
|
||||
src.icon_state = "morgue0"
|
||||
if(connected)
|
||||
icon_state = "morgue0"
|
||||
else
|
||||
if(src.contents.len)
|
||||
if(contents.len)
|
||||
|
||||
var/mob/living/M = locate() in contents
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
var/mob/dead/observer/G = M.get_ghost()
|
||||
|
||||
if(M.client)
|
||||
src.icon_state = "morgue3"
|
||||
icon_state = "morgue3"
|
||||
else if(G && G.client) //There is a ghost and it is connected to the server
|
||||
src.icon_state = "morgue5"
|
||||
icon_state = "morgue5"
|
||||
else
|
||||
src.icon_state = "morgue2"
|
||||
icon_state = "morgue2"
|
||||
|
||||
else src.icon_state = "morgue4"
|
||||
else src.icon_state = "morgue1"
|
||||
else icon_state = "morgue4"
|
||||
else icon_state = "morgue1"
|
||||
return
|
||||
|
||||
|
||||
@@ -50,94 +50,99 @@
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/morgue/alter_health()
|
||||
return src.loc
|
||||
return loc
|
||||
|
||||
|
||||
/obj/structure/morgue/attack_hand(mob/user as mob)
|
||||
if (src.connected)
|
||||
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
||||
if (connected)
|
||||
for(var/atom/movable/A as mob|obj in connected.loc)
|
||||
if (!( A.anchored ))
|
||||
A.loc = src
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
//src.connected = null
|
||||
qdel(src.connected)
|
||||
A.forceMove(src)
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
qdel(connected)
|
||||
connected = null
|
||||
else
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
src.connected = new /obj/structure/m_tray( src.loc )
|
||||
step(src.connected, src.dir)
|
||||
src.connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, src.dir)
|
||||
if (T.contents.Find(src.connected))
|
||||
src.connected.connected = src
|
||||
src.icon_state = "morgue0"
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
connected = new /obj/structure/m_tray( loc )
|
||||
step(connected, dir)
|
||||
connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, dir)
|
||||
if (T.contents.Find(connected))
|
||||
connected.connected = src
|
||||
icon_state = "morgue0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.connected.loc
|
||||
src.connected.icon_state = "morguet"
|
||||
src.connected.dir = src.dir
|
||||
A.forceMove(connected.loc)
|
||||
connected.icon_state = "morguet"
|
||||
connected.dir = dir
|
||||
else
|
||||
//src.connected = null
|
||||
qdel(src.connected)
|
||||
src.add_fingerprint(user)
|
||||
qdel(connected)
|
||||
connected = null
|
||||
add_fingerprint(user)
|
||||
update()
|
||||
return
|
||||
|
||||
/obj/structure/morgue/attackby(P as obj, mob/user as mob, params)
|
||||
if (istype(P, /obj/item/weapon/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", name), null) as text
|
||||
if (user.get_active_hand() != P)
|
||||
return
|
||||
if ((!in_range(src, usr) && src.loc != user))
|
||||
if ((!in_range(src, usr) && loc != user))
|
||||
return
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
if (t)
|
||||
src.name = text("Morgue- '[]'", t)
|
||||
src.overlays += image(src.icon, "morgue_label")
|
||||
name = text("Morgue- '[]'", t)
|
||||
overlays += image(icon, "morgue_label")
|
||||
else
|
||||
src.name = "Morgue"
|
||||
src.overlays.Cut()
|
||||
src.add_fingerprint(user)
|
||||
name = "Morgue"
|
||||
overlays.Cut()
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/morgue/relaymove(mob/user as mob)
|
||||
if (user.stat)
|
||||
return
|
||||
src.connected = new /obj/structure/m_tray( src.loc )
|
||||
step(src.connected, EAST)
|
||||
src.connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, EAST)
|
||||
if (T.contents.Find(src.connected))
|
||||
src.connected.connected = src
|
||||
src.icon_state = "morgue0"
|
||||
connected = new /obj/structure/m_tray( loc )
|
||||
step(connected, dir)
|
||||
connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, dir)
|
||||
if (T.contents.Find(connected))
|
||||
connected.connected = src
|
||||
icon_state = "morgue0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.connected.loc
|
||||
//Foreach goto(106)
|
||||
src.connected.icon_state = "morguet"
|
||||
A.forceMove(connected.loc)
|
||||
connected.icon_state = "morguet"
|
||||
else
|
||||
//src.connected = null
|
||||
qdel(src.connected)
|
||||
qdel(connected)
|
||||
connected = null
|
||||
return
|
||||
|
||||
/obj/structure/morgue/Destroy()
|
||||
if(connected)
|
||||
qdel(connected)
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
|
||||
/*
|
||||
* Morgue tray
|
||||
@@ -155,15 +160,13 @@
|
||||
|
||||
|
||||
/obj/structure/m_tray/attack_hand(mob/user as mob)
|
||||
if (src.connected)
|
||||
for(var/atom/movable/A as mob|obj in src.loc)
|
||||
if (connected)
|
||||
for(var/atom/movable/A as mob|obj in loc)
|
||||
if (!( A.anchored ))
|
||||
A.loc = src.connected
|
||||
//Foreach goto(26)
|
||||
src.connected.connected = null
|
||||
src.connected.update()
|
||||
A.forceMove(connected)
|
||||
connected.connected = null
|
||||
connected.update()
|
||||
add_fingerprint(user)
|
||||
//SN src = null
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
@@ -175,13 +178,19 @@
|
||||
return
|
||||
if (!ismob(user) || user.stat || user.lying || user.stunned)
|
||||
return
|
||||
O.loc = src.loc
|
||||
O.forceMove(loc)
|
||||
if (user != O)
|
||||
for(var/mob/B in viewers(user, 3))
|
||||
if ((B.client && !( B.blinded )))
|
||||
B << text("\red [] stuffs [] into []!", user, O, src)
|
||||
return
|
||||
|
||||
/obj/structure/m_tray/Destroy()
|
||||
if(connected && connected.connected == src)
|
||||
connected.connected = null
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
|
||||
/*
|
||||
* Crematorium
|
||||
@@ -200,116 +209,106 @@
|
||||
var/locked = 0
|
||||
|
||||
/obj/structure/crematorium/proc/update()
|
||||
if (src.connected)
|
||||
src.icon_state = "crema0"
|
||||
if (connected)
|
||||
icon_state = "crema0"
|
||||
else
|
||||
if (src.contents.len)
|
||||
src.icon_state = "crema2"
|
||||
if (contents.len)
|
||||
icon_state = "crema2"
|
||||
else
|
||||
src.icon_state = "crema1"
|
||||
icon_state = "crema1"
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(50))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(5))
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.forceMove(loc)
|
||||
ex_act(severity)
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/alter_health()
|
||||
return src.loc
|
||||
return loc
|
||||
|
||||
|
||||
/obj/structure/crematorium/attack_hand(mob/user as mob)
|
||||
// if (cremating) AWW MAN! THIS WOULD BE SO MUCH MORE FUN ... TO WATCH
|
||||
// user.show_message("\red Uh-oh, that was a bad idea.", 1)
|
||||
// //usr << "Uh-oh, that was a bad idea."
|
||||
// src:loc:poison += 20000000
|
||||
// src:loc:firelevel = src:loc:poison
|
||||
// return
|
||||
if (cremating)
|
||||
usr << "\red It's locked."
|
||||
return
|
||||
if ((src.connected) && (src.locked == 0))
|
||||
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
||||
if ((connected) && (locked == 0))
|
||||
for(var/atom/movable/A as mob|obj in connected.loc)
|
||||
if (!( A.anchored ))
|
||||
A.loc = src
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
//src.connected = null
|
||||
qdel(src.connected)
|
||||
else if (src.locked == 0)
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
src.connected = new /obj/structure/c_tray( src.loc )
|
||||
step(src.connected, SOUTH)
|
||||
src.connected.layer = OBJ_LAYER
|
||||
A.forceMove(src)
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
qdel(connected)
|
||||
connected = null
|
||||
else if (locked == 0)
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
connected = new /obj/structure/c_tray( loc )
|
||||
step(connected, SOUTH)
|
||||
connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, SOUTH)
|
||||
if (T.contents.Find(src.connected))
|
||||
src.connected.connected = src
|
||||
src.icon_state = "crema0"
|
||||
if (T.contents.Find(connected))
|
||||
connected.connected = src
|
||||
icon_state = "crema0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.connected.loc
|
||||
src.connected.icon_state = "cremat"
|
||||
A.forceMove(connected.loc)
|
||||
connected.icon_state = "cremat"
|
||||
else
|
||||
//src.connected = null
|
||||
qdel(src.connected)
|
||||
src.add_fingerprint(user)
|
||||
qdel(connected)
|
||||
connected = null
|
||||
add_fingerprint(user)
|
||||
update()
|
||||
|
||||
/obj/structure/crematorium/attackby(P as obj, mob/user as mob, params)
|
||||
if (istype(P, /obj/item/weapon/pen))
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", src.name), null) as text
|
||||
var/t = input(user, "What would you like the label to be?", text("[]", name), null) as text
|
||||
if (user.get_active_hand() != P)
|
||||
return
|
||||
if ((!in_range(src, usr) > 1 && src.loc != user))
|
||||
if ((!in_range(src, usr) > 1 && loc != user))
|
||||
return
|
||||
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
|
||||
if (t)
|
||||
src.name = text("Crematorium- '[]'", t)
|
||||
name = text("Crematorium- '[]'", t)
|
||||
else
|
||||
src.name = "Crematorium"
|
||||
src.add_fingerprint(user)
|
||||
name = "Crematorium"
|
||||
add_fingerprint(user)
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/relaymove(mob/user as mob)
|
||||
if (user.stat || locked)
|
||||
return
|
||||
src.connected = new /obj/structure/c_tray( src.loc )
|
||||
step(src.connected, SOUTH)
|
||||
src.connected.layer = OBJ_LAYER
|
||||
connected = new /obj/structure/c_tray( loc )
|
||||
step(connected, SOUTH)
|
||||
connected.layer = OBJ_LAYER
|
||||
var/turf/T = get_step(src, SOUTH)
|
||||
if (T.contents.Find(src.connected))
|
||||
src.connected.connected = src
|
||||
src.icon_state = "crema0"
|
||||
if (T.contents.Find(connected))
|
||||
connected.connected = src
|
||||
icon_state = "crema0"
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.connected.loc
|
||||
//Foreach goto(106)
|
||||
src.connected.icon_state = "cremat"
|
||||
A.forceMove(connected.loc)
|
||||
connected.icon_state = "cremat"
|
||||
else
|
||||
//src.connected = null
|
||||
qdel(src.connected)
|
||||
qdel(connected)
|
||||
connected = null
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/proc/cremate(atom/A, mob/user as mob)
|
||||
// for(var/obj/machinery/crema_switch/O in src) //trying to figure a way to call the switch, too drunk to sort it out atm
|
||||
// if(var/on == 1)
|
||||
// return
|
||||
/obj/structure/crematorium/proc/cremate(mob/user as mob)
|
||||
if(cremating)
|
||||
return //don't let you cremate something twice or w/e
|
||||
|
||||
@@ -319,10 +318,10 @@
|
||||
return
|
||||
|
||||
else
|
||||
if(!isemptylist(src.search_contents_for(/obj/item/weapon/disk/nuclear)))
|
||||
if(!isemptylist(search_contents_for(/obj/item/weapon/disk/nuclear)))
|
||||
usr << "You get the feeling that you shouldn't cremate one of the items in the cremator."
|
||||
return
|
||||
if(!isemptylist(src.search_contents_for(/obj/item/flag/nation)))
|
||||
if(!isemptylist(search_contents_for(/obj/item/flag/nation)))
|
||||
usr << "You get the feeling that you shouldn't cremate one of the items in the cremator."
|
||||
return
|
||||
for (var/mob/M in viewers(src))
|
||||
@@ -332,13 +331,15 @@
|
||||
locked = 1
|
||||
icon_state = "crema_active"
|
||||
|
||||
for(var/mob/living/M in contents)
|
||||
for(var/mob/living/M in search_contents_for(/mob/living))
|
||||
if(!M || !isnull(M.gcDestroyed))
|
||||
continue
|
||||
if (M.stat!=2)
|
||||
M.emote("scream")
|
||||
//Logging for this causes runtimes resulting in the cremator locking up. Commenting it out until that's figured out.
|
||||
//M.attack_log += "\[[time_stamp()]\] Has been cremated by <b>[user]/[user.ckey]</b>" //No point in this when the mob's about to be deleted
|
||||
//user.attack_log +="\[[time_stamp()]\] Cremated <b>[M]/[M.ckey]</b>"
|
||||
//log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> cremated <b>[M]/[M.ckey]</b>")
|
||||
if(istype(user))
|
||||
M.attack_log += "\[[time_stamp()]\] <font color='orange'>Has been cremated by [user.name] ([user.ckey])</font>"
|
||||
user.attack_log +="\[[time_stamp()]\] <font color='red'>Cremated [M.name] ([M.ckey])</font>"
|
||||
log_attack("[user.name] ([user.ckey]) cremated [M.name] ([M.ckey])")
|
||||
M.death(1)
|
||||
M.ghostize()
|
||||
qdel(M)
|
||||
@@ -351,9 +352,15 @@
|
||||
cremating = 0
|
||||
locked = 0
|
||||
update()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
|
||||
return
|
||||
|
||||
/obj/structure/crematorium/Destroy()
|
||||
if(connected)
|
||||
qdel(connected)
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
|
||||
/*
|
||||
* Crematorium tray
|
||||
@@ -370,15 +377,14 @@
|
||||
throwpass = 1
|
||||
|
||||
/obj/structure/c_tray/attack_hand(mob/user as mob)
|
||||
if (src.connected)
|
||||
for(var/atom/movable/A as mob|obj in src.loc)
|
||||
if (connected)
|
||||
for(var/atom/movable/A as mob|obj in loc)
|
||||
if (!( A.anchored ))
|
||||
A.loc = src.connected
|
||||
A.forceMove(connected)
|
||||
//Foreach goto(26)
|
||||
src.connected.connected = null
|
||||
src.connected.update()
|
||||
connected.connected = null
|
||||
connected.update()
|
||||
add_fingerprint(user)
|
||||
//SN src = null
|
||||
qdel(src)
|
||||
return
|
||||
return
|
||||
@@ -390,7 +396,7 @@
|
||||
return
|
||||
if (!ismob(user) || user.stat || user.lying || user.stunned)
|
||||
return
|
||||
O.loc = src.loc
|
||||
O.forceMove(loc)
|
||||
if (user != O)
|
||||
for(var/mob/B in viewers(user, 3))
|
||||
if ((B.client && !( B.blinded )))
|
||||
@@ -398,8 +404,14 @@
|
||||
//Foreach goto(99)
|
||||
return
|
||||
|
||||
/obj/structure/c_tray/Destroy()
|
||||
if(connected && connected.connected == src)
|
||||
connected.connected = null
|
||||
connected = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/crema_switch/attack_hand(mob/user as mob)
|
||||
if(src.allowed(usr))
|
||||
if(allowed(usr))
|
||||
for (var/obj/structure/crematorium/C in world)
|
||||
if (C.id == id)
|
||||
if (!C.cremating)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "stool"
|
||||
anchored = 1.0
|
||||
pressure_resistance = 15
|
||||
|
||||
/obj/structure/stool/ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
Reference in New Issue
Block a user