mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fixed the map/code issues that the body bags caused.
/obj/effects is now /obj/effect. /obj/station_objects is now /obj/structure. Did a bit of minor blob work. The Bay 12 body bags were replaced with closets because having two sets of code that do almost the same thing is silly. Changed back a few of the last jobproc edits as the remove from list before assign was a check to see if the mob was fucked up and if it was remove it so we did not check it again as it would still be fucked up. The medbay/tox monkeys names are random once more. More random name monkeys will help with changeling and clean up the observe/mob menus. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2324 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
log_admin("[key_name(usr)] has left build mode.")
|
||||
M.client.buildmode = 0
|
||||
M.client.show_popup_menus = 1
|
||||
for(var/obj/effects/bmode/buildholder/H)
|
||||
for(var/obj/effect/bmode/buildholder/H)
|
||||
if(H.cl == M.client)
|
||||
del(H)
|
||||
else
|
||||
@@ -14,14 +14,14 @@
|
||||
M.client.buildmode = 1
|
||||
M.client.show_popup_menus = 0
|
||||
|
||||
var/obj/effects/bmode/buildholder/H = new/obj/effects/bmode/buildholder()
|
||||
var/obj/effects/bmode/builddir/A = new/obj/effects/bmode/builddir(H)
|
||||
var/obj/effect/bmode/buildholder/H = new/obj/effect/bmode/buildholder()
|
||||
var/obj/effect/bmode/builddir/A = new/obj/effect/bmode/builddir(H)
|
||||
A.master = H
|
||||
var/obj/effects/bmode/buildhelp/B = new/obj/effects/bmode/buildhelp(H)
|
||||
var/obj/effect/bmode/buildhelp/B = new/obj/effect/bmode/buildhelp(H)
|
||||
B.master = H
|
||||
var/obj/effects/bmode/buildmode/C = new/obj/effects/bmode/buildmode(H)
|
||||
var/obj/effect/bmode/buildmode/C = new/obj/effect/bmode/buildmode(H)
|
||||
C.master = H
|
||||
var/obj/effects/bmode/buildquit/D = new/obj/effects/bmode/buildquit(H)
|
||||
var/obj/effect/bmode/buildquit/D = new/obj/effect/bmode/buildquit(H)
|
||||
D.master = H
|
||||
|
||||
H.builddir = A
|
||||
@@ -34,15 +34,15 @@
|
||||
M.client.screen += D
|
||||
H.cl = M.client
|
||||
|
||||
/obj/effects/bmode//Cleaning up the tree a bit
|
||||
/obj/effect/bmode//Cleaning up the tree a bit
|
||||
density = 1
|
||||
anchored = 1
|
||||
layer = 20
|
||||
dir = NORTH
|
||||
icon = 'buildmode.dmi'
|
||||
var/obj/effects/bmode/buildholder/master = null
|
||||
var/obj/effect/bmode/buildholder/master = null
|
||||
|
||||
/obj/effects/bmode/builddir
|
||||
/obj/effect/bmode/builddir
|
||||
icon_state = "build"
|
||||
screen_loc = "NORTH,WEST"
|
||||
Click()
|
||||
@@ -59,7 +59,7 @@
|
||||
dir = NORTH
|
||||
return
|
||||
|
||||
/obj/effects/bmode/buildhelp
|
||||
/obj/effect/bmode/buildhelp
|
||||
icon = 'buildmode.dmi'
|
||||
icon_state = "buildhelp"
|
||||
screen_loc = "NORTH,WEST+1"
|
||||
@@ -97,29 +97,29 @@
|
||||
usr << "\blue ***********************************************************"
|
||||
return
|
||||
|
||||
/obj/effects/bmode/buildquit
|
||||
/obj/effect/bmode/buildquit
|
||||
icon_state = "buildquit"
|
||||
screen_loc = "NORTH,WEST+3"
|
||||
|
||||
Click()
|
||||
togglebuildmode(master.cl.mob)
|
||||
|
||||
/obj/effects/bmode/buildholder
|
||||
/obj/effect/bmode/buildholder
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/client/cl = null
|
||||
var/obj/effects/bmode/builddir/builddir = null
|
||||
var/obj/effects/bmode/buildhelp/buildhelp = null
|
||||
var/obj/effects/bmode/buildmode/buildmode = null
|
||||
var/obj/effects/bmode/buildquit/buildquit = null
|
||||
var/obj/effect/bmode/builddir/builddir = null
|
||||
var/obj/effect/bmode/buildhelp/buildhelp = null
|
||||
var/obj/effect/bmode/buildmode/buildmode = null
|
||||
var/obj/effect/bmode/buildquit/buildquit = null
|
||||
var/atom/movable/throw_atom = null
|
||||
|
||||
/obj/effects/bmode/buildmode
|
||||
/obj/effect/bmode/buildmode
|
||||
icon_state = "buildmode1"
|
||||
screen_loc = "NORTH,WEST+2"
|
||||
var/varholder = "name"
|
||||
var/valueholder = "derp"
|
||||
var/objholder = "/obj/station_objects/closet"
|
||||
var/objholder = "/obj/structure/closet"
|
||||
|
||||
Click(location, control, params)
|
||||
var/list/pa = params2list(params)
|
||||
@@ -144,13 +144,13 @@
|
||||
if(1)
|
||||
return
|
||||
if(2)
|
||||
objholder = input(usr,"Enter typepath:" ,"Typepath","/obj/station_objects/closet")
|
||||
var/list/removed_paths = list("/obj/effects/bhole")
|
||||
objholder = input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet")
|
||||
var/list/removed_paths = list("/obj/effect/bhole")
|
||||
if(objholder in removed_paths)
|
||||
alert("That path is not allowed.")
|
||||
objholder = "/obj/station_objects/closet"
|
||||
objholder = "/obj/structure/closet"
|
||||
else if (dd_hasprefix(objholder, "/mob") && !(usr.client.holder.rank in list("Game Master", "Game Admin", "Badmin")))
|
||||
objholder = "/obj/station_objects/closet"
|
||||
objholder = "/obj/structure/closet"
|
||||
if(3)
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine")
|
||||
|
||||
@@ -173,8 +173,8 @@
|
||||
|
||||
|
||||
/proc/build_click(var/mob/user, buildmode, location, control, params, var/obj/object)
|
||||
var/obj/effects/bmode/buildholder/holder = null
|
||||
for(var/obj/effects/bmode/buildholder/H)
|
||||
var/obj/effect/bmode/buildholder/holder = null
|
||||
for(var/obj/effect/bmode/buildholder/H)
|
||||
if(H.cl == user.client)
|
||||
holder = H
|
||||
break
|
||||
@@ -217,19 +217,19 @@
|
||||
else if(istype(object,/turf) && pa.Find("ctrl") && pa.Find("left"))
|
||||
switch(holder.builddir.dir)
|
||||
if(NORTH)
|
||||
var/obj/station_objects/window/reinforced/WIN = new/obj/station_objects/window/reinforced(get_turf(object))
|
||||
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
||||
WIN.dir = NORTH
|
||||
if(SOUTH)
|
||||
var/obj/station_objects/window/reinforced/WIN = new/obj/station_objects/window/reinforced(get_turf(object))
|
||||
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
||||
WIN.dir = SOUTH
|
||||
if(EAST)
|
||||
var/obj/station_objects/window/reinforced/WIN = new/obj/station_objects/window/reinforced(get_turf(object))
|
||||
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
||||
WIN.dir = EAST
|
||||
if(WEST)
|
||||
var/obj/station_objects/window/reinforced/WIN = new/obj/station_objects/window/reinforced(get_turf(object))
|
||||
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
||||
WIN.dir = WEST
|
||||
if(NORTHWEST)
|
||||
var/obj/station_objects/window/reinforced/WIN = new/obj/station_objects/window/reinforced(get_turf(object))
|
||||
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
||||
WIN.dir = NORTHWEST
|
||||
if(2)
|
||||
if(pa.Find("left"))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/effects/expl_particles
|
||||
/obj/effect/expl_particles
|
||||
name = "fire"
|
||||
icon = 'effects.dmi'
|
||||
icon_state = "explosion_particle"
|
||||
@@ -6,37 +6,37 @@
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/effects/expl_particles/New()
|
||||
/obj/effect/expl_particles/New()
|
||||
..()
|
||||
spawn (15)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/obj/effects/expl_particles/Move()
|
||||
/obj/effect/expl_particles/Move()
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/effects/system/expl_particles
|
||||
/datum/effect/system/expl_particles
|
||||
var/number = 10
|
||||
var/turf/location
|
||||
var/total_particles = 0
|
||||
|
||||
/datum/effects/system/expl_particles/proc/set_up(n = 10, loca)
|
||||
/datum/effect/system/expl_particles/proc/set_up(n = 10, loca)
|
||||
number = n
|
||||
if(istype(loca, /turf/)) location = loca
|
||||
else location = get_turf(loca)
|
||||
|
||||
/datum/effects/system/expl_particles/proc/start()
|
||||
/datum/effect/system/expl_particles/proc/start()
|
||||
var/i = 0
|
||||
for(i=0, i<src.number, i++)
|
||||
spawn(0)
|
||||
var/obj/effects/expl_particles/expl = new /obj/effects/expl_particles(src.location)
|
||||
var/obj/effect/expl_particles/expl = new /obj/effect/expl_particles(src.location)
|
||||
var/direct = pick(alldirs)
|
||||
for(i=0, i<pick(1;25,2;50,3,4;200), i++)
|
||||
sleep(1)
|
||||
step(expl,direct)
|
||||
|
||||
/obj/effects/explosion
|
||||
/obj/effect/explosion
|
||||
name = "fire"
|
||||
icon = '96x96.dmi'
|
||||
icon_state = "explosion"
|
||||
@@ -46,25 +46,25 @@
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
|
||||
/obj/effects/explosion/New()
|
||||
/obj/effect/explosion/New()
|
||||
..()
|
||||
spawn (10)
|
||||
del(src)
|
||||
return
|
||||
|
||||
/datum/effects/system/explosion
|
||||
/datum/effect/system/explosion
|
||||
var/turf/location
|
||||
|
||||
/datum/effects/system/explosion/proc/set_up(loca)
|
||||
/datum/effect/system/explosion/proc/set_up(loca)
|
||||
if(istype(loca, /turf/)) location = loca
|
||||
else location = get_turf(loca)
|
||||
|
||||
/datum/effects/system/explosion/proc/start()
|
||||
new/obj/effects/explosion( location )
|
||||
var/datum/effects/system/expl_particles/P = new/datum/effects/system/expl_particles()
|
||||
/datum/effect/system/explosion/proc/start()
|
||||
new/obj/effect/explosion( location )
|
||||
var/datum/effect/system/expl_particles/P = new/datum/effect/system/expl_particles()
|
||||
P.set_up(10,location)
|
||||
P.start()
|
||||
spawn(5)
|
||||
var/datum/effects/system/harmless_smoke_spread/S = new/datum/effects/system/harmless_smoke_spread()
|
||||
var/datum/effect/system/harmless_smoke_spread/S = new/datum/effect/system/harmless_smoke_spread()
|
||||
S.set_up(5,0,location,null)
|
||||
S.start()
|
||||
@@ -4,15 +4,15 @@
|
||||
#define CYBER 1
|
||||
#define SPELL 2
|
||||
|
||||
/obj/effects/organstructure //used obj for the "contents" var
|
||||
/obj/effect/organstructure //used obj for the "contents" var
|
||||
name = "organs"
|
||||
|
||||
var/obj/item/weapon/cell/mainPowerCell = null //for ease of refernce for installed c. implants
|
||||
var/species = "mob" //for speaking in unknown languages purposes
|
||||
|
||||
var/obj/effects/organ/limb/arms/arms = null
|
||||
var/obj/effects/organ/limb/legs/legs = null
|
||||
var/obj/effects/organ/chest/chest = null
|
||||
var/obj/effect/organ/limb/arms/arms = null
|
||||
var/obj/effect/organ/limb/legs/legs = null
|
||||
var/obj/effect/organ/chest/chest = null
|
||||
|
||||
proc/FindMainPowercell()
|
||||
if(chest) //priority goes to chest implant, if there is one
|
||||
@@ -20,7 +20,7 @@
|
||||
mainPowerCell = chest.cell
|
||||
return
|
||||
var/list/organs = GetAllContents()
|
||||
for(var/obj/effects/organ/otherOrgan in organs) //otherwise, maybe some other organ fits the criteria?
|
||||
for(var/obj/effect/organ/otherOrgan in organs) //otherwise, maybe some other organ fits the criteria?
|
||||
if((otherOrgan.organType & CYBER) && otherOrgan.canExportPower && otherOrgan.cell)
|
||||
mainPowerCell = otherOrgan:cell
|
||||
return
|
||||
@@ -30,7 +30,7 @@
|
||||
proc/GetSpeciesName()
|
||||
var/list/speciesPresent = list()
|
||||
|
||||
for(var/obj/effects/organ/organ in src) //only external organs count, since it's judging by the appearance
|
||||
for(var/obj/effect/organ/organ in src) //only external organs count, since it's judging by the appearance
|
||||
if(speciesPresent[organ.species])
|
||||
speciesPresent[organ.species]++
|
||||
else
|
||||
@@ -57,9 +57,9 @@
|
||||
proc/RecalculateStructure()
|
||||
var/list/organs = GetAllContents()
|
||||
|
||||
arms = locate(/obj/effects/organ/limb/arms) in organs
|
||||
legs = locate(/obj/effects/organ/limb/legs) in organs
|
||||
chest = locate(/obj/effects/organ/chest) in organs
|
||||
arms = locate(/obj/effect/organ/limb/arms) in organs
|
||||
legs = locate(/obj/effect/organ/limb/legs) in organs
|
||||
chest = locate(/obj/effect/organ/chest) in organs
|
||||
|
||||
GetSpeciesName()
|
||||
FindMainPowercell()
|
||||
@@ -70,7 +70,7 @@
|
||||
set background = 1
|
||||
|
||||
var/list/organs = GetAllContents()
|
||||
for(var/obj/effects/organ/organ in organs)
|
||||
for(var/obj/effect/organ/organ in organs)
|
||||
organ.ProcessOrgan()
|
||||
|
||||
return
|
||||
@@ -79,31 +79,31 @@
|
||||
..()
|
||||
RecalculateStructure()
|
||||
|
||||
/obj/effects/organstructure/human
|
||||
/obj/effect/organstructure/human
|
||||
name = "human organs"
|
||||
|
||||
New()
|
||||
//new /obj/effects/organ/limb/arms/human(src)
|
||||
//new /obj/effects/organ/limb/legs/human(src)
|
||||
new /obj/effects/organ/chest/human(src)
|
||||
//new /obj/effect/organ/limb/arms/human(src)
|
||||
//new /obj/effect/organ/limb/legs/human(src)
|
||||
new /obj/effect/organ/chest/human(src)
|
||||
..()
|
||||
|
||||
/obj/effects/organstructure/cyber
|
||||
/obj/effect/organstructure/cyber
|
||||
name = "cyborg organs"
|
||||
|
||||
New()
|
||||
//new /obj/effects/organ/limb/arms/cyber(src)
|
||||
//new /obj/effects/organ/limb/legs/cyber(src)
|
||||
new /obj/effects/organ/chest/cyber(src)
|
||||
//new /obj/effect/organ/limb/arms/cyber(src)
|
||||
//new /obj/effect/organ/limb/legs/cyber(src)
|
||||
new /obj/effect/organ/chest/cyber(src)
|
||||
..()
|
||||
|
||||
/obj/effects/organ
|
||||
/obj/effect/organ
|
||||
name = "organ"
|
||||
|
||||
//All types
|
||||
var/organType = 0 //CYBER and SPELL go here
|
||||
var/species = "mob"
|
||||
var/obj/effects/organstructure/rootOrganStructure = null
|
||||
var/obj/effect/organstructure/rootOrganStructure = null
|
||||
|
||||
New(location)
|
||||
..()
|
||||
@@ -111,10 +111,10 @@
|
||||
rootOrganStructure = FindRootStructure()
|
||||
|
||||
proc/FindRootStructure()
|
||||
if(istype(loc,/obj/effects/organ))
|
||||
var/obj/effects/organ/parent = loc
|
||||
if(istype(loc,/obj/effect/organ))
|
||||
var/obj/effect/organ/parent = loc
|
||||
return parent.FindRootStructure()
|
||||
else if(istype(loc,/obj/effects/organstructure))
|
||||
else if(istype(loc,/obj/effect/organstructure))
|
||||
return loc
|
||||
return null
|
||||
|
||||
@@ -159,23 +159,23 @@
|
||||
active = 0
|
||||
return
|
||||
|
||||
/obj/effects/organ/limb
|
||||
/obj/effect/organ/limb
|
||||
name = "limb"
|
||||
|
||||
/obj/effects/organ/limb/arms
|
||||
/obj/effect/organ/limb/arms
|
||||
name = "arms"
|
||||
|
||||
var/minDamage = 5 //punching damage
|
||||
var/maxDamage = 5
|
||||
// var/strangleDelay = 1 //The code is a bit too complicated for that right now
|
||||
|
||||
/obj/effects/organ/limb/arms/human
|
||||
/obj/effect/organ/limb/arms/human
|
||||
name = "human arms"
|
||||
species = "human"
|
||||
minDamage = 1
|
||||
maxDamage = 9
|
||||
|
||||
/obj/effects/organ/limb/arms/cyber
|
||||
/obj/effect/organ/limb/arms/cyber
|
||||
name = "cyborg arms"
|
||||
species = "cyborg"
|
||||
organType = CYBER
|
||||
@@ -192,18 +192,18 @@
|
||||
maxDamage = 3
|
||||
|
||||
|
||||
/obj/effects/organ/limb/legs
|
||||
/obj/effect/organ/limb/legs
|
||||
name = "legs"
|
||||
|
||||
var/moveRunDelay = 1 //not sure about how that works
|
||||
var/moveWalkDelay = 7
|
||||
//var/knockdownResist = 0
|
||||
|
||||
/obj/effects/organ/limb/legs/human
|
||||
/obj/effect/organ/limb/legs/human
|
||||
name = "human legs"
|
||||
species = "human"
|
||||
|
||||
/obj/effects/organ/limb/legs/cyber
|
||||
/obj/effect/organ/limb/legs/cyber
|
||||
name = "cyborg legs"
|
||||
species = "cyborg"
|
||||
organType = CYBER
|
||||
@@ -220,21 +220,21 @@
|
||||
moveWalkDelay = 10
|
||||
|
||||
|
||||
/obj/effects/organ/chest
|
||||
/obj/effect/organ/chest
|
||||
name = "chest"
|
||||
var/maxHealth = 50 //right now, the mob's (only humans for now) health depends only on it. Will be fixed later
|
||||
|
||||
/obj/effects/organ/chest/human
|
||||
/obj/effect/organ/chest/human
|
||||
name = "human chest"
|
||||
species = "human"
|
||||
maxHealth = 100
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/effects/organ/limb/arms/human(src)
|
||||
new /obj/effects/organ/limb/legs/human(src)
|
||||
new /obj/effect/organ/limb/arms/human(src)
|
||||
new /obj/effect/organ/limb/legs/human(src)
|
||||
|
||||
/obj/effects/organ/chest/cyber
|
||||
/obj/effect/organ/chest/cyber
|
||||
name = "cyborg chest"
|
||||
species = "cyborg"
|
||||
organType = CYBER
|
||||
@@ -245,8 +245,8 @@
|
||||
..()
|
||||
cell = new /obj/item/weapon/cell/high(src)
|
||||
cell.charge = cell.maxcharge
|
||||
new /obj/effects/organ/limb/arms/cyber(src)
|
||||
new /obj/effects/organ/limb/legs/cyber(src)
|
||||
new /obj/effect/organ/limb/arms/cyber(src)
|
||||
new /obj/effect/organ/limb/legs/cyber(src)
|
||||
|
||||
Activate()
|
||||
..()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Disposal pipe construction
|
||||
|
||||
/obj/station_objects/disposalconstruct
|
||||
/obj/structure/disposalconstruct
|
||||
|
||||
name = "disposal pipe segment"
|
||||
desc = "A huge pipe segment used for constructing disposal systems."
|
||||
@@ -88,11 +88,11 @@
|
||||
proc/dpipetype()
|
||||
switch(ptype)
|
||||
if(0,1)
|
||||
return /obj/station_objects/disposalpipe/segment
|
||||
return /obj/structure/disposalpipe/segment
|
||||
if(2,3,4)
|
||||
return /obj/station_objects/disposalpipe/junction
|
||||
return /obj/structure/disposalpipe/junction
|
||||
if(5)
|
||||
return /obj/station_objects/disposalpipe/trunk
|
||||
return /obj/structure/disposalpipe/trunk
|
||||
return
|
||||
|
||||
|
||||
@@ -107,11 +107,11 @@
|
||||
user << "You can only attach the pipe if the floor plating is removed."
|
||||
return
|
||||
|
||||
var/obj/station_objects/disposalpipe/CP = locate() in T
|
||||
var/obj/structure/disposalpipe/CP = locate() in T
|
||||
if(CP)
|
||||
update()
|
||||
var/pdir = CP.dpdir
|
||||
if(istype(CP, /obj/station_objects/disposalpipe/broken))
|
||||
if(istype(CP, /obj/structure/disposalpipe/broken))
|
||||
pdir = CP.dir
|
||||
if(pdir & dpdir)
|
||||
user << "There is already a pipe at that location."
|
||||
@@ -139,7 +139,7 @@
|
||||
if(do_after(user, 20))
|
||||
update()
|
||||
var/pipetype = dpipetype()
|
||||
var/obj/station_objects/disposalpipe/P = new pipetype(src.loc)
|
||||
var/obj/structure/disposalpipe/P = new pipetype(src.loc)
|
||||
P.base_icon_state = base_state
|
||||
P.dir = dir
|
||||
P.dpdir = dpdir
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/datum/gas_mixture/air_contents // internal reservoir
|
||||
var/mode = 1 // item mode 0=off 1=charging 2=charged
|
||||
var/flush = 0 // true if flush handle is pulled
|
||||
var/obj/station_objects/disposalpipe/trunk/trunk = null // the attached pipe trunk
|
||||
var/obj/structure/disposalpipe/trunk/trunk = null // the attached pipe trunk
|
||||
var/flushing = 0 // true if flushing in progress
|
||||
|
||||
// create a new disposal
|
||||
@@ -307,7 +307,7 @@
|
||||
flushing = 1
|
||||
flick("disposal-flush", src)
|
||||
|
||||
var/obj/station_objects/disposalholder/H = new() // virtual holder object which actually
|
||||
var/obj/structure/disposalholder/H = new() // virtual holder object which actually
|
||||
// travels through the pipes.
|
||||
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
|
||||
// called when holder is expelled from a disposal
|
||||
// should usually only occur if the pipe network is modified
|
||||
proc/expel(var/obj/station_objects/disposalholder/H)
|
||||
proc/expel(var/obj/structure/disposalholder/H)
|
||||
|
||||
var/turf/target
|
||||
playsound(src, 'hiss.ogg', 50, 0, 0)
|
||||
@@ -432,7 +432,7 @@
|
||||
|
||||
flush()
|
||||
flick("toilet-flush", src)
|
||||
var/obj/station_objects/disposalholder/H = new()
|
||||
var/obj/structure/disposalholder/H = new()
|
||||
H.init(src)
|
||||
sleep(10)
|
||||
playsound(src, 'disposalflush.ogg', 50, 0, 0)
|
||||
@@ -447,7 +447,7 @@
|
||||
// contents will be items flushed by the disposal
|
||||
// this allows the gas flushed to be tracked
|
||||
|
||||
/obj/station_objects/disposalholder
|
||||
/obj/structure/disposalholder
|
||||
invisibility = 101
|
||||
var/datum/gas_mixture/gas = null // gas used to flush, will appear at exit point
|
||||
var/active = 0 // true if the holder is moving, otherwise inactive
|
||||
@@ -470,8 +470,8 @@
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(H.mutations & FAT) // is a human and fat?
|
||||
has_fat_guy = 1 // set flag on holder
|
||||
if(istype(AM, /obj/effects/bigDelivery))
|
||||
var/obj/effects/bigDelivery/T = AM
|
||||
if(istype(AM, /obj/effect/bigDelivery))
|
||||
var/obj/effect/bigDelivery/T = AM
|
||||
src.destinationTag = T.sortTag
|
||||
if(istype(AM, /obj/item/smallDelivery))
|
||||
var/obj/item/smallDelivery/T = AM
|
||||
@@ -495,7 +495,7 @@
|
||||
|
||||
// movement process, persists while holder is moving through pipes
|
||||
process()
|
||||
var/obj/station_objects/disposalpipe/last
|
||||
var/obj/structure/disposalpipe/last
|
||||
while(active)
|
||||
if(has_fat_guy && prob(2)) // chance of becoming stuck per segment if contains a fat guy
|
||||
active = 0
|
||||
@@ -504,7 +504,7 @@
|
||||
|
||||
break
|
||||
sleep(1) // was 1
|
||||
var/obj/station_objects/disposalpipe/curr = loc
|
||||
var/obj/structure/disposalpipe/curr = loc
|
||||
last = curr
|
||||
curr = curr.transfer(src)
|
||||
if(!curr)
|
||||
@@ -528,7 +528,7 @@
|
||||
return null
|
||||
|
||||
var/fdir = turn(dir, 180) // flip the movement direction
|
||||
for(var/obj/station_objects/disposalpipe/P in T)
|
||||
for(var/obj/structure/disposalpipe/P in T)
|
||||
if(fdir & P.dpdir) // find pipe direction mask that matches flipped dir
|
||||
return P
|
||||
// if no matching pipe, return null
|
||||
@@ -536,7 +536,7 @@
|
||||
|
||||
// merge two holder objects
|
||||
// used when a a holder meets a stuck holder
|
||||
proc/merge(var/obj/station_objects/disposalholder/other)
|
||||
proc/merge(var/obj/structure/disposalholder/other)
|
||||
for(var/atom/movable/AM in other)
|
||||
AM.loc = src // move everything in other holder to this one
|
||||
if(ismob(AM))
|
||||
@@ -566,7 +566,7 @@
|
||||
|
||||
// Disposal pipes
|
||||
|
||||
/obj/station_objects/disposalpipe
|
||||
/obj/structure/disposalpipe
|
||||
icon = 'disposal.dmi'
|
||||
name = "disposal pipe"
|
||||
desc = "An underfloor disposal pipe."
|
||||
@@ -590,7 +590,7 @@
|
||||
// pipe is deleted
|
||||
// ensure if holder is present, it is expelled
|
||||
Del()
|
||||
var/obj/station_objects/disposalholder/H = locate() in src
|
||||
var/obj/structure/disposalholder/H = locate() in src
|
||||
if(H)
|
||||
// holder was present
|
||||
H.active = 0
|
||||
@@ -618,15 +618,15 @@
|
||||
// transfer the holder through this pipe segment
|
||||
// overriden for special behaviour
|
||||
//
|
||||
proc/transfer(var/obj/station_objects/disposalholder/H)
|
||||
proc/transfer(var/obj/structure/disposalholder/H)
|
||||
var/nextdir = nextdir(H.dir)
|
||||
H.dir = nextdir
|
||||
var/turf/T = H.nextloc()
|
||||
var/obj/station_objects/disposalpipe/P = H.findpipe(T)
|
||||
var/obj/structure/disposalpipe/P = H.findpipe(T)
|
||||
|
||||
if(P)
|
||||
// find other holder in next loc, if inactive merge it with current
|
||||
var/obj/station_objects/disposalholder/H2 = locate() in P
|
||||
var/obj/structure/disposalholder/H2 = locate() in P
|
||||
if(H2 && !H2.active)
|
||||
H.merge(H2)
|
||||
|
||||
@@ -665,7 +665,7 @@
|
||||
// called when there is a break in the pipe
|
||||
//
|
||||
|
||||
proc/expel(var/obj/station_objects/disposalholder/H, var/turf/T, var/direction)
|
||||
proc/expel(var/obj/structure/disposalholder/H, var/turf/T, var/direction)
|
||||
|
||||
var/turf/target
|
||||
|
||||
@@ -723,11 +723,11 @@
|
||||
if(remains)
|
||||
for(var/D in cardinal)
|
||||
if(D & dpdir)
|
||||
var/obj/station_objects/disposalpipe/broken/P = new(src.loc)
|
||||
var/obj/structure/disposalpipe/broken/P = new(src.loc)
|
||||
P.dir = D
|
||||
|
||||
src.invisibility = 101 // make invisible (since we won't delete the pipe immediately)
|
||||
var/obj/station_objects/disposalholder/H = locate() in src
|
||||
var/obj/structure/disposalholder/H = locate() in src
|
||||
if(H)
|
||||
// holder was present
|
||||
H.active = 0
|
||||
@@ -807,7 +807,7 @@
|
||||
// called when pipe is cut with welder
|
||||
proc/welded()
|
||||
|
||||
var/obj/station_objects/disposalconstruct/C = new (src.loc)
|
||||
var/obj/structure/disposalconstruct/C = new (src.loc)
|
||||
switch(base_icon_state)
|
||||
if("pipe-s")
|
||||
C.ptype = 0
|
||||
@@ -829,11 +829,11 @@
|
||||
|
||||
// *** TEST verb
|
||||
//client/verb/dispstop()
|
||||
// for(var/obj/station_objects/disposalholder/H in world)
|
||||
// for(var/obj/structure/disposalholder/H in world)
|
||||
// H.active = 0
|
||||
|
||||
// a straight or bent segment
|
||||
/obj/station_objects/disposalpipe/segment
|
||||
/obj/structure/disposalpipe/segment
|
||||
icon_state = "pipe-s"
|
||||
|
||||
New()
|
||||
@@ -850,7 +850,7 @@
|
||||
|
||||
|
||||
//a three-way junction with dir being the dominant direction
|
||||
/obj/station_objects/disposalpipe/junction
|
||||
/obj/structure/disposalpipe/junction
|
||||
icon_state = "pipe-j1"
|
||||
|
||||
New()
|
||||
@@ -894,7 +894,7 @@
|
||||
return mask & (~setbit)
|
||||
|
||||
//a three-way junction that sorts objects
|
||||
/obj/station_objects/disposalpipe/sortjunction
|
||||
/obj/structure/disposalpipe/sortjunction
|
||||
|
||||
desc = "An underfloor disposal pipe with a package sorting mechanism."
|
||||
icon_state = "pipe-j1s"
|
||||
@@ -936,15 +936,15 @@
|
||||
// so go with the flow to positive direction
|
||||
return posdir
|
||||
|
||||
transfer(var/obj/station_objects/disposalholder/H)
|
||||
transfer(var/obj/structure/disposalholder/H)
|
||||
var/nextdir = nextdir(H.dir, H.destinationTag)
|
||||
H.dir = nextdir
|
||||
var/turf/T = H.nextloc()
|
||||
var/obj/station_objects/disposalpipe/P = H.findpipe(T)
|
||||
var/obj/structure/disposalpipe/P = H.findpipe(T)
|
||||
|
||||
if(P)
|
||||
// find other holder in next loc, if inactive merge it with current
|
||||
var/obj/station_objects/disposalholder/H2 = locate() in P
|
||||
var/obj/structure/disposalholder/H2 = locate() in P
|
||||
if(H2 && !H2.active)
|
||||
H.merge(H2)
|
||||
|
||||
@@ -960,7 +960,7 @@
|
||||
|
||||
|
||||
//a trunk joining to a disposal bin or outlet on the same turf
|
||||
/obj/station_objects/disposalpipe/trunk
|
||||
/obj/structure/disposalpipe/trunk
|
||||
icon_state = "pipe-t"
|
||||
var/obj/linked // the linked obj/machinery/disposal or obj/disposaloutlet
|
||||
|
||||
@@ -981,7 +981,7 @@
|
||||
if (!D.trunk)
|
||||
D.trunk = src
|
||||
|
||||
var/obj/station_objects/disposaloutlet/O = locate() in src.loc
|
||||
var/obj/structure/disposaloutlet/O = locate() in src.loc
|
||||
if(O)
|
||||
linked = O
|
||||
|
||||
@@ -992,13 +992,13 @@
|
||||
// if not entering from disposal bin,
|
||||
// transfer to linked object (outlet or bin)
|
||||
|
||||
transfer(var/obj/station_objects/disposalholder/H)
|
||||
transfer(var/obj/structure/disposalholder/H)
|
||||
|
||||
if(H.dir == DOWN) // we just entered from a disposer
|
||||
return ..() // so do base transfer proc
|
||||
// otherwise, go to the linked object
|
||||
if(linked)
|
||||
var/obj/station_objects/disposaloutlet/O = linked
|
||||
var/obj/structure/disposaloutlet/O = linked
|
||||
if(istype(O))
|
||||
O.expel(H) // expel at outlet
|
||||
else
|
||||
@@ -1017,7 +1017,7 @@
|
||||
return 0
|
||||
|
||||
// a broken pipe
|
||||
/obj/station_objects/disposalpipe/broken
|
||||
/obj/structure/disposalpipe/broken
|
||||
icon_state = "pipe-b"
|
||||
dpdir = 0 // broken pipes have dpdir=0 so they're not found as 'real' pipes
|
||||
// i.e. will be treated as an empty turf
|
||||
@@ -1038,7 +1038,7 @@
|
||||
|
||||
// the disposal outlet machine
|
||||
|
||||
/obj/station_objects/disposaloutlet
|
||||
/obj/structure/disposaloutlet
|
||||
name = "disposal outlet"
|
||||
desc = "An outlet for the pneumatic disposal system."
|
||||
icon = 'disposal.dmi'
|
||||
@@ -1056,7 +1056,7 @@
|
||||
|
||||
// expel the contents of the holder object, then delete it
|
||||
// called when the holder exits the outlet
|
||||
proc/expel(var/obj/station_objects/disposalholder/H)
|
||||
proc/expel(var/obj/structure/disposalholder/H)
|
||||
|
||||
flick("outlet-open", src)
|
||||
playsound(src, 'warning-buzzer.ogg', 50, 0, 0)
|
||||
@@ -1091,7 +1091,7 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/effects/decal/cleanable/blood/gibs/pipe_eject(var/direction)
|
||||
/obj/effect/decal/cleanable/blood/gibs/pipe_eject(var/direction)
|
||||
var/list/dirs
|
||||
if(direction)
|
||||
dirs = list( direction, turn(direction, -45), turn(direction, 45))
|
||||
@@ -1100,7 +1100,7 @@
|
||||
|
||||
src.streak(dirs)
|
||||
|
||||
/obj/effects/decal/cleanable/robot_debris/gib/pipe_eject(var/direction)
|
||||
/obj/effect/decal/cleanable/robot_debris/gib/pipe_eject(var/direction)
|
||||
var/list/dirs
|
||||
if(direction)
|
||||
dirs = list( direction, turn(direction, -45), turn(direction, 45))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/effects/bigDelivery
|
||||
/obj/effect/bigDelivery
|
||||
desc = "A big wrapped package."
|
||||
name = "large parcel"
|
||||
icon = 'storage.dmi'
|
||||
@@ -13,8 +13,8 @@
|
||||
attack_hand(mob/user as mob)
|
||||
if (src.wrapped) //sometimes items can disappear. For example, bombs. --rastaf0
|
||||
src.wrapped.loc = (get_turf(src.loc))
|
||||
if (istype(src.wrapped,/obj/station_objects/closet))
|
||||
var/obj/station_objects/closet/O = src.wrapped
|
||||
if (istype(src.wrapped,/obj/structure/closet))
|
||||
var/obj/structure/closet/O = src.wrapped
|
||||
O.welded = 0
|
||||
del(src)
|
||||
return
|
||||
@@ -70,19 +70,19 @@
|
||||
P.wrapped = O
|
||||
O.loc = P
|
||||
src.amount -= 1
|
||||
else if (istype(target, /obj/station_objects/crate))
|
||||
var/obj/station_objects/crate/O = target
|
||||
else if (istype(target, /obj/structure/crate))
|
||||
var/obj/structure/crate/O = target
|
||||
if (src.amount > 3)
|
||||
var/obj/effects/bigDelivery/P = new /obj/effects/bigDelivery(get_turf(O.loc))
|
||||
var/obj/effect/bigDelivery/P = new /obj/effect/bigDelivery(get_turf(O.loc))
|
||||
P.wrapped = O
|
||||
O.loc = P
|
||||
src.amount -= 3
|
||||
else
|
||||
user << "\blue You need more paper."
|
||||
else if (istype (target, /obj/station_objects/closet))
|
||||
var/obj/station_objects/closet/O = target
|
||||
else if (istype (target, /obj/structure/closet))
|
||||
var/obj/structure/closet/O = target
|
||||
if (src.amount > 3)
|
||||
var/obj/effects/bigDelivery/P = new /obj/effects/bigDelivery(get_turf(O.loc))
|
||||
var/obj/effect/bigDelivery/P = new /obj/effect/bigDelivery(get_turf(O.loc))
|
||||
P.wrapped = O
|
||||
O.close()
|
||||
O.welded = 1
|
||||
@@ -149,9 +149,9 @@
|
||||
user << "/blue You can only tag properly wrapped delivery packages!"
|
||||
*/
|
||||
attack(target as obj, mob/user as mob)
|
||||
if (istype(target, /obj/effects/bigDelivery))
|
||||
if (istype(target, /obj/effect/bigDelivery))
|
||||
user << "\blue *TAGGED*"
|
||||
var/obj/effects/bigDelivery/O = target
|
||||
var/obj/effect/bigDelivery/O = target
|
||||
O.sortTag = src.currTag
|
||||
else if (istype(target, /obj/item/smallDelivery))
|
||||
user << "\blue *TAGGED*"
|
||||
@@ -183,9 +183,9 @@
|
||||
flushing = 1
|
||||
flick("intake-closing", src)
|
||||
var/deliveryCheck = 0
|
||||
var/obj/station_objects/disposalholder/H = new() // virtual holder object which actually
|
||||
var/obj/structure/disposalholder/H = new() // virtual holder object which actually
|
||||
// travels through the pipes.
|
||||
for(var/obj/effects/bigDelivery/O in src)
|
||||
for(var/obj/effect/bigDelivery/O in src)
|
||||
deliveryCheck = 1
|
||||
if(O.sortTag == 0)
|
||||
O.sortTag = 1
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if(do_after(user, 20))
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/station_objects/computerframe/A = new /obj/station_objects/computerframe( src.loc )
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
var/obj/item/weapon/circuitboard/curer/M = new /obj/item/weapon/circuitboard/curer( A )
|
||||
for (var/obj/C in src)
|
||||
@@ -29,7 +29,7 @@
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/station_objects/computerframe/A = new /obj/station_objects/computerframe( src.loc )
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
var/obj/item/weapon/circuitboard/curer/M = new /obj/item/weapon/circuitboard/curer( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(do_after(user, 20))
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/station_objects/computerframe/A = new /obj/station_objects/computerframe( src.loc )
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
var/obj/item/weapon/circuitboard/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( A )
|
||||
for (var/obj/C in src)
|
||||
@@ -34,7 +34,7 @@
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/station_objects/computerframe/A = new /obj/station_objects/computerframe( src.loc )
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
var/obj/item/weapon/circuitboard/diseasesplicer/M = new /obj/item/weapon/circuitboard/diseasesplicer( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
|
||||
Reference in New Issue
Block a user