diff --git a/code/TriDimension/Movement.dm b/code/TriDimension/Movement.dm
deleted file mode 100644
index dfb529df5b1..00000000000
--- a/code/TriDimension/Movement.dm
+++ /dev/null
@@ -1,49 +0,0 @@
-var/maxZ = 6
-var/minZ = 2
-
-// Maybe it's best to have this hardcoded for whatever we'd add to the map, in order to avoid exploits
-// (such as mining base => admin station)
-// Note that this assumes the ship's top is at z=1 and bottom at z=4
-/obj/item/weapon/tank/jetpack/proc/move_z(cardinal, mob/user as mob)
- if (user.z > 1)
- user << "\red There is nothing of interest in that direction."
- return
- if(allow_thrust(0.01, user))
- switch(cardinal)
- if (UP) // Going up!
- if(user.z > maxZ) // If we aren't at the very top of the ship
- var/turf/T = locate(user.x, user.y, user.z - 1)
- // You can only jetpack up if there's space above, and you're sitting on either hull (on the exterior), or space
- //if(T && istype(T, /turf/space) && (istype(user.loc, /turf/space) || istype(user.loc, /turf/space/*/hull*/)))
- //check through turf contents to make sure there's nothing blocking the way
- if(T && istype(T, /turf/space))
- var/blocked = 0
- for(var/atom/A in T.contents)
- if(T.density)
- blocked = 1
- user << "\red You bump into [T.name]."
- break
- if(!blocked)
- user.Move(T)
- else
- user << "\red You bump into the ship's plating."
- else
- user << "\red The ship's gravity well keeps you in orbit!" // Assuming the ship starts on z level 1, you don't want to go past it
-
- if (DOWN) // Going down!
- if (user.z < 1) // If we aren't at the very bottom of the ship, or out in space
- var/turf/T = locate(user.x, user.y, user.z + 1)
- // You can only jetpack down if you're sitting on space and there's space down below, or hull
- if(T && (istype(T, /turf/space) || istype(T, /turf/space/*/hull*/)) && istype(user.loc, /turf/space))
- var/blocked = 0
- for(var/atom/A in T.contents)
- if(T.density)
- blocked = 1
- user << "\red You bump into [T.name]."
- break
- if(!blocked)
- user.Move(T)
- else
- user << "\red You bump into the ship's plating."
- else
- user << "\red The ship's gravity well keeps you in orbit!"
\ No newline at end of file
diff --git a/code/TriDimension/Pipes.dm b/code/TriDimension/Pipes.dm
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/code/TriDimension/Structures.dm b/code/TriDimension/Structures.dm
deleted file mode 100644
index 85e499f7ad4..00000000000
--- a/code/TriDimension/Structures.dm
+++ /dev/null
@@ -1,205 +0,0 @@
-///////////////////////////////////////
-//Contents: Ladders, Hatches, Stairs.//
-///////////////////////////////////////
-
-/obj/multiz
- icon = 'code/TriDimension/multiz.dmi'
- density = 0
- opacity = 0
- anchored = 1
- var/obj/multiz/target
-
- CanPass(obj/mover, turf/source, height, airflow)
- return airflow || !density
-
-/obj/multiz/ladder
- icon_state = "ladderdown"
- name = "ladder"
- desc = "A Ladder. You climb up and down it."
-
- var/top_icon_state = "ladderdown"
- var/bottom_icon_state = "ladderup"
-
- New()
- . = ..()
- spawn(1) //Allow map to load
- if(z in levels_3d)
- if(!target)
- var/list/adjacent_to_me = global_adjacent_z_levels["[z]"]
- if("up" in adjacent_to_me)
- target = locate() in locate(x,y,adjacent_to_me["up"])
- if(istype(target))
- icon_state = bottom_icon_state
- else if("down" in adjacent_to_me)
- target = locate() in locate(x,y,adjacent_to_me["down"])
- if(istype(target))
- icon_state = top_icon_state
- else
- del src
- else
- del src
- else if("down" in adjacent_to_me)
- target = locate() in locate(x,y,adjacent_to_me["down"])
- if(istype(target))
- icon_state = bottom_icon_state
- else
- del src
- else
- del src
- if(target)
- target.icon_state = ( icon_state == top_icon_state ? bottom_icon_state : top_icon_state)
- target.target = src
- else
- del src
-
- Del()
- spawn(1)
- if(target)
- del target
- return ..()
-
- attack_paw(var/mob/M)
- return attack_hand(M)
-
- attackby(var/W, var/mob/M)
- return attack_hand(M)
-
- attack_hand(var/mob/M)
- if(!target || !istype(target.loc, /turf))
- del src
- var/list/adjacent_to_me = global_adjacent_z_levels["[z]"]
- M.visible_message("\blue \The [M] climbs [target.z == adjacent_to_me["up"] ? "up" : "down"] \the [src]!", "You climb [target.z == adjacent_to_me["up"] ? "up" : "down"] \the [src]!", "You hear some grunting, and clanging of a metal ladder being used.")
- M.Move(target.loc)
-
-
- hatch
- icon_state = "hatchdown"
- name = "hatch"
- desc = "A hatch. You climb down it, and it will automatically seal against pressure loss behind you."
- top_icon_state = "hatchdown"
- var/top_icon_state_open = "hatchdown-open"
- var/top_icon_state_close = "hatchdown-close"
-
- bottom_icon_state = "ladderup"
-
- var/image/green_overlay
- var/image/red_overlay
-
- var/active = 0
-
- New()
- . = ..()
- red_overlay = image(icon, "red-ladderlight")
- green_overlay = image(icon, "green-ladderlight")
-
- attack_hand(var/mob/M)
-
- if(!target || !istype(target.loc, /turf))
- del src
-
- if(active)
- M << "That [src] is being used."
- return // It is a tiny airlock, only one at a time.
-
- active = 1
- var/obj/multiz/ladder/hatch/top_hatch = target
- var/obj/multiz/ladder/hatch/bottom_hatch = src
- if(icon_state == top_icon_state)
- top_hatch = src
- bottom_hatch = target
-
- flick(top_icon_state_open, top_hatch)
- bottom_hatch.overlays += green_overlay
-
- spawn(7)
- if(!target || !istype(target.loc, /turf))
- del src
- if(M.z == z && get_dist(src,M) <= 1)
- var/list/adjacent_to_me = global_adjacent_z_levels["[z]"]
- M.visible_message("\blue \The [M] scurries [target.z == adjacent_to_me["up"] ? "up" : "down"] \the [src]!", "You scramble [target.z == adjacent_to_me["up"] ? "up" : "down"] \the [src]!", "You hear some grunting, and a hatch sealing.")
- M.Move(target.loc)
- flick(top_icon_state_close,top_hatch)
- bottom_hatch.overlays -= green_overlay
- bottom_hatch.overlays += red_overlay
-
- spawn(7)
- top_hatch.icon_state = top_icon_state
- bottom_hatch.overlays -= red_overlay
- active = 0
-
-/obj/multiz/stairs
- name = "Stairs"
- desc = "Stairs. You walk up and down them."
- icon_state = "ramptop"
- var/top_icon_state = "ramptop"
- var/bottom_icon_state = "rampbottom"
-
- active
- density = 1
-
-
- New()
- . = ..()
- spawn(1)
- if(z in levels_3d)
- if(!target)
- var/list/adjacent_to_me = global_adjacent_z_levels["[z]"]
- if("up" in adjacent_to_me)
- target = locate() in locate(x,y,adjacent_to_me["up"])
- if(istype(target))
- icon_state = bottom_icon_state
- else if("down" in adjacent_to_me)
- target = locate() in locate(x,y,adjacent_to_me["down"])
- if(istype(target))
- icon_state = top_icon_state
- else
- del src
- else
- del src
- else if("down" in adjacent_to_me)
- target = locate() in locate(x,y,adjacent_to_me["down"])
- if(istype(target))
- icon_state = bottom_icon_state
- else
- del src
- else
- del src
- if(target)
- target.icon_state = ( icon_state == top_icon_state ? bottom_icon_state : top_icon_state)
- target.target = src
- var/obj/multiz/stairs/lead_in = locate() in get_step(src, reverse_direction(dir))
- if(lead_in)
- lead_in.icon_state = ( icon_state == top_icon_state ? bottom_icon_state : top_icon_state)
- else
- del src
-
-
- Del()
- spawn(1)
- if(target)
- del target
- return ..()
-
-
- Bumped(var/atom/movable/M)
- if(target.z > z && istype(src, /obj/multiz/stairs/active) && !locate(/obj/multiz/stairs) in M.loc)
- return //If on bottom, only let them go up stairs if they've moved to the entry tile first.
- //If it's the top, they can fall down just fine.
-
- if(!target || !istype(target.loc, /turf))
- del src
-
- if(ismob(M) && M:client)
- M:client.moving = 1
- M.Move(target.loc)
- if (ismob(M) && M:client)
- M:client.moving = 0
-
- Click()
- if(!istype(usr,/mob/dead/observer))
- return ..()
- if(!target || !istype(target.loc, /turf))
- del src
- usr.client.moving = 1
- usr.Move(target.loc)
- usr.client.moving = 0
\ No newline at end of file
diff --git a/code/TriDimension/Turfs.dm b/code/TriDimension/Turfs.dm
deleted file mode 100644
index 1e49e4dc80e..00000000000
--- a/code/TriDimension/Turfs.dm
+++ /dev/null
@@ -1,96 +0,0 @@
-atom/movable/var/list/adjacent_z_levels
-atom/movable/var/archived_z_level
-
-atom/movable/Move() //Hackish
-
- if(adjacent_z_levels && adjacent_z_levels["up"])
- var/turf/above_me = locate(x,y,adjacent_z_levels["up"])
- if(istype(above_me, /turf/simulated/floor/open))
- above_me:RemoveImage(src)
-
- . = ..()
-
- if(archived_z_level != z)
- archived_z_level = z
- if(z in levels_3d)
- adjacent_z_levels = global_adjacent_z_levels["[z]"]
- else
- adjacent_z_levels = null
-
- if(adjacent_z_levels && adjacent_z_levels["up"])
- var/turf/above_me = locate(x,y,adjacent_z_levels["up"])
- if(istype(above_me, /turf/simulated/floor/open))
- above_me:AddImage(src)
-
-/turf/simulated/floor/open
- name = "open space"
- intact = 0
- density = 0
- icon_state = "black"
- pathweight = 100000 //Seriously, don't try and path over this one numbnuts
- var/icon/darkoverlays = null
- var/turf/floorbelow
- var/list/overlay_references
- mouse_opacity = 2
-
- New()
- ..()
- spawn(1)
- if(!(z in levels_3d))
- ReplaceWithSpace()
- var/list/adjacent_to_me = global_adjacent_z_levels["[z]"]
- if(!("down" in adjacent_to_me))
- ReplaceWithSpace()
-
- floorbelow = locate(x, y, adjacent_to_me["down"])
- if(floorbelow)
- if(!istype(floorbelow,/turf))
- del src
- else if(floorbelow.density)
- ReplaceWithPlating()
- else
- set_up()
- else
- ReplaceWithSpace()
-
-
- Enter(var/atom/movable/AM)
- if (..()) //TODO make this check if gravity is active (future use) - Sukasa
- spawn(1)
- if(AM)
- AM.Move(floorbelow)
- if (istype(AM, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = AM
- var/damage = rand(5,15)
- H.apply_damage(2*damage, BRUTE, "head")
- H.apply_damage(2*damage, BRUTE, "chest")
- H.apply_damage(0.5*damage, BRUTE, "l_leg")
- H.apply_damage(0.5*damage, BRUTE, "r_leg")
- H.apply_damage(0.5*damage, BRUTE, "l_arm")
- H.apply_damage(0.5*damage, BRUTE, "r_arm")
- H:weakened = max(H:weakened,2)
- H:updatehealth()
- return ..()
-
- attackby()
- return //nothing
-
- proc/set_up() //Update the overlays to make the openspace turf show what's down a level
- if(!overlay_references)
- overlay_references = list()
- if(!floorbelow) return
- overlays += floorbelow
- for(var/obj/o in floorbelow)
- var/image/o_img = image(o, dir=o.dir, layer = TURF_LAYER+0.05*o.layer)
- overlays += o_img
- overlay_references[o] = o_img
-
- proc/AddImage(var/atom/movable/o)
- var/o_img = image(o, dir=o.dir, layer = TURF_LAYER+0.05*o.layer)
- overlays += o_img
- overlay_references[o] = o_img
-
- proc/RemoveImage(var/atom/movable/o)
- var/o_img = overlay_references[o]
- overlays -= o_img
- overlay_references -= o
\ No newline at end of file
diff --git a/code/TriDimension/multiz.dmi b/code/TriDimension/multiz.dmi
deleted file mode 100644
index 13b118ce9f2..00000000000
Binary files a/code/TriDimension/multiz.dmi and /dev/null differ
diff --git a/code/TriDimension/multiz_pipe.dmi b/code/TriDimension/multiz_pipe.dmi
deleted file mode 100644
index a3bbbee0b28..00000000000
Binary files a/code/TriDimension/multiz_pipe.dmi and /dev/null differ
diff --git a/code/WorkInProgress/AI_Visibility/_old_AI_Visibility.dm b/code/WorkInProgress/AI_Visibility/_old_AI_Visibility.dm
deleted file mode 100644
index 9b50c74f686..00000000000
--- a/code/WorkInProgress/AI_Visibility/_old_AI_Visibility.dm
+++ /dev/null
@@ -1,573 +0,0 @@
-//All credit for this goes to Uristqwerty.
-
-//And some to me! -Mini
-
-
-
-//This file is partly designed around being able to uninclude it to go back to the old ai viewing system completely.
-//(And therefore also be portable to another similar codebase simply by transferring the file and including it after the other AI code files.)
-//There are probably a few parts that don't do that at the moment, but I'll fix them at some point.
-
-
-#define MINIMAP_UPDATE_DELAY 1200
-
-/turf
- var/image/obscured
- var/image/dim
-
-/turf/proc/visibilityChanged()
- cameranet.updateVisibility(src)
-
-/turf/New()
- ..()
- cameranet.updateVisibility(src)
-/*
-/turf/Del()
- ..()
- cameranet.updateVisibility(src)
-*/
-/datum/camerachunk
- var/list/obscuredTurfs = list()
- var/list/visibleTurfs = list()
- var/list/dimTurfs = list()
- var/list/obscured = list()
- var/list/dim = list()
- var/list/cameras = list()
- var/list/turfs = list()
- var/list/seenby = list()
- var/visible = 0
- var/changed = 1
- var/updating = 0
-
- var/x
- var/y
- var/z
-
- var/minimap_updating = 0
-
- var/icon/minimap_icon = new('icons/minimap.dmi', "chunk_base")
- var/obj/minimap_obj/minimap_obj = new()
-
-/obj/minimap_obj/Click(location, control, params)
- if(!istype(usr, /mob/dead) && !istype(usr, /mob/living/silicon/ai) && !(usr.client && usr.client.holder && usr.client.holder.level >= 4))
- return
-
- var/list/par = params2list(params)
- var/screen_loc = par["screen-loc"]
-
- if(findtext(screen_loc, "minimap:") != 1)
- return
-
- screen_loc = copytext(screen_loc, length("minimap:") + 1)
-
- var/x_text = copytext(screen_loc, 1, findtext(screen_loc, ","))
- var/y_text = copytext(screen_loc, findtext(screen_loc, ",") + 1)
-
- var/x = (text2num(copytext(x_text, 1, findtext(x_text, ":"))) - 1) * 16
- x += round((text2num(copytext(x_text, findtext(x_text, ":") + 1)) + 1) / 2)
-
- var/y = (text2num(copytext(y_text, 1, findtext(y_text, ":"))) - 1) * 16
- y += round((text2num(copytext(y_text, findtext(y_text, ":") + 1)) + 1) / 2)
-
- if(istype(usr, /mob/living/silicon/ai))
- var/mob/living/silicon/ai/ai = usr
- ai.freelook()
- ai.eyeobj.loc = locate(max(1, x - 1), max(1, y - 1), ai.eyeobj.z)
- cameranet.visibility(ai.eyeobj)
-
- else
- usr.loc = locate(max(1, x - 1), max(1, y - 1), usr.z)
-
-/mob/dead/verb/Open_Minimap()
- set category = "Ghost"
- winshow(src, "minimapwindow", 1)
- client.screen |= cameranet.minimap
-
- if(cameranet.generating_minimap)
- cameranet.minimap_viewers += src
-
-/mob/living/silicon/ai/verb/Open_Minimap()
- set category = "AI Commands"
- winshow(src, "minimapwindow", 1)
- client.screen |= cameranet.minimap
-
- if(cameranet.generating_minimap)
- cameranet.minimap_viewers += src
-
-/client/proc/Open_Minimap()
- set category = "Admin"
- winshow(src, "minimapwindow", 1)
- screen |= cameranet.minimap
-
- if(cameranet.generating_minimap)
- cameranet.minimap_viewers += src.mob
-
-/datum/camerachunk/proc/update_minimap()
- if(changed && !updating)
- update()
-
- minimap_icon.Blend(rgb(255, 0, 0), ICON_MULTIPLY)
-
- var/list/turfs = visibleTurfs | dimTurfs
-
- for(var/turf/turf in turfs)
- var/x = (turf.x & 0xf) * 2
- var/y = (turf.y & 0xf) * 2
-
- if(turf.density)
- minimap_icon.DrawBox(rgb(100, 100, 100), x + 1, y + 1, x + 2, y + 2)
- continue
-
- else if(istype(turf, /turf/space))
- minimap_icon.DrawBox(rgb(0, 0, 0), x + 1, y + 1, x + 2, y + 2)
-
- else
- minimap_icon.DrawBox(rgb(200, 200, 200), x + 1, y + 1, x + 2, y + 2)
-
- for(var/obj/structure/o in turf)
- if(o.density)
- if(istype(o, /obj/structure/window) && (o.dir == NORTH || o.dir == SOUTH || o.dir == EAST || o.dir == WEST))
- if(o.dir == NORTH)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 2, x + 2, y + 2)
- else if(o.dir == SOUTH)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 1, x + 2, y + 1)
- else if(o.dir == EAST)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 3, y + 1, x + 2, y + 2)
- else if(o.dir == WEST)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 1, x + 1, y + 2)
-
- else
- minimap_icon.DrawBox(rgb(150, 150, 150), x + 1, y + 1, x + 2, y + 2)
- break
-
- for(var/obj/machinery/door/o in turf)
- if(istype(o, /obj/machinery/door/window))
- if(o.dir == NORTH)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 2, x + 2, y + 2)
- else if(o.dir == SOUTH)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 2, y + 1)
- else if(o.dir == EAST)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 2, y + 1, x + 2, y + 2)
- else if(o.dir == WEST)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 1, y + 2)
-
- else
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 2, y + 2)
- break
-
- minimap_obj.screen_loc = "minimap:[src.x / 16],[src.y / 16]"
- minimap_obj.icon = minimap_icon
-
-/mob/aiEye
- var/list/visibleCameraChunks = list()
- var/mob/ai = null
- density = 0
-
-/datum/camerachunk/proc/add(mob/aiEye/ai)
- ai.visibleCameraChunks += src
- if(ai.ai.client)
- ai.ai.client.images += obscured
- ai.ai.client.images += dim
- visible++
- seenby += ai
- if(changed && !updating)
- update()
- changed = 0
-
-/datum/camerachunk/proc/remove(mob/aiEye/ai)
- ai.visibleCameraChunks -= src
- if(ai.ai.client)
- ai.ai.client.images -= obscured
- ai.ai.client.images -= dim
- seenby -= ai
- if(visible > 0)
- visible--
-
-/datum/camerachunk/proc/visibilityChanged(turf/loc)
- if(!(loc in visibleTurfs))
- return
-
- hasChanged()
-
-/datum/camerachunk/proc/hasChanged()
- if(visible)
- if(!updating)
- updating = 1
- spawn(10)//Batch large changes, such as many doors opening or closing at once
- update()
- updating = 0
- else
- changed = 1
-
- if(!minimap_updating)
- minimap_updating = 1
-
- spawn(MINIMAP_UPDATE_DELAY)
- if(changed && !updating)
- update()
- changed = 0
-
- update_minimap()
- minimap_updating = 0
-
-/datum/camerachunk/proc/update()
-
- var/list/newDimTurfs = list()
- var/list/newVisibleTurfs = list()
-
- for(var/obj/machinery/camera/c in cameras)
- var/lum = c.luminosity
- c.luminosity = 7
-
- newDimTurfs |= turfs & view(7, c)
- newVisibleTurfs |= turfs & view(6, c)
-
- c.luminosity = lum
-
- var/list/dimAdded = newDimTurfs - dimTurfs
- var/list/dimRemoved = dimTurfs - newDimTurfs
- var/list/visAdded = newVisibleTurfs - visibleTurfs
- var/list/visRemoved = visibleTurfs - newVisibleTurfs
-
- visibleTurfs = newVisibleTurfs
- dimTurfs = newDimTurfs
- obscuredTurfs = turfs - dimTurfs
- dimTurfs -= visibleTurfs
-
- for(var/turf/t in dimRemoved)
- if(t.dim)
- dim -= t.dim
- for(var/mob/aiEye/m in seenby)
- if(m.ai.client)
- m.ai.client.images -= t.dim
-
- if(!(t in visibleTurfs))
- if(!t.obscured)
- t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
-
- obscured += t.obscured
- for(var/mob/aiEye/m in seenby)
- if(m.ai.client)
- m.ai.client.images += t.obscured
-
- for(var/turf/t in dimAdded)
- if(!(t in visibleTurfs))
- if(!t.dim)
- t.dim = image('icons/effects/cameravis.dmi', t, "dim", 15)
- t.mouse_opacity = 0
-
- dim += t.dim
- for(var/mob/aiEye/m in seenby)
- if(m.ai.client)
- m.ai.client.images += t.dim
-
- if(t.obscured)
- obscured -= t.obscured
- for(var/mob/aiEye/m in seenby)
- if(m.ai.client)
- m.ai.client.images -= t.obscured
-
- for(var/turf/t in visAdded)
- if(t.obscured)
- obscured -= t.obscured
- for(var/mob/aiEye/m in seenby)
- if(m.ai.client)
- m.ai.client.images -= t.obscured
-
- for(var/turf/t in visRemoved)
- if(t in obscuredTurfs)
- if(!t.obscured)
- t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
-
- obscured += t.obscured
- for(var/mob/aiEye/m in seenby)
- if(m.ai.client)
- m.ai.client.images += t.obscured
-
-
-/datum/camerachunk/New(loc, x, y, z)
- x &= ~0xf
- y &= ~0xf
-
- src.x = x
- src.y = y
- src.z = z
-
- for(var/obj/machinery/camera/c in range(16, locate(x + 8, y + 8, z)))
- if(c.status)
- cameras += c
-
- turfs = block(locate(x, y, z), locate(min(world.maxx, x + 15), min(world.maxy, y + 15), z))
-
- for(var/obj/machinery/camera/c in cameras)
- var/lum = c.luminosity
- c.luminosity = 7
-
- dimTurfs |= turfs & view(7, c)
- visibleTurfs |= turfs & view(6, c)
-
- c.luminosity = lum
-
- obscuredTurfs = turfs - dimTurfs
- dimTurfs -= visibleTurfs
-
- for(var/turf/t in obscuredTurfs)
- if(!t.obscured)
- t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
-
- obscured += t.obscured
-
- for(var/turf/t in dimTurfs)
- if(!(t in visibleTurfs))
- if(!t.dim)
- t.dim = image('icons/effects/cameravis.dmi', t, "dim", TURF_LAYER)
- t.dim.mouse_opacity = 0
-
- dim += t.dim
-
- cameranet.minimap += minimap_obj
-
-var/datum/cameranet/cameranet = new()
-
-/datum/cameranet
- var/list/cameras = list()
- var/list/chunks = list()
- var/network = "net1"
- var/ready = 0
-
- var/list/minimap = list()
-
- var/generating_minimap = TRUE
- var/list/minimap_viewers = list()
-
-/datum/cameranet/New()
- ..()
-
- spawn(200)
- for(var/x = 0, x <= world.maxx, x += 16)
- for(var/y = 0, y <= world.maxy, y += 16)
- sleep(1)
- var/datum/camerachunk/c = getCameraChunk(x, y, 1)
- c.update_minimap()
-
- for(var/mob/m in minimap_viewers)
- m.client.screen |= c.minimap_obj
-
- generating_minimap = FALSE
- minimap_viewers = list()
-
-/datum/cameranet/proc/chunkGenerated(x, y, z)
- var/key = "[x],[y],[z]"
- return key in chunks
-
-/datum/cameranet/proc/getCameraChunk(x, y, z)
- var/key = "[x],[y],[z]"
-
- if(!(key in chunks))
- chunks[key] = new /datum/camerachunk(null, x, y, z)
-
- return chunks[key]
-
-/datum/cameranet/proc/visibility(mob/aiEye/ai)
- var/x1 = max(0, ai.x - 16) & ~0xf
- var/y1 = max(0, ai.y - 16) & ~0xf
- var/x2 = min(world.maxx, ai.x + 16) & ~0xf
- var/y2 = min(world.maxy, ai.y + 16) & ~0xf
-
- var/list/visibleChunks = list()
-
- for(var/x = x1; x <= x2; x += 16)
- for(var/y = y1; y <= y2; y += 16)
- visibleChunks += getCameraChunk(x, y, ai.z)
-
- var/list/remove = ai.visibleCameraChunks - visibleChunks
- var/list/add = visibleChunks - ai.visibleCameraChunks
-
- for(var/datum/camerachunk/c in remove)
- c.remove(ai)
-
- for(var/datum/camerachunk/c in add)
- c.add(ai)
-
-/datum/cameranet/proc/updateVisibility(turf/loc)
- if(!chunkGenerated(loc.x & ~0xf, loc.y & ~0xf, loc.z))
- return
-
- var/datum/camerachunk/chunk = getCameraChunk(loc.x & ~0xf, loc.y & ~0xf, loc.z)
- chunk.visibilityChanged(loc)
-
-/datum/cameranet/proc/addCamera(obj/machinery/camera/c)
- var/x1 = max(0, c.x - 16) & ~0xf
- var/y1 = max(0, c.y - 16) & ~0xf
- var/x2 = min(world.maxx, c.x + 16) & ~0xf
- var/y2 = min(world.maxy, c.y + 16) & ~0xf
-
- for(var/x = x1; x <= x2; x += 16)
- for(var/y = y1; y <= y2; y += 16)
- if(chunkGenerated(x, y, c.z))
- var/datum/camerachunk/chunk = getCameraChunk(x, y, c.z)
- if(!(c in chunk.cameras))
- chunk.cameras += c
- chunk.hasChanged()
-
-/datum/cameranet/proc/removeCamera(obj/machinery/camera/c)
- var/x1 = max(0, c.x - 16) & ~0xf
- var/y1 = max(0, c.y - 16) & ~0xf
- var/x2 = min(world.maxx, c.x + 16) & ~0xf
- var/y2 = min(world.maxy, c.y + 16) & ~0xf
-
- for(var/x = x1; x <= x2; x += 16)
- for(var/y = y1; y <= y2; y += 16)
- if(chunkGenerated(x, y, c.z))
- var/datum/camerachunk/chunk = getCameraChunk(x, y, c.z)
- if(!c)
- chunk.hasChanged()
- if(c in chunk.cameras)
- chunk.cameras -= c
- chunk.hasChanged()
-
-/mob/living/silicon/ai/var/mob/aiEye/eyeobj = new()
-
-/mob/living/silicon/ai/New()
- ..()
- eyeobj.ai = src
- spawn(20)
- freelook()
-
-/mob/living/silicon/ai/death(gibbed)
- if(client && client.eye == eyeobj)
- for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks)
- c.remove(eyeobj)
- client.eye = src
- return ..(gibbed)
-
-/mob/living/silicon/ai/verb/freelook()
- set category = "AI Commands"
- set name = "freelook"
- current = null //cancel camera view first, it causes problems
- cameraFollow = null
-// machine = null
- if(!eyeobj) //if it got deleted somehow (like an admin trying to fix things <.<')
- eyeobj = new()
- eyeobj.ai = src
- client.eye = eyeobj
- eyeobj.loc = loc
- cameranet.visibility(eyeobj)
- cameraFollow = null
-
-/mob/aiEye/Move()
- . = ..()
- if(.)
- cameranet.visibility(src)
-
-/client/AIMove(n, direct, var/mob/living/silicon/ai/user)
- if(eye == user.eyeobj)
- user.eyeobj.loc = get_step(user.eyeobj, direct)
- cameranet.visibility(user.eyeobj)
-
- else
- return ..()
-
-/*
-/client/AIMoveZ(direct, var/mob/living/silicon/ai/user)
- if(eye == user.eyeobj)
- var/dif = 0
- if(direct == UP && user.eyeobj.z > 1)
- dif = -1
- else if(direct == DOWN && user.eyeobj.z < 4)
- dif = 1
- user.eyeobj.loc = locate(user.eyeobj.x, user.eyeobj.y, user.eyeobj.z + dif)
- cameranet.visibility(user.eyeobj)
- else
- return ..()
-*/
-
-/turf/move_camera_by_click()
- if(istype(usr, /mob/living/silicon/ai))
- var/mob/living/silicon/ai/AI = usr
- if(AI.client.eye == AI.eyeobj)
- return
- return ..()
-
-
-/obj/machinery/door/update_nearby_tiles(need_rebuild)
- . = ..(need_rebuild)
- cameranet.updateVisibility(loc)
-
-/obj/machinery/camera/New()
- ..()
- cameranet.addCamera(src)
-
-/obj/machinery/camera/Del()
- cameranet.removeCamera(src)
- ..()
-
-/obj/machinery/camera/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
- . = ..(W, user)
- if(istype(W, /obj/item/weapon/wirecutters))
- if(status)
- cameranet.addCamera(src)
- else
- cameranet.removeCamera(src)
-
-/proc/checkcameravis(atom/A)
- for(var/obj/machinery/camera/C in view(A,7))
- if(!C.status || C.stat == 2)
- continue
- return 1
- return 0
-
-/mob/living/silicon/ai/attack_ai(var/mob/user as mob)
- if (user != src)
- return
-
- if (stat == 2)
- return
-
- var/list/L = list()
- for (var/obj/machinery/camera/C in world)
- L.Add(C)
-
- camera_sort(L)
- L = camera_network_sort(L)
-
- var/list/D = list()
- for (var/obj/machinery/camera/C in L)
- if ( C.network in src.networks )
- D[text("[]: [][]", C.network, C.c_tag, (C.status ? null : " (Deactivated)"))] = C
- D["Cancel"] = "Cancel"
-
- var/t = input(user, "Which camera should you change to?") as null|anything in D
-
- if (!t || t == "Cancel")
- return 0
-
- var/obj/machinery/camera/C = D[t]
-
- eyeobj.loc = C.loc
- cameranet.visibility(eyeobj)
-
- return
-
-/mob/living/silicon/ai/cancel_camera()
- set name = "Cancel Camera View"
- set category = "OOC"
- reset_view(null)
- machine = null
-
-/mob/living/silicon/ai/reset_view(atom/A)
- if (client)
- if(!eyeobj)
- eyeobj = new()
- eyeobj.ai = src
-
- client.eye = eyeobj
- client.perspective = EYE_PERSPECTIVE
-
- if (istype(A, /atom/movable))
- eyeobj.loc = locate(A.x, A.y, A.z)
-
- else
- eyeobj.loc = locate(src.x, src.y, src.z)
-
- cameranet.visibility(eyeobj)
diff --git a/code/WorkInProgress/AI_Visibility/ai.dm b/code/WorkInProgress/AI_Visibility/ai.dm
deleted file mode 100644
index 7dcbf54e679..00000000000
--- a/code/WorkInProgress/AI_Visibility/ai.dm
+++ /dev/null
@@ -1,107 +0,0 @@
-
-/mob/aiEye
- var/list/visibleCameraChunks = list()
- var/mob/ai = null
- density = 0
-
-/mob/living/silicon/ai/var/mob/aiEye/eyeobj = new()
-
-/mob/living/silicon/ai/New()
- ..()
- eyeobj.ai = src
- spawn(20)
- freelook()
-
-/mob/living/silicon/ai/death(gibbed)
- if(client && client.eye == eyeobj)
- for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks)
- c.remove(eyeobj)
- client.eye = src
- return ..(gibbed)
-
-/mob/living/silicon/ai/verb/freelook()
- set category = "AI Commands"
- set name = "freelook"
- current = null //cancel camera view first, it causes problems
- cameraFollow = null
- if(!eyeobj) //if it got deleted somehow (like an admin trying to fix things <.<')
- eyeobj = new()
- eyeobj.ai = src
- client.eye = eyeobj
- eyeobj.loc = loc
- cameranet.visibility(eyeobj)
-
-/mob/aiEye/Move()
- . = ..()
- if(.)
- cameranet.visibility(src)
-
-/client/AIMove(n, direct, var/mob/living/silicon/ai/user)
- if(eye == user.eyeobj)
- user.eyeobj.loc = get_step(user.eyeobj, direct)
- cameranet.visibility(user.eyeobj)
-
- else
- return ..()
-
-/turf/move_camera_by_click()
- if(istype(usr, /mob/living/silicon/ai))
- var/mob/living/silicon/ai/AI = usr
- if(AI.client.eye == AI.eyeobj)
- return
- return ..()
-
-/mob/living/silicon/ai/attack_ai(var/mob/user as mob)
- if (user != src)
- return
-
- if (stat == 2)
- return
-
- var/list/L = list()
- for (var/obj/machinery/camera/C in world)
- L.Add(C)
-
- camera_sort(L)
- L = camera_network_sort(L)
-
- var/list/D = list()
- for (var/obj/machinery/camera/C in L)
- if ( C.network in src.networks )
- D[text("[]: [][]", C.network, C.c_tag, (C.status ? null : " (Deactivated)"))] = C
- D["Cancel"] = "Cancel"
-
- var/t = input(user, "Which camera should you change to?") as null|anything in D
-
- if (!t || t == "Cancel")
- return 0
-
- var/obj/machinery/camera/C = D[t]
-
- eyeobj.loc = C.loc
- cameranet.visibility(eyeobj)
-
- return
-
-/mob/living/silicon/ai/cancel_camera()
- set name = "Cancel Camera View"
- set category = "OOC"
- reset_view(null)
- machine = null
-
-/mob/living/silicon/ai/reset_view(atom/A)
- if (client)
- if(!eyeobj)
- eyeobj = new()
- eyeobj.ai = src
-
- client.eye = eyeobj
- client.perspective = EYE_PERSPECTIVE
-
- if (istype(A, /atom/movable))
- eyeobj.loc = locate(A.x, A.y, A.z)
-
- else
- eyeobj.loc = locate(src.x, src.y, src.z)
-
- cameranet.visibility(eyeobj)
diff --git a/code/WorkInProgress/AI_Visibility/cameranet.dm b/code/WorkInProgress/AI_Visibility/cameranet.dm
deleted file mode 100644
index 3b46844e6be..00000000000
--- a/code/WorkInProgress/AI_Visibility/cameranet.dm
+++ /dev/null
@@ -1,156 +0,0 @@
-//------------------------------------------------------------
-//
-// The Cameranet
-//
-// The cameranet is a single global instance of a unique
-// datum, which contains logic for managing the individual
-// chunks.
-//
-//------------------------------------------------------------
-
-/datum/cameranet
- var/list/cameras = list()
- var/list/chunks = list()
- var/network = "net1"
- var/ready = 0
-
- var/list/minimap = list()
-
- var/generating_minimap = TRUE
-
-var/datum/cameranet/cameranet = new()
-
-
-
-/datum/cameranet/New()
- ..()
-
- spawn(100)
- init_minimap()
-
-
-/datum/cameranet/proc/init_minimap()
- for(var/x = 0, x <= world.maxx, x += 16)
- for(var/y = 0, y <= world.maxy, y += 16)
- sleep(1)
- getCameraChunk(x, y, 5)
- getCameraChunk(x, y, 1)
-
- generating_minimap = FALSE
-
-
-/datum/cameranet/proc/chunkGenerated(x, y, z)
- var/key = "[x],[y],[z]"
- return key in chunks
-
-
-/datum/cameranet/proc/getCameraChunk(x, y, z)
- var/key = "[x],[y],[z]"
-
- if(!(key in chunks))
- chunks[key] = new /datum/camerachunk(null, x, y, z)
-
- return chunks[key]
-
-
-
-
-// This proc updates what chunks are considered seen
-// by an aiEye. As part of the process, it will force
-// any newly visible chunks with pending unscheduled
-// updates to update, and show the correct obscuring
-// and dimming image sets. If you do not call this
-// after the eye has moved, it may result in the
-// affected AI gaining (partial) xray, seeing through
-// now-closed doors, not seeing through open doors,
-// or other visibility oddities, depending on if/when
-// they last visited any of the chunks in the nearby
-// area.
-
-// It must be called manually, as there is no way to
-// have a proc called automatically every time an
-// object's loc changes.
-
-/datum/cameranet/proc/visibility(mob/aiEye/ai)
- var/x1 = max(0, ai.x - 16) & ~0xf
- var/y1 = max(0, ai.y - 16) & ~0xf
- var/x2 = min(world.maxx, ai.x + 16) & ~0xf
- var/y2 = min(world.maxy, ai.y + 16) & ~0xf
-
- var/list/visibleChunks = list()
-
- for(var/x = x1; x <= x2; x += 16)
- for(var/y = y1; y <= y2; y += 16)
- visibleChunks += getCameraChunk(x, y, ai.z)
-
- var/list/remove = ai.visibleCameraChunks - visibleChunks
- var/list/add = visibleChunks - ai.visibleCameraChunks
-
- for(var/datum/camerachunk/c in remove)
- c.remove(ai)
-
- for(var/datum/camerachunk/c in add)
- c.add(ai)
-
-
-
-
-// This proc should be called if a turf, or the contents
-// of a turf, changes opacity. This includes such things
-// as changing the turf, opening or closing a door, or
-// anything else that would alter line of sight in the
-// general area.
-
-/datum/cameranet/proc/updateVisibility(turf/loc)
- if(!chunkGenerated(loc.x & ~0xf, loc.y & ~0xf, loc.z))
- return
-
- var/datum/camerachunk/chunk = getCameraChunk(loc.x & ~0xf, loc.y & ~0xf, loc.z)
- chunk.visibilityChanged(loc)
-
-
-
-
-// This proc updates all relevant chunks when enabling or
-// creating a camera, allowing freelook and the minimap to
-// respond correctly.
-
-/datum/cameranet/proc/addCamera(obj/machinery/camera/c)
- var/x1 = max(0, c.x - 16) & ~0xf
- var/y1 = max(0, c.y - 16) & ~0xf
- var/x2 = min(world.maxx, c.x + 16) & ~0xf
- var/y2 = min(world.maxy, c.y + 16) & ~0xf
-
- for(var/x = x1; x <= x2; x += 16)
- for(var/y = y1; y <= y2; y += 16)
- if(chunkGenerated(x, y, c.z))
- var/datum/camerachunk/chunk = getCameraChunk(x, y, c.z)
-
- if(!(c in chunk.cameras))
- chunk.cameras += c
- chunk.hasChanged()
-
-
-
-
-// This proc updates all relevant chunks when disabling or
-// deleting a camera, allowing freelook and the minimap to
-// respond correctly.
-
-/datum/cameranet/proc/removeCamera(obj/machinery/camera/c)
- var/x1 = max(0, c.x - 16) & ~0xf
- var/y1 = max(0, c.y - 16) & ~0xf
- var/x2 = min(world.maxx, c.x + 16) & ~0xf
- var/y2 = min(world.maxy, c.y + 16) & ~0xf
-
- for(var/x = x1; x <= x2; x += 16)
- for(var/y = y1; y <= y2; y += 16)
- if(chunkGenerated(x, y, c.z))
- var/datum/camerachunk/chunk = getCameraChunk(x, y, c.z)
-
- if(!c)
- chunk.hasChanged()
-
- if(c in chunk.cameras)
- chunk.cameras -= c
- chunk.hasChanged()
diff --git a/code/WorkInProgress/AI_Visibility/chunk.dm b/code/WorkInProgress/AI_Visibility/chunk.dm
deleted file mode 100644
index 8a6886a1ade..00000000000
--- a/code/WorkInProgress/AI_Visibility/chunk.dm
+++ /dev/null
@@ -1,224 +0,0 @@
-#define MINIMAP_UPDATE_DELAY 1200
-
-/datum/camerachunk
- var/list/turfs = list()
-
- var/list/obscuredTurfs = list()
- var/list/visibleTurfs = list()
- var/list/dimTurfs = list()
-
- var/list/obscured = list()
- var/list/dim = list()
-
- var/list/cameras = list()
- var/list/seenby = list()
-
- var/changed = 1
- var/updating = 0
- var/minimap_updating = 0
-
- var/x
- var/y
- var/z
-
-
- var/icon/minimap_icon = new('icons/minimap.dmi', "chunk_base")
- var/obj/minimap_obj/minimap_obj = new()
-
-
-
-/datum/camerachunk/New(loc, x, y, z)
- //Round X and Y down to a multiple of 16, if nessecary
- src.x = x & ~0xF
- src.y = y & ~0xF
- src.z = z
-
- rebuild_chunk()
-
-
-
-// Completely re-calculate the whole chunk.
-
-/datum/camerachunk/proc/rebuild_chunk()
- for(var/mob/aiEye/eye in seenby)
- if(!eye.ai)
- seenby -= eye
- continue
-
- if(eye.ai.client)
- eye.ai.client.images -= obscured
- eye.ai.client.images -= dim
-
- var/start = locate(x, y, z)
- var/end = locate(min(x + 15, world.maxx), min(y + 15, world.maxy), z)
-
- turfs = block(start, end)
- dimTurfs = list()
- visibleTurfs = list()
- obscured = list()
- dim = list()
- cameras = list()
-
- for(var/obj/machinery/camera/c in range(16, locate(x + 8, y + 8, z)))
- if(c.status)
- cameras += c
-
- for(var/obj/machinery/camera/c in cameras)
- var/lum = c.luminosity
- c.luminosity = 7
-
- dimTurfs |= turfs & view(7, c)
- visibleTurfs |= turfs & view(6, c)
-
- c.luminosity = lum
-
- obscuredTurfs = turfs - dimTurfs
- dimTurfs -= visibleTurfs
-
- for(var/turf/t in obscuredTurfs)
- if(!t.obscured)
- t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
-
- obscured += t.obscured
-
- for(var/turf/t in dimTurfs)
- if(!t.dim)
- t.dim = image('icons/effects/cameravis.dmi', t, "dim", TURF_LAYER)
- t.dim.mouse_opacity = 0
-
- dim += t.dim
-
- cameranet.minimap |= minimap_obj
-
- for(var/mob/aiEye/eye in seenby)
- if(eye.ai.client)
- eye.ai.client.images |= obscured
- eye.ai.client.images |= dim
-
-
-
-/datum/camerachunk/proc/add(mob/aiEye/eye)
- eye.visibleCameraChunks |= src
-
- if(eye.ai.client)
- eye.ai.client.images |= obscured
- eye.ai.client.images |= dim
-
- seenby |= eye
-
- if(changed && !updating)
- update()
- changed = 0
-
-
-
-/datum/camerachunk/proc/remove(mob/aiEye/eye)
- eye.visibleCameraChunks -= src
-
- if(eye.ai.client)
- eye.ai.client.images -= obscured
- eye.ai.client.images -= dim
-
- seenby -= eye
-
-/datum/camerachunk/proc/visibilityChanged(turf/loc)
- if(!(loc in visibleTurfs))
- return
-
- hasChanged()
-
-/datum/camerachunk/proc/hasChanged()
- if(length(seenby) > 0)
- if(!updating)
- updating = 1
-
- spawn(10)//Batch large changes, such as many doors opening or closing at once
- update()
- updating = 0
-
- else
- changed = 1
-
- if(!minimap_updating)
- minimap_updating = 1
-
- spawn(MINIMAP_UPDATE_DELAY)
- if(changed && !updating)
- update()
- changed = 0
-
- update_minimap()
- minimap_updating = 0
-
-/datum/camerachunk/proc/update()
-
- var/list/newDimTurfs = list()
- var/list/newVisibleTurfs = list()
-
- for(var/obj/machinery/camera/c in cameras)
- var/lum = c.luminosity
- c.luminosity = 7
-
- newDimTurfs |= turfs & view(7, c)
- newVisibleTurfs |= turfs & view(6, c)
-
- c.luminosity = lum
-
- var/list/dimAdded = newDimTurfs - dimTurfs
- var/list/dimRemoved = dimTurfs - newDimTurfs
- var/list/visAdded = newVisibleTurfs - visibleTurfs
- var/list/visRemoved = visibleTurfs - newVisibleTurfs
-
- visibleTurfs = newVisibleTurfs
- dimTurfs = newDimTurfs
- obscuredTurfs = turfs - dimTurfs
- dimTurfs -= visibleTurfs
-
- var/list/images_added = list()
- var/list/images_removed = list()
-
- for(var/turf/t in dimRemoved)
- if(t.dim)
- dim -= t.dim
- images_removed += t.dim
-
- if(!(t in visibleTurfs))
- if(!t.obscured)
- t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
-
- obscured += t.obscured
- images_added += t.obscured
-
- for(var/turf/t in dimAdded)
- if(!(t in visibleTurfs))
- if(!t.dim)
- t.dim = image('icons/effects/cameravis.dmi', t, "dim", 15)
- t.dim.mouse_opacity = 0
-
- dim += t.dim
- images_added += t.dim
-
- if(t.obscured)
- obscured -= t.obscured
- images_removed += t.obscured
-
- for(var/turf/t in visAdded)
- if(t.obscured)
- obscured -= t.obscured
- images_removed += t.obscured
-
- for(var/turf/t in visRemoved)
- if(t in obscuredTurfs)
- if(!t.obscured)
- t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15)
-
- obscured += t.obscured
- images_added += t.obscured
-
- for(var/mob/aiEye/eye in seenby)
- if(eye.ai)
- if(eye.ai.client)
- eye.ai.client.images -= images_removed
- eye.ai.client.images |= images_added
- else
- seenby -= eye
\ No newline at end of file
diff --git a/code/WorkInProgress/AI_Visibility/minimap.dm b/code/WorkInProgress/AI_Visibility/minimap.dm
deleted file mode 100644
index c97b01e0f82..00000000000
--- a/code/WorkInProgress/AI_Visibility/minimap.dm
+++ /dev/null
@@ -1,137 +0,0 @@
-/client/var/minimap_view_z = 1
-
-/obj/minimap_obj
- var/datum/camerachunk/chunk
-
-/obj/minimap_obj/Click(location, control, params)
- if(!istype(usr, /mob/dead) && !istype(usr, /mob/living/silicon/ai) && !(usr.client && usr.client.holder && usr.client.holder.level >= 4))
- return
-
- var/list/par = params2list(params)
- var/screen_loc = par["screen-loc"]
-
- if(findtext(screen_loc, "minimap:") != 1)
- return
-
- screen_loc = copytext(screen_loc, length("minimap:") + 1)
-
- var/x_text = copytext(screen_loc, 1, findtext(screen_loc, ","))
- var/y_text = copytext(screen_loc, findtext(screen_loc, ",") + 1)
-
- var/x = chunk.x
- x += round((text2num(copytext(x_text, findtext(x_text, ":") + 1)) + 1) / 2)
-
- var/y = chunk.y
- y += round((text2num(copytext(y_text, findtext(y_text, ":") + 1)) + 1) / 2)
-
- if(istype(usr, /mob/living/silicon/ai))
- var/mob/living/silicon/ai/ai = usr
- ai.freelook()
- ai.eyeobj.loc = locate(max(1, x - 1), max(1, y - 1), usr.client.minimap_view_z)
- cameranet.visibility(ai.eyeobj)
-
- else
- usr.loc = locate(max(1, x - 1), max(1, y - 1), usr.client.minimap_view_z)
-
-/mob/dead/verb/Open_Minimap()
- set category = "Ghost"
- cameranet.show_minimap(client)
-
-
-/mob/living/silicon/ai/verb/Open_Minimap()
- set category = "AI Commands"
- cameranet.show_minimap(client)
-
-
-/client/proc/Open_Minimap()
- set category = "Admin"
- cameranet.show_minimap(src)
-
-
-/mob/verb/Open_Minimap_Z()
- set hidden = 1
-
- if(!istype(src, /mob/dead) && !istype(src, /mob/living/silicon/ai) && !(client && client.holder && client.holder.level >= 4))
- return
-
- var/level = input("Select a Z level", "Z select", null) as null | anything in cameranet.minimap
-
- if(level != null)
- cameranet.show_minimap(client, level)
-
-
-
-/datum/cameranet/proc/show_minimap(client/client, z_level = "z-1")
- if(!istype(client.mob, /mob/dead) && !istype(client.mob, /mob/living/silicon/ai) && !(client.holder && client.holder.level >= 4))
- return
-
- if(z_level in cameranet.minimap)
- winshow(client, "minimapwindow", 1)
-
- for(var/key in cameranet.minimap)
- client.screen -= cameranet.minimap[key]
-
- client.screen |= cameranet.minimap[z_level]
-
- if(cameranet.generating_minimap)
- spawn(50)
- show_minimap(client, z_level)
-
- client.minimap_view_z = text2num(copytext(z_level, 3))
-
-
-/datum/camerachunk/proc/update_minimap()
- if(changed && !updating)
- update()
-
- minimap_icon.Blend(rgb(255, 0, 0), ICON_MULTIPLY)
-
- var/list/turfs = visibleTurfs | dimTurfs
-
- for(var/turf/turf in turfs)
- var/x = (turf.x & 0xf) * 2
- var/y = (turf.y & 0xf) * 2
-
- if(turf.density)
- minimap_icon.DrawBox(rgb(100, 100, 100), x + 1, y + 1, x + 2, y + 2)
- continue
-
- else if(istype(turf, /turf/space))
- minimap_icon.DrawBox(rgb(0, 0, 0), x + 1, y + 1, x + 2, y + 2)
-
- else
- minimap_icon.DrawBox(rgb(200, 200, 200), x + 1, y + 1, x + 2, y + 2)
-
- for(var/obj/structure/o in turf)
- if(o.density)
- if(istype(o, /obj/structure/window) && (o.dir == NORTH || o.dir == SOUTH || o.dir == EAST || o.dir == WEST))
- if(o.dir == NORTH)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 2, x + 2, y + 2)
- else if(o.dir == SOUTH)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 1, x + 2, y + 1)
- else if(o.dir == EAST)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 3, y + 1, x + 2, y + 2)
- else if(o.dir == WEST)
- minimap_icon.DrawBox(rgb(150, 150, 200), x + 1, y + 1, x + 1, y + 2)
-
- else
- minimap_icon.DrawBox(rgb(150, 150, 150), x + 1, y + 1, x + 2, y + 2)
- break
-
- for(var/obj/machinery/door/o in turf)
- if(istype(o, /obj/machinery/door/window))
- if(o.dir == NORTH)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 2, x + 2, y + 2)
- else if(o.dir == SOUTH)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 2, y + 1)
- else if(o.dir == EAST)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 2, y + 1, x + 2, y + 2)
- else if(o.dir == WEST)
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 1, y + 2)
-
- else
- minimap_icon.DrawBox(rgb(100, 150, 100), x + 1, y + 1, x + 2, y + 2)
- break
-
- minimap_obj.screen_loc = "minimap:[src.x / 16],[src.y / 16]"
- minimap_obj.icon = minimap_icon
diff --git a/code/WorkInProgress/AI_Visibility/util.dm b/code/WorkInProgress/AI_Visibility/util.dm
deleted file mode 100644
index da576cbd406..00000000000
--- a/code/WorkInProgress/AI_Visibility/util.dm
+++ /dev/null
@@ -1,38 +0,0 @@
-
-/turf
- var/image/obscured
- var/image/dim
-
-/turf/proc/visibilityChanged()
- cameranet.updateVisibility(src)
-
-/turf/New()
- ..()
- cameranet.updateVisibility(src)
-
-/obj/machinery/door/update_nearby_tiles(need_rebuild)
- . = ..(need_rebuild)
- cameranet.updateVisibility(loc)
-
-/obj/machinery/camera/New()
- ..()
- cameranet.addCamera(src)
-
-/obj/machinery/camera/Del()
- cameranet.removeCamera(src)
- ..()
-
-/obj/machinery/camera/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
- . = ..(W, user)
- if(istype(W, /obj/item/weapon/wirecutters))
- if(status)
- cameranet.addCamera(src)
- else
- cameranet.removeCamera(src)
-
-/proc/checkcameravis(atom/A)
- for(var/obj/machinery/camera/C in view(A,7))
- if(!C.status || C.stat == 2)
- continue
- return 1
- return 0
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/areas.dm b/code/WorkInProgress/Cael_Aislinn/Rust/areas.dm
deleted file mode 100644
index 6183ed04f67..00000000000
--- a/code/WorkInProgress/Cael_Aislinn/Rust/areas.dm
+++ /dev/null
@@ -1,77 +0,0 @@
-
-//reactor areas
-
-/area/engine
- icon_state = "engine"
-
- fore
- name = "\improper Fore"
-
- construction_storage
- name = "\improper Construction storage"
-
- locker
- name = "\improper Locker room"
-
- atmos_storage
- name = "\improper Atmos storage"
- icon_state = "engine_storage"
-
- control
- name = "\improper Control"
- icon_state = "engine_control"
-
- electrical_storage
- name = "\improper Electrical storage"
-
- engine_monitoring
- name = "\improper Electrical storage"
- icon_state = "engine_monitoring"
-
- reactor_core
- name = "\improper Reactor Core"
- //icon_state = "engine_core"
-
- reactor_gas
- name = "Reactor Gas Storage"
- //icon_state = "engine_atmos"
-
- aux_control
- name = "Reactor Auxiliary Control"
- //icon_state = "engine_aux"
-
- turbine_control
- name = "Turbine Control"
- //icon_state = "engine_turbine"
-
- reactor_airlock
- name = "\improper Reactor Primary Entrance"
- //icon_state = "engine_airlock"
-
- reactor_fuel_storage
- name = "Reactor Fuel Storage"
- //icon_state = "engine_fuel"
-
- reactor_fuel_ports
- name = "\improper Reactor Fuel Ports"
- //icon_state = "engine_port"
-
- generators
- name = "\improper Generator Room"
- //icon_state = "engine_generators"
-
- port_gyro_bay
- name = "\improper Port Gyrotron Bay"
- //icon_state = "engine_starboardgyro"
-
- starboard_gyro_bay
- name = "\improper Starboard Gyrotron Bay"
- //icon_state = "engine_portgyro"
-
- storage
- name = "\improper Engineering hallway"
- icon_state = "engine_storage"
-
- hallway
- name = "\improper Engineering storage"
- icon_state = "engine_hallway"
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/circuits_and_design.dm b/code/WorkInProgress/Cael_Aislinn/Rust/circuits_and_design.dm
deleted file mode 100644
index 8521e4d1b4c..00000000000
--- a/code/WorkInProgress/Cael_Aislinn/Rust/circuits_and_design.dm
+++ /dev/null
@@ -1,120 +0,0 @@
-
-//////////////////////////////////////
-// RUST Core Control computer
-
-/obj/item/weapon/circuitboard/rust_core_control
- name = "Circuit board (RUST core controller)"
- build_path = "/obj/machinery/computer/rust_core_control"
- origin_tech = "programming=4;engineering=4"
-
-datum/design/rust_core_control
- name = "Circuit Design (RUST core controller)"
- desc = "Allows for the construction of circuit boards used to build a core control console for the RUST fusion engine."
- id = "rust_core_control"
- req_tech = list("programming" = 4, "engineering" = 4)
- build_type = IMPRINTER
- materials = list("$glass" = 2000, "sacid" = 20)
- build_path = "/obj/item/weapon/circuitboard/rust_core_control"
-
-//////////////////////////////////////
-// RUST Fuel Control computer
-
-/obj/item/weapon/circuitboard/rust_fuel_control
- name = "Circuit board (RUST fuel controller)"
- build_path = "/obj/machinery/computer/rust_fuel_control"
- origin_tech = "programming=4;engineering=4"
-
-datum/design/rust_fuel_control
- name = "Circuit Design (RUST fuel controller)"
- desc = "Allows for the construction of circuit boards used to build a fuel injector control console for the RUST fusion engine."
- id = "rust_fuel_control"
- req_tech = list("programming" = 4, "engineering" = 4)
- build_type = IMPRINTER
- materials = list("$glass" = 2000, "sacid" = 20)
- build_path = "/obj/item/weapon/circuitboard/rust_fuel_control"
-
-//////////////////////////////////////
-// RUST Fuel Port board
-
-/obj/item/weapon/module/rust_fuel_port
- name = "Internal circuitry (RUST fuel port)"
- icon_state = "card_mod"
- origin_tech = "engineering=4;materials=5"
-
-datum/design/rust_fuel_port
- name = "Internal circuitry (RUST fuel port)"
- desc = "Allows for the construction of circuit boards used to build a fuel injection port for the RUST fusion engine."
- id = "rust_fuel_port"
- req_tech = list("engineering" = 4, "materials" = 5)
- build_type = IMPRINTER
- materials = list("$glass" = 2000, "sacid" = 20, "$uranium" = 3000)
- build_path = "/obj/item/weapon/module/rust_fuel_port"
-
-//////////////////////////////////////
-// RUST Fuel Compressor board
-
-/obj/item/weapon/module/rust_fuel_compressor
- name = "Internal circuitry (RUST fuel compressor)"
- icon_state = "card_mod"
- origin_tech = "materials=6;plasmatech=4"
-
-datum/design/rust_fuel_compressor
- name = "Circuit Design (RUST fuel compressor)"
- desc = "Allows for the construction of circuit boards used to build a fuel compressor of the RUST fusion engine."
- id = "rust_fuel_compressor"
- req_tech = list("materials" = 6, "plasmatech" = 4)
- build_type = IMPRINTER
- materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$diamond" = 1000)
- build_path = "/obj/item/weapon/module/rust_fuel_compressor"
-
-//////////////////////////////////////
-// RUST Tokamak Core board
-
-/obj/item/weapon/circuitboard/rust_core
- name = "Internal circuitry (RUST tokamak core)"
- build_path = "/obj/machinery/power/rust_core"
- board_type = "machine"
- origin_tech = "bluespace=3;plasmatech=4;magnets=5;powerstorage=6"
- frame_desc = "Requires 2 Pico Manipulators, 1 Ultra Micro-Laser, 5 Pieces of Cable, 1 Subspace Crystal and 1 Console Screen."
- req_components = list(
- "/obj/item/weapon/stock_parts/manipulator/pico" = 2,
- "/obj/item/weapon/stock_parts/micro_laser/ultra" = 1,
- "/obj/item/weapon/stock_parts/subspace/crystal" = 1,
- "/obj/item/weapon/stock_parts/console_screen" = 1,
- "/obj/item/stack/cable_coil" = 5)
-
-datum/design/rust_core
- name = "Internal circuitry (RUST tokamak core)"
- desc = "The circuit board that for a RUST-pattern tokamak fusion core."
- id = "pacman"
- req_tech = list(bluespace = 3, plasmatech = 4, magnets = 5, powerstorage = 6)
- build_type = IMPRINTER
- reliability_base = 79
- materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$diamond" = 2000)
- build_path = "/obj/item/weapon/circuitboard/rust_core"
-
-//////////////////////////////////////
-// RUST Fuel Injector board
-
-/obj/item/weapon/circuitboard/rust_injector
- name = "Internal circuitry (RUST fuel injector)"
- build_path = "/obj/machinery/power/rust_fuel_injector"
- board_type = "machine"
- origin_tech = "powerstorage=3;engineering=4;plasmatech=4;materials=6"
- frame_desc = "Requires 2 Pico Manipulators, 1 Phasic Scanning Module, 1 Super Matter Bin, 1 Console Screen and 5 Pieces of Cable."
- req_components = list(
- "/obj/item/weapon/stock_parts/manipulator/pico" = 2,
- "/obj/item/weapon/stock_parts/scanning_module/phasic" = 1,
- "/obj/item/weapon/stock_parts/matter_bin/super" = 1,
- "/obj/item/weapon/stock_parts/console_screen" = 1,
- "/obj/item/stack/cable_coil" = 5)
-
-datum/design/rust_injector
- name = "Internal circuitry (RUST tokamak core)"
- desc = "The circuit board that for a RUST-pattern particle accelerator."
- id = "pacman"
- req_tech = list(powerstorage = 3, engineering = 4, plasmatech = 4, materials = 6)
- build_type = IMPRINTER
- reliability_base = 79
- materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$uranium" = 2000)
- build_path = "/obj/item/weapon/circuitboard/rust_core"
diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/core_control.dm b/code/WorkInProgress/Cael_Aislinn/Rust/core_control.dm
deleted file mode 100644
index f20f33a7ac4..00000000000
--- a/code/WorkInProgress/Cael_Aislinn/Rust/core_control.dm
+++ /dev/null
@@ -1,143 +0,0 @@
-
-/obj/machinery/computer/rust_core_control
- name = "RUST Core Control"
- icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
- icon_state = "core_control"
- var/list/connected_devices = list()
- var/id_tag = "allan remember to update this before you leave"
- var/scan_range = 25
-
- //currently viewed
- var/obj/machinery/power/rust_core/cur_viewed_device
-
-/obj/machinery/computer/rust_core_control/process()
- if(stat & (BROKEN|NOPOWER))
- return
-
-/obj/machinery/computer/rust_core_control/attack_ai(mob/user)
- attack_hand(user)
-
-/obj/machinery/computer/rust_core_control/attack_hand(mob/user)
- add_fingerprint(user)
- interact(user)
-
-/obj/machinery/computer/rust_core_control/interact(mob/user)
- if(stat & BROKEN)
- user.unset_machine()
- user << browse(null, "window=core_control")
- return
- if (!istype(user, /mob/living/silicon) && (get_dist(src, user) > 1 ))
- user.unset_machine()
- user << browse(null, "window=core_control")
- return
-
- var/dat = ""
- if(stat & NOPOWER)
- dat += "The console is dark and nonresponsive."
- else
- dat += "Reactor Core Primary Monitor
"
- if(cur_viewed_device && cur_viewed_device.stat & (BROKEN|NOPOWER))
- cur_viewed_device = null
- if(cur_viewed_device && !cur_viewed_device.remote_access_enabled)
- cur_viewed_device = null
-
- if(cur_viewed_device)
- dat += "Device tag: [cur_viewed_device.id_tag ? cur_viewed_device.id_tag : "UNSET"]
"
- dat += "Device [cur_viewed_device.owned_field ? "activated" : "deactivated"].
"
- dat += "\[Bring field [cur_viewed_device.owned_field ? "offline" : "online"]\]
"
- dat += "Device [cur_viewed_device.anchored ? "secured" : "unsecured"].
"
- dat += "
| Device tag | " - dat += "" - dat += " |
| [C.id_tag] | " - dat += "\[Manage\] | " - dat += "
| ID | " - dat += "Assembly | " - dat += "Consumption | " - dat += "Depletion | " - dat += "Duration | " - dat += "Next stage | " - dat += "" - dat += " | " - dat += " | |||
| [I.id_tag] | " - if(I.cur_assembly) - dat += "\[[I.injecting ? "Halt injecting" : "Begin injecting"]\] | " - else - dat += "None | " - dat += "[I.fuel_usage * 100]% | " - if(I.cur_assembly) - dat += "[I.cur_assembly.percent_depleted * 100]% | " - else - dat += "NA | " - if(stage_times.Find(I.id_tag)) - dat += "[ticks_this_stage]/[stage_times[I.id_tag]]s Modify | " - else - dat += "[ticks_this_stage]s Set | " - if(proceeding_stages.Find(I.id_tag)) - dat += "[proceeding_stages[I.id_tag]] | " - else - dat += "None \[modify\] | " - dat += "\[[active_stages.Find(I.id_tag) ? "Deactivate stage" : "Activate stage "] \] | " - dat += "
| Injector Status | " - t += "Injection interval (sec) | " - t += "Assembly consumption per injection | " - t += "Fuel Assembly Port | " - t += "Assembly depletion percentage | " - t += "
| Fuel Injection Stage: [stage] [active_stage == stage ? " (Currently active)" : "Activate"] | ||||
| [Injector.on && Injector.remote_enabled ? "Operational" : "Unresponsive"] | " - t += "[Injector.rate/10] Modify | " - t += "[Injector.fuel_usage*100]% Modify | " - t += "[Injector.owned_assembly_port ? "[Injector.owned_assembly_port.cur_assembly ? "Loaded": "Empty"]" : "Disconnected" ] | " - t += "[Injector.owned_assembly_port && Injector.owned_assembly_port.cur_assembly ? "[Injector.owned_assembly_port.cur_assembly.amount_depleted*100]%" : ""] | " - t += "
LIST OF SPELLS AVAILABLE
Magic Missile:
This spell fires several, slow moving, magic projectiles at nearby targets. If they hit a target, it is paralyzed and takes minor damage.
Fireball:
This spell fires a fireball at a target and does not require wizard garb. Be careful not to fire it at people that are standing next to you.
Disintegrate:This spell instantly kills somebody adjacent to you with the vilest of magick. It has a long cooldown.
Disable Technology:
This spell disables all weapons, cameras and most other technology in range.
Smoke:
This spell spawns a cloud of choking smoke at your location and does not require wizard garb.
Blind:
This spell temporarly blinds a single person and does not require wizard garb.
Forcewall:
This spell creates an unbreakable wall that lasts for 30 seconds and does not require wizard garb.
Blink:
This spell randomly teleports you a short distance. Useful for evasion or getting into areas if you have patience.
Teleport:
This spell teleports you to a type of area of your selection. Very useful if you are in danger, but has a decent cooldown, and is unpredictable.
Mutate:
This spell causes you to turn into a hulk, and gain telekinesis for a short while.
Ethereal Jaunt:
This spell creates your ethereal form, temporarily making you invisible and able to pass through walls.
Knock:
This spell opens nearby doors and does not require wizard garb.
Please note that changing these settings can and probably will result in death, destruction and mayhem. Change at your own risk.
-| Other | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Other | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Dionaea Nymph | " else - jobs += "Dionaea | " + jobs += "Dionaea Nymph | " + + //NPC + if(jobban_isbanned(M, "NPC")) + jobs += "NPC | " + else + jobs += "NPC | " + + //ANTAG HUD + if(jobban_isbanned(M, "AntagHUD")) + jobs += "AntagHUD | " + else + jobs += "AntagHUD | " //ERT if(jobban_isbanned(M, "Emergency Response Team") || isbanned_dept) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 2b7c9e79f0e..4bcc4bec78c 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -223,6 +223,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0) for(var/mob/M in player_list) if(M.stat != DEAD) continue //we are not dead! if(!M.client.prefs.be_special & BE_ALIEN) continue //we don't want to be an alium + if(jobban_isbanned(M, "alien")) continue //we are jobbanned if(M.client.is_afk()) continue //we are afk if(M.mind && M.mind.current && M.mind.current.stat != DEAD) continue //we have a live body we are tied to candidates += M.ckey diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 0b09395ce8e..a2591aff17e 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -2,25 +2,59 @@ var/list/preferences_datums = list() -var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm --rastaf +var/global/list/special_roles = list( //keep synced with the defines BE_* in setup.dm //some autodetection here. - "traitor" = IS_MODE_COMPILED("traitor"), // 0 - "operative" = IS_MODE_COMPILED("nuclear"), // 1 + "pAI" = 1, // 0 + "traitor" = IS_MODE_COMPILED("traitor"), // 1 "changeling" = IS_MODE_COMPILED("changeling"), // 2 - "wizard" = IS_MODE_COMPILED("wizard"), // 3 - "malf AI" = IS_MODE_COMPILED("malfunction"), // 4 - "revolutionary" = IS_MODE_COMPILED("revolution"), // 5 - "alien candidate" = 1, //always show // 6 - "pAI candidate" = 1, // -- TLE // 7 - "cultist" = IS_MODE_COMPILED("cult"), // 8 - "plant" = 1, // 9 - "ninja" = "true", // 10 - "raider" = IS_MODE_COMPILED("heist"), // 11 - "slime" = 1, // 12 - "vampire" = IS_MODE_COMPILED("vampire"), // 13 - "mutineer" = IS_MODE_COMPILED("mutiny"), // 14 - "blob" = IS_MODE_COMPILED("blob") // 15 + "vampire" = IS_MODE_COMPILED("vampire"), // 3 + "revolutionary" = IS_MODE_COMPILED("revolution"), // 4 + "blob" = IS_MODE_COMPILED("blob"), // 5 + "operative" = IS_MODE_COMPILED("nuclear"), // 6 + "cultist" = IS_MODE_COMPILED("cult"), // 7 + "wizard" = IS_MODE_COMPILED("wizard"), // 8 + "raider" = IS_MODE_COMPILED("heist"), // 9 + "alien" = 1, // 10 + "ninja" = 1, // 11 + "mutineer" = IS_MODE_COMPILED("mutiny"), // 12 + "malf AI" = IS_MODE_COMPILED("malfunction") // 13 ) +var/global/list/special_role_times = list( //minimum age (in days) for accounts to play these roles + num2text(BE_TRAITOR) = 14, + num2text(BE_OPERATIVE) = 21, + num2text(BE_CHANGELING) = 14, + num2text(BE_WIZARD) = 21, + num2text(BE_MALF) = 30, + num2text(BE_REV) = 14, + num2text(BE_ALIEN) = 21, + num2text(BE_PAI) = 0, + num2text(BE_CULTIST) = 21, + num2text(BE_NINJA) = 21, + num2text(BE_RAIDER) = 21, + num2text(BE_VAMPIRE) = 14, + num2text(BE_MUTINEER) = 21, + num2text(BE_BLOB) = 14 +) + +/proc/player_old_enough_antag(client/C, role) + if(available_in_days_antag(C, role) == 0) + return 1 //Available in 0 days = available right now = player is old enough to play. + return 0 + +/proc/available_in_days_antag(client/C, role) + if(!C) + return 0 + if(!role) + return 0 + if(!config.use_age_restriction_for_antags) + return 0 + if(!isnum(C.player_age)) + return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced + var/minimal_player_age_antag = special_role_times[num2text(role)] + if(!isnum(minimal_player_age_antag)) + return 0 + + return max(0, minimal_player_age_antag - C.player_age) var/const/MAX_SAVE_SLOTS = 10 @@ -327,20 +361,21 @@ datum/preferences dat += "OOC Notes: Edit"
- dat += "Antagonist Settings" + dat += "Special Role Settings" // dat += "" if(jobban_isbanned(user, "Syndicate")) - dat += "You are banned from antagonist roles." + dat += "You are banned from special roles." src.be_special = 0 else var/n = 0 for (var/i in special_roles) if(special_roles[i]) //if mode is available on the server + var/special_role_flag = be_special_flags[i] if(jobban_isbanned(user, i)) dat += "Be [i]: \[BANNED] " - else if(i == "pai candidate") - if(jobban_isbanned(user, "pAI")) - dat += "Be [i]: \[BANNED] " + else if(!player_old_enough_antag(user.client,special_role_flag)) + var/available_in_days_antag = available_in_days_antag(user.client,special_role_flag) + dat += "Be [i]: \[IN [(available_in_days_antag)] DAYS] " else dat += "Be [i]: [src.be_special&(1< " n++ diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index 9250796e29a..012497c8e08 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -127,4 +127,35 @@ item_state = "s_helmet" desc = "A lightweight space helmet with the basic ability to protect the wearer from the vacuum of space during emergencies." flags_inv = HIDEMASK|HIDEEARS|HIDEEYES - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20) \ No newline at end of file + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 20) + +//Mime's Hardsuit +/obj/item/clothing/head/helmet/space/eva/mime + name = "mime eva helmet" +// icon = 'spaceciv.dmi' + desc = "An eva helmet specifically designed for the mime." + icon_state = "spacemimehelmet" + item_state = "spacemimehelmet" + +/obj/item/clothing/suit/space/eva/mime + name = "mime eva suit" +// icon = 'spaceciv.dmi' + desc = "An EVA suit specifically designed for the mime." + icon_state = "spacemime_suit" + item_state = "spacemime_items" + allowed = list(/obj/item/weapon/tank) + +/obj/item/clothing/head/helmet/space/eva/clown + name = "clown eva helmet" +// icon = 'spaceciv.dmi' + desc = "An EVA helmet specifically designed for the clown. SPESSHONK!" + icon_state = "clownhelmet" + item_state = "clownhelmet" + +/obj/item/clothing/suit/space/eva/clown + name = "clown eva suit" +// icon = 'spaceciv.dmi' + desc = "An EVA suit specifically designed for the clown. SPESSHONK!" + icon_state = "spaceclown_suit" + item_state = "spaceclown_items" + allowed = list(/obj/item/weapon/tank) diff --git a/code/WorkInProgress/computer3/NTOS.dm b/code/modules/computer3/NTOS.dm similarity index 100% rename from code/WorkInProgress/computer3/NTOS.dm rename to code/modules/computer3/NTOS.dm diff --git a/code/WorkInProgress/computer3/bios.dm b/code/modules/computer3/bios.dm similarity index 100% rename from code/WorkInProgress/computer3/bios.dm rename to code/modules/computer3/bios.dm diff --git a/code/WorkInProgress/computer3/buildandrepair.dm b/code/modules/computer3/buildandrepair.dm similarity index 100% rename from code/WorkInProgress/computer3/buildandrepair.dm rename to code/modules/computer3/buildandrepair.dm diff --git a/code/WorkInProgress/computer3/component.dm b/code/modules/computer3/component.dm similarity index 100% rename from code/WorkInProgress/computer3/component.dm rename to code/modules/computer3/component.dm diff --git a/code/WorkInProgress/computer3/computer.dm b/code/modules/computer3/computer.dm similarity index 100% rename from code/WorkInProgress/computer3/computer.dm rename to code/modules/computer3/computer.dm diff --git a/code/WorkInProgress/computer3/computer3_notes.dm b/code/modules/computer3/computer3_notes.dm similarity index 100% rename from code/WorkInProgress/computer3/computer3_notes.dm rename to code/modules/computer3/computer3_notes.dm diff --git a/code/WorkInProgress/computer3/computers/HolodeckControl.dm b/code/modules/computer3/computers/HolodeckControl.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/HolodeckControl.dm rename to code/modules/computer3/computers/HolodeckControl.dm diff --git a/code/WorkInProgress/computer3/computers/Operating.dm b/code/modules/computer3/computers/Operating.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/Operating.dm rename to code/modules/computer3/computers/Operating.dm diff --git a/code/WorkInProgress/computer3/computers/aifixer.dm b/code/modules/computer3/computers/aifixer.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/aifixer.dm rename to code/modules/computer3/computers/aifixer.dm diff --git a/code/WorkInProgress/computer3/computers/arcade.dm b/code/modules/computer3/computers/arcade.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/arcade.dm rename to code/modules/computer3/computers/arcade.dm diff --git a/code/WorkInProgress/computer3/computers/atmos_alert.dm b/code/modules/computer3/computers/atmos_alert.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/atmos_alert.dm rename to code/modules/computer3/computers/atmos_alert.dm diff --git a/code/WorkInProgress/computer3/computers/camera.dm b/code/modules/computer3/computers/camera.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/camera.dm rename to code/modules/computer3/computers/camera.dm diff --git a/code/WorkInProgress/computer3/computers/card.dm b/code/modules/computer3/computers/card.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/card.dm rename to code/modules/computer3/computers/card.dm diff --git a/code/WorkInProgress/computer3/computers/cloning.dm b/code/modules/computer3/computers/cloning.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/cloning.dm rename to code/modules/computer3/computers/cloning.dm diff --git a/code/WorkInProgress/computer3/computers/communications.dm b/code/modules/computer3/computers/communications.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/communications.dm rename to code/modules/computer3/computers/communications.dm diff --git a/code/WorkInProgress/computer3/computers/crew.dm b/code/modules/computer3/computers/crew.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/crew.dm rename to code/modules/computer3/computers/crew.dm diff --git a/code/WorkInProgress/computer3/computers/customs.dm b/code/modules/computer3/computers/customs.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/customs.dm rename to code/modules/computer3/computers/customs.dm diff --git a/code/WorkInProgress/computer3/computers/law.dm b/code/modules/computer3/computers/law.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/law.dm rename to code/modules/computer3/computers/law.dm diff --git a/code/WorkInProgress/computer3/computers/medical.dm b/code/modules/computer3/computers/medical.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/medical.dm rename to code/modules/computer3/computers/medical.dm diff --git a/code/WorkInProgress/computer3/computers/message.dm b/code/modules/computer3/computers/message.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/message.dm rename to code/modules/computer3/computers/message.dm diff --git a/code/WorkInProgress/computer3/computers/power.dm b/code/modules/computer3/computers/power.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/power.dm rename to code/modules/computer3/computers/power.dm diff --git a/code/WorkInProgress/computer3/computers/prisoner.dm b/code/modules/computer3/computers/prisoner.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/prisoner.dm rename to code/modules/computer3/computers/prisoner.dm diff --git a/code/WorkInProgress/computer3/computers/prisonshuttle.dm b/code/modules/computer3/computers/prisonshuttle.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/prisonshuttle.dm rename to code/modules/computer3/computers/prisonshuttle.dm diff --git a/code/WorkInProgress/computer3/computers/robot.dm b/code/modules/computer3/computers/robot.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/robot.dm rename to code/modules/computer3/computers/robot.dm diff --git a/code/WorkInProgress/computer3/computers/scanconsole.dm b/code/modules/computer3/computers/scanconsole.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/scanconsole.dm rename to code/modules/computer3/computers/scanconsole.dm diff --git a/code/WorkInProgress/computer3/computers/security.dm b/code/modules/computer3/computers/security.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/security.dm rename to code/modules/computer3/computers/security.dm diff --git a/code/WorkInProgress/computer3/computers/shuttle.dm b/code/modules/computer3/computers/shuttle.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/shuttle.dm rename to code/modules/computer3/computers/shuttle.dm diff --git a/code/WorkInProgress/computer3/computers/specops_shuttle.dm b/code/modules/computer3/computers/specops_shuttle.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/specops_shuttle.dm rename to code/modules/computer3/computers/specops_shuttle.dm diff --git a/code/WorkInProgress/computer3/computers/station_alert.dm b/code/modules/computer3/computers/station_alert.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/station_alert.dm rename to code/modules/computer3/computers/station_alert.dm diff --git a/code/WorkInProgress/computer3/computers/syndicate_shuttle.dm b/code/modules/computer3/computers/syndicate_shuttle.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/syndicate_shuttle.dm rename to code/modules/computer3/computers/syndicate_shuttle.dm diff --git a/code/WorkInProgress/computer3/computers/syndicate_specops_shuttle.dm b/code/modules/computer3/computers/syndicate_specops_shuttle.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/syndicate_specops_shuttle.dm rename to code/modules/computer3/computers/syndicate_specops_shuttle.dm diff --git a/code/WorkInProgress/computer3/computers/welcome.dm b/code/modules/computer3/computers/welcome.dm similarity index 100% rename from code/WorkInProgress/computer3/computers/welcome.dm rename to code/modules/computer3/computers/welcome.dm diff --git a/code/WorkInProgress/computer3/file.dm b/code/modules/computer3/file.dm similarity index 100% rename from code/WorkInProgress/computer3/file.dm rename to code/modules/computer3/file.dm diff --git a/code/WorkInProgress/computer3/laptop.dm b/code/modules/computer3/laptop.dm similarity index 100% rename from code/WorkInProgress/computer3/laptop.dm rename to code/modules/computer3/laptop.dm diff --git a/code/WorkInProgress/computer3/lapvend.dm b/code/modules/computer3/lapvend.dm similarity index 100% rename from code/WorkInProgress/computer3/lapvend.dm rename to code/modules/computer3/lapvend.dm diff --git a/code/WorkInProgress/computer3/networking.dm b/code/modules/computer3/networking.dm similarity index 100% rename from code/WorkInProgress/computer3/networking.dm rename to code/modules/computer3/networking.dm diff --git a/code/WorkInProgress/computer3/program.dm b/code/modules/computer3/program.dm similarity index 100% rename from code/WorkInProgress/computer3/program.dm rename to code/modules/computer3/program.dm diff --git a/code/WorkInProgress/computer3/program_disks.dm b/code/modules/computer3/program_disks.dm similarity index 100% rename from code/WorkInProgress/computer3/program_disks.dm rename to code/modules/computer3/program_disks.dm diff --git a/code/WorkInProgress/computer3/server.dm b/code/modules/computer3/server.dm similarity index 100% rename from code/WorkInProgress/computer3/server.dm rename to code/modules/computer3/server.dm diff --git a/code/WorkInProgress/computer3/storage.dm b/code/modules/computer3/storage.dm similarity index 100% rename from code/WorkInProgress/computer3/storage.dm rename to code/modules/computer3/storage.dm diff --git a/code/WorkInProgress/computer3/test_machines.dm b/code/modules/computer3/test_machines.dm similarity index 100% rename from code/WorkInProgress/computer3/test_machines.dm rename to code/modules/computer3/test_machines.dm diff --git a/code/WorkInProgress/computer3/upload/lawfile.dm b/code/modules/computer3/upload/lawfile.dm similarity index 100% rename from code/WorkInProgress/computer3/upload/lawfile.dm rename to code/modules/computer3/upload/lawfile.dm diff --git a/code/WorkInProgress/computer3/upload/programs.dm b/code/modules/computer3/upload/programs.dm similarity index 100% rename from code/WorkInProgress/computer3/upload/programs.dm rename to code/modules/computer3/upload/programs.dm diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index 64485bf701e..d3f55d43557 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -26,7 +26,7 @@ if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent - var/list/candidates = get_candidates(BE_ALIEN) + var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien") while(spawncount > 0 && vents.len && candidates.len) var/obj/vent = pick_n_take(vents) diff --git a/code/modules/events/borers.dm b/code/modules/events/borers.dm index 66a998756a1..88352307868 100644 --- a/code/modules/events/borers.dm +++ b/code/modules/events/borers.dm @@ -23,7 +23,7 @@ if(temp_vent.network.normal_members.len > 50) vents += temp_vent - var/list/candidates = get_candidates(BE_ALIEN) + var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien") while(spawncount > 0 && vents.len && candidates.len) var/obj/vent = pick_n_take(vents) var/client/C = pick_n_take(candidates) diff --git a/code/modules/events/tgevents/alien_infestation.dm b/code/modules/events/tgevents/alien_infestation.dm index 322c7feaad1..c9d16c2ab4c 100644 --- a/code/modules/events/tgevents/alien_infestation.dm +++ b/code/modules/events/tgevents/alien_infestation.dm @@ -26,7 +26,7 @@ if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent - var/list/candidates = get_candidates(BE_ALIEN) + var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien") while(spawncount > 0 && vents.len && candidates.len) var/obj/vent = pick_n_take(vents) diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/falsewall.dm b/code/modules/jungle/falsewall.dm similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/Jungle/falsewall.dm rename to code/modules/jungle/falsewall.dm diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dm b/code/modules/jungle/jungle.dm similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dm rename to code/modules/jungle/jungle.dm diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi b/code/modules/jungle/jungle.dmi similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dmi rename to code/modules/jungle/jungle.dmi diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_animals.dm b/code/modules/jungle/jungle_animals.dm similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/Jungle/jungle_animals.dm rename to code/modules/jungle/jungle_animals.dm diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_plants.dm b/code/modules/jungle/jungle_plants.dm similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/Jungle/jungle_plants.dm rename to code/modules/jungle/jungle_plants.dm diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm b/code/modules/jungle/jungle_temple.dm similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/Jungle/jungle_temple.dm rename to code/modules/jungle/jungle_temple.dm diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_tribe.dm b/code/modules/jungle/jungle_tribe.dm similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/Jungle/jungle_tribe.dm rename to code/modules/jungle/jungle_tribe.dm diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle_turfs.dm b/code/modules/jungle/jungle_turfs.dm similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/Jungle/jungle_turfs.dm rename to code/modules/jungle/jungle_turfs.dm diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/misc_helpers.dm b/code/modules/jungle/misc_helpers.dm similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/Jungle/misc_helpers.dm rename to code/modules/jungle/misc_helpers.dm diff --git a/code/modules/media/jukebox.dm b/code/modules/media/jukebox.dm index 1f0d12a9dd2..3605e929f7c 100644 --- a/code/modules/media/jukebox.dm +++ b/code/modules/media/jukebox.dm @@ -214,7 +214,7 @@ var/global/loopModeNames=list( /obj/machinery/media/jukebox/process() if(!playlist) var/url="[config.media_base_url]/index.php?playlist=[playlist_id]" - testing("[src] - Updating playlist from [url]...") + //testing("[src] - Updating playlist from [url]...") var/response = world.Export(url) playlist=list() if(response) @@ -240,7 +240,7 @@ var/global/loopModeNames=list( playing=1 autoplay=0 else - testing("[src] failed to update playlist: Response null.") + //testing("[src] failed to update playlist: Response null.") stat &= BROKEN update_icon() return diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm index eeb4cd08ef1..cf4edf1ab2d 100644 --- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm +++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm @@ -74,7 +74,7 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds AttemptGrow() /obj/item/alien_embryo/proc/AttemptGrow(var/gib_on_success = 1) - var/list/candidates = get_candidates(BE_ALIEN, ALIEN_AFK_BRACKET) + var/list/candidates = get_candidates(BE_ALIEN,ALIEN_AFK_BRACKET,"alien") var/client/C = null // To stop clientless larva, we will check that our host has a client diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 54361ed3d36..63504acaca3 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -42,7 +42,7 @@ /obj/item/device/mmi/posibrain/proc/check_observer(var/mob/dead/observer/O) if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) return 0 - if(jobban_isbanned(O, "pAI")) + if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept")) return 0 if(O.client) return 1 @@ -125,7 +125,7 @@ if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) O << "\red Upon using the antagHUD you forfeited the ability to join the round." return - if(jobban_isbanned(O, "pAI")) + if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept")) O << "\red You are job banned from this role." return O.<< "\blue You've been added to the list of ghosts that may become this [src]. Click again to unvolunteer." diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index fd2c6fc99d9..a9e99e87e76 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -353,7 +353,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates O << "\blue A pAI card is looking for personalities. (Sign Up)" //question(O.client) proc/check_recruit(var/mob/dead/observer/O) - if(jobban_isbanned(O, "pAI")) + if(jobban_isbanned(O, "pAI") || jobban_isbanned(O,"nonhumandept")) return 0 if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) return 0 diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index cb05233a350..0073729778d 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -307,15 +307,15 @@ /mob/living/silicon/robot/drone/proc/request_player() for(var/mob/dead/observer/O in player_list) - if(jobban_isbanned(O, "Cyborg")) + if(jobban_isbanned(O,"nonhumandept") || jobban_isbanned(O,"Drone")) continue if(O.client) if(O.client.prefs.be_special & BE_PAI) - question(O.client) + question(O.client,O) -/mob/living/silicon/robot/drone/proc/question(var/client/C) +/mob/living/silicon/robot/drone/proc/question(var/client/C,var/mob/M) spawn(0) - if(!C || jobban_isbanned(C,"Cyborg")) return + if(!C || !M || jobban_isbanned(M,"nonhumandept") || jobban_isbanned(M,"Drone")) return var/response = alert(C, "Someone is attempting to reboot a maintenance drone. Would you like to play as one?", "Maintenance drone reboot", "Yes", "No", "Never for this round.") if(!C || ckey) return diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index 9572421ae4d..d886cb0b5a2 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -80,7 +80,6 @@ /mob/dead/verb/join_as_drone() - set category = "Ghost" set name = "Join As Drone" set desc = "If there is a powered, enabled fabricator in the game world with a prepared chassis, join as a maintenance drone." @@ -95,8 +94,8 @@ if (usr != src) return 0 //something is terribly wrong - if(jobban_isbanned(src,"Cyborg")) - usr << "\red You are banned from playing synthetics and cannot spawn as a drone." + if(jobban_isbanned(src,"nonhumandept") || jobban_isbanned(src,"Drone")) + usr << "\red You are banned from playing drones and cannot spawn as a drone." return var/deathtime = world.time - src.timeofdeath diff --git a/code/modules/mob/living/simple_animal/borer.dm b/code/modules/mob/living/simple_animal/borer.dm index abcd7b94627..8dae4be093b 100644 --- a/code/modules/mob/living/simple_animal/borer.dm +++ b/code/modules/mob/living/simple_animal/borer.dm @@ -510,7 +510,7 @@ mob/living/simple_animal/borer/proc/request_player() if(jobban_isbanned(O, "Syndicate")) continue if(O.client) - if(O.client.prefs.be_special & BE_ALIEN) + if(O.client.prefs.be_special & BE_ALIEN && !jobban_isbanned(O, "alien")) question(O.client) mob/living/simple_animal/borer/proc/question(var/client/C) diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index e0fa382af85..0854948bf6a 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -71,7 +71,7 @@ user << "\red [O] is dead. Sticking it into the frame would sort of defeat the purpose." return - if(jobban_isbanned(B.brainmob, "Cyborg")) + if(jobban_isbanned(B.brainmob, "Cyborg") || jobban_isbanned(B.brainmob,"nonhumandept")) user << "\red [O] does not seem to fit." return diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 1cc7a8fff7d..893992f5b7e 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -71,6 +71,9 @@ for(var/obj/mecha/M in mechas_list) if(get_dist(M, src) <= vision_range && can_see(src, M, vision_range)) L += M + for(var/obj/spacepod/S in spacepods_list) + if(get_dist(S, src) <= vision_range && can_see(src, S, vision_range)) + L += S return L /mob/living/simple_animal/hostile/proc/FindTarget()//Step 2, filter down possible targets to things we actually care about @@ -131,6 +134,10 @@ var/obj/mecha/M = the_target if(M.occupant)//Just so we don't attack empty mechs return 1 + if(istype(the_target, /obj/spacepod)) + var/obj/spacepod/S = the_target + if(S.occupant || S.occupant2)//Just so we don't attack empty mechs + return 1 return 0 /mob/living/simple_animal/hostile/proc/GiveTarget(var/new_target)//Step 4, give us our selected target diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm index 978deb17346..6cf9a8aec56 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm @@ -14,6 +14,11 @@ if(M.occupant) stance = HOSTILE_STANCE_ATTACK return A + else if(istype(A, /obj/spacepod)) + var/obj/spacepod/M = A + if(M.occupant || M.occupant2) + stance = HOSTILE_STANCE_ATTACK + return A /mob/living/simple_animal/hostile/retaliate/ListTargets() if(!enemies.len) @@ -43,6 +48,11 @@ if(M.occupant) enemies |= M enemies |= M.occupant + else if(istype(A, /obj/spacepod)) + var/obj/spacepod/M = A + if(M.occupant || M.occupant2) + enemies |= M + enemies |= M.occupant for(var/mob/living/simple_animal/hostile/retaliate/H in around) var/retaliate_faction_check = 0 diff --git a/code/WorkInProgress/ZomgPonies/mobs/pony.dm b/code/modules/mob/living/simple_animal/pony.dm similarity index 100% rename from code/WorkInProgress/ZomgPonies/mobs/pony.dm rename to code/modules/mob/living/simple_animal/pony.dm diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 7becc36cfa2..890c953c632 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -468,6 +468,10 @@ var/obj/mecha/M = target if (M.occupant) return 0 + if (istype(target,/obj/spacepod)) + var/obj/spacepod/S = target + if (S.occupant || S.occupant2) + return 0 return 1 /mob/living/simple_animal/update_fire() @@ -526,4 +530,8 @@ var/obj/mecha/M = the_target if (M.occupant) return 0 + if (istype(the_target, /obj/spacepod)) + var/obj/spacepod/S = the_target + if (S.occupant || S.occupant2) + return 0 return 1 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 4c9608945c0..6abce2c37d7 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1223,6 +1223,10 @@ mob/proc/yank_out_object() set name = "Respawn as NPC" set category = "Ghost" + if(jobban_isbanned(usr, "NPC")) + usr << "You are banned from playing as NPC's." + return + if((usr in respawnable_list) && (stat==2 || istype(usr,/mob/dead/observer))) var/list/creatures = list("Mouse") for(var/mob/living/L in living_mob_list) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 0722950e54a..a5aad6e3999 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -461,19 +461,19 @@ return 1 //Antag Creatures! -/* if(ispath(MP, /mob/living/simple_animal/hostile/carp)) +/* if(ispath(MP, /mob/living/simple_animal/hostile/carp) && !jobban_isbanned(src, "Syndicate")) return 1 - if(ispath(MP, /mob/living/simple_animal/hostile/giant_spider)) + if(ispath(MP, /mob/living/simple_animal/hostile/giant_spider) && !jobban_isbanned(src, "Syndicate")) return 1 */ - if(ispath(MP, /mob/living/simple_animal/borer)) + if(ispath(MP, /mob/living/simple_animal/borer) && !jobban_isbanned(src, "alien") && !jobban_isbanned(src, "Syndicate")) return 1 - if(ispath(MP, /mob/living/carbon/alien)) + if(ispath(MP, /mob/living/carbon/alien) && !jobban_isbanned(src, "alien") && !jobban_isbanned(src, "Syndicate")) return 1 - if(ispath(MP, /mob/living/simple_animal/hostile/statue)) + if(ispath(MP, /mob/living/simple_animal/hostile/statue) && !jobban_isbanned(src, "Syndicate")) return 1 //Friendly Creatures! - if(ispath(MP, /mob/living/carbon/monkey/diona)) + if(ispath(MP, /mob/living/carbon/monkey/diona) && !jobban_isbanned(src, "Dionaea")) return 1 //Not in here? Must be untested! diff --git a/code/modules/research/designs/bluespace_designs.dm b/code/modules/research/designs/bluespace_designs.dm index 1a3711b3f3e..54fe591a901 100644 --- a/code/modules/research/designs/bluespace_designs.dm +++ b/code/modules/research/designs/bluespace_designs.dm @@ -23,8 +23,19 @@ build_path = /obj/item/weapon/storage/backpack/holding category = list("Bluespace") +/datum/design/bluespace_belt + name = "Belt of Holding" + desc = "An astonishingly complex belt popularized by a rich blue-space technology magnate." + id = "bluespace_belt" + req_tech = list("bluespace" = 4, "materials" = 6) + build_type = PROTOLATHE + materials = list("$gold" = 1500, "$diamond" = 3000, "$uranium" = 1000) + reliability_base = 80 + build_path = /obj/item/weapon/storage/belt/bluespace + category = list("Bluespace") + /datum/design/bluespacebeaker - name = "bluespace beaker" + name = "Bluespace Beaker" desc = "A bluespace beaker, powered by experimental bluespace technology and Element Cuban combined with the Compound Pete. Can hold up to 300 units." id = "bluespacebeaker" req_tech = list("bluespace" = 2, "materials" = 6) diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm index 41ae598a7ce..4567d00bfde 100644 --- a/code/modules/research/designs/machine_designs.dm +++ b/code/modules/research/designs/machine_designs.dm @@ -261,6 +261,16 @@ materials = list("$glass" = 1000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/arcade/orion_trail category = list("Misc. Machinery") + +/datum/design/programmable + name = "Machine Board (Programmable Unloader)" + desc = "The circuit board for a Programmable Unloader." + id = "selunload" + req_tech = list("programming" = 5) + build_type = IMPRINTER + materials = list("$glass" = 2000, "sacid" = 20) + build_path = /obj/item/weapon/circuitboard/programmable + category = list("Misc. Machinery") /datum/design/vendor name = "Machine Board (Vendor)" diff --git a/code/WorkInProgress/Cael_Aislinn/ShieldGen/circuits_and_designs.dm b/code/modules/shieldgen/circuits_and_designs.dm similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/ShieldGen/circuits_and_designs.dm rename to code/modules/shieldgen/circuits_and_designs.dm diff --git a/code/WorkInProgress/Cael_Aislinn/ShieldGen/energy_field.dm b/code/modules/shieldgen/energy_field.dm similarity index 96% rename from code/WorkInProgress/Cael_Aislinn/ShieldGen/energy_field.dm rename to code/modules/shieldgen/energy_field.dm index 4ebfda0024d..a5519fbf70a 100644 --- a/code/WorkInProgress/Cael_Aislinn/ShieldGen/energy_field.dm +++ b/code/modules/shieldgen/energy_field.dm @@ -1,55 +1,55 @@ - -//---------- actual energy field - -/obj/effect/energy_field - name = "energy field" - desc = "Impenetrable field of energy, capable of blocking anything as long as it's active." - icon = 'code/WorkInProgress/Cael_Aislinn/ShieldGen/shielding.dmi' - icon_state = "shieldsparkles" - anchored = 1 - layer = 4.1 //just above mobs - density = 0 - invisibility = 101 - var/strength = 0 - -/obj/effect/energy_field/ex_act(var/severity) - Stress(0.5 + severity) - -/obj/effect/energy_field/bullet_act(var/obj/item/projectile/Proj) - Stress(Proj.damage / 10) - -/obj/effect/energy_field/meteorhit(obj/effect/meteor/M as obj) - if(M) - walk(M,0) - Stress(2) - -/obj/effect/energy_field/proc/Stress(var/severity) - strength -= severity - - //if we take too much damage, drop out - the generator will bring us back up if we have enough power - if(strength < 1) - invisibility = 101 - density = 0 - else if(strength >= 1) - invisibility = 0 - density = 1 - -/obj/effect/energy_field/proc/Strengthen(var/severity) - strength += severity - - //if we take too much damage, drop out - the generator will bring us back up if we have enough power - if(strength >= 1) - invisibility = 0 - density = 1 - else if(strength < 1) - invisibility = 101 - density = 0 - -/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0) - //Purpose: Determines if the object (or airflow) can pass this atom. - //Called by: Movement, airflow. - //Inputs: The moving atom (optional), target turf, "height" and air group - //Outputs: Boolean if can pass. - - //return (!density || !height || air_group) - return !density + +//---------- actual energy field + +/obj/effect/energy_field + name = "energy field" + desc = "Impenetrable field of energy, capable of blocking anything as long as it's active." + icon = 'code/WorkInProgress/Cael_Aislinn/ShieldGen/shielding.dmi' + icon_state = "shieldsparkles" + anchored = 1 + layer = 4.1 //just above mobs + density = 0 + invisibility = 101 + var/strength = 0 + +/obj/effect/energy_field/ex_act(var/severity) + Stress(0.5 + severity) + +/obj/effect/energy_field/bullet_act(var/obj/item/projectile/Proj) + Stress(Proj.damage / 10) + +/obj/effect/energy_field/meteorhit(obj/effect/meteor/M as obj) + if(M) + walk(M,0) + Stress(2) + +/obj/effect/energy_field/proc/Stress(var/severity) + strength -= severity + + //if we take too much damage, drop out - the generator will bring us back up if we have enough power + if(strength < 1) + invisibility = 101 + density = 0 + else if(strength >= 1) + invisibility = 0 + density = 1 + +/obj/effect/energy_field/proc/Strengthen(var/severity) + strength += severity + + //if we take too much damage, drop out - the generator will bring us back up if we have enough power + if(strength >= 1) + invisibility = 0 + density = 1 + else if(strength < 1) + invisibility = 101 + density = 0 + +/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0) + //Purpose: Determines if the object (or airflow) can pass this atom. + //Called by: Movement, airflow. + //Inputs: The moving atom (optional), target turf, "height" and air group + //Outputs: Boolean if can pass. + + //return (!density || !height || air_group) + return !density diff --git a/code/WorkInProgress/Cael_Aislinn/ShieldGen/shield_capacitor.dm b/code/modules/shieldgen/shield_capacitor.dm similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/ShieldGen/shield_capacitor.dm rename to code/modules/shieldgen/shield_capacitor.dm diff --git a/code/WorkInProgress/Cael_Aislinn/ShieldGen/shield_gen.dm b/code/modules/shieldgen/shield_gen.dm similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/ShieldGen/shield_gen.dm rename to code/modules/shieldgen/shield_gen.dm diff --git a/code/WorkInProgress/Cael_Aislinn/ShieldGen/shield_gen_external.dm b/code/modules/shieldgen/shield_gen_external.dm similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/ShieldGen/shield_gen_external.dm rename to code/modules/shieldgen/shield_gen_external.dm diff --git a/code/WorkInProgress/Cael_Aislinn/ShieldGen/shielding.dmi b/code/modules/shieldgen/shielding.dmi similarity index 100% rename from code/WorkInProgress/Cael_Aislinn/ShieldGen/shielding.dmi rename to code/modules/shieldgen/shielding.dmi diff --git a/code/setup.dm b/code/setup.dm index ce7ec7b3d02..8770a2c08f4 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -731,32 +731,28 @@ var/list/TAGGERLOCATIONS = list("Disposals", #define BE_ALIEN 64 #define BE_PAI 128 #define BE_CULTIST 256 -#define BE_PLANT 512 -#define BE_NINJA 1024 -#define BE_RAIDER 2048 -#define BE_SLIME 4096 -#define BE_VAMPIRE 8192 -#define BE_MUTINEER 16384 -#define BE_BLOB 32768 +#define BE_NINJA 512 +#define BE_RAIDER 1024 +#define BE_VAMPIRE 2048 +#define BE_MUTINEER 4096 +#define BE_BLOB 8192 var/list/be_special_flags = list( - "Traitor" = BE_TRAITOR, - "Operative" = BE_OPERATIVE, - "Changeling" = BE_CHANGELING, - "Wizard" = BE_WIZARD, - "Malf AI" = BE_MALF, - "Revolutionary" = BE_REV, - "Xenomorph" = BE_ALIEN, + "traitor" = BE_TRAITOR, + "operative" = BE_OPERATIVE, + "changeling" = BE_CHANGELING, + "wizard" = BE_WIZARD, + "malf AI" = BE_MALF, + "revolutionary" = BE_REV, + "alien" = BE_ALIEN, "pAI" = BE_PAI, - "Cultist" = BE_CULTIST, - "Plant" = BE_PLANT, - "Ninja" = BE_NINJA, - "Vox Raider" = BE_RAIDER, - "Slime" = BE_SLIME, - "Vampire" = BE_VAMPIRE, - "Mutineer" = BE_MUTINEER, - "Blob" = BE_BLOB - ) + "cultist" = BE_CULTIST, + "ninja" = BE_NINJA, + "raider" = BE_RAIDER, + "vampire" = BE_VAMPIRE, + "mutineer" = BE_MUTINEER, + "blob" = BE_BLOB +) #define AGE_MIN 17 //youngest a character can be #define AGE_MAX 85 //oldest a character can be diff --git a/code/unused/AI_Visibility.dm b/code/unused/AI_Visibility.dm deleted file mode 100644 index d218f4409b8..00000000000 --- a/code/unused/AI_Visibility.dm +++ /dev/null @@ -1,310 +0,0 @@ -//All credit for this goes to Uristqwerty. - -/turf - var/image/obscured - var/image/dim - -/turf/proc/visibilityChanged() - cameranet.updateVisibility(src) - -/datum/camerachunk - var/list/obscuredTurfs = list() - var/list/visibleTurfs = list() - var/list/dimTurfs = list() - var/list/obscured = list() - var/list/dim = list() - var/list/cameras = list() - var/list/turfs = list() - var/list/seenby = list() - var/visible = 0 - var/changed = 0 - var/updating = 0 - -/mob/aiEye - var/list/visibleCameraChunks = list() - var/mob/ai = null - density = 0 - -/datum/camerachunk/proc/add(mob/aiEye/ai) - ai.visibleCameraChunks += src - if(ai.ai.client) - ai.ai.client.images += obscured - ai.ai.client.images += dim - visible++ - seenby += ai - if(changed && !updating) - update() - -/datum/camerachunk/proc/remove(mob/aiEye/ai) - ai.visibleCameraChunks -= src - if(ai.ai.client) - ai.ai.client.images -= obscured - ai.ai.client.images -= dim - seenby -= ai - if(visible > 0) - visible-- - -/datum/camerachunk/proc/visibilityChanged(turf/loc) - if(!(loc in visibleTurfs)) - return - - hasChanged() - -/datum/camerachunk/proc/hasChanged() - if(visible) - if(!updating) - updating = 1 - spawn(10)//Batch large changes, such as many doors opening or closing at once - update() - updating = 0 - else - changed = 1 - -/datum/camerachunk/proc/update() - var/list/newDimTurfs = list() - var/list/newVisibleTurfs = list() - - for(var/obj/machinery/camera/c in cameras) - var/lum = c.luminosity - c.luminosity = 6 - for(var/turf/t in view(7, c)) - if(t in turfs) - newDimTurfs += t - - for(var/turf/t in view(6, c)) - if(t in turfs) - newVisibleTurfs += t - - c.luminosity = lum - - var/list/dimAdded = newDimTurfs - dimTurfs - var/list/dimRemoved = dimTurfs - newDimTurfs - var/list/visAdded = newVisibleTurfs - visibleTurfs - var/list/visRemoved = visibleTurfs - newVisibleTurfs - - visibleTurfs = newVisibleTurfs - dimTurfs = newDimTurfs - obscuredTurfs = turfs - dimTurfs - dimTurfs -= visibleTurfs - - for(var/turf/t in dimRemoved) - if(t.dim) - dim -= t.dim - for(var/mob/aiEye/m in seenby) - if(m.ai.client) - m.ai.client.images -= t.dim - - if(!(t in visibleTurfs)) - if(!t.obscured) - t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15) - - obscured += t.obscured - for(var/mob/aiEye/m in seenby) - if(m.ai.client) - m.ai.client.images += t.obscured - - for(var/turf/t in dimAdded) - if(!(t in visibleTurfs)) - if(!t.dim) - t.dim = image('icons/effects/cameravis.dmi', t, "dim", 15) - t.mouse_opacity = 0 - - dim += t.dim - for(var/mob/aiEye/m in seenby) - if(m.ai.client) - m.ai.client.images += t.dim - - if(t.obscured) - obscured -= t.obscured - for(var/mob/aiEye/m in seenby) - if(m.ai.client) - m.ai.client.images -= t.obscured - - for(var/turf/t in visAdded) - if(t.obscured) - obscured -= t.obscured - for(var/mob/aiEye/m in seenby) - if(m.ai.client) - m.ai.client.images -= t.obscured - - for(var/turf/t in visRemoved) - if(t in obscuredTurfs) - if(!t.obscured) - t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15) - - obscured += t.obscured - for(var/mob/aiEye/m in seenby) - if(m.ai.client) - m.ai.client.images += t.obscured - - - -/datum/camerachunk/New(loc, x, y, z) - x &= ~0xf - y &= ~0xf - - for(var/obj/machinery/camera/c in range(16, locate(x + 8, y + 8, z))) - if(c.status) - cameras += c - - for(var/turf/t in range(10, locate(x + 8, y + 8, z))) - if(t.x >= x && t.y >= y && t.x < x + 16 && t.y < y + 16) - turfs += t - - for(var/obj/machinery/camera/c in cameras) - var/lum = c.luminosity - c.luminosity = 6 - for(var/turf/t in view(7, c)) - if(t in turfs) - dimTurfs += t - - for(var/turf/t in view(6, c)) - if(t in turfs) - visibleTurfs += t - - c.luminosity = lum - - obscuredTurfs = turfs - dimTurfs - dimTurfs -= visibleTurfs - - for(var/turf/t in obscuredTurfs) - if(!t.obscured) - t.obscured = image('icons/effects/cameravis.dmi', t, "black", 15) - - obscured += t.obscured - - for(var/turf/t in dimTurfs) - if(!(t in visibleTurfs)) - if(!t.dim) - t.dim = image('icons/effects/cameravis.dmi', t, "dim", TURF_LAYER) - - dim += t.dim - -var/datum/cameranet/cameranet = new() - -/datum/cameranet - var/list/cameras = list() - var/list/chunks = list() - var/network = "net1" - var/ready = 0 - -/datum/cameranet/New() - ..() - -/datum/cameranet/proc/chunkGenerated(x, y, z) - var/key = "[x],[y],[z]" - return key in chunks - -/datum/cameranet/proc/getCameraChunk(x, y, z) - var/key = "[x],[y],[z]" - - if(!(key in chunks)) - chunks[key] = new /datum/camerachunk(null, x, y, z) - - return chunks[key] - -/datum/cameranet/proc/visibility(mob/aiEye/ai) - var/x1 = max(0, ai.x - 16) & ~0xf - var/y1 = max(0, ai.y - 16) & ~0xf - var/x2 = min(world.maxx, ai.x + 16) & ~0xf - var/y2 = min(world.maxy, ai.y + 16) & ~0xf - - var/list/visibleChunks = list() - - for(var/x = x1; x <= x2; x += 16) - for(var/y = y1; y <= y2; y += 16) - visibleChunks += getCameraChunk(x, y, ai.z) - - var/list/remove = ai.visibleCameraChunks - visibleChunks - var/list/add = visibleChunks - ai.visibleCameraChunks - - for(var/datum/camerachunk/c in remove) - c.remove(ai) - - for(var/datum/camerachunk/c in add) - c.add(ai) - -/datum/cameranet/proc/updateVisibility(turf/loc) - if(!chunkGenerated(loc.x & ~0xf, loc.y & ~0xf, loc.z)) - return - - var/datum/camerachunk/chunk = getCameraChunk(loc.x & ~0xf, loc.y & ~0xf, loc.z) - chunk.visibilityChanged(loc) - -/datum/cameranet/proc/addCamera(obj/machinery/camera/c) - var/x1 = max(0, c.x - 16) & ~0xf - var/y1 = max(0, c.y - 16) & ~0xf - var/x2 = min(world.maxx, c.x + 16) & ~0xf - var/y2 = min(world.maxy, c.y + 16) & ~0xf - - for(var/x = x1; x <= x2; x += 16) - for(var/y = y1; y <= y2; y += 16) - if(chunkGenerated(x, y, c.z)) - var/datum/camerachunk/chunk = getCameraChunk(x, y, c.z) - if(!(c in chunk.cameras)) - chunk.cameras += c - chunk.hasChanged() - - -/mob/living/silicon/ai/var/mob/aiEye/eyeobj = new() - -/mob/living/silicon/ai/New() - ..() - eyeobj.ai = src - -/mob/living/silicon/ai/verb/freelook() - set category = "AI Commands" - set name = "freelook" - current = null //cancel camera view first, it causes problems - cameraFollow = null - machine = null - if(client.eye == eyeobj) - client.eye = src - for(var/datum/camerachunk/c in eyeobj.visibleCameraChunks) - c.remove(eyeobj) - else - client.eye = eyeobj - eyeobj.loc = loc - cameranet.visibility(eyeobj) - cameraFollow = null -/mob/aiEye/Move() - . = ..() - if(.) - cameranet.visibility(src) - -/client/AIMove(n, direct, var/mob/living/silicon/ai/user) - if(eye == user.eyeobj) - user.eyeobj.loc = get_step(user.eyeobj, direct) - cameranet.visibility(user.eyeobj) - - else - return ..() - -/* -/client/AIMoveZ(direct, var/mob/living/silicon/ai/user) - if(eye == user.eyeobj) - var/dif = 0 - if(direct == UP && user.eyeobj.z > 1) - dif = -1 - else if(direct == DOWN && user.eyeobj.z < 4) - dif = 1 - user.eyeobj.loc = locate(user.eyeobj.x, user.eyeobj.y, user.eyeobj.z + dif) - cameranet.visibility(user.eyeobj) - else - return ..() -*/ - -/turf/move_camera_by_click() - if(istype(usr, /mob/living/silicon/ai)) - var/mob/living/silicon/ai/AI = usr - if(AI.client.eye == AI.eyeobj) - return - return ..() - -/obj/machinery/door/update_nearby_tiles(need_rebuild) - . = ..(need_rebuild) - cameranet.updateVisibility(loc) - -/obj/machinery/camera/New() - ..() - cameranet.addCamera(src) \ No newline at end of file diff --git a/code/unused/Agouri_stuff.dm b/code/unused/Agouri_stuff.dm deleted file mode 100644 index 391c44229bc..00000000000 --- a/code/unused/Agouri_stuff.dm +++ /dev/null @@ -1,1949 +0,0 @@ -/* -/obj/vehicle/airtight - //inner atmos - var/use_internal_tank = 0 - var/internal_tank_valve = ONE_ATMOSPHERE - var/obj/machinery/portable_atmospherics/canister/internal_tank - var/datum/gas_mixture/cabin_air - var/obj/machinery/atmospherics/portables_connector/connected_port = null - - var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature - var/datum/global_iterator/pr_give_air //moves air from tank to cabin - - -/obj/vehicle/airtight/New() - ..() - src.add_airtank() - src.add_cabin() - src.add_airtight_iterators() - - - - -//######################################### Helpers for airtight vehicles ######################################### - -/obj/vehicle/airtight/proc/add_cabin() - cabin_air = new - cabin_air.temperature = T20C - cabin_air.volume = 200 - cabin_air.oxygen = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) - cabin_air.nitrogen = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) - return cabin_air - -/obj/vehicle/airtight/proc/add_airtank() - internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src) - return internal_tank - -/obj/vehicle/airtight/proc/add_airtight_iterators() - pr_int_temp_processor = new /datum/global_iterator/vehicle_preserve_temp(list(src)) - pr_give_air = new /datum/global_iterator/vehicle_tank_give_air(list(src)) - - -//######################################### Specific datums for airtight vehicles ################################# - - -/datum/global_iterator/vehicle_preserve_temp //normalizing cabin air temperature to 20 degrees celsium - delay = 20 - - process(var/obj/vehicle/airtight/V) - if(V.cabin_air && V.cabin_air.return_volume() > 0) - var/delta = V.cabin_air.temperature - T20C - V.cabin_air.temperature -= max(-10, min(10, round(delta/4,0.1))) - return - - -/datum/global_iterator/vehicle_tank_give_air - delay = 15 - - process(var/obj/vehicle/airtight/V) - if(V.internal_tank) - var/datum/gas_mixture/tank_air = V.internal_tank.return_air() - var/datum/gas_mixture/cabin_air = V.cabin_air - - var/release_pressure = V.internal_tank_valve - var/cabin_pressure = cabin_air.return_pressure() - var/pressure_delta = min(release_pressure - cabin_pressure, (tank_air.return_pressure() - cabin_pressure)/2) - var/transfer_moles = 0 - if(pressure_delta > 0) //cabin pressure lower than release pressure - if(tank_air.return_temperature() > 0) - transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION) - var/datum/gas_mixture/removed = tank_air.remove(transfer_moles) - cabin_air.merge(removed) - else if(pressure_delta < 0) //cabin pressure higher than release pressure - var/datum/gas_mixture/t_air = V.get_turf_air() - pressure_delta = cabin_pressure - release_pressure - if(t_air) - pressure_delta = min(cabin_pressure - t_air.return_pressure(), pressure_delta) - if(pressure_delta > 0) //if location pressure is lower than cabin pressure - transfer_moles = pressure_delta*cabin_air.return_volume()/(cabin_air.return_temperature() * R_IDEAL_GAS_EQUATION) - var/datum/gas_mixture/removed = cabin_air.remove(transfer_moles) - if(t_air) - t_air.merge(removed) - else //just delete the cabin gas, we're in space or some shit - del(removed) - else - return stop() - return - - -//######################################### Atmospherics for vehicles ############################################# - - -/obj/vehicle/proc/get_turf_air() - var/turf/T = get_turf(src) - if(T) - . = T.return_air() - return - -/obj/vehicle/airtight/remove_air(amount) - if(use_internal_tank) - return cabin_air.remove(amount) - else - var/turf/T = get_turf(src) - if(T) - return T.remove_air(amount) - return - -/obj/vehicle/airtight/return_air() - if(use_internal_tank) - return cabin_air - return get_turf_air() - -/obj/vehicle/airtight/proc/return_pressure() - . = 0 - if(use_internal_tank) - . = cabin_air.return_pressure() - else - var/datum/gas_mixture/t_air = get_turf_air() - if(t_air) - . = t_air.return_pressure() - return - - -/obj/vehicle/airtight/proc/return_temperature() - . = 0 - if(use_internal_tank) - . = cabin_air.return_temperature() - else - var/datum/gas_mixture/t_air = get_turf_air() - if(t_air) - . = t_air.return_temperature() - return - -/obj/vehicle/airtight/proc/connect(obj/machinery/atmospherics/portables_connector/new_port) - //Make sure not already connected to something else - if(connected_port || !new_port || new_port.connected_device) - return 0 - - //Make sure are close enough for a valid connection - if(new_port.loc != src.loc) - return 0 - - //Perform the connection - connected_port = new_port - connected_port.connected_device = src - - //Actually enforce the air sharing - var/datum/pipe_network/network = connected_port.return_network(src) - if(network && !(internal_tank.return_air() in network.gases)) - network.gases += internal_tank.return_air() - network.update = 1 - log_message("Vehicle airtank connected to external port.") - return 1 - -/obj/vehicle/airtight/proc/disconnect() - if(!connected_port) - return 0 - - var/datum/pipe_network/network = connected_port.return_network(src) - if(network) - network.gases -= internal_tank.return_air() - - connected_port.connected_device = null - connected_port = null - src.log_message("Vehicle airtank disconnected from external port.") - return 1 - - - - -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// - - - -/obj/vehicle - name = "Vehicle" - icon = 'icons/vehicles/vehicles.dmi' - density = 1 - anchored = 1 - unacidable = 1 //To avoid the pilot-deleting shit that came with mechas - layer = MOB_LAYER - //var/can_move = 1 - var/mob/living/carbon/occupant = null - //var/step_in = 10 //make a step in step_in/10 sec. - //var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South. - //var/step_energy_drain = 10 - var/health = 300 //health is health - //var/deflect_chance = 10 //chance to deflect the incoming projectiles, hits, or lesser the effect of ex_act. - //the values in this list show how much damage will pass through, not how much will be absorbed. - var/list/damage_absorption = list("brute"=0.8,"fire"=1.2,"bullet"=0.9,"laser"=1,"energy"=1,"bomb"=1) - var/obj/item/weapon/cell/cell //Our power source - var/state = 0 - var/list/log = new - var/last_message = 0 - var/add_req_access = 1 - var/maint_access = 1 - //var/dna //dna-locking the mech - var/list/proc_res = list() //stores proc owners, like proc_res["functionname"] = owner reference - var/datum/effect/effect/system/spark_spread/spark_system = new - var/lights = 0 - var/lights_power = 6 - - //inner atmos //These go in airtight.dm, not all vehicles are space-faring -Agouri - //var/use_internal_tank = 0 - //var/internal_tank_valve = ONE_ATMOSPHERE - //var/obj/machinery/portable_atmospherics/canister/internal_tank - //var/datum/gas_mixture/cabin_air - //var/obj/machinery/atmospherics/portables_connector/connected_port = null - - var/obj/item/device/radio/radio = null - - var/max_temperature = 2500 - //var/internal_damage_threshold = 50 //health percentage below which internal damage is possible - var/internal_damage = 0 //contains bitflags - - var/list/operation_req_access = list()//required access level for mecha operation - var/list/internals_req_access = list(access_engine,access_robotics)//required access level to open cell compartment - - //var/datum/global_iterator/pr_int_temp_processor //normalizes internal air mixture temperature //In airtight.dm you go -Agouri - var/datum/global_iterator/pr_inertial_movement //controls intertial movement in spesss - - //var/datum/global_iterator/pr_give_air //moves air from tank to cabin //Y-you too -Agouri - - var/datum/global_iterator/pr_internal_damage //processes internal damage - - - var/wreckage - - var/list/equipment = new - var/obj/selected - //var/max_equip = 3 - - var/datum/events/events - - - -/obj/vehicle/New() - ..() - events = new - icon_state += "-unmanned" - add_radio() - //add_cabin() //No cabin for non-airtights - - spark_system.set_up(2, 0, src) - spark_system.attach(src) - add_cell() - add_iterators() - removeVerb(/obj/mecha/verb/disconnect_from_port) - removeVerb(/atom/movable/verb/pull) - log_message("[src.name]'s functions initialised. Work protocols active - Entering IDLE mode.") - loc.Entered(src) - return - - -//################ Helpers ########################################################### - - -/obj/vehicle/proc/removeVerb(verb_path) - verbs -= verb_path - -/obj/vehicle/proc/addVerb(verb_path) - verbs += verb_path - -/*/obj/vehicle/proc/add_airtank() //In airtight.dm -Agouri - internal_tank = new /obj/machinery/portable_atmospherics/canister/air(src) - return internal_tank*/ - -/obj/vehicle/proc/add_cell(var/obj/item/weapon/cell/C=null) - if(C) - C.forceMove(src) - cell = C - return - cell = new(src) - cell.charge = 15000 - cell.maxcharge = 15000 - -/*/obj/vehicle/proc/add_cabin() //In airtight.dm -Agouri - cabin_air = new - cabin_air.temperature = T20C - cabin_air.volume = 200 - cabin_air.oxygen = O2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) - cabin_air.nitrogen = N2STANDARD*cabin_air.volume/(R_IDEAL_GAS_EQUATION*cabin_air.temperature) - return cabin_air*/ - -/obj/vehicle/proc/add_radio() - radio = new(src) - radio.name = "[src] radio" - radio.icon = icon - radio.icon_state = icon_state - radio.subspace_transmission = 1 - -/obj/vehicle/proc/add_iterators() - pr_inertial_movement = new /datum/global_iterator/vehicle_intertial_movement(null,0) - //pr_internal_damage = new /datum/global_iterator/vehicle_internal_damage(list(src),0) - //pr_int_temp_processor = new /datum/global_iterator/vehicle_preserve_temp(list(src)) //In airtight.dm's add_airtight_iterators -Agouri - //pr_give_air = new /datum/global_iterator/vehicle_tank_give_air(list(src) //Same here -Agouri - -/obj/vehicle/proc/check_for_support() - if(locate(/obj/structure/grille, orange(1, src)) || locate(/obj/structure/lattice, orange(1, src)) || locate(/turf/simulated, orange(1, src)) || locate(/turf/unsimulated, orange(1, src))) - return 1 - else - return 0 - -//################ Logs and messages ############################################ - - -/obj/vehicle/proc/log_message(message as text,red=null) - log.len++ - log[log.len] = list("time"=world.timeofday,"message"="[red?"":null][message][red?"":null]") - return log.len - - - -//################ Global Iterator Datums ###################################### - - -/datum/global_iterator/vehicle_intertial_movement //inertial movement in space - delay = 7 - - process(var/obj/vehicle/V as obj, direction) - if(direction) - if(!step(V, direction)||V.check_for_support()) - src.stop() - else - src.stop() - return - - -/datum/global_iterator/mecha_internal_damage // processing internal damage - - process(var/obj/mecha/mecha) - if(!mecha.hasInternalDamage()) - return stop() - if(mecha.hasInternalDamage(MECHA_INT_FIRE)) - if(!mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL) && prob(5)) - mecha.clearInternalDamage(MECHA_INT_FIRE) - if(mecha.internal_tank) - if(mecha.internal_tank.return_pressure()>mecha.internal_tank.maximum_pressure && !(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH))) - mecha.setInternalDamage(MECHA_INT_TANK_BREACH) - var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air() - if(int_tank_air && int_tank_air.return_volume()>0) //heat the air_contents - int_tank_air.temperature = min(6000+T0C, int_tank_air.temperature+rand(10,15)) - if(mecha.cabin_air && mecha.cabin_air.return_volume()>0) - mecha.cabin_air.temperature = min(6000+T0C, mecha.cabin_air.return_temperature()+rand(10,15)) - if(mecha.cabin_air.return_temperature()>mecha.max_temperature/2) - mecha.take_damage(4/round(mecha.max_temperature/mecha.cabin_air.return_temperature(),0.1),"fire") - if(mecha.hasInternalDamage(MECHA_INT_TEMP_CONTROL)) //stop the mecha_preserve_temp loop datum - mecha.pr_int_temp_processor.stop() - if(mecha.hasInternalDamage(MECHA_INT_TANK_BREACH)) //remove some air from internal tank - if(mecha.internal_tank) - var/datum/gas_mixture/int_tank_air = mecha.internal_tank.return_air() - var/datum/gas_mixture/leaked_gas = int_tank_air.remove_ratio(0.10) - if(mecha.loc && hascall(mecha.loc,"assume_air")) - mecha.loc.assume_air(leaked_gas) - else - del(leaked_gas) - if(mecha.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT)) - if(mecha.get_charge()) - mecha.spark_system.start() - mecha.cell.charge -= min(20,mecha.cell.charge) - mecha.cell.maxcharge -= min(20,mecha.cell.maxcharge) - return - - -*/ - - - - - -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// -///////////////////////////////////////////////////////// - - - - -/*/turf/DblClick() - if(istype(usr, /mob/living/silicon/ai)) - return move_camera_by_click() - if(usr.stat || usr.restrained() || usr.lying) - return ..() - - if(usr.hand && istype(usr.l_hand, /obj/item/weapon/flamethrower)) - var/turflist = getline(usr,src) - var/obj/item/weapon/flamethrower/F = usr.l_hand - F.flame_turf(turflist) - else if(!usr.hand && istype(usr.r_hand, /obj/item/weapon/flamethrower)) - var/turflist = getline(usr,src) - var/obj/item/weapon/flamethrower/F = usr.r_hand - F.flame_turf(turflist) - - return ..() - -/turf/New() - ..() - for(var/atom/movable/AM as mob|obj in src) - spawn( 0 ) - src.Entered(AM) - return - return - -/turf/ex_act(severity) - return 0 - - -/turf/bullet_act(var/obj/item/projectile/Proj) - if(istype(Proj ,/obj/item/projectile/beam/pulse)) - src.ex_act(2) - ..() - return 0 - -/turf/bullet_act(var/obj/item/projectile/Proj) - if(istype(Proj ,/obj/item/projectile/bullet/gyro)) - explosion(src, -1, 0, 2) - ..() - return 0 - -/turf/Enter(atom/movable/mover as mob|obj, atom/forget as mob|obj|turf|area) - if (!mover || !isturf(mover.loc)) - return 1 - - - //First, check objects to block exit that are not on the border - for(var/obj/obstacle in mover.loc) - if((obstacle.flags & ~ON_BORDER) && (mover != obstacle) && (forget != obstacle)) - if(!obstacle.CheckExit(mover, src)) - mover.Bump(obstacle, 1) - return 0 - - //Now, check objects to block exit that are on the border - for(var/obj/border_obstacle in mover.loc) - if((border_obstacle.flags & ON_BORDER) && (mover != border_obstacle) && (forget != border_obstacle)) - if(!border_obstacle.CheckExit(mover, src)) - mover.Bump(border_obstacle, 1) - return 0 - - //Next, check objects to block entry that are on the border - for(var/obj/border_obstacle in src) - if(border_obstacle.flags & ON_BORDER) - if(!border_obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != border_obstacle)) - mover.Bump(border_obstacle, 1) - return 0 - - //Then, check the turf itself - if (!src.CanPass(mover, src)) - mover.Bump(src, 1) - return 0 - - //Finally, check objects/mobs to block entry that are not on the border - for(var/atom/movable/obstacle in src) - if(obstacle.flags & ~ON_BORDER) - if(!obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != obstacle)) - mover.Bump(obstacle, 1) - return 0 - return 1 //Nothing found to block so return success! - - -/turf/Entered(atom/movable/M as mob|obj) - var/loopsanity = 100 - if(ismob(M)) - if(!M:lastarea) - M:lastarea = get_area(M.loc) - if(M:lastarea.has_gravity == 0) - inertial_drift(M) - - /* - if(M.flags & NOGRAV) - inertial_drift(M) - */ - - - - else if(!istype(src, /turf/space)) - M:inertia_dir = 0 - ..() - var/objects = 0 - for(var/atom/A as mob|obj|turf|area in src) - if(objects > loopsanity) break - objects++ - spawn( 0 ) - if ((A && M)) - A.HasEntered(M, 1) - return - objects = 0 - for(var/atom/A as mob|obj|turf|area in range(1)) - if(objects > loopsanity) break - objects++ - spawn( 0 ) - if ((A && M)) - A.HasProximity(M, 1) - return - return - -/turf/proc/inertial_drift(atom/movable/A as mob|obj) - if(!(A.last_move)) return - if((istype(A, /mob/) && src.x > 2 && src.x < (world.maxx - 1) && src.y > 2 && src.y < (world.maxy-1))) - var/mob/M = A - if(M.Process_Spacemove(1)) - M.inertia_dir = 0 - return - spawn(5) - if((M && !(M.anchored) && (M.loc == src))) - if(M.inertia_dir) - step(M, M.inertia_dir) - return - M.inertia_dir = M.last_move - step(M, M.inertia_dir) - return - -/turf/proc/levelupdate() - for(var/obj/O in src) - if(O.level == 1) - O.hide(src.intact) - -// override for space turfs, since they should never hide anything -/turf/space/levelupdate() - for(var/obj/O in src) - if(O.level == 1) - O.hide(0) - -// Removes all signs of lattice on the pos of the turf -Donkieyo -/turf/proc/RemoveLattice() - var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) - if(L) - del L - -/turf/proc/ReplaceWithFloor(explode=0) - var/prior_icon = icon_old - var/old_dir = dir - - var/turf/simulated/floor/W = new /turf/simulated/floor( locate(src.x, src.y, src.z) ) - - W.RemoveLattice() - W.dir = old_dir - if(prior_icon) W.icon_state = prior_icon - else W.icon_state = "floor" - - if (!explode) - W.opacity = 1 - W.sd_SetOpacity(0) - //This is probably gonna make lighting go a bit wonky in bombed areas, but sd_SetOpacity was the primary reason bombs have been so laggy. --NEO - W.levelupdate() - return W - -/turf/proc/ReplaceWithPlating() - var/prior_icon = icon_old - var/old_dir = dir - - var/turf/simulated/floor/plating/W = new /turf/simulated/floor/plating( locate(src.x, src.y, src.z) ) - - W.RemoveLattice() - W.dir = old_dir - if(prior_icon) W.icon_state = prior_icon - else W.icon_state = "plating" - W.opacity = 1 - W.sd_SetOpacity(0) - W.levelupdate() - return W - -/turf/proc/ReplaceWithEngineFloor() - var/old_dir = dir - - var/turf/simulated/floor/engine/E = new /turf/simulated/floor/engine( locate(src.x, src.y, src.z) ) - - E.dir = old_dir - E.icon_state = "engine" - -/turf/simulated/Entered(atom/A, atom/OL) - if (istype(A,/mob/living/carbon)) - var/mob/living/carbon/M = A - if(M.lying) return - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - if(istype(H.shoes, /obj/item/clothing/shoes/clown_shoes)) - if(H.m_intent == "run") - if(H.footstep >= 2) - H.footstep = 0 - else - H.footstep++ - if(H.footstep == 0) - playsound(src, "clownstep", 50, 1) // this will get annoying very fast. - else - playsound(src, "clownstep", 20, 1) - - switch (src.wet) - if(1) - if(istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes - if ((M.m_intent == "run") && !(istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP)) - M.stop_pulling() - step(M, M.dir) - M << "\blue You slipped on the wet floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) - M.Stun(8) - M.Weaken(5) - else - M.inertia_dir = 0 - return - else if(!istype(M, /mob/living/carbon/slime)) - if (M.m_intent == "run") - M.stop_pulling() - step(M, M.dir) - M << "\blue You slipped on the wet floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) - M.Stun(8) - M.Weaken(5) - else - M.inertia_dir = 0 - return - - if(2) //lube - if(!istype(M, /mob/living/carbon/slime)) - M.stop_pulling() - step(M, M.dir) - spawn(1) step(M, M.dir) - spawn(2) step(M, M.dir) - spawn(3) step(M, M.dir) - spawn(4) step(M, M.dir) - M.take_organ_damage(2) // Was 5 -- TLE - M << "\blue You slipped on the floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) - M.Weaken(10) - - ..() - -/turf/proc/ReplaceWithSpace() - var/old_dir = dir - var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) ) - S.dir = old_dir - return S - -/turf/proc/ReplaceWithLattice() - var/old_dir = dir - var/turf/space/S = new /turf/space( locate(src.x, src.y, src.z) ) - S.dir = old_dir - new /obj/structure/lattice( locate(src.x, src.y, src.z) ) - return S - -/turf/proc/ReplaceWithWall() - var/old_icon = icon_state - var/turf/simulated/wall/S = new /turf/simulated/wall( locate(src.x, src.y, src.z) ) - S.icon_old = old_icon - S.opacity = 0 - S.sd_NewOpacity(1) - return S - -/turf/proc/ReplaceWithRWall() - var/old_icon = icon_state - var/turf/simulated/wall/r_wall/S = new /turf/simulated/wall/r_wall( locate(src.x, src.y, src.z) ) - S.icon_old = old_icon - S.opacity = 0 - S.sd_NewOpacity(1) - return S - -/turf/simulated/wall/New() - ..() - -/turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0) - if(istype(src,/turf/simulated/wall/r_wall)) - if(!devastated) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - new /obj/structure/girder/reinforced(src) - new /obj/item/stack/sheet/plasteel( src ) - else - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/plasteel( src ) - else if(istype(src,/turf/simulated/wall/cult)) - if(!devastated) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - new /obj/effect/decal/remains/human(src) - else - new /obj/effect/decal/remains/human(src) - - else - if(!devastated) - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - new /obj/structure/girder(src) - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/metal( src ) - else - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/metal( src ) - new /obj/item/stack/sheet/metal( src ) - - ReplaceWithPlating(explode) - -/turf/simulated/wall/examine() - set src in oview(1) - - usr << "It looks like a regular wall." - return - -/turf/simulated/wall/ex_act(severity) - switch(severity) - if(1.0) - //SN src = null - src.ReplaceWithSpace() - del(src) - return - if(2.0) - if (prob(50)) - dismantle_wall(0,1) - else - dismantle_wall(1,1) - if(3.0) - var/proba - if (istype(src, /turf/simulated/wall/r_wall)) - proba = 15 - else - proba = 40 - if (prob(proba)) - dismantle_wall(0,1) - else - return - -/turf/simulated/wall/blob_act() - if(prob(50)) - dismantle_wall() - -/turf/simulated/wall/attack_paw(mob/user as mob) - if ((user.mutations & M_HULK)) - if (prob(40)) - usr << text("\blue You smash through the wall.") - dismantle_wall(1) - return - else - usr << text("\blue You punch the wall.") - return - - return src.attack_hand(user) - - -/turf/simulated/wall/attack_animal(mob/living/simple_animal/M as mob) - if(M.wall_smash) - if (istype(src, /turf/simulated/wall/r_wall)) - M << text("\blue This wall is far too strong for you to destroy.") - return - else - if (prob(40)) - M << text("\blue You smash through the wall.") - dismantle_wall(1) - return - else - M << text("\blue You smash against the wall.") - return - - M << "\blue You push the wall but nothing happens!" - return - -/turf/simulated/wall/attack_hand(mob/user as mob) - if ((user.mutations & M_HULK)) - if (prob(40)) - usr << text("\blue You smash through the wall.") - dismantle_wall(1) - return - else - usr << text("\blue You punch the wall.") - return - - user << "\blue You push the wall but nothing happens!" - playsound(src.loc, 'sound/weapons/Genhit.ogg', 25, 1) - src.add_fingerprint(user) - return - -/turf/simulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob) - - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "\red You don't have the dexterity to do this!" - return - - if (istype(W, /obj/item/weapon/weldingtool) && W:welding) - var/turf/T = get_turf(user) - if (!( istype(T, /turf) )) - return - - if (thermite) - var/obj/effect/overlay/O = new/obj/effect/overlay( src ) - O.name = "Thermite" - O.desc = "Looks hot." - O.icon = 'icons/effects/fire.dmi' - O.icon_state = "2" - O.anchored = 1 - O.density = 1 - O.layer = 5 - var/turf/simulated/floor/F = ReplaceWithPlating() - F.burn_tile() - F.icon_state = "wall_thermite" - user << "\red The thermite melts the wall." - spawn(100) del(O) - F.sd_LumReset() - return - - if (W:remove_fuel(0,user)) - W:welding = 2 - user << "\blue Now disassembling the outer wall plating." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(100) - if (W && istype(src, /turf/simulated/wall)) - if ((get_turf(user) == T && user.equipped() == W)) - user << "\blue You disassembled the outer wall plating." - dismantle_wall() - W:welding = 1 - else - user << "\blue You need more welding fuel to complete this task." - return - - else if (istype(W, /obj/item/weapon/pickaxe/plasmacutter)) - var/turf/T = user.loc - if (!( istype(T, /turf) )) - return - - if (thermite) - var/obj/effect/overlay/O = new/obj/effect/overlay( src ) - O.name = "Thermite" - O.desc = "Looks hot." - O.icon = 'icons/effects/fire.dmi' - O.icon_state = "2" - O.anchored = 1 - O.density = 1 - O.layer = 5 - var/turf/simulated/floor/F = ReplaceWithPlating() - F.burn_tile() - F.icon_state = "wall_thermite" - user << "\red The thermite melts the wall." - spawn(100) del(O) - F.sd_LumReset() - return - - else - user << "\blue Now disassembling the outer wall plating." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(60) - if (W && istype(src, /turf/simulated/wall)) - if ((get_turf(user) == T && user.equipped() == W)) - user << "\blue You disassembled the outer wall plating." - dismantle_wall() - for(var/mob/O in viewers(user, 5)) - O.show_message(text("\blue The wall was sliced apart by []!", user), 1, text("\red You hear metal being sliced apart."), 2) - return - - else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill)) - var/turf/T = user.loc - user << "\blue Now drilling through wall." - sleep(60) - if (W && istype(src, /turf/simulated/wall)) - if ((user.loc == T && user.equipped() == W)) - dismantle_wall(1) - for(var/mob/O in viewers(user, 5)) - O.show_message(text("\blue The wall was drilled apart by []!", user), 1, text("\red You hear metal being drilled appart."), 2) - return - - else if(istype(W, /obj/item/weapon/melee/energy/blade)) - var/turf/T = user.loc - user << "\blue Now slicing through wall." - W:spark_system.start() - playsound(src.loc, "sparks", 50, 1) - sleep(70) - if (W && istype(src, /turf/simulated/wall)) - if ((user.loc == T && user.equipped() == W)) - W:spark_system.start() - playsound(src.loc, "sparks", 50, 1) - playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1) - dismantle_wall(1) - for(var/mob/O in viewers(user, 5)) - O.show_message(text("\blue The wall was sliced apart by []!", user), 1, text("\red You hear metal being sliced and sparks flying."), 2) - return - - else if(istype(W,/obj/item/apc_frame)) - var/obj/item/apc_frame/AH = W - AH.try_build(src) - else if(istype(W,/obj/item/weapon/contraband/poster)) - var/obj/item/weapon/contraband/poster/P = W - if(P.resulting_poster) - var/check = 0 - var/stuff_on_wall = 0 - for( var/obj/O in src.contents) //Let's see if it already has a poster on it or too much stuff - if(istype(O,/obj/effect/decal/poster)) - check = 1 - break - stuff_on_wall++ - if(stuff_on_wall==3) - check = 1 - break - - if(check) - user << "The wall is far too cluttered to place a poster!" - return - - user << "You start placing the poster on the wall..." //Looks like it's uncluttered enough. Place the poster. - - P.resulting_poster.loc = src - var/temp = P.resulting_poster.icon_state - var/temp_loc = user.loc - P.resulting_poster.icon_state = "poster_being_set" - playsound(P.resulting_poster.loc, 'sound/items/poster_being_created.ogg', 100, 1) - sleep(24) - - if(user.loc == temp_loc)//Let's check if he still is there - user << "You place the poster!" - P.resulting_poster.icon_state = temp - src.contents += P.resulting_poster - del(P) - else - user << "You stop placing the poster." - P.resulting_poster.loc = P - P.resulting_poster.icon_state = temp - else - return attack_hand(user) - return - - -/turf/simulated/wall/r_wall/attackby(obj/item/W as obj, mob/user as mob) - - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "\red You don't have the dexterity to do this!" - return - - if(!istype(src, /turf/simulated/wall/r_wall)) - return // this may seem stupid and redundant but apparently floors can call this attackby() proc, it was spamming shit up. -- Doohl - - - if (istype(W, /obj/item/weapon/weldingtool) && W:welding) - W:eyecheck(user) - var/turf/T = user.loc - if (!( istype(T, /turf) )) - return - - if (thermite) - var/obj/effect/overlay/O = new/obj/effect/overlay( src ) - O.name = "Thermite" - O.desc = "Looks hot." - O.icon = 'icons/effects/fire.dmi' - O.icon_state = "2" - O.anchored = 1 - O.density = 1 - O.layer = 5 - var/turf/simulated/floor/F = ReplaceWithPlating() - F.burn_tile() - F.icon_state = "wall_thermite" - user << "\red The thermite melts the wall." - spawn(100) del(O) - F.sd_LumReset() - return - - if (src.d_state == 2) - W:welding = 2 - user << "\blue Slicing metal cover." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(60) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 3 - user << "\blue You removed the metal cover." - W:welding = 1 - - else if (src.d_state == 5) - W:welding = 2 - user << "\blue Removing support rods." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(100) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 6 - new /obj/item/stack/rods( src ) - user << "\blue You removed the support rods." - W:welding = 1 - - else if(istype(W, /obj/item/weapon/pickaxe/plasmacutter)) - var/turf/T = user.loc - if (!( istype(T, /turf) )) - return - - if (thermite) - var/obj/effect/overlay/O = new/obj/effect/overlay( src ) - O.name = "Thermite" - O.desc = "Looks hot." - O.icon = 'icons/effects/fire.dmi' - O.icon_state = "2" - O.anchored = 1 - O.density = 1 - O.layer = 5 - var/turf/simulated/floor/F = ReplaceWithPlating() - F.burn_tile() - F.icon_state = "wall_thermite" - user << "\red The thermite melts the wall." - spawn(100) del(O) - F.sd_LumReset() - return - - if (src.d_state == 2) - user << "\blue Slicing metal cover." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(40) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 3 - user << "\blue You removed the metal cover." - - else if (src.d_state == 5) - user << "\blue Removing support rods." - playsound(src.loc, 'sound/items/Welder.ogg', 100, 1) - sleep(70) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 6 - new /obj/item/stack/rods( src ) - user << "\blue You removed the support rods." - - else if(istype(W, /obj/item/weapon/melee/energy/blade)) - user << "\blue This wall is too thick to slice through. You will need to find a different path." - return - - else if (istype(W, /obj/item/weapon/wrench)) - if (src.d_state == 4) - var/turf/T = user.loc - user << "\blue Detaching support rods." - playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1) - sleep(40) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 5 - user << "\blue You detach the support rods." - - else if (istype(W, /obj/item/weapon/wirecutters)) - if (src.d_state == 0) - playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1) - src.d_state = 1 - new /obj/item/stack/rods( src ) - - else if (istype(W, /obj/item/weapon/screwdriver)) - if (src.d_state == 1) - var/turf/T = user.loc - playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1) - user << "\blue Removing support lines." - sleep(40) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 2 - user << "\blue You removed the support lines." - - else if (istype(W, /obj/item/weapon/crowbar)) - - if (src.d_state == 3) - var/turf/T = user.loc - user << "\blue Prying cover off." - playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) - sleep(100) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 4 - user << "\blue You removed the cover." - - else if (src.d_state == 6) - var/turf/T = user.loc - user << "\blue Prying outer sheath off." - playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1) - sleep(100) - if(src) - if ((user.loc == T && user.equipped() == W)) - user << "\blue You removed the outer sheath." - dismantle_wall() - return - - else if (istype(W, /obj/item/weapon/pickaxe/diamonddrill)) - var/turf/T = user.loc - user << "\blue You begin to drill though, this will take some time." - sleep(200) - if(src) - if ((user.loc == T && user.equipped() == W)) - user << "\blue Your drill tears though the reinforced plating." - dismantle_wall() - return - - else if ((istype(W, /obj/item/stack/sheet/metal)) && (src.d_state)) - var/turf/T = user.loc - user << "\blue Repairing wall." - sleep(100) - if ((user.loc == T && user.equipped() == W)) - src.d_state = 0 - src.icon_state = initial(src.icon_state) - user << "\blue You repaired the wall." - if (W:amount > 1) - W:amount-- - else - del(W) - - else if(istype(W,/obj/item/weapon/contraband/poster)) - var/obj/item/weapon/contraband/poster/P = W - if(P.resulting_poster) - var/check = 0 - var/stuff_on_wall = 0 - for( var/obj/O in src.contents) //Let's see if it already has a poster on it or too much stuff - if(istype(O,/obj/effect/decal/poster)) - check = 1 - break - stuff_on_wall++ - if(stuff_on_wall==3) - check = 1 - break - - if(check) - user << "The wall is far too cluttered to place a poster!" - return - - user << "You start placing the poster on the wall..." //Looks like it's uncluttered enough. Place the poster. - - P.resulting_poster.loc = src - var/temp = P.resulting_poster.icon_state - var/temp_loc = user.loc - P.resulting_poster.icon_state = "poster_being_set" - playsound(P.resulting_poster.loc, 'sound/items/poster_being_created.ogg', 100, 1) - sleep(24) - - if(user.loc == temp_loc)//Let's check if he still is there - user << "You place the poster!" - P.resulting_poster.icon_state = temp - src.contents += P.resulting_poster - del(P) - else - user << "You stop placing the poster." - P.resulting_poster.loc = P - P.resulting_poster.icon_state = temp - return - - if(istype(W,/obj/item/apc_frame)) - var/obj/item/apc_frame/AH = W - AH.try_build(src) - return - - if(src.d_state > 0) - src.icon_state = "r_wall-[d_state]" - - else - return attack_hand(user) - return - -/turf/simulated/wall/meteorhit(obj/M as obj) - if (prob(15)) - dismantle_wall() - else if(prob(70)) - ReplaceWithPlating() - else - ReplaceWithLattice() - return 0 - - -//This is so damaged or burnt tiles or platings don't get remembered as the default tile -var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","damaged4", - "damaged5","panelscorched","floorscorched1","floorscorched2","platingdmg1","platingdmg2", - "platingdmg3","plating","light_on","light_on_flicker1","light_on_flicker2", - "light_on_clicker3","light_on_clicker4","light_on_clicker5","light_broken", - "light_on_broken","light_off","wall_thermite","grass1","grass2","grass3","grass4", - "asteroid","asteroid_dug", - "asteroid0","asteroid1","asteroid2","asteroid3","asteroid4", - "asteroid5","asteroid6","asteroid7","asteroid8", - "burning","oldburning","light-on-r","light-on-y","light-on-g","light-on-b") - -var/list/plating_icons = list("plating","platingdmg1","platingdmg2","platingdmg3","asteroid","asteroid_dug") - -/turf/simulated/floor - - //Note to coders, the 'intact' var can no longer be used to determine if the floor is a plating or not. - //Use the is_plating(), is_plasteel_floor() and is_light_floor() procs instead. --Errorage - name = "floor" - icon = 'icons/turf/floors.dmi' - icon_state = "floor" - var/icon_regular_floor = "floor" //used to remember what icon the tile should have by default - var/icon_plating = "plating" - thermal_conductivity = 0.040 - heat_capacity = 10000 - var/broken = 0 - var/burnt = 0 - var/obj/item/stack/tile/floor_tile = new/obj/item/stack/tile/plasteel - - airless - icon_state = "floor" - name = "airless floor" - oxygen = 0.01 - nitrogen = 0.01 - temperature = TCMB - - New() - ..() - name = "floor" - - light - name = "Light floor" - luminosity = 5 - icon_state = "light_on" - floor_tile = new/obj/item/stack/tile/light - - New() - floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well. - var/n = name //just in case commands rename it in the ..() call - ..() - spawn(4) - update_icon() - name = n - - grass - name = "Grass patch" - icon_state = "grass1" - floor_tile = new/obj/item/stack/tile/grass - - New() - floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well. - icon_state = "grass[pick("1","2","3","4")]" - ..() - spawn(4) - update_icon() - for(var/direction in cardinal) - if(istype(get_step(src,direction),/turf/simulated/floor)) - var/turf/simulated/floor/FF = get_step(src,direction) - FF.update_icon() //so siding get updated properly - -/turf/simulated/floor/vault - icon_state = "rockvault" - - New(location,type) - ..() - icon_state = "[type]vault" - -/turf/simulated/wall/vault - icon_state = "rockvault" - - New(location,type) - ..() - icon_state = "[type]vault" - -/turf/simulated/floor/engine - name = "reinforced floor" - icon_state = "engine" - thermal_conductivity = 0.025 - heat_capacity = 325000 - -/turf/simulated/floor/engine/cult - name = "engraved floor" - icon_state = "cult" - - -/turf/simulated/floor/engine/n20 - New() - ..() - var/datum/gas_mixture/adding = new - var/datum/gas/sleeping_agent/trace_gas = new - - trace_gas.moles = 2000 - adding.trace_gases += trace_gas - adding.temperature = T20C - - assume_air(adding) - -/turf/simulated/floor/engine/vacuum - name = "vacuum floor" - icon_state = "engine" - oxygen = 0 - nitrogen = 0.001 - temperature = TCMB - -/turf/simulated/floor/plating - name = "plating" - icon_state = "plating" - floor_tile = null - intact = 0 - -/turf/simulated/floor/plating/airless - icon_state = "plating" - name = "airless plating" - oxygen = 0.01 - nitrogen = 0.01 - temperature = TCMB - - New() - ..() - name = "plating" - -/turf/simulated/floor/grid - icon = 'icons/turf/floors.dmi' - icon_state = "circuit" - -/turf/simulated/floor/New() - ..() - if(icon_state in icons_to_ignore_at_floor_init) //so damaged/burned tiles or plating icons aren't saved as the default - icon_regular_floor = "floor" - else - icon_regular_floor = icon_state - -//turf/simulated/floor/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) -// if ((istype(mover, /obj/machinery/vehicle) && !(src.burnt))) -// if (!( locate(/obj/machinery/mass_driver, src) )) -// return 0 -// return ..() - -/turf/simulated/floor/ex_act(severity) - //set src in oview(1) - switch(severity) - if(1.0) - src.ReplaceWithSpace() - if(2.0) - switch(pick(1,2;75,3)) - if (1) - src.ReplaceWithLattice() - if(prob(33)) new /obj/item/stack/sheet/metal(src) - if(2) - src.ReplaceWithSpace() - if(3) - if(prob(80)) - src.break_tile_to_plating() - else - src.break_tile() - src.hotspot_expose(1000,CELL_VOLUME) - if(prob(33)) new /obj/item/stack/sheet/metal(src) - if(3.0) - if (prob(50)) - src.break_tile() - src.hotspot_expose(1000,CELL_VOLUME) - return - -/turf/simulated/floor/blob_act() - return - -turf/simulated/floor/proc/update_icon() - if(is_plasteel_floor()) - if(!broken && !burnt) - icon_state = icon_regular_floor - if(is_plating()) - if(!broken && !burnt) - icon_state = icon_plating //Because asteroids are 'platings' too. - if(is_light_floor()) - var/obj/item/stack/tile/light/T = floor_tile - if(T.on) - switch(T.state) - if(0) - icon_state = "light_on" - sd_SetLuminosity(5) - if(1) - var/num = pick("1","2","3","4") - icon_state = "light_on_flicker[num]" - sd_SetLuminosity(5) - if(2) - icon_state = "light_on_broken" - sd_SetLuminosity(5) - if(3) - icon_state = "light_off" - sd_SetLuminosity(0) - else - sd_SetLuminosity(0) - icon_state = "light_off" - if(is_grass_floor()) - if(!broken && !burnt) - if(!(icon_state in list("grass1","grass2","grass3","grass4"))) - icon_state = "grass[pick("1","2","3","4")]" - spawn(1) - if(istype(src,/turf/simulated/floor)) //Was throwing runtime errors due to a chance of it changing to space halfway through. - if(air) - update_visuals(air) - -turf/simulated/floor/return_siding_icon_state() - ..() - if(is_grass_floor()) - var/dir_sum = 0 - for(var/direction in cardinal) - var/turf/T = get_step(src,direction) - if(!(T.is_grass_floor())) - dir_sum += direction - if(dir_sum) - return "wood_siding[dir_sum]" - else - return 0 - - -/turf/simulated/floor/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/turf/simulated/floor/attack_hand(mob/user as mob) - if (is_light_floor()) - var/obj/item/stack/tile/light/T = floor_tile - T.on = !T.on - update_icon() - if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) - return - if (user.pulling.anchored) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling - var/mob/t = M.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - M.start_pulling(t) - else - step(user.pulling, get_dir(user.pulling.loc, src)) - return - -/turf/simulated/floor/engine/attackby(obj/item/weapon/C as obj, mob/user as mob) - if(!C) - return - if(!user) - return - if(istype(C, /obj/item/weapon/wrench)) - user << "\blue Removing rods..." - playsound(src.loc, 'sound/items/Ratchet.ogg', 80, 1) - if(do_after(user, 30)) - new /obj/item/stack/rods(src, 2) - ReplaceWithFloor() - var/turf/simulated/floor/F = src - F.make_plating() - return - -/turf/simulated/floor/proc/gets_drilled() - return - -/turf/simulated/floor/proc/break_tile_to_plating() - if(!is_plating()) - make_plating() - break_tile() - -/turf/simulated/floor/is_plasteel_floor() - if(istype(floor_tile,/obj/item/stack/tile/plasteel)) - return 1 - else - return 0 - -/turf/simulated/floor/is_light_floor() - if(istype(floor_tile,/obj/item/stack/tile/light)) - return 1 - else - return 0 - -/turf/simulated/floor/is_grass_floor() - if(istype(floor_tile,/obj/item/stack/tile/grass)) - return 1 - else - return 0 - -/turf/simulated/floor/is_plating() - if(!floor_tile) - return 1 - return 0 - -/turf/simulated/floor/proc/break_tile() - if(istype(src,/turf/simulated/floor/engine)) return - if(istype(src,/turf/simulated/floor/mech_bay_recharge_floor)) - src.ReplaceWithPlating() - if(broken) return - if(is_plasteel_floor()) - src.icon_state = "damaged[pick(1,2,3,4,5)]" - broken = 1 - else if(is_plasteel_floor()) - src.icon_state = "light_broken" - broken = 1 - else if(is_plating()) - src.icon_state = "platingdmg[pick(1,2,3)]" - broken = 1 - else if(is_grass_floor()) - src.icon_state = "sand[pick("1","2","3")]" - broken = 1 - -/turf/simulated/floor/proc/burn_tile() - if(istype(src,/turf/simulated/floor/engine)) return - if(broken || burnt) return - if(is_plasteel_floor()) - src.icon_state = "damaged[pick(1,2,3,4,5)]" - burnt = 1 - else if(is_plasteel_floor()) - src.icon_state = "floorscorched[pick(1,2)]" - burnt = 1 - else if(is_plating()) - src.icon_state = "panelscorched" - burnt = 1 - else if(is_grass_floor()) - src.icon_state = "sand[pick("1","2","3")]" - burnt = 1 - -//This proc will delete the floor_tile and the update_iocn() proc will then change the icon_state of the turf -//This proc auto corrects the grass tiles' siding. -/turf/simulated/floor/proc/make_plating() - if(istype(src,/turf/simulated/floor/engine)) return - - if(is_grass_floor()) - for(var/direction in cardinal) - if(istype(get_step(src,direction),/turf/simulated/floor)) - var/turf/simulated/floor/FF = get_step(src,direction) - FF.update_icon() //so siding get updated properly - - if(!floor_tile) return - del(floor_tile) - icon_plating = "plating" - sd_SetLuminosity(0) - floor_tile = null - intact = 0 - broken = 0 - burnt = 0 - - update_icon() - levelupdate() - -//This proc will make the turf a plasteel floor tile. The expected argument is the tile to make the turf with -//If none is given it will make a new object. dropping or unequipping must be handled before or after calling -//this proc. -/turf/simulated/floor/proc/make_plasteel_floor(var/obj/item/stack/tile/plasteel/T = null) - broken = 0 - burnt = 0 - intact = 1 - sd_SetLuminosity(0) - if(T) - if(istype(T,/obj/item/stack/tile/plasteel)) - floor_tile = T - if (icon_regular_floor) - icon_state = icon_regular_floor - else - icon_state = "floor" - icon_regular_floor = icon_state - update_icon() - levelupdate() - return - //if you gave a valid parameter, it won't get thisf ar. - floor_tile = new/obj/item/stack/tile/plasteel - icon_state = "floor" - icon_regular_floor = icon_state - - update_icon() - levelupdate() - -//This proc will make the turf a light floor tile. The expected argument is the tile to make the turf with -//If none is given it will make a new object. dropping or unequipping must be handled before or after calling -//this proc. -/turf/simulated/floor/proc/make_light_floor(var/obj/item/stack/tile/light/T = null) - broken = 0 - burnt = 0 - intact = 1 - if(T) - if(istype(T,/obj/item/stack/tile/light)) - floor_tile = T - update_icon() - levelupdate() - return - //if you gave a valid parameter, it won't get thisf ar. - floor_tile = new/obj/item/stack/tile/light - - update_icon() - levelupdate() - -//This proc will make a turf into a grass patch. Fun eh? Insert the grass tile to be used as the argument -//If no argument is given a new one will be made. -/turf/simulated/floor/proc/make_grass_floor(var/obj/item/stack/tile/grass/T = null) - broken = 0 - burnt = 0 - intact = 1 - if(T) - if(istype(T,/obj/item/stack/tile/grass)) - floor_tile = T - update_icon() - levelupdate() - return - //if you gave a valid parameter, it won't get thisf ar. - floor_tile = new/obj/item/stack/tile/grass - - update_icon() - levelupdate() - -/turf/simulated/floor/attackby(obj/item/C as obj, mob/user as mob) - - if(!C || !user) - return 0 - - if(istype(C,/obj/item/weapon/light/bulb)) //only for light tiles - if(is_light_floor()) - var/obj/item/stack/tile/light/T = floor_tile - if(T.state) - user.u_equip(C) - del(C) - T.state = C //fixing it by bashing it with a light bulb, fun eh? - update_icon() - user << "\blue You replace the light bulb." - else - user << "\blue The lightbulb seems fine, no need to replace it." - - if(istype(C, /obj/item/weapon/crowbar) && (!(is_plating()))) - if(broken || burnt) - user << "\red You remove the broken plating." - else - user << "\red You remove the [floor_tile.name]." - new floor_tile.type(src) - - make_plating() - playsound(src.loc, 'sound/items/Crowbar.ogg', 80, 1) - - return - - if(istype(C, /obj/item/stack/rods)) - var/obj/item/stack/rods/R = C - if (is_plating()) - if (R.amount >= 2) - user << "\blue Reinforcing the floor..." - if(do_after(user, 30) && R && R.amount >= 2 && is_plating()) - ReplaceWithEngineFloor() - playsound(src.loc, 'sound/items/Deconstruct.ogg', 80, 1) - R.use(2) - return - else - user << "\red You need more rods." - else - user << "\red You must remove the plating first." - return - - if(istype(C, /obj/item/stack/tile)) - if(is_plating()) - if(!broken && !burnt) - var/obj/item/stack/tile/T = C - floor_tile = new T.type - intact = 1 - if(istype(T,/obj/item/stack/tile/light)) - var/obj/item/stack/tile/light/L = T - var/obj/item/stack/tile/light/F = floor_tile - F.state = L.state - F.on = L.on - if(istype(T,/obj/item/stack/tile/grass)) - for(var/direction in cardinal) - if(istype(get_step(src,direction),/turf/simulated/floor)) - var/turf/simulated/floor/FF = get_step(src,direction) - FF.update_icon() //so siding gets updated properly - T.use(1) - update_icon() - levelupdate() - playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1) - else - user << "\blue This section is too damaged to support a tile. Use a welder to fix the damage." - - - if(istype(C, /obj/item/weapon/cable_coil)) - if(is_plating()) - var/obj/item/weapon/cable_coil/coil = C - coil.turf_place(src, user) - else - user << "\red You must remove the plating first." - - if(istype(C, /obj/item/weapon/shovel)) - if(is_grass_floor()) - new /obj/item/weapon/ore/glass(src) - new /obj/item/weapon/ore/glass(src) //Make some sand if you shovel grass - user << "\blue You shovel the grass." - make_plating() - else - user << "\red You cannot shovel this." - - if(istype(C, /obj/item/weapon/weldingtool)) - var/obj/item/weapon/weldingtool/welder = C - if(welder.welding && (is_plating())) - if(broken || burnt) - if(welder.remove_fuel(0,user)) - user << "\red You fix some dents on the broken plating." - playsound(src.loc, 'sound/items/Welder.ogg', 80, 1) - icon_state = "plating" - burnt = 0 - broken = 0 - else - user << "\blue You need more welding fuel to complete this task." - -/turf/unsimulated/floor/attack_paw(user as mob) - return src.attack_hand(user) - -/turf/unsimulated/floor/attack_hand(var/mob/user as mob) - if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) - return - if (user.pulling.anchored) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling - var/mob/t = M.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - M.start_pulling(t) - else - step(user.pulling, get_dir(user.pulling.loc, src)) - return - -// imported from space.dm - -/turf/space/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/turf/space/attack_hand(mob/user as mob) - if ((user.restrained() || !( user.pulling ))) - return - if (user.pulling.anchored) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling - var/atom/movable/t = M.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - M.start_pulling(t) - else - step(user.pulling, get_dir(user.pulling.loc, src)) - return - -/turf/space/attackby(obj/item/C as obj, mob/user as mob) - - if (istype(C, /obj/item/stack/rods)) - var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) - if(L) - return - var/obj/item/stack/rods/R = C - user << "\blue Constructing support lattice ..." - playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1) - ReplaceWithLattice() - R.use(1) - return - - if (istype(C, /obj/item/stack/tile/plasteel)) - var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) - if(L) - var/obj/item/stack/tile/plasteel/S = C - del(L) - playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1) - S.build(src) - S.use(1) - return - else - user << "\red The plating is going to need some support." - return - - -// Ported from unstable r355 - -/turf/space/Entered(atom/movable/A as mob|obj) - ..() - if ((!(A) || src != A.loc || istype(null, /obj/effect/beam))) return - - inertial_drift(A) - - if(ticker && ticker.mode) - - // Okay, so let's make it so that people can travel z levels but not nuke disks! - // if(ticker.mode.name == "nuclear emergency") return - - if(ticker.mode.name == "extended"||ticker.mode.name == "sandbox") - Sandbox_Spacemove(A) - - else - if (src.x <= 2 || A.x >= (world.maxx - 1) || src.y <= 2 || A.y >= (world.maxy - 1)) - if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust)) - del(A) - return - - if(istype(A, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks travel Z levels ... And moving this shit down here so it only fires when they're actually trying to change z-level. - return - - if(!isemptylist(A.search_contents_for(/obj/item/weapon/disk/nuclear))) - if(istype(A, /mob/living)) - var/mob/living/MM = A - if(MM.client) - MM << "\red Something you are carrying is preventing you from leaving. Don't play stupid; you know exactly what it is." - return - - - - var/move_to_z_str = pickweight(accessable_z_levels) - - var/move_to_z = text2num(move_to_z_str) - - if(!move_to_z) - return - - - - A.z = move_to_z - - - if(src.x <= 2) - A.x = world.maxx - 2 - - else if (A.x >= (world.maxx - 1)) - A.x = 3 - - else if (src.y <= 2) - A.y = world.maxy - 2 - - else if (A.y >= (world.maxy - 1)) - A.y = 3 - - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - -// if(istype(A, /obj/structure/closet/coffin)) -// coffinhandler.Add(A) - -/turf/space/proc/Sandbox_Spacemove(atom/movable/A as mob|obj) - var/cur_x - var/cur_y - var/next_x - var/next_y - var/target_z - var/list/y_arr - - if(src.x <= 1) - if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust)) - del(A) - return - - var/list/cur_pos = src.get_global_map_pos() - if(!cur_pos) return - cur_x = cur_pos["x"] - cur_y = cur_pos["y"] - next_x = (--cur_x||global_map.len) - y_arr = global_map[next_x] - target_z = y_arr[cur_y] -/* - //debug - world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]" - world << "Target Z = [target_z]" - world << "Next X = [next_x]" - //debug -*/ - if(target_z) - A.z = target_z - A.x = world.maxx - 2 - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - else if (src.x >= world.maxx) - if(istype(A, /obj/effect/meteor)) - del(A) - return - - var/list/cur_pos = src.get_global_map_pos() - if(!cur_pos) return - cur_x = cur_pos["x"] - cur_y = cur_pos["y"] - next_x = (++cur_x > global_map.len ? 1 : cur_x) - y_arr = global_map[next_x] - target_z = y_arr[cur_y] -/* - //debug - world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]" - world << "Target Z = [target_z]" - world << "Next X = [next_x]" - //debug -*/ - if(target_z) - A.z = target_z - A.x = 3 - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - else if (src.y <= 1) - if(istype(A, /obj/effect/meteor)) - del(A) - return - var/list/cur_pos = src.get_global_map_pos() - if(!cur_pos) return - cur_x = cur_pos["x"] - cur_y = cur_pos["y"] - y_arr = global_map[cur_x] - next_y = (--cur_y||y_arr.len) - target_z = y_arr[next_y] -/* - //debug - world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]" - world << "Next Y = [next_y]" - world << "Target Z = [target_z]" - //debug -*/ - if(target_z) - A.z = target_z - A.y = world.maxy - 2 - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - - else if (src.y >= world.maxy) - if(istype(A, /obj/effect/meteor)||istype(A, /obj/effect/space_dust)) - del(A) - return - var/list/cur_pos = src.get_global_map_pos() - if(!cur_pos) return - cur_x = cur_pos["x"] - cur_y = cur_pos["y"] - y_arr = global_map[cur_x] - next_y = (++cur_y > y_arr.len ? 1 : cur_y) - target_z = y_arr[next_y] -/* - //debug - world << "Src.z = [src.z] in global map X = [cur_x], Y = [cur_y]" - world << "Next Y = [next_y]" - world << "Target Z = [target_z]" - //debug -*/ - if(target_z) - A.z = target_z - A.y = 3 - spawn (0) - if ((A && A.loc)) - A.loc.Entered(A) - return - -/obj/effect/vaultspawner - var/maxX = 6 - var/maxY = 6 - var/minX = 2 - var/minY = 2 - -/obj/effect/vaultspawner/New(turf/location as turf,lX = minX,uX = maxX,lY = minY,uY = maxY,var/type = null) - if(!type) - type = pick("sandstone","rock","alien") - - var/lowBoundX = location.x - var/lowBoundY = location.y - - var/hiBoundX = location.x + rand(lX,uX) - var/hiBoundY = location.y + rand(lY,uY) - - var/z = location.z - - for(var/i = lowBoundX,i<=hiBoundX,i++) - for(var/j = lowBoundY,j<=hiBoundY,j++) - if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY) - new /turf/simulated/wall/vault(locate(i,j,z),type) - else - new /turf/simulated/floor/vault(locate(i,j,z),type) - - del(src) - -/turf/proc/kill_creatures(mob/U = null)//Will kill people/creatures and damage mechs./N -//Useful to batch-add creatures to the list. - for(var/mob/living/M in src) - if(M==U) continue//Will not harm U. Since null != M, can be excluded to kill everyone. - spawn(0) - M.gib() - for(var/obj/mecha/M in src)//Mecha are not gibbed but are damaged. - spawn(0) - M.take_damage(100, "brute") - for(var/obj/effect/critter/M in src) - spawn(0) - M.Die() - -/turf/proc/Bless() - if(flags & NOJAUNT) - return - flags |= NOJAUNT - overlays += image('icons/effects/water.dmi',src,"holywater")*/ \ No newline at end of file diff --git a/code/unused/BrokenInhands.dm b/code/unused/BrokenInhands.dm deleted file mode 100644 index 6339d3c0113..00000000000 --- a/code/unused/BrokenInhands.dm +++ /dev/null @@ -1,36 +0,0 @@ -/proc/getbrokeninhands() - var/icon/IL = new('icons/mob/items_lefthand.dmi') - var/list/Lstates = IL.IconStates() - var/icon/IR = new('icons/mob/items_righthand.dmi') - var/list/Rstates = IR.IconStates() - - - var/text - for(var/A in typesof(/obj/item)) - var/obj/item/O = new A( locate(1,1,1) ) - if(!O) continue - var/icon/J = new(O.icon) - var/list/istates = J.IconStates() - if(!Lstates.Find(O.icon_state) && !Lstates.Find(O.item_state)) - if(O.icon_state) - text += "[O.type] WANTS IN LEFT HAND CALLED\n\"[O.icon_state]\".\n" - if(!Rstates.Find(O.icon_state) && !Rstates.Find(O.item_state)) - if(O.icon_state) - text += "[O.type] WANTS IN RIGHT HAND CALLED\n\"[O.icon_state]\".\n" - - - if(O.icon_state) - if(!istates.Find(O.icon_state)) - text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.icon_state]\" IN \"[O.icon]\"\n" - if(O.item_state) - if(!istates.Find(O.item_state)) - text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.item_state]\" IN \"[O.icon]\"\n" - text+="\n" - del(O) - if(text) - var/F = file("broken_icons.txt") - fdel(F) - F << text - world << "Completely successfully and written to [F]" - - diff --git a/code/unused/Ultralight.dm b/code/unused/Ultralight.dm deleted file mode 100644 index 783726de915..00000000000 --- a/code/unused/Ultralight.dm +++ /dev/null @@ -1,341 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - -//UltraLight system, by Sukasa - - const/ar/UL_LUMINOSITY = 0 - const/ar/UL_SQUARELIGHT = 0 - - const/ar/UL_RGB = 1 - const/ar/UL_ROUNDLIGHT = 2 - - const/ar/UL_I_FALLOFF_SQUARE = 0 - const/ar/UL_I_FALLOFF_ROUND = 1 - - const/ar/UL_I_LUMINOSITY = 0 - const/ar/UL_I_RGB = 1 - - const/ar/UL_I_LIT = 0 - const/ar/UL_I_EXTINGUISHED = 1 - const/ar/UL_I_ONZERO = 2 - - ul_LightingEnabled = 1 - ul_LightingResolution = 1 - ul_Steps = 7 - ul_LightingModel = UL_I_RGB - ul_FalloffStyle = UL_I_FALLOFF_ROUND - ul_TopLuminosity = 0 - ul_Layer = 10 - ul_SuppressLightLevelChanges = 0 - - list/ul_FastRoot = list(0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, - 7, 7) - - -proc - ul_Clamp(var/Value) - return min(max(Value, 0), ul_Steps) - -atom - var/LuminosityRed = 0 - var/LuminosityGreen = 0 - var/LuminosityBlue = 0 - - var/ul_Extinguished = UL_I_ONZERO - - proc - sd_SetLuminosity(var/Red, var/Green = Red, var/Blue = Red) - - if(LuminosityRed == Red && LuminosityGreen == Green && LuminosityBlue == Blue) - return //No point doing all that work if it won't have any effect anyways... - - if (ul_Extinguished == UL_I_EXTINGUISHED) - LuminosityRed = Red - LuminosityGreen = Green - LuminosityBlue = Blue - - return - - if (ul_IsLuminous()) - ul_Extinguish() - - LuminosityRed = Red - LuminosityGreen = Green - LuminosityBlue = Blue - - ul_Extinguished = UL_I_ONZERO - - if (ul_IsLuminous()) - ul_Illuminate() - - return - - ul_Illuminate() - if (ul_Extinguished == UL_I_LIT) - return - - ul_Extinguished = UL_I_LIT - - ul_UpdateTopLuminosity() - luminosity = ul_Luminosity() - - for(var/turf/Affected in view(ul_Luminosity(), src)) - var/Falloff = src.ul_FalloffAmount(Affected) - - var/DeltaRed = LuminosityRed - Falloff - var/DeltaGreen = LuminosityGreen - Falloff - var/DeltaBlue = LuminosityBlue - Falloff - - if(ul_IsLuminous(DeltaRed, DeltaGreen, DeltaBlue)) - - Affected.LightLevelRed += max(DeltaRed, 0) - Affected.LightLevelGreen += max(DeltaGreen, 0) - Affected.LightLevelBlue += max(DeltaBlue, 0) - - Affected.MaxRed += LuminosityRed - Affected.MaxGreen += LuminosityGreen - Affected.MaxBlue += LuminosityBlue - - Affected.ul_UpdateLight() - - if (ul_SuppressLightLevelChanges == 0) - Affected.ul_LightLevelChanged() - - for(var/atom/AffectedAtom in Affected) - AffectedAtom.ul_LightLevelChanged() - return - - ul_Extinguish() - - if (ul_Extinguished != UL_I_LIT) - return - - ul_Extinguished = UL_I_EXTINGUISHED - - for(var/turf/Affected in view(ul_Luminosity(), src)) - - var/Falloff = ul_FalloffAmount(Affected) - - var/DeltaRed = LuminosityRed - Falloff - var/DeltaGreen = LuminosityGreen - Falloff - var/DeltaBlue = LuminosityBlue - Falloff - - if(ul_IsLuminous(DeltaRed, DeltaGreen, DeltaBlue)) - - Affected.LightLevelRed -= max(DeltaRed, 0) - Affected.LightLevelGreen -= max(DeltaGreen, 0) - Affected.LightLevelBlue -= max(DeltaBlue, 0) - - Affected.MaxRed -= LuminosityRed - Affected.MaxGreen -= LuminosityGreen - Affected.MaxBlue -= LuminosityBlue - - Affected.ul_UpdateLight() - - if (ul_SuppressLightLevelChanges == 0) - Affected.ul_LightLevelChanged() - - for(var/atom/AffectedAtom in Affected) - AffectedAtom.ul_LightLevelChanged() - - luminosity = 0 - - return - - ul_FalloffAmount(var/atom/ref) - if (ul_FalloffStyle == UL_I_FALLOFF_ROUND) - var/x = (ref.x - src.x) - var/y = (ref.y - src.y) - if ((x*x + y*y) > ul_FastRoot.len) - for(var/i = ul_FastRoot.len, i <= x*x+y*y, i++) - ul_FastRoot += round(sqrt(x*x+y*y)) - return round(ul_LightingResolution * ul_FastRoot[x*x + y*y + 1], 1) - - else if (ul_FalloffStyle == UL_I_FALLOFF_SQUARE) - return get_dist(src, ref) - - return 0 - - ul_SetOpacity(var/NewOpacity) - if(opacity != NewOpacity) - - var/list/Blanked = ul_BlankLocal() - var/atom/T = src - while(T && !isturf(T)) - T = T.loc - - opacity = NewOpacity - - if(T) - T:LightLevelRed = 0 - T:LightLevelGreen = 0 - T:LightLevelBlue = 0 - - ul_UnblankLocal(Blanked) - - return - - ul_UnblankLocal(var/list/ReApply = view(ul_TopLuminosity, src)) - for(var/atom/Light in ReApply) - if(Light.ul_IsLuminous()) - Light.ul_Illuminate() - - return - - ul_BlankLocal() - var/list/Blanked = list( ) - var/TurfAdjust = isturf(src) ? 1 : 0 - - for(var/atom/Affected in view(ul_TopLuminosity, src)) - if(Affected.ul_IsLuminous() && Affected.ul_Extinguished == UL_I_LIT && (ul_FalloffAmount(Affected) <= Affected.luminosity + TurfAdjust)) - Affected.ul_Extinguish() - Blanked += Affected - - return Blanked - - ul_UpdateTopLuminosity() - - if (ul_TopLuminosity < LuminosityRed) - ul_TopLuminosity = LuminosityRed - - if (ul_TopLuminosity < LuminosityGreen) - ul_TopLuminosity = LuminosityGreen - - if (ul_TopLuminosity < LuminosityBlue) - ul_TopLuminosity = LuminosityBlue - - return - - ul_Luminosity() - return max(LuminosityRed, LuminosityGreen, LuminosityBlue) - - ul_IsLuminous(var/Red = LuminosityRed, var/Green = LuminosityGreen, var/Blue = LuminosityBlue) - return (Red > 0 || Green > 0 || Blue > 0) - - ul_LightLevelChanged() - //Designed for client projects to use. Called on items when the turf they are in has its light level changed - return - - New() - ..() - if(ul_IsLuminous()) - spawn(1) - ul_Illuminate() - return - - Del() - if(ul_IsLuminous()) - ul_Extinguish() - - ..() - - return - - movable - Move() - ul_Extinguish() - ..() - ul_Illuminate() - return - -turf - var/LightLevelRed = 0 - var/LightLevelGreen = 0 - var/LightLevelBlue = 0 - - var/list/MaxRed = list( ) - var/list/MaxGreen = list( ) - var/list/MaxBlue = list( ) - - proc - - ul_GetRed() - return ul_Clamp(min(LightLevelRed, max(MaxRed))) - ul_GetGreen() - return ul_Clamp(min(LightLevelGreen, max(MaxGreen))) - ul_GetBlue() - return ul_Clamp(min(LightLevelBlue, max(MaxBlue))) - - ul_UpdateLight() - - var/area/CurrentArea = loc - - if(!isarea(CurrentArea) || !CurrentArea.ul_Lighting) - return - - var/LightingTag = copytext(CurrentArea.tag, 1, findtext(CurrentArea.tag, ":UL")) + ":UL[ul_GetRed()]_[ul_GetGreen()]_[ul_GetBlue()]" - - if(CurrentArea.tag != LightingTag) - var/area/NewArea = locate(LightingTag) - - if(!NewArea) - NewArea = new CurrentArea.type() - NewArea.tag = LightingTag - - for(var/V in CurrentArea.vars - "contents") - if(issaved(CurrentArea.vars[V])) - NewArea.vars[V] = CurrentArea.vars[V] - - NewArea.tag = LightingTag - - NewArea.ul_Light(ul_GetRed(), ul_GetGreen(), ul_GetBlue()) - - - NewArea.contents += src - - return - - ul_Recalculate() - - ul_SuppressLightLevelChanges++ - - var/list/Lights = ul_BlankLocal() - - LightLevelRed = 0 - LightLevelGreen = 0 - LightLevelBlue = 0 - - ul_UnblankLocal(Lights) - - ul_SuppressLightLevelChanges-- - - return - -area - var/ul_Overlay = null - var/ul_Lighting = 1 - - var/LightLevelRed = 0 - var/LightLevelGreen = 0 - var/LightLevelBlue = 0 - - proc - ul_Light(var/Red = LightLevelRed, var/Green = LightLevelGreen, var/Blue = LightLevelBlue) - - if(!src || !src.ul_Lighting) - return - - overlays -= ul_Overlay - - LightLevelRed = Red - LightLevelGreen = Green - LightLevelBlue = Blue - - luminosity = ul_IsLuminous(LightLevelRed, LightLevelGreen, LightLevelBlue) - - ul_Overlay = image('icons/effects/ULIcons.dmi', , num2text(LightLevelRed) + "-" + num2text(LightLevelGreen) + "-" + num2text(LightLevelBlue), ul_Layer) - - overlays += ul_Overlay - - return - - ul_Prep() - - if(!tag) - tag = "[type]" - if(ul_Lighting) - if(!findtext(tag,":UL")) - ul_Light() - //world.log << tag - - return diff --git a/code/unused/Virus2Prob.dm b/code/unused/Virus2Prob.dm deleted file mode 100644 index bf9868041dd..00000000000 --- a/code/unused/Virus2Prob.dm +++ /dev/null @@ -1,12 +0,0 @@ -var/list/prob_G_list = list() - -/proc/probG(var/define,var/everyother) - if(prob_G_list["[define]"]) - prob_G_list["[define]"] += 1 - if(prob_G_list["[define]"] == everyother) - prob_G_list["[define]"] = 0 - return 1 - else - (prob_G_list["[define]"]) = 0 - (prob_G_list["[define]"]) = rand(1,everyother-1) - return 0 diff --git a/code/unused/_debug.dm b/code/unused/_debug.dm deleted file mode 100644 index 271ee870a71..00000000000 --- a/code/unused/_debug.dm +++ /dev/null @@ -1,619 +0,0 @@ -// NOTE WELL! -// Only include this file when debugging locally -// Do not include in release versions - - -#define VARSICON 1 -#define SDEBUG 1 - -/client/verb/Debug() - set category = "Debug" - set name = "Debug-Debug" - if(src.holder.rank == "Game Admin") - Debug = !Debug - - world << "Debugging [Debug ? "On" : "Off"]" - else - alert("Coders only baby") - return - -/turf/verb/Flow() - set category = "Debug" - //set hidden = 1 - if(Debug) - for(var/turf/T in range(5)) - - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - var/obj/move/OM = locate(/obj/move/, T) - - if(OM) - - if(! OM.updatecell) - O.icon_state = "x2" - else - O.icon_state = "blank" -/* -Doing this because FindTurfs() isn't even used - for(var/atom/U in OM.FindTurfs() ) - var/dirn = get_dir(OM, U) - if(dirn == 1) - O.overlays += image('icons/misc/mark.dmi', OM.airdir==1?"up":"fup") - else if(dirn == 2) - O.overlays += image('icons/misc/mark.dmi', OM.airdir==2?"dn":"fdn") - else if(dirn == 4) - O.overlays += image('icons/misc/mark.dmi', OM.airdir==4?"rt":"frt") - else if(dirn == 8) - O.overlays += image('icons/misc/mark.dmi', OM.airdir==8?"lf":"flf") -*/ - else - - if(!(T.updatecell)) - O.icon_state = "x2" - else - O.icon_state = "blank" - - if(T.airN) - O.overlays += image('icons/misc/mark.dmi', T.airdir==1?"up":"fup") - - if(T.airS) - O.overlays += image('icons/misc/mark.dmi', T.airdir==2?"dn":"fdn") - - if(T.airW) - O.overlays += image('icons/misc/mark.dmi', T.airdir==8?"lf":"flf") - - if(T.airE) - O.overlays += image('icons/misc/mark.dmi', T.airdir==4?"rt":"frt") - - - if(T.condN) - O.overlays += image('icons/misc/mark.dmi', T.condN == 1?"yup":"rup") - - if(T.condS) - O.overlays += image('icons/misc/mark.dmi', T.condS == 1?"ydn":"rdn") - - if(T.condE) - O.overlays += image('icons/misc/mark.dmi', T.condE == 1?"yrt":"rrt") - - if(T.condW) - O.overlays += image('icons/misc/mark.dmi', T.condW == 1?"ylf":"rlf") - else - alert("Debugging off") - return - -/turf/verb/Clear() - set category = "Debug" - //set hidden = 1 - if(Debug) - for(var/obj/effect/mark/O in world) - del(O) - else - alert("Debugging off") - return - -/proc/numbericon(var/tn as text,var/s = 0) - if(Debug) - var/image/I = image('icons/misc/mark.dmi', "blank") - - if(lentext(tn)>8) - tn = "*" - - var/len = lentext(tn) - - for(var/d = 1 to lentext(tn)) - - - var/char = copytext(tn, len-d+1, len-d+2) - - if(char == " ") - continue - - var/image/ID = image('icons/misc/mark.dmi', char) - - ID.pixel_x = -(d-1)*4 - ID.pixel_y = s - //if(d>1) I.Shift(WEST, (d-1)*8) - - I.overlays += ID - - - - return I - else - alert("Debugging off") - return - -/*/turf/verb/Stats() - set category = "Debug" - for(var/turf/T in range(5)) - - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - - var/temp = round(T.temp-T0C, 0.1) - - O.overlays += numbericon("[temp]C") - - var/pres = round(T.tot_gas() / CELLSTANDARD * 100, 0.1) - - O.overlays += numbericon("[pres]", -8) - O.mark = "[temp]/[pres]" -*/ -/* -/turf/verb/Pipes() - set category = "Debug" - - for(var/turf/T in range(6)) - - //world << "Turf [T] at ([T.x],[T.y])" - - for(var/obj/machinery/M in T) - //world <<" Mach [M] with pdir=[M.p_dir]" - - if(M && M.p_dir) - - //world << "Accepted" - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - if(istype(M, /obj/machinery/pipes)) - var/obj/machinery/pipes/P = M - O.overlays += numbericon("[P.plnum] ", -20) - M = P.pl - - - var/obj/substance/gas/G = M.get_gas() - - if(G) - - var/cap = round( 100*(G.tot_gas()/ M.capmult / 6e6), 0.1) - var/temp = round(G.temperature - T0C, 0.1) - O.overlays += numbericon("[temp]C", 0) - O.overlays += numbericon("[cap]", -8) - - break -*/ -/turf/verb/Cables() - set category = "Debug" - if(Debug) - for(var/turf/T in range(6)) - - //world << "Turf [T] at ([T.x],[T.y])" - - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - var/marked = 0 - for(var/obj/M in T) - //world <<" Mach [M] with pdir=[M.p_dir]" - - - if(M && istype(M, /obj/structure/cable/)) - - - var/obj/structure/cable/C = M - //world << "Accepted" - - O.overlays += numbericon("[C.netnum] " , marked) - - marked -= 8 - - else if(M && istype(M, /obj/machinery/power/)) - - var/obj/machinery/power/P = M - O.overlays += numbericon("*[P.netnum] " , marked) - marked -= 8 - - if(!marked) - del(O) - else - alert("Debugging off") - return - - -/turf/verb/Solar() - set category = "Debug" - if(Debug) - - for(var/turf/T in range(6)) - - //world << "Turf [T] at ([T.x],[T.y])" - - var/obj/effect/mark/O = locate(/obj/effect/mark/, T) - - if(!O) - O = new /obj/effect/mark(T) - else - O.overlays.Cut() - - - var/obj/machinery/power/solar/S - - S = locate(/obj/machinery/power/solar, T) - - if(S) - - O.overlays += numbericon("[S.obscured] " , 0) - O.overlays += numbericon("[round(S.sunfrac*100,0.1)] " , -12) - - else - del(O) - else - alert("Debugging off") - return - - -/mob/verb/Showports() - set category = "Debug" - if(Debug) - var/turf/T - var/obj/machinery/pipes/P - var/list/ndirs - - for(var/obj/machinery/pipeline/PL in plines) - - var/num = plines.Find(PL) - - P = PL.nodes[1] // 1st node in list - ndirs = P.get_node_dirs() - - T = get_step(P, ndirs[1]) - - var/obj/effect/mark/O = new(T) - - O.overlays += numbericon("[num] * 1 ", -4) - O.overlays += numbericon("[ndirs[1]] - [ndirs[2]]",-16) - - - P = PL.nodes[PL.nodes.len] // last node in list - - ndirs = P.get_node_dirs() - T = get_step(P, ndirs[2]) - - O = new(T) - - O.overlays += numbericon("[num] * 2 ", -4) - O.overlays += numbericon("[ndirs[1]] - [ndirs[2]]", -16) - else - alert("Debugging off") - return - -/atom/verb/delete() - set category = "Debug" - set src in view() - if(Debug) - del(src) - else - alert("Debugging off") - return - - -/area/verb/dark() - set category = "Debug" - if(Debug) - if(src.icon_state == "dark") - icon_state = null - else - icon_state = "dark" - else - alert("Debugging off") - return - -/area/verb/power() - set category = "Debug" - if(Debug) - power_equip = !power_equip - power_environ = !power_environ - - world << "Power ([src]) = [power_equip]" - - power_change() - else - alert("Debugging off") - return - -// *****RM - -// ***** - - -/mob/verb/ShowPlasma() - set category = "Debug" - if(Debug) - Plasma() - else - alert("Debugging off") - return - -/mob/verb/Blobcount() - set category = "Debug" - if(Debug) - world << "Blob count: [blobs.len]" - else - alert("Debugging off") - return - - -/mob/verb/Blobkill() - set category = "Debug" - if(Debug) - blobs = list() - world << "Blob killed." - else - alert("Debugging off") - return - -/mob/verb/Blobmode() - set category = "Debug" - if(Debug) - world << "Event=[ticker.event]" - world << "Time =[(ticker.event_time - world.realtime)/10]s" - else - alert("Debugging off") - return - -/mob/verb/Blobnext() - set category = "Debug" - if(Debug) - ticker.event_time = world.realtime - else - alert("Debugging off") - return - - -/mob/verb/callshuttle() - set category = "Debug" - if(Debug) - ticker.timeleft = 300 - ticker.timing = 1 - else - alert("Debugging off") - return - -/mob/verb/apcs() - set category = "Debug" - if(Debug) - for(var/obj/machinery/power/apc/APC in world) - world << APC.report() - else - alert("Debugging off") - return - -/mob/verb/Globals() - set category = "Debug" - if(Debug) - debugobj = new() - - debugobj.debuglist = list( powernets, plines, vote, config, admins, ticker, SS13_airtunnel, sun ) - - - world << "Debug" - else - alert("Debugging off") - return - /*for(var/obj/O in plines) - - world << "[O.name]" - */ - - - - -/mob/verb/Mach() - set category = "Debug" - if(Debug) - var/n = 0 - for(var/obj/machinery/M in world) - n++ - if(! (M in machines) ) - world << "[M] [M.type]: not in list" - - world << "in world: [n]; in list:[machines.len]" - else - alert("Debugging off") - return - - -/*/mob/verb/air() - set category = "Debug" - - Air() - -/proc/Air() - - - var/area/A = locate(/area/airintake) - - var/atot = 0 - for(var/turf/T in A) - atot += T.tot_gas() - - var/ptot = 0 - for(var/obj/machinery/pipeline/PL in plines) - if(PL.suffix == "d") - ptot += PL.ngas.tot_gas() - - var/vtot = 0 - for(var/obj/machinery/atmoalter/V in machines) - if(V.suffix == "d") - vtot += V.gas.tot_gas() - - var/ctot = 0 - for(var/obj/machinery/connector/C in machines) - if(C.suffix == "d") - ctot += C.ngas.tot_gas() - - - var/tot = atot + ptot + vtot + ctot - - diary << "A=[num2text(atot,10)] P=[num2text(ptot,10)] V=[num2text(vtot,10)] C=[num2text(ctot,10)] : Total=[num2text(tot,10)]" -*/ -/mob/verb/Revive() - set category = "Debug" - if(Debug) - adjustFireLoss(0 - getBruteLoss()) - setToxLoss(0) - adjustBruteLoss(0 - getBruteLoss()) - setOxyLoss(0) - paralysis = 0 - stunned = 0 - weakened = 0 - health = 100 - if(stat > 1) stat=0 - disabilities = initial(disabilities) - sdisabilities = initial(sdisabilities) - for(var/datum/organ/external/e in src) - e.brute_dam = 0.0 - e.burn_dam = 0.0 - e.bandaged = 0.0 - e.wound_size = 0.0 - e.max_damage = initial(e.max_damage) - e.broken = 0 - e.destroyed = 0 - e.perma_injury = 0 - e.update_icon() - if(src.type == /mob/living/carbon/human) - var/mob/living/carbon/human/H = src - H.update_body() - H.UpdateDamageIcon() - else - alert("Debugging off") - return - -/mob/verb/Smoke() - set category = "Debug" - if(Debug) - var/obj/effect/smoke/O = new /obj/effect/smoke( src.loc ) - O.dir = pick(NORTH, SOUTH, EAST, WEST) - spawn( 0 ) - O.Life() - else - alert("Debugging off") - return - -/mob/verb/revent(number as num) - set category = "Debug" - set name = "Change event %" - if(!src.holder) - src << "Only administrators may use this command." - return - if(src.holder) - eventchance = number - log_admin("[src.key] set the random event chance to [eventchance]%") - message_admins("[src.key] set the random event chance to [eventchance]%") - -/* Does nothing but blow up the station. -/mob/verb/funbutton() - set category = "Admin" - set name = "Random Expl.(REMOVE ME)" - if(!src.holder) - src << "Only administrators may use this command." - return - for(var/turf/T in world) - if(prob(4) && T.z == 1 && istype(T,/turf/station/floor)) - spawn(50+rand(0,3000)) - var/obj/item/weapon/tank/plasmatank/pt = new /obj/item/weapon/tank/plasmatank( T ) - pt.gas.temperature = 400+T0C - pt.ignite() - for(var/turf/P in view(3, T)) - if (P.poison) - P.poison = 0 - P.oldpoison = 0 - P.tmppoison = 0 - P.oxygen = 755985 - P.oldoxy = 755985 - P.tmpoxy = 755985 - usr << "\blue Blowing up station ..." - world << "[usr.key] has used boom boom boom shake the room" -*/ - -/mob/verb/removeplasma() - set category = "Debug" - set name = "Stabilize Atmos." - if(!src.holder) - src << "Only administrators may use this command." - return - spawn(0) - for(var/turf/T in view()) - T.poison = 0 - T.oldpoison = 0 - T.tmppoison = 0 - T.oxygen = 755985 - T.oldoxy = 755985 - T.tmpoxy = 755985 - T.co2 = 14.8176 - T.oldco2 = 14.8176 - T.tmpco2 = 14.8176 - T.n2 = 2.844e+006 - T.on2 = 2.844e+006 - T.tn2 = 2.844e+006 - T.tsl_gas = 0 - T.osl_gas = 0 - T.sl_gas = 0 - T.temp = 293.15 - T.otemp = 293.15 - T.ttemp = 293.15 - -/mob/verb/fire(turf/T as turf in world) - set category = "Special Verbs" - set name = "Create Fire" - if(!src.holder) - src << "Only administrators may use this command." - return - world << "[usr.key] created fire" - spawn(0) - T.poison += 30000000 - T.firelevel = T.poison - -/mob/verb/co2(turf/T as turf in world) - set category = "Special Verbs" - set name = "Create CO2" - if(!src.holder) - src << "Only administrators may use this command." - return - world << "[usr.key] created CO2" - spawn(0) - T.co2 += 300000000 - -/mob/verb/n2o(turf/T as turf in world) - set category = "Special Verbs" - set name = "Create N2O" - if(!src.holder) - src << "Only administrators may use this command." - return - world << "[usr.key] created N2O" - spawn(0) - T.sl_gas += 30000000 - -/mob/verb/explosion(T as obj|mob|turf in world) - set category = "Special Verbs" - set name = "Create Explosion" - if(!src.holder) - src << "Only administrators may use this command." - return - world << "[usr.key] created an explosion" - var/obj/item/weapon/tank/plasmatank/pt = new /obj/item/weapon/tank/plasmatank( T ) - playsound(pt.loc, "explosion", 100, 1,3) - playsound(pt.loc, 'sound/effects/explosionfar.ogg', 100, 1,10) - pt.gas.temperature = 500+T0C - pt.ignite() - - diff --git a/code/unused/ai_lockdown.dm b/code/unused/ai_lockdown.dm deleted file mode 100644 index 552ae977f35..00000000000 --- a/code/unused/ai_lockdown.dm +++ /dev/null @@ -1,60 +0,0 @@ -/mob/living/silicon/ai/proc/lockdown() - set category = "AI Commands" - set name = "Lockdown" - - if(usr.stat == 2) - usr <<"You cannot initiate lockdown because you are dead!" - return - - src << "Initiating lockdowns has been disabled due to system stress." -// Commented this out to disable Lockdowns -- TLE -/* world << "\red Lockdown initiated by [usr.name]!" - - for(var/obj/machinery/firealarm/FA in world) //activate firealarms - spawn( 0 ) - if(FA.lockdownbyai == 0) - FA.lockdownbyai = 1 - FA.alarm() - for(var/obj/machinery/door/airlock/AL in world) //close airlocks - spawn( 0 ) - if(AL.canAIControl() && AL.icon_state == "door0" && AL.lockdownbyai == 0) - AL.close() - AL.lockdownbyai = 1 - - var/obj/machinery/computer/communications/C = locate() in world - if(C) - C.post_status("alert", "lockdown") -*/ - -/* src.verbs -= /mob/living/silicon/ai/proc/lockdown - src.verbs += /mob/living/silicon/ai/proc/disablelockdown - usr << "\red Disable lockdown command enabled!" - winshow(usr,"rpane",1) -*/ - -/mob/living/silicon/ai/proc/disablelockdown() - set category = "AI Commands" - set name = "Disable Lockdown" - - if(usr.stat == 2) - usr <<"You cannot disable lockdown because you are dead!" - return - - world << "\red Lockdown cancelled by [usr.name]!" - - for(var/obj/machinery/firealarm/FA in world) //deactivate firealarms - spawn( 0 ) - if(FA.lockdownbyai == 1) - FA.lockdownbyai = 0 - FA.reset() - for(var/obj/machinery/door/airlock/AL in world) //open airlocks - spawn ( 0 ) - if(AL.canAIControl() && AL.lockdownbyai == 1) - AL.open() - AL.lockdownbyai = 0 - -/* src.verbs -= /mob/living/silicon/ai/proc/disablelockdown - src.verbs += /mob/living/silicon/ai/proc/lockdown - usr << "\red Disable lockdown command removed until lockdown initiated again!" - winshow(usr,"rpane",1) -*/ \ No newline at end of file diff --git a/code/unused/airtunnel.dm b/code/unused/airtunnel.dm deleted file mode 100644 index 9b61340bdfc..00000000000 --- a/code/unused/airtunnel.dm +++ /dev/null @@ -1,463 +0,0 @@ -/obj/machinery/sec_lock//P'sure this was part of the tunnel - name = "Security Pad" - desc = "A lock, for doors. Used by security." - icon = 'icons/obj/stationobjs.dmi' - icon_state = "sec_lock" - var/obj/item/weapon/card/id/scan = null - var/a_type = 0.0 - var/obj/machinery/door/d1 = null - var/obj/machinery/door/d2 = null - anchored = 1.0 - req_access = list(access_brig) - use_power = 1 - idle_power_usage = 2 - active_power_usage = 4 - -/obj/move/airtunnel/process() - if (!( src.deployed )) - return null - else - ..() - return - -/obj/move/airtunnel/connector/create() - src.current = src - src.next = new /obj/move/airtunnel( null ) - src.next.master = src.master - src.next.previous = src - spawn( 0 ) - src.next.create(airtunnel_start - airtunnel_stop, src.y) - return - return - -/obj/move/airtunnel/connector/wall/create() - src.current = src - src.next = new /obj/move/airtunnel/wall( null ) - src.next.master = src.master - src.next.previous = src - spawn( 0 ) - src.next.create(airtunnel_start - airtunnel_stop, src.y) - return - return - -/obj/move/airtunnel/connector/wall/process() - return - -/obj/move/airtunnel/wall/create(num, y_coord) - if (((num < 7 || (num > 16 && num < 23)) && y_coord == airtunnel_bottom)) - src.next = new /obj/move/airtunnel( null ) - else - src.next = new /obj/move/airtunnel/wall( null ) - src.next.master = src.master - src.next.previous = src - if (num > 1) - spawn( 0 ) - src.next.create(num - 1, y_coord) - return - return - -/obj/move/airtunnel/wall/move_right() - flick("wall-m", src) - return ..() - -/obj/move/airtunnel/wall/move_left() - flick("wall-m", src) - return ..() - -/obj/move/airtunnel/wall/process() - return - -/obj/move/airtunnel/proc/move_left() - src.relocate(get_step(src, WEST)) - if ((src.next && src.next.deployed)) - return src.next.move_left() - else - return src.next - return - -/obj/move/airtunnel/proc/move_right() - src.relocate(get_step(src, EAST)) - if ((src.previous && src.previous.deployed)) - src.previous.move_right() - return src.previous - -/obj/move/airtunnel/proc/create(num, y_coord) - if (y_coord == airtunnel_bottom) - if ((num < 7 || (num > 16 && num < 23))) - src.next = new /obj/move/airtunnel( null ) - else - src.next = new /obj/move/airtunnel/wall( null ) - else - src.next = new /obj/move/airtunnel( null ) - src.next.master = src.master - src.next.previous = src - if (num > 1) - spawn( 0 ) - src.next.create(num - 1, y_coord) - return - return - -/obj/machinery/at_indicator/ex_act(severity) - switch(severity) - if(1.0) - del(src) - return - if(2.0) - if (prob(50)) - for(var/x in src.verbs) - src.verbs -= x - src.icon_state = "reader_broken" - stat |= BROKEN - if(3.0) - if (prob(25)) - for(var/x in src.verbs) - src.verbs -= x - src.icon_state = "reader_broken" - stat |= BROKEN - else - return - -/obj/machinery/at_indicator/blob_act() - if (prob(75)) - for(var/x in src.verbs) - src.verbs -= x - src.icon_state = "reader_broken" - stat |= BROKEN - -/obj/machinery/at_indicator/proc/update_icon() - if(stat & (BROKEN|NOPOWER)) - icon_state = "reader_broken" - return - - var/status = 0 - if (SS13_airtunnel.operating == 1) - status = "r" - else - if (SS13_airtunnel.operating == 2) - status = "e" - else - if(!SS13_airtunnel.connectors) - return - var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors) - if (C.current == C) - status = 0 - else - if (!( C.current.next )) - status = 2 - else - status = 1 - src.icon_state = text("reader[][]", (SS13_airtunnel.siphon_status == 2 ? "1" : "0"), status) - return - -/obj/machinery/at_indicator/process() - if(stat & (NOPOWER|BROKEN)) - src.update_icon() - return - use_power(5, ENVIRON) - src.update_icon() - return - -/obj/machinery/computer/airtunnel/attack_paw(user as mob) - return src.attack_hand(user) - -obj/machinery/computer/airtunnel/attack_ai(user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/airtunnel/attack_hand(var/mob/user as mob) - if(..()) - return - - var/dat = "Air Tunnel Controls " - user.machine = src - if (SS13_airtunnel.operating == 1) - dat += "Status: RETRACTING " - else - if (SS13_airtunnel.operating == 2) - dat += "Status: EXPANDING " - else - var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors) - if (C.current == C) - dat += "Status: Fully Retracted " - else - if (!( C.current.next )) - dat += "Status: Fully Extended " - else - dat += "Status: Stopped Midway " - dat += text("Retract Stop Extend ", src, src, src) - dat += text(" Air Level: [] ", (SS13_airtunnel.air_stat ? "Acceptable" : "DANGEROUS")) - dat += "Air System Status: " - switch(SS13_airtunnel.siphon_status) - if(0.0) - dat += "Stopped " - if(1.0) - dat += "Siphoning (Siphons only) " - if(2.0) - dat += "Regulating (BOTH) " - if(3.0) - dat += "RELEASING MAX (Siphons only) " - else - dat += text("(Refresh) ", src) - dat += text("RELEASE (Siphons only) Siphon (Siphons only) Stop Regulate ", src, src, src, src) - dat += text(" Close", user) - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return - -/obj/machinery/computer/airtunnel/proc/update_icon() - if(stat & BROKEN) - icon_state = "broken" - return - - if(stat & NOPOWER) - icon_state = "c_unpowered" - return - - var/status = 0 - if (SS13_airtunnel.operating == 1) - status = "r" - else - if (SS13_airtunnel.operating == 2) - status = "e" - else - var/obj/move/airtunnel/connector/C = pick(SS13_airtunnel.connectors) - if (C.current == C) - status = 0 - else - if (!( C.current.next )) - status = 2 - else - status = 1 - src.icon_state = text("console[][]", (SS13_airtunnel.siphon_status >= 2 ? "1" : "0"), status) - return - -/obj/machinery/computer/airtunnel/process() - src.update_icon() - if(stat & (NOPOWER|BROKEN)) - return - use_power(250) - src.updateUsrDialog() - return - -/obj/machinery/computer/airtunnel/Topic(href, href_list) - if(..()) - return - - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))) - usr.machine = src - if (href_list["retract"]) - SS13_airtunnel.retract() - else if (href_list["stop"]) - SS13_airtunnel.operating = 0 - else if (href_list["extend"]) - SS13_airtunnel.extend() - else if (href_list["release"]) - SS13_airtunnel.siphon_status = 3 - SS13_airtunnel.siphons() - else if (href_list["siphon"]) - SS13_airtunnel.siphon_status = 1 - SS13_airtunnel.siphons() - else if (href_list["stop_siph"]) - SS13_airtunnel.siphon_status = 0 - SS13_airtunnel.siphons() - else if (href_list["auto"]) - SS13_airtunnel.siphon_status = 2 - SS13_airtunnel.siphons() - else if (href_list["refresh"]) - SS13_airtunnel.siphons() - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - - -/obj/machinery/sec_lock/attack_ai(user as mob) - return src.attack_hand(user) - -/obj/machinery/sec_lock/attack_paw(user as mob) - return src.attack_hand(user) - -/obj/machinery/sec_lock/attack_hand(var/mob/user as mob) - if(..()) - return - use_power(10) - - if (src.loc == user.loc) - var/dat = text("Security Pad: \nKeycard: [] \nToggle Outer Door \nToggle Inner Door \n \nEmergency Close \nEmergency Open ", (src.scan ? text("[]", src, src.scan.name) : text("-----", src)), src, src, src, src) - user << browse(dat, "window=sec_lock") - onclose(user, "sec_lock") - return - -/obj/machinery/sec_lock/attackby(nothing, user as mob) - return src.attack_hand(user) - -/obj/machinery/sec_lock/New() - ..() - spawn( 2 ) - if (src.a_type == 1) - src.d2 = locate(/obj/machinery/door, locate(src.x - 2, src.y - 1, src.z)) - src.d1 = locate(/obj/machinery/door, get_step(src, SOUTHWEST)) - else - if (src.a_type == 2) - src.d2 = locate(/obj/machinery/door, locate(src.x - 2, src.y + 1, src.z)) - src.d1 = locate(/obj/machinery/door, get_step(src, NORTHWEST)) - else - src.d1 = locate(/obj/machinery/door, get_step(src, SOUTH)) - src.d2 = locate(/obj/machinery/door, get_step(src, SOUTHEAST)) - return - return - -/obj/machinery/sec_lock/Topic(href, href_list) - if(..()) - return - if ((!( src.d1 ) || !( src.d2 ))) - usr << "\red Error: Cannot interface with door security!" - return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon)))) - usr.machine = src - if (href_list["card"]) - if (src.scan) - src.scan.loc = src.loc - src.scan = null - else - var/obj/item/weapon/card/id/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/id)) - usr.drop_item() - I.loc = src - src.scan = I - if (href_list["door1"]) - if (src.scan) - if (src.check_access(src.scan)) - if (src.d1.density) - spawn( 0 ) - src.d1.open() - return - else - spawn( 0 ) - src.d1.close() - return - if (href_list["door2"]) - if (src.scan) - if (src.check_access(src.scan)) - if (src.d2.density) - spawn( 0 ) - src.d2.open() - return - else - spawn( 0 ) - src.d2.close() - return - if (href_list["em_cl"]) - if (src.scan) - if (src.check_access(src.scan)) - if (!( src.d1.density )) - src.d1.close() - return - sleep(1) - spawn( 0 ) - if (!( src.d2.density )) - src.d2.close() - return - if (href_list["em_op"]) - if (src.scan) - if (src.check_access(src.scan)) - spawn( 0 ) - if (src.d1.density) - src.d1.open() - return - sleep(1) - spawn( 0 ) - if (src.d2.density) - src.d2.open() - return - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/datum/air_tunnel/air_tunnel1/New() - ..() - for(var/obj/move/airtunnel/A in locate(/area/airtunnel1)) - A.master = src - A.create() - src.connectors += A - //Foreach goto(21) - return - -/datum/air_tunnel/proc/siphons() - switch(src.siphon_status) - if(0.0) - for(var/obj/machinery/atmoalter/siphs/S in locate(/area/airtunnel1)) - S.t_status = 3 - if(1.0) - for(var/obj/machinery/atmoalter/siphs/fullairsiphon/S in locate(/area/airtunnel1)) - S.t_status = 2 - S.t_per = 1000000.0 - for(var/obj/machinery/atmoalter/siphs/scrubbers/S in locate(/area/airtunnel1)) - S.t_status = 3 - if(2.0) - for(var/obj/machinery/atmoalter/siphs/S in locate(/area/airtunnel1)) - S.t_status = 4 - if(3.0) - for(var/obj/machinery/atmoalter/siphs/fullairsiphon/S in locate(/area/airtunnel1)) - S.t_status = 1 - S.t_per = 1000000.0 - for(var/obj/machinery/atmoalter/siphs/scrubbers/S in locate(/area/airtunnel1)) - S.t_status = 3 - else - return - -/datum/air_tunnel/proc/stop() - src.operating = 0 - return - -/datum/air_tunnel/proc/extend() - if (src.operating) - return - - spawn(0) - src.operating = 2 - while(src.operating == 2) - var/ok = 1 - for(var/obj/move/airtunnel/connector/A in src.connectors) - if (!( A.current.next )) - src.operating = 0 - return - if (!( A.move_left() )) - ok = 0 - if (!( ok )) - src.operating = 0 - else - for(var/obj/move/airtunnel/connector/A in src.connectors) - if (A.current) - A.current.next.loc = get_step(A.current.loc, EAST) - A.current = A.current.next - A.current.deployed = 1 - else - src.operating = 0 - sleep(20) - return - -/datum/air_tunnel/proc/retract() - if (src.operating) - return - spawn(0) - src.operating = 1 - while(src.operating == 1) - var/ok = 1 - for(var/obj/move/airtunnel/connector/A in src.connectors) - if (A.current == A) - src.operating = 0 - return - if (A.current) - A.current.loc = null - A.current.deployed = 0 - A.current = A.current.previous - else - ok = 0 - if (!( ok )) - src.operating = 0 - else - for(var/obj/move/airtunnel/connector/A in src.connectors) - if (!( A.current.move_right() )) - src.operating = 0 - sleep(20) - return \ No newline at end of file diff --git a/code/unused/assemblies.dm b/code/unused/assemblies.dm deleted file mode 100644 index 0b6db495148..00000000000 --- a/code/unused/assemblies.dm +++ /dev/null @@ -1,951 +0,0 @@ -/*/obj/item/assembly - name = "assembly" - icon = 'icons/obj/assemblies.dmi' - item_state = "assembly" - var/status = 0.0 - throwforce = 10 - w_class = 3.0 - throw_speed = 4 - throw_range = 10 - -/obj/item/assembly/a_i_a - name = "Health-Analyzer/Igniter/Armor Assembly" - desc = "A health-analyzer, igniter and armor assembly." - icon_state = "armor-igniter-analyzer" - var/obj/item/device/healthanalyzer/part1 = null - var/obj/item/device/igniter/part2 = null - var/obj/item/clothing/suit/armor/vest/part3 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/m_i_ptank - desc = "A very intricate igniter and proximity sensor electrical assembly mounted onto top of a plasma tank." - name = "Proximity/Igniter/Plasma Tank Assembly" - icon_state = "prox-igniter-tank0" - var/obj/item/device/prox_sensor/part1 = null - var/obj/item/device/igniter/part2 = null - var/obj/item/weapon/tank/plasma/part3 = null - status = 0.0 - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/prox_ignite - name = "Proximity/Igniter Assembly" - desc = "A proximity-activated igniter assembly." - icon_state = "prox-igniter0" - var/obj/item/device/prox_sensor/part1 = null - var/obj/item/device/igniter/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/r_i_ptank - desc = "A very intricate igniter and signaller electrical assembly mounted onto top of a plasma tank." - name = "Radio/Igniter/Plasma Tank Assembly" - icon_state = "radio-igniter-tank" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/igniter/part2 = null - var/obj/item/weapon/tank/plasma/part3 = null - status = 0.0 - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/anal_ignite - name = "Health-Analyzer/Igniter Assembly" - desc = "A health-analyzer igniter assembly." - icon_state = "timer-igniter0" - var/obj/item/device/healthanalyzer/part1 = null - var/obj/item/device/igniter/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - item_state = "electronic" - -/obj/item/assembly/time_ignite - name = "Timer/Igniter Assembly" - desc = "A timer-activated igniter assembly." - icon_state = "timer-igniter0" - var/obj/item/device/timer/part1 = null - var/obj/item/device/igniter/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/t_i_ptank - desc = "A very intricate igniter and timer assembly mounted onto top of a plasma tank." - name = "Timer/Igniter/Plasma Tank Assembly" - icon_state = "timer-igniter-tank0" - var/obj/item/device/timer/part1 = null - var/obj/item/device/igniter/part2 = null - var/obj/item/weapon/tank/plasma/part3 = null - status = 0.0 - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/rad_ignite - name = "Radio/Igniter Assembly" - desc = "A radio-activated igniter assembly." - icon_state = "radio-igniter" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/igniter/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/rad_infra - name = "Signaller/Infrared Assembly" - desc = "An infrared-activated radio signaller" - icon_state = "infrared-radio0" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/infra/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/rad_prox - name = "Signaller/Prox Sensor Assembly" - desc = "A proximity-activated radio signaller." - icon_state = "prox-radio0" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/prox_sensor/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT - -/obj/item/assembly/rad_time - name = "Signaller/Timer Assembly" - desc = "A radio signaller activated by a count-down timer." - icon_state = "timer-radio0" - var/obj/item/device/radio/signaler/part1 = null - var/obj/item/device/timer/part2 = null - status = null - flags = FPRINT | TABLEPASS| CONDUCT -*/ - -/obj/item/assembly/time_ignite/premade/New() - ..() - part1 = new(src) - part2 = new(src) - part1.master = src - part2.master = src - //part2.status = 0 - -/obj/item/assembly/time_ignite/Del() - del(part1) - del(part2) - ..() - -/obj/item/assembly/time_ignite/attack_self(mob/user as mob) - if (src.part1) - src.part1.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/time_ignite/receive_signal() - if (!status) - return - for(var/mob/O in hearers(1, src.loc)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - src.part2.Activate() - return - -/obj/effect/decal/ash/attack_hand(mob/user as mob) - usr << "\blue The ashes slip through your fingers." - del(src) - return - -/obj/item/assembly/time_ignite/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part1.master = null - src.part1 = null - src.part2.loc = T - src.part2.master = null - src.part2 = null - - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The timer is now secured!", 1) - else - user.show_message("\blue The timer is now unsecured!", 1) - src.part2.secured = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/time_ignite/c_state(n) - src.icon_state = text("timer-igniter[]", n) - return - -//*********** - -/obj/item/assembly/anal_ignite/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part1.master = null - src.part1 = null - src.part2.loc = T - src.part2.master = null - src.part2 = null - - del(src) - return - if (( istype(W, /obj/item/weapon/screwdriver) )) - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The analyzer is now secured!", 1) - else - user.show_message("\blue The analyzer is now unsecured!", 1) - src.part2.secured = src.status - src.add_fingerprint(user) - if(( istype(W, /obj/item/clothing/suit/armor/vest) ) && src.status) - var/obj/item/assembly/a_i_a/R = new - R.part1 = part1 - R.part1.master = R - part1 = null - - R.part2 = part2 - R.part2.master = R - part2 = null - - user.put_in_hand(R) - user.before_take_item(W) - R.part3 = W - R.part3.master = R - del(src) - -/* WTF THIS SHIT? It is working? Shouldn't. --rastaf0 - W.loc = R - R.part1 = W - R.part2 = W - W.layer = initial(W.layer) - if (user.client) - user.client.screen -= W - if (user.r_hand == W) - user.u_equip(W) - user.r_hand = R - else - user.u_equip(W) - user.l_hand = R - W.master = R - src.master = R - src.layer = initial(src.layer) - user.u_equip(src) - if (user.client) - user.client.screen -= src - src.loc = R - R.part3 = src - R.layer = 20 - R.loc = user - src.add_fingerprint(user) -*/ - return -/* else if ((istype(W, /obj/item/device/timer) && !( src.status ))) - - var/obj/item/assembly/time_ignite/R = new /obj/item/assembly/time_ignite( user ) - W.loc = R - R.part1 = W - W.layer = initial(W.layer) - if (user.client) - user.client.screen -= W - if (user.r_hand == W) - user.u_equip(W) - user.r_hand = R - else - user.u_equip(W) - user.l_hand = R - W.master = R - src.master = R - src.layer = initial(src.layer) - user.u_equip(src) - if (user.client) - user.client.screen -= src - src.loc = R - R.part2 = src - R.layer = 20 - R.loc = user - src.add_fingerprint(user) -*/ - -/obj/item/assembly/proc/c_state(n, O as obj) - return - -/obj/item/assembly/a_i_a/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part1.master = null - src.part1 = null - src.part2.loc = T - src.part2.master = null - src.part2 = null - src.part3.loc = T - src.part3.master = null - src.part3 = null - - del(src) - return - if (( istype(W, /obj/item/weapon/screwdriver) )) - if (!src.status && (!part1||!part2||!part3)) - user << "\red You cannot finish the assembly, not all components are in place!" - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The armor is now secured!", 1) - else - user.show_message("\blue The armor is now unsecured!", 1) - src.add_fingerprint(user) - -/obj/item/assembly/a_i_a/Del() - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - del(src.part3) - ..() - return -//***** - -/obj/item/assembly/rad_time/Del() - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - ..() - return - -/obj/item/assembly/rad_time/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The signaler is now secured!", 1) - else - user.show_message("\blue The signaler is now unsecured!", 1) - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_time/attack_self(mob/user as mob) - src.part1.attack_self(user, src.status) - src.part2.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_time/receive_signal(datum/signal/signal) - if (signal.source == src.part2) - src.part1.send_signal("ACTIVATE") - return -//******************* -/obj/item/assembly/rad_prox/c_state(n) - src.icon_state = "prox-radio[n]" - return - -/obj/item/assembly/rad_prox/Del() - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - ..() - return - -/obj/item/assembly/rad_prox/HasProximity(atom/movable/AM as mob|obj) - if (istype(AM, /obj/effect/beam)) - return - if (AM.move_speed < 12) - src.part2.sense() - return - -/obj/item/assembly/rad_prox/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The proximity sensor is now secured!", 1) - else - user.show_message("\blue The proximity sensor is now unsecured!", 1) - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_prox/attack_self(mob/user as mob) - src.part1.attack_self(user, src.status) - src.part2.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_prox/receive_signal(datum/signal/signal) - if (signal.source == src.part2) - src.part1.send_signal("ACTIVATE") - return - -/obj/item/assembly/rad_prox/Move() - ..() - src.part2.sense() - return - -/obj/item/assembly/rad_prox/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/item/assembly/rad_prox/dropped() - spawn( 0 ) - src.part2.sense() - return - return -//************************ -/obj/item/assembly/rad_infra/c_state(n) - src.icon_state = text("infrared-radio[]", n) - return - -/obj/item/assembly/rad_infra/Del() - del(src.part1) - del(src.part2) - ..() - return - -/obj/item/assembly/rad_infra/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The infrared laser is now secured!", 1) - else - user.show_message("\blue The infrared laser is now unsecured!", 1) - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_infra/attack_self(mob/user as mob) - src.part1.attack_self(user, src.status) - src.part2.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_infra/receive_signal(datum/signal/signal) - - if (signal.source == src.part2) - src.part1.send_signal("ACTIVATE") - return - -/obj/item/assembly/rad_infra/verb/rotate() - set name = "Rotate Assembly" - set category = "Object" - set src in usr - - src.dir = turn(src.dir, 90) - src.part2.dir = src.dir - src.add_fingerprint(usr) - return - -/obj/item/assembly/rad_infra/Move() - - var/t = src.dir - ..() - src.dir = t - //src.part2.first = null - del(src.part2.first) - return - -/obj/item/assembly/rad_infra/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/item/assembly/rad_infra/attack_hand(M) - del(src.part2.first) - ..() - return - -/obj/item/assembly/prox_ignite/HasProximity(atom/movable/AM as mob|obj) - - if (istype(AM, /obj/effect/beam)) - return - if (AM.move_speed < 12 && src.part1) - src.part1.sense() - return - -/obj/item/assembly/prox_ignite/dropped() - spawn( 0 ) - src.part1.sense() - return - return - -/obj/item/assembly/prox_ignite/Del() - del(src.part1) - del(src.part2) - ..() - return - -/obj/item/assembly/prox_ignite/c_state(n) - src.icon_state = text("prox-igniter[]", n) - return - -/obj/item/assembly/prox_ignite/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The proximity sensor is now secured! The igniter now works!", 1) - else - user.show_message("\blue The proximity sensor is now unsecured! The igniter will not work.", 1) - src.part2.secured = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/prox_ignite/attack_self(mob/user as mob) - - if (src.part1) - src.part1.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/prox_ignite/receive_signal() - for(var/mob/O in hearers(1, src.loc)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - src.part2.Activate() - return - -/obj/item/assembly/rad_ignite/Del() - del(src.part1) - del(src.part2) - ..() - return - - - -/obj/item/assembly/rad_ignite/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/turf/T = src.loc - if (ismob(T)) - T = T.loc - src.part1.loc = T - src.part2.loc = T - src.part1.master = null - src.part2.master = null - src.part1 = null - src.part2 = null - //SN src = null - del(src) - return - if (!( istype(W, /obj/item/weapon/screwdriver) )) - return - src.status = !( src.status ) - if (src.status) - user.show_message("\blue The radio is now secured! The igniter now works!", 1) - else - user.show_message("\blue The radio is now unsecured! The igniter will not work.", 1) - src.part2.secured = src.status - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_ignite/attack_self(mob/user as mob) - - if (src.part1) - src.part1.attack_self(user, src.status) - src.add_fingerprint(user) - return - -/obj/item/assembly/rad_ignite/receive_signal() - for(var/mob/O in hearers(1, src.loc)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - src.part2.Activate() - return - -/obj/item/assembly/m_i_ptank/c_state(n) - - src.icon_state = text("prox-igniter-tank[]", n) - return - -/obj/item/assembly/m_i_ptank/HasProximity(atom/movable/AM as mob|obj) - if (istype(AM, /obj/effect/beam)) - return - if (AM.move_speed < 12 && src.part1) - src.part1.sense() - return - - -//*****RM -/obj/item/assembly/m_i_ptank/Bump(atom/O) - spawn(0) - //world << "miptank bumped into [O]" - if(src.part1.secured) - //world << "sending signal" - receive_signal() - else - //world << "not active" - ..() - -/obj/item/assembly/m_i_ptank/proc/prox_check() - if(!part1 || !part1.secured) - return - for(var/atom/A in view(1, src.loc)) - if(A!=src && !istype(A, /turf/space) && !isarea(A)) - //world << "[A]:[A.type] was sensed" - src.part1.sense() - break - - spawn(10) - prox_check() - - -//***** - - -/obj/item/assembly/m_i_ptank/dropped() - - spawn( 0 ) - part1.sense() - return - return - -/obj/item/assembly/m_i_ptank/examine() - ..() - part3.examine() - -/obj/item/assembly/m_i_ptank/Del() - - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - //src.part3 = null - del(src.part3) - ..() - return - -/obj/item/assembly/m_i_ptank/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if (istype(W, /obj/item/device/analyzer)) - src.part3.attackby(W, user) - return - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/obj/item/assembly/prox_ignite/R = new(get_turf(src.loc)) - R.part1 = src.part1 - R.part1.master = R - R.part1.loc = R - R.part2 = src.part2 - R.part2.master = R - R.part2.loc = R - if (user.get_inactive_hand()==src) - user.put_in_inactive_hand(part3) - else - part3.loc = src.loc - src.part1 = null - src.part2 = null - src.part3 = null - del(src) - return - if (!( istype(W, /obj/item/weapon/weldingtool)&&W:welding )) - return - if (!( src.status )) - src.status = 1 - bombers += "[key_name(user)] welded a prox bomb. Temp: [src.part3.air_contents.temperature-T0C]" - message_admins("[key_name_admin(user)] welded a prox bomb. Temp: [src.part3.air_contents.temperature-T0C]") - user.show_message("\blue A pressure hole has been bored to the plasma tank valve. The plasma tank can now be ignited.", 1) - else - src.status = 0 - bombers += "[key_name(user)] unwelded a prox bomb. Temp: [src.part3.air_contents.temperature-T0C]" - user << "\blue The hole has been closed." - src.part2.secured = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/m_i_ptank/attack_self(mob/user as mob) - - playsound(src.loc, 'sound/weapons/armbomb.ogg', 100, 1) - src.part1.attack_self(user, 1) - src.add_fingerprint(user) - return - -/obj/item/assembly/m_i_ptank/receive_signal() - //world << "miptank [src] got signal" - for(var/mob/O in hearers(1, null)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - //Foreach goto(19) - - if ((src.status && prob(90))) - //world << "sent ignite() to [src.part3]" - src.part3.ignite() - else - if(!src.status) - src.part3.release() - src.part1.secured = 0.0 - - return - -/obj/item/assembly/m_i_ptank/emp_act(severity) - - if(istype(part3,/obj/item/weapon/tank/plasma) && prob(100/severity)) - part3.ignite() - ..() - -//*****RM - -/obj/item/assembly/t_i_ptank/c_state(n) - - src.icon_state = text("timer-igniter-tank[]", n) - return - -/obj/item/assembly/t_i_ptank/examine() - ..() - src.part3.examine() - -/obj/item/assembly/t_i_ptank/Del() - - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - //src.part3 = null - del(src.part3) - ..() - return - -/obj/item/assembly/t_i_ptank/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - - if (istype(W, /obj/item/device/analyzer)) - src.part3.attackby(W, user) - return - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/obj/item/assembly/time_ignite/R = new(get_turf(src.loc)) - R.part1 = src.part1 - R.part1.master = R - R.part1.loc = R - R.part2 = src.part2 - R.part2.master = R - R.part2.loc = R - if (user.get_inactive_hand()==src) - user.put_in_inactive_hand(part3) - else - part3.loc = src.loc - src.part1 = null - src.part2 = null - src.part3 = null - del(src) - return - if (!( istype(W, /obj/item/weapon/weldingtool) && W:welding)) - return - if (!( src.status )) - src.status = 1 - bombers += "[key_name(user)] welded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]" - message_admins("[key_name_admin(user)] welded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]") - user.show_message("\blue A pressure hole has been bored to the plasma tank valve. The plasma tank can now be ignited.", 1) - else - if(src) - src.status = 0 - bombers += "[key_name(user)] unwelded a time bomb. Temp: [src.part3.air_contents.temperature-T0C]" - user << "\blue The hole has been closed." - src.part2.secured = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/t_i_ptank/attack_self(mob/user as mob) - - src.part1.attack_self(user, 1) - playsound(src.loc, 'sound/weapons/armbomb.ogg', 100, 1) - src.add_fingerprint(user) - return - -/obj/item/assembly/t_i_ptank/receive_signal() - //world << "tiptank [src] got signal" - for(var/mob/O in hearers(1, null)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - //Foreach goto(19) - if ((src.status && prob(90))) - //world << "sent ignite() to [src.part3]" - src.part3.ignite() - else - if(!src.status) - src.part3.release() - return - -/obj/item/assembly/t_i_ptank/emp_act(severity) - if(istype(part3,/obj/item/weapon/tank/plasma) && prob(100/severity)) - part3.ignite() - ..() - -/obj/item/assembly/r_i_ptank/examine() - ..() - src.part3.examine() - -/obj/item/assembly/r_i_ptank/Del() - - //src.part1 = null - del(src.part1) - //src.part2 = null - del(src.part2) - //src.part3 = null - del(src.part3) - ..() - return - -/obj/item/assembly/r_i_ptank/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - - if (istype(W, /obj/item/device/analyzer)) - src.part3.attackby(W, user) - return - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/obj/item/assembly/rad_ignite/R = new(get_turf(src.loc)) - R.part1 = src.part1 - R.part1.master = R - R.part1.loc = R - R.part2 = src.part2 - R.part2.master = R - R.part2.loc = R - if (user.get_inactive_hand()==src) - user.put_in_inactive_hand(part3) - else - part3.loc = src.loc - src.part1 = null - src.part2 = null - src.part3 = null - del(src) - return - if (!( istype(W, /obj/item/weapon/weldingtool) && W:welding )) - return - if (!( src.status )) - src.status = 1 - bombers += "[key_name(user)] welded a radio bomb. Temp: [src.part3.air_contents.temperature-T0C]" - message_admins("[key_name_admin(user)] welded a radio bomb. Temp: [src.part3.air_contents.temperature-T0C]") - user.show_message("\blue A pressure hole has been bored to the plasma tank valve. The plasma tank can now be ignited.", 1) - else - src.status = 0 - bombers += "[key_name(user)] unwelded a radio bomb. Temp: [src.part3.air_contents.temperature-T0C]" - user << "\blue The hole has been closed." - src.part2.secured = src.status - src.part1.b_stat = !( src.status ) - src.add_fingerprint(user) - return - -/obj/item/assembly/r_i_ptank/emp_act(severity) - if(istype(part3,/obj/item/weapon/tank/plasma) && prob(100/severity)) - part3.ignite() - ..() - - -/obj/item/clothing/suit/armor/a_i_a_ptank/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if (istype(W, /obj/item/device/analyzer)) - src.part4.attackby(W, user) - return - if ((istype(W, /obj/item/weapon/wrench) && !( src.status ))) - var/obj/item/assembly/a_i_a/R = new(get_turf(src.loc)) - R.part1 = src.part1 - R.part1.master = R - R.part1.loc = R - R.part2 = src.part2 - R.part2.master = R - R.part2.loc = R - R.part3 = src.part3 - R.part3.master = R - R.part3.loc = R - if (user.get_inactive_hand()==src) - user.put_in_inactive_hand(part4) - else - part4.loc = src.loc - src.part1 = null - src.part2 = null - src.part3 = null - src.part4 = null - del(src) - return - if (( istype(W, /obj/item/weapon/weldingtool) && W:welding)) - return - if (!( src.status )) - src.status = 1 - bombers += "[key_name(user)] welded a suicide bomb. Temp: [src.part4.air_contents.temperature-T0C]" - message_admins("[key_name_admin(user)] welded a suicide bomb. Temp: [src.part4.air_contents.temperature-T0C]") - user.show_message("\blue A pressure hole has been bored to the plasma tank valve. The plasma tank can now be ignited.", 1) - else - src.status = 0 - bombers += "[key_name(user)] unwelded a suicide bomb. Temp: [src.part4.air_contents.temperature-T0C]" - user << "\blue The hole has been closed." -// src.part3.status = src.status - src.add_fingerprint(user) - return - -/obj/item/assembly/r_i_ptank/attack_self(mob/user as mob) - playsound(src.loc, 'sound/weapons/armbomb.ogg', 100, 1) - src.part1.attack_self(user, 1) - src.add_fingerprint(user) - return - -/obj/item/assembly/r_i_ptank/receive_signal() - //world << "riptank [src] got signal" - for(var/mob/O in hearers(1, null)) - O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - //Foreach goto(19) - if ((src.status && prob(90))) - //world << "sent ignite() to [src.part3]" - src.part3.ignite() - else - if(!src.status) - src.part3.release() - return - - -//*****RM \ No newline at end of file diff --git a/code/unused/asteroiddevice.dm b/code/unused/asteroiddevice.dm deleted file mode 100644 index 0fc2c3fd27f..00000000000 --- a/code/unused/asteroiddevice.dm +++ /dev/null @@ -1,105 +0,0 @@ -/obj/item/device/gps - name = "GPS" - icon = 'icons/obj/device.dmi' - icon_state = "pinoff" - flags = FPRINT | TABLEPASS| CONDUCT - slot_flags = SLOT_BELT - w_class = 2.0 - item_state = "electronic" - throw_speed = 4 - throw_range = 20 - m_amt = 500 - var/obj/effect/ship_landing_beacon/beacon = null - var/active = 0 - - attack_self() - if(!active) - active = 1 - work() - usr << "\blue You activate the GPS" - else - active = 0 - icon_state = "pinoff" - usr << "\blue You deactivate the GPS" - - proc/work() - while(active) - if(!beacon) - for(var/obj/effect/ship_landing_beacon/B in world) - if(B.name == "Beacon - SS13") - beacon = B - break - - if(!beacon) - usr << "\red Unable to detect beacon signal." - active = 0 - icon_state = "pinonnull" - return - - if(!istype(src.loc, /turf) && !istype(src.loc, /mob)) - usr << "\red Too much interference. Please hold the device in hand or place it on belt." - active = 0 - icon_state = "pinonnull" - return - - src.icon_state = "pinonfar" - - var/atom/cur_loc = src.loc - - if(cur_loc.z == beacon.z) - src.dir = get_dir(cur_loc,beacon) - else - var/list/beacon_global_loc = beacon.get_global_map_pos() - var/list/src_global_loc = cur_loc.get_global_map_pos() - if(beacon_global_loc && src_global_loc) - var/hor_dir = 0 - var/ver_dir = 0 - if(beacon_global_loc["x"]>src_global_loc["x"]) - hor_dir = EAST - else if(beacon_global_loc["x"] Frequency: " - dat += "-- " - dat += "- " - dat += "[format_frequency(src.master.frequency)] " - dat += "+ " - dat += "++" - dat += " " - */ - - - dat += " ID:[src.id_tag] " - - dat += "Cycle" - - - dat += "" - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["set_tag"]) - var/t = input(usr, "Please enter new tag", src.id_tag, null) as text - t = copytext(sanitize(t), 1, MAX_MESSAGE_LEN) - if (!t) - return - if (!in_range(src.master, usr)) - return - - src.id_tag = t - -// if(href_list["adj_freq"]) -// var/new_frequency = (src.master.frequency + text2num(href_list["adj_freq"])) -// src.master.set_frequency(new_frequency) - - if(href_list["send_command"]) - var/datum/signal/signal = new - signal.data["tag"] = id_tag - signal.data["command"] = href_list["send_command"] - peripheral_command("send signal", signal) - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return \ No newline at end of file diff --git a/code/unused/computer2/arcade.dm b/code/unused/computer2/arcade.dm deleted file mode 100644 index 679e2bd4a43..00000000000 --- a/code/unused/computer2/arcade.dm +++ /dev/null @@ -1,136 +0,0 @@ -/datum/computer/file/computer_program/arcade - name = "Arcade 500" - size = 8.0 - var/enemy_name = "Space Villian" - var/temp = "Winners Don't Use Spacedrugs" //Temporary message, for attack messages, etc - var/player_hp = 30 //Player health/attack points - var/player_mp = 10 - var/enemy_hp = 45 //Enemy health/attack points - var/enemy_mp = 20 - var/gameover = 0 - var/blocked = 0 //Player cannot attack/heal while set - - New(obj/holding as obj) - if(holding) - src.holder = holding - - if(istype(src.holder.loc,/obj/machinery/computer2)) - src.master = src.holder.loc - -// var/name_action = pick("Defeat ", "Annihilate ", "Save ", "Strike ", "Stop ", "Destroy ", "Robust ", "Romance ") - - var/name_part1 = pick("the Automatic ", "Farmer ", "Lord ", "Professor ", "the Evil ", "the Dread King ", "the Space ", "Lord ") - var/name_part2 = pick("Melonoid", "Murdertron", "Sorcerer", "Ruin", "Jeff", "Ectoplasm", "Crushulon") - - src.enemy_name = replacetext((name_part1 + name_part2), "the ", "") -// src.name = (name_action + name_part1 + name_part2) - - - -/datum/computer/file/computer_program/arcade/return_text() - if(..()) - return - - var/dat = "Close | " - dat += "Quit" - - dat += " [src.enemy_name][src.temp]" - - dat += "Current ID: [src.authid ? "[src.authid.name]" : "----------"] " - dat += "Auxiliary ID: [src.auxid ? "[src.auxid.name]" : "----------"] " - - var/progdat - if((src.hd) && (src.hd.root)) - for(var/datum/computer/file/computer_program/P in src.hd.root.contents) - progdat += " [P.name] | Size: [P.size] | "
-
- progdat += "Run | "
-
- if(P in src.processing_programs)
- progdat += "Halt | "
- else
- progdat += "Load | "
-
- progdat += "Del | " - dat += "Programs on Fixed Disk: " - - if(!progdat) - progdat = "No programs found. " - dat += " " - dat += " " - - dat += " " - - progdat = null - if((src.diskette) && (src.diskette.root)) - - dat += "Eject " - - for(var/datum/computer/file/computer_program/P in src.diskette.root.contents) - progdat += " [P.name] | Size: [P.size] | "
- progdat += "Run | "
-
- if(P in src.processing_programs)
- progdat += "Halt | "
- else
- progdat += "Load | "
-
- progdat += "Install | " - dat += "Programs on Disk: " - - if(!progdat) - progdat = "No data found. " - dat += " " - dat += " " - - dat += "" - - user << browse(dat,"window=comp2") - onclose(user,"comp2") - return - -/obj/machinery/computer2/Topic(href, href_list) - if(..()) - return - - if(!src.active_program) - if((href_list["prog"]) && (href_list["function"])) - var/datum/computer/file/computer_program/newprog = locate(href_list["prog"]) - if(newprog && istype(newprog)) - switch(href_list["function"]) - if("run") - src.run_program(newprog) - if("load") - src.load_program(newprog) - if("unload") - src.unload_program(newprog) - if((href_list["file"]) && (href_list["function"])) - var/datum/computer/file/newfile = locate(href_list["file"]) - if(!newfile) - return - switch(href_list["function"]) - if("install") - if((src.hd) && (src.hd.root) && (src.allowed(usr))) - newfile.copy_file_to_folder(src.hd.root) - - if("delete") - if(src.allowed(usr)) - src.delete_file(newfile) - - //If there is already one loaded eject, or if not and they have one insert it. - if (href_list["id"]) - switch(href_list["id"]) - if("auth") - if(!isnull(src.authid)) - src.authid.loc = get_turf(src) - src.authid = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/id)) - usr.drop_item() - I.loc = src - src.authid = I - if("aux") - if(!isnull(src.auxid)) - src.auxid.loc = get_turf(src) - src.auxid = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/id)) - usr.drop_item() - I.loc = src - src.auxid = I - - //Same but for a data disk - else if (href_list["disk"]) - if(!isnull(src.diskette)) - src.diskette.loc = get_turf(src) - src.diskette = null -/* else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/disk/data)) - usr.drop_item() - I.loc = src - src.diskette = I -*/ - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/obj/machinery/computer2/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(250) - - for(var/datum/computer/file/computer_program/P in src.processing_programs) - P.process() - - return - -/obj/machinery/computer2/power_change() - if(stat & BROKEN) - icon_state = src.base_icon_state - src.icon_state += "b" - - else if(powered()) - icon_state = src.base_icon_state - stat &= ~NOPOWER - else - spawn(rand(0, 15)) - icon_state = src.base_icon_state - src.icon_state += "0" - stat |= NOPOWER - - -/obj/machinery/computer2/attackby(obj/item/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES - if ((!src.diskette) && W:portable) - user.machine = src - user.drop_item() - W.loc = src - src.diskette = W - user << "You insert [W]." - src.updateUsrDialog() - return - - else if (istype(W, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - var/obj/computer2frame/A = new /obj/computer2frame( src.loc ) - A.created_icon_state = src.base_icon_state - if (src.stat & BROKEN) - user << "\blue The broken glass falls out." - new /obj/item/weapon/shard( src.loc ) - A.state = 3 - A.icon_state = "3" - else - user << "\blue You disconnect the monitor." - A.state = 4 - A.icon_state = "4" - - for (var/obj/item/weapon/peripheral/C in src.peripherals) - C.loc = A - A.peripherals.Add(C) - - if(src.diskette) - src.diskette.loc = src.loc - - //TO-DO: move card reading to peripheral cards instead - if(src.authid) - src.authid.loc = src.loc - - if(src.auxid) - src.auxid.loc = src.loc - - if(src.hd) - src.hd.loc = A - A.hd = src.hd - - A.mainboard = new /obj/item/weapon/motherboard(A) - A.mainboard.created_name = src.name - - - A.anchored = 1 - del(src) - - else - src.attack_hand(user) - return - -/obj/machinery/computer2/proc/send_command(command, datum/signal/signal) - for(var/obj/item/weapon/peripheral/P in src.peripherals) - P.receive_command(src, command, signal) - - del(signal) - -/obj/machinery/computer2/proc/receive_command(obj/source, command, datum/signal/signal) - if(source in src.contents) - - for(var/datum/computer/file/computer_program/P in src.processing_programs) - P.receive_command(src, command, signal) - - del(signal) - - return - - -/obj/machinery/computer2/proc/run_program(datum/computer/file/computer_program/program,datum/computer/file/computer_program/host) - if(!program) - return 0 - -// src.unload_program(src.active_program) - - if(src.load_program(program)) - if(host && istype(host)) - src.host_program = host - else - src.host_program = null - - src.active_program = program - return 1 - - return 0 - -/obj/machinery/computer2/proc/load_program(datum/computer/file/computer_program/program) - if((!program) || (!program.holder)) - return 0 - - if(!(program.holder in src)) -// world << "Not in src" - program = new program.type - program.transfer_holder(src.hd) - - if(program.master != src) - program.master = src - - if(program in src.processing_programs) - return 1 - else - src.processing_programs.Add(program) - return 1 - - return 0 - -/obj/machinery/computer2/proc/unload_program(datum/computer/file/computer_program/program) - if((!program) || (!src.hd)) - return 0 - - if(program in src.processing_programs) - src.processing_programs.Remove(program) - return 1 - - return 0 - -/obj/machinery/computer2/proc/delete_file(datum/computer/file/file) - //world << "Deleting [file]..." - if((!file) || (!file.holder) || (file.holder.read_only)) - //world << "Cannot delete :(" - return 0 - - if(file in src.processing_programs) - src.processing_programs.Remove(file) - - if(src.active_program == file) - src.active_program = null - -// file.holder.root.remove_file(file) - - //world << "Now calling del on [file]..." - del(file) - return 1 \ No newline at end of file diff --git a/code/unused/computer2/filebrowse.dm b/code/unused/computer2/filebrowse.dm deleted file mode 100644 index 38c88f06161..00000000000 --- a/code/unused/computer2/filebrowse.dm +++ /dev/null @@ -1,164 +0,0 @@ -/datum/computer/file/computer_program/progman - name = "ProgManager" - size = 16.0 - var/datum/computer/folder/current_folder - var/mode = 0 - var/datum/computer/file/clipboard - - - return_text() - if(..()) - return - - if((!src.current_folder) || !(src.current_folder.holder in src.master)) - src.current_folder = src.holder.root - - var/dat = "Close | " - dat += "Quit" - - switch(mode) - if(0) - dat += " |Create Folder" - //dat += " | Create File" - dat += " | Paste" - dat += " | Root" - dat += " | Drive " - - dat += "Contents of [current_folder] | Drive:\[[src.current_folder.holder.title]] " - dat += "Used: \[[src.current_folder.holder.file_used]/[src.current_folder.holder.file_amount]\] " - - dat += "
" - - for(var/obj/item/weapon/disk/data/D in src.master) - if(D == current_folder.holder) - dat += "[D.name] " - else - dat += "[D.title] " - - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["create"]) - if(current_folder) - var/datum/computer/F = null - switch(href_list["create"]) - if("folder") - F = new /datum/computer/folder - if(!current_folder.add_file(F)) - //world << "Couldn't add folder :(" - del(F) - if("file") - F = new /datum/computer/file - if(!current_folder.add_file(F)) - //world << "Couldn't add file :(" - del(F) - - if(href_list["file"] && href_list["function"]) - var/datum/computer/F = locate(href_list["file"]) - if(!F || !istype(F)) - return - switch(href_list["function"]) - if("open") - if(istype(F,/datum/computer/folder)) - src.current_folder = F - else if(istype(F,/datum/computer/file/computer_program)) - src.master.run_program(F,src) - src.master.updateUsrDialog() - return - - if("delete") - src.master.delete_file(F) - - if("copy") - if(istype(F,/datum/computer/file) && (!F.holder || (F.holder in src.master.contents))) - src.clipboard = F - - if("paste") - if(istype(F,/datum/computer/folder)) - if(!src.clipboard || !src.clipboard.holder || !(src.clipboard.holder in src.master.contents)) - return - - if(!istype(src.clipboard)) - return - - src.clipboard.copy_file_to_folder(F) - - if("rename") - spawn(0) - var/t = input(usr, "Please enter new name", F.name, null) as text - t = copytext(sanitize(t), 1, 16) - if (!t) - return - if (!in_range(src.master, usr) || !(F.holder in src.master)) - return - if(F.holder.read_only) - return - F.name = capitalize(lowertext(t)) - src.master.updateUsrDialog() - return - - -/* - if(href_list["open"]) - var/datum/computer/F = locate(href_list["open"]) - if(!F || !istype(F)) - return - - if(istype(F,/datum/computer/folder)) - src.current_folder = F - else if(istype(F,/datum/computer/file/computer_program)) - src.master.run_program(F) - src.master.updateUsrDialog() - return - - if(href_list["delete"]) - var/datum/computer/F = locate(href_list["delete"]) - if(!F || !istype(F)) - return - - src.master.delete_file(F) -*/ - if(href_list["top_folder"]) - src.current_folder = src.current_folder.holder.root - - if(href_list["mode"]) - var/newmode = text2num(href_list["mode"]) - newmode = max(newmode,0) - src.mode = newmode - - if(href_list["drive"]) - var/obj/item/weapon/disk/data/D = locate(href_list["drive"]) - if(D && istype(D) && D.root) - current_folder = D.root - src.mode = 0 - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return \ No newline at end of file diff --git a/code/unused/computer2/med_rec.dm b/code/unused/computer2/med_rec.dm deleted file mode 100644 index 0f510da7b8e..00000000000 --- a/code/unused/computer2/med_rec.dm +++ /dev/null @@ -1,463 +0,0 @@ -/datum/computer/file/computer_program/med_data - name = "Medical Records" - size = 32.0 - active_icon = "dna" - req_access = list(ACCESS_MEDICAL) - var/authenticated = null - var/rank = null - var/screen = null - var/datum/data/record/active1 = null - var/datum/data/record/active2 = null - var/a_id = null - var/temp = null - -/datum/computer/file/computer_program/med_data/return_text() - if(..()) - return - var/dat - if (src.temp) - dat = text("[src.temp] Clear Screen") - else - dat = text("Confirm Identity: [] ", master, (src.master.authid ? text("[]", src.master.authid.name) : "----------")) - if (src.authenticated) - switch(src.screen) - if(1.0) - dat += {" -Search Records - List Records - - Virus Database - Medbot Tracking - - Record Maintenance - {Log Out} -"} - if(2.0) - dat += "Record List: " - for(var/datum/data/record/R in data_core.general) - dat += text("[]: [] ", src, R, R.fields["id"], R.fields["name"]) - //Foreach goto(132) - dat += text(" Back", src) - if(3.0) - dat += text("Records Maintenance \nBackup To Disk \nUpload From disk \nDelete All Records \n \nBack", src, src, src, src) - if(4.0) - dat += " " - if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1))) - dat += text("Name: [] ID: [] \nSex: [] \nAge: [] \nFingerprint: [] \nPhysical Status: [] \nMental Status: [] ", src.active1.fields["name"], src.active1.fields["id"], src, src.active1.fields["sex"], src, src.active1.fields["age"], src, src.active1.fields["fingerprint"], src, src.active1.fields["p_stat"], src, src.active1.fields["m_stat"]) - else - dat += "General Record Lost! " - if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2))) - dat += text(" \n \nBlood Type: [] \n \nMinor Disabilities: [] \nDetails: [] \n \nMajor Disabilities: [] \nDetails: [] \n \nAllergies: [] \nDetails: [] \n \nCurrent Diseases: [] (per disease info placed in log/comment section) \nDetails: [] \n \nImportant Notes: \n\t[] \n \n ", src, src.active2.fields["b_type"], src, src.active2.fields["mi_dis"], src, src.active2.fields["mi_dis_d"], src, src.active2.fields["ma_dis"], src, src.active2.fields["ma_dis_d"], src, src.active2.fields["alg"], src, src.active2.fields["alg_d"], src, src.active2.fields["cdi"], src, src.active2.fields["cdi_d"], src, src.active2.fields["notes"]) - var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) - dat += text("[] Delete Entry ", src.active2.fields[text("com_[]", counter)], src, counter) - counter++ - dat += text("Add Entry ", src) - dat += text("Delete Record (Medical Only) ", src) - else - dat += "Medical Record Lost! " - dat += text("New Record ") - dat += text("\nPrint Record \nBack ", src, src) - if(5.0) - dat += {" GBS - Common Cold - Flu - Jungle Fever - Clowning Around - Plasmatoid - Space Rhinovirus - Robot Transformation - Back"} - if(6.0) - dat += " Medical Robots:" - var/bdat = null - for(var/obj/machinery/bot/medbot/M in world) - var/turf/bl = get_turf(M) - bdat += "[M.name] - \[[bl.x],[bl.y]\] - [M.on ? "Online" : "Offline"] " - if(!isnull(M.reagent_glass)) - bdat += "Reservoir: \[[M.reagent_glass.reagents.total_volume]/[M.reagent_glass.reagents.maximum_volume]\]" - else - bdat += "Using Internal Synthesizer." - - if(!bdat) - dat += " {Quit}" - - return dat - -/datum/computer/file/computer_program/med_data/Topic(href, href_list) - if(..()) - return - if (!( data_core.general.Find(src.active1) )) - src.active1 = null - if (!( data_core.medical.Find(src.active2) )) - src.active2 = null - if (href_list["temp"]) - src.temp = null - else if (href_list["logout"]) - src.authenticated = null - src.screen = null - src.active1 = null - src.active2 = null - else if (href_list["login"]) - if (istype(usr, /mob/living/silicon)) - src.active1 = null - src.active2 = null - src.authenticated = 1 - src.rank = "AI" - src.screen = 1 - else if (istype(src.master.authid, /obj/item/weapon/card/id)) - src.active1 = null - src.active2 = null - if (src.check_access(src.master.authid)) - src.authenticated = src.master.authid.registered_name - src.rank = src.master.authid.assignment - src.screen = 1 - if (src.authenticated) - - if(href_list["screen"]) - src.screen = text2num(href_list["screen"]) - if(src.screen < 1) - src.screen = 1 - - src.active1 = null - src.active2 = null - - if(href_list["vir"]) - switch(href_list["vir"]) - if("gbs") - src.temp = {"Name: GBS - Number of stages: 5 - Spread: Airborne Transmission - Possible Cure: Spaceacillin - Affected Species: Human - - Notes: If left untreated death will occur. - - Severity: Major"} - if("cc") - src.temp = {"Name: Common Cold - Number of stages: 3 - Spread: Airborne Transmission - Possible Cure: Rest - Affected Species: Human - - Notes: If left untreated the subject will contract the flu. - - Severity: Minor"} - if("f") - src.temp = {"Name: The Flu - Number of stages: 3 - Spread: Airborne Transmission - Possible Cure: Rest - Affected Species: Human - - Notes: If left untreated the subject will feel quite unwell. - - Severity: Medium"} - if("jf") - src.temp = {"Name: Jungle Fever - Number of stages: 1 - Spread: Airborne Transmission - Possible Cure: None - Affected Species: Monkey - - Notes: monkeys with this disease will bite humans, causing humans to spontaneously to mutate into a monkey. - - Severity: Medium"} - if("ca") - src.temp = {"Name: Clowning Around - Number of stages: 4 - Spread: Airborne Transmission - Possible Cure: Spaceacillin - Affected Species: Human - - Notes: Subjects are affected by rampant honking and a fondness for shenanigans. They may also spontaneously phase through closed airlocks. - - Severity: Laughable"} - if("p") - src.temp = {"Name: Plasmatoid - Number of stages: 3 - Spread: Airborne Transmission - Possible Cure: Inaprovaline - Affected Species: Human and Monkey - - Notes: With this disease the victim will need plasma to breathe. - - Severity: Major"} - if("dna") - src.temp = {"Name: Space Rhinovirus - Number of stages: 4 - Spread: Airborne Transmission - Possible Cure: Spaceacillin - Affected Species: Human - - Notes: This disease transplants the genetic code of the intial vector into new hosts. - - Severity: Medium"} - if("bot") - src.temp = {"Name: Robot Transformation - Number of stages: 5 - Spread: Infected food - Possible Cure: None - Affected Species: Human - - Notes: This disease, actually acute nanomachine infection, converts the victim into a cyborg. - - Severity: Major"} - - if (href_list["del_all"]) - src.temp = text("Are you sure you wish to delete all records? \n\tYes \n\tNo ", src, src) - - if (href_list["del_all2"]) - for(var/datum/data/record/R in data_core.medical) - del(R) - src.temp = "All records deleted." - - if (href_list["field"]) - var/a1 = src.active1 - var/a2 = src.active2 - switch(href_list["field"]) - if("fingerprint") - if (istype(src.active1, /datum/data/record)) - var/t1 = input("Please input fingerprint hash:", "Med. records", src.active1.fields["id"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) - return - src.active1.fields["fingerprint"] = t1 - if("sex") - if (istype(src.active1, /datum/data/record)) - if (src.active1.fields["sex"] == "Male") - src.active1.fields["sex"] = "Female" - else - src.active1.fields["sex"] = "Male" - if("age") - if (istype(src.active1, /datum/data/record)) - var/t1 = input("Please input age:", "Med. records", src.active1.fields["age"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1)) - return - src.active1.fields["age"] = t1 - if("mi_dis") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["mi_dis"] = t1 - if("mi_dis_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["mi_dis_d"] = t1 - if("ma_dis") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["ma_dis"] = t1 - if("ma_dis_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["ma_dis_d"] = t1 - if("alg") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["alg"] = t1 - if("alg_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["alg_d"] = t1 - if("cdi") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["cdi"] = t1 - if("cdi_d") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["cdi_d"] = t1 - if("notes") - if (istype(src.active2, /datum/data/record)) - var/t1 = input("Please summarize notes:", "Med. records", src.active2.fields["notes"], null) as message - if ((!( t1 ) || !( src.authenticated ) || (!src.master) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - src.active2.fields["notes"] = t1 - if("p_stat") - if (istype(src.active1, /datum/data/record)) - src.temp = text("Physical Condition: \n\t*Deceased* \n\t*Unconscious* \n\tActive \n\tPhysically Unfit ", src, src, src, src) - if("m_stat") - if (istype(src.active1, /datum/data/record)) - src.temp = text("Mental Condition: \n\t*Insane* \n\t*Unstable* \n\t*Watch* \n\tStable ", src, src, src, src) - if("b_type") - if (istype(src.active2, /datum/data/record)) - src.temp = text("Blood Type: \n\tA- A+ \n\tB- B+ \n\tAB- AB+ \n\tO- O+ ", src, src, src, src, src, src, src, src) - else - - if (href_list["p_stat"]) - if (src.active1) - switch(href_list["p_stat"]) - if("deceased") - src.active1.fields["p_stat"] = "*Deceased*" - if("unconscious") - src.active1.fields["p_stat"] = "*Unconscious*" - if("active") - src.active1.fields["p_stat"] = "Active" - if("unfit") - src.active1.fields["p_stat"] = "Physically Unfit" - - if (href_list["m_stat"]) - if (src.active1) - switch(href_list["m_stat"]) - if("insane") - src.active1.fields["m_stat"] = "*Insane*" - if("unstable") - src.active1.fields["m_stat"] = "*Unstable*" - if("watch") - src.active1.fields["m_stat"] = "*Watch*" - if("stable") - src.active2.fields["m_stat"] = "Stable" - - - if (href_list["b_type"]) - if (src.active2) - switch(href_list["b_type"]) - if("an") - src.active2.fields["b_type"] = "A-" - if("bn") - src.active2.fields["b_type"] = "B-" - if("abn") - src.active2.fields["b_type"] = "AB-" - if("on") - src.active2.fields["b_type"] = "O-" - if("ap") - src.active2.fields["b_type"] = "A+" - if("bp") - src.active2.fields["b_type"] = "B+" - if("abp") - src.active2.fields["b_type"] = "AB+" - if("op") - src.active2.fields["b_type"] = "O+" - - - if (href_list["del_r"]) - if (src.active2) - src.temp = "Are you sure you wish to delete the record (Medical Portion Only)? \n\tYes \n\tNo " - - if (href_list["del_r2"]) - if (src.active2) - del(src.active2) - - if (href_list["d_rec"]) - var/datum/data/record/R = locate(href_list["d_rec"]) - var/datum/data/record/M = locate(href_list["d_rec"]) - if (!( data_core.general.Find(R) )) - src.temp = "Record Not Found!" - return - for(var/datum/data/record/E in data_core.medical) - if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - M = E - else - //Foreach continue //goto(2540) - src.active1 = R - src.active2 = M - src.screen = 4 - - if (href_list["new"]) - if ((istype(src.active1, /datum/data/record) && !( istype(src.active2, /datum/data/record) ))) - var/datum/data/record/R = new /datum/data/record( ) - R.fields["name"] = src.active1.fields["name"] - R.fields["id"] = src.active1.fields["id"] - R.name = text("Medical Record #[]", R.fields["id"]) - R.fields["b_type"] = "Unknown" - R.fields["mi_dis"] = "None" - R.fields["mi_dis_d"] = "No minor disabilities have been declared." - R.fields["ma_dis"] = "None" - R.fields["ma_dis_d"] = "No major disabilities have been diagnosed." - R.fields["alg"] = "None" - R.fields["alg_d"] = "No allergies have been detected in this patient." - R.fields["cdi"] = "None" - R.fields["cdi_d"] = "No diseases have been diagnosed at the moment." - R.fields["notes"] = "No notes." - data_core.medical += R - src.active2 = R - src.screen = 4 - - if (href_list["add_c"]) - if (!( istype(src.active2, /datum/data/record) )) - return - var/a2 = src.active2 - var/t1 = input("Add Comment:", "Med. records", null, null) as message - if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src.master, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2)) - return - var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) - counter++ - src.active2.fields[text("com_[]", counter)] = text("Made by [] ([]) on [], 2556 []", src.authenticated, src.rank, time2text(world.realtime, "DDD MMM DD hh:mm:ss"), t1) - - if (href_list["del_c"]) - if ((istype(src.active2, /datum/data/record) && src.active2.fields[text("com_[]", href_list["del_c"])])) - src.active2.fields[text("com_[]", href_list["del_c"])] = "Deleted" - - if (href_list["search"]) - var/t1 = input("Search String: (Name or ID)", "Med. records", null, null) as text - if ((!( t1 ) || usr.stat || (!src.master) || !( src.authenticated ) || usr.restrained() || ((!in_range(src.master, usr)) && (!istype(usr, /mob/living/silicon))))) - return - src.active1 = null - src.active2 = null - t1 = lowertext(t1) - for(var/datum/data/record/R in data_core.general) - if ((lowertext(R.fields["name"]) == t1 || t1 == lowertext(R.fields["id"]))) - src.active1 = R - else - - if (!( src.active1 )) - src.temp = text("Could not locate record [].", t1) - else - for(var/datum/data/record/E in data_core.medical) - if ((E.fields["name"] == src.active1.fields["name"] || E.fields["id"] == src.active1.fields["id"])) - src.active2 = E - else - - src.screen = 4 - - if (href_list["print_p"]) - var/info = " " - if ((istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1))) - info += text("Name: [] ID: [] \nSex: [] \nAge: [] \nFingerprint: [] \nPhysical Status: [] \nMental Status: [] ", src.active1.fields["name"], src.active1.fields["id"], src.active1.fields["sex"], src.active1.fields["age"], src.active1.fields["fingerprint"], src.active1.fields["p_stat"], src.active1.fields["m_stat"]) - else - info += "General Record Lost! " - if ((istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2))) - info += text(" \n \nBlood Type: [] \n \nMinor Disabilities: [] \nDetails: [] \n \nMajor Disabilities: [] \nDetails: [] \n \nAllergies: [] \nDetails: [] \n \nCurrent Diseases: [] (per disease info placed in log/comment section) \nDetails: [] \n \nImportant Notes: \n\t[] \n \n ", src.active2.fields["b_type"], src.active2.fields["mi_dis"], src.active2.fields["mi_dis_d"], src.active2.fields["ma_dis"], src.active2.fields["ma_dis_d"], src.active2.fields["alg"], src.active2.fields["alg_d"], src.active2.fields["cdi"], src.active2.fields["cdi_d"], src.active2.fields["notes"]) - var/counter = 1 - while(src.active2.fields[text("com_[]", counter)]) - info += text("[] ", src.active2.fields[text("com_[]", counter)]) - counter++ - else - info += "Medical Record Lost! " - info += "" - - var/datum/signal/signal = new - signal.data["data"] = info - signal.data["title"] = "Medical Record" - src.peripheral_command("print",signal) - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return \ No newline at end of file diff --git a/code/unused/computer2/messenger.dm b/code/unused/computer2/messenger.dm deleted file mode 100644 index be1930bb7a2..00000000000 --- a/code/unused/computer2/messenger.dm +++ /dev/null @@ -1,97 +0,0 @@ -/datum/computer/file/computer_program/messenger - name = "Messenger" - size = 8.0 - var/messages = null - var/screen_name = "User" - -//To-do: take screen_name from inserted id card?? -//Saving log to file datum - - return_text() - if(..()) - return - - var/dat = "Close | " - dat += "Quit " - - dat += "SpaceMessenger V4.1.2 " - - dat += "Send Message" - - dat += " | Clear" - dat += " | Print" - - dat += " | Name:[src.screen_name] " - - dat += messages - - dat += " [t] " - - peripheral_command("send signal", signal) - - if(href_list["func_msg"]) - switch(href_list["func_msg"]) - if("clear") - src.messages = null - - if("print") - var/datum/signal/signal = new - signal.data["data"] = src.messages - signal.data["title"] = "Chatlog" - peripheral_command("print", signal) - - //if("save") - //TO-DO - - - if(href_list["set_name"]) - var/t = input(usr, "Please enter screen name", src.id_tag, null) as text - t = copytext(sanitize(t), 1, 20) - if (!t) - return - if (!in_range(src.master, usr)) - return - - src.screen_name = t - - src.master.add_fingerprint(usr) - src.master.updateUsrDialog() - return - - receive_command(obj/source, command, datum/signal/signal) - if(..() || !signal) - return - - if(command == "radio signal") - switch(signal.data["type"]) - if("message") - var/sender = signal.data["sender"] - if(!sender) - sender = "Unknown" - - src.messages += "← From [sender]: [signal.data["data"]] " - if(src.master.active_program == src) - playsound(src.master.loc, 'sound/machines/twobeep.ogg', 50, 1) - src.master.updateUsrDialog() - - return \ No newline at end of file diff --git a/code/unused/computer2/peripherals.dm b/code/unused/computer2/peripherals.dm deleted file mode 100644 index 9e19cb9d236..00000000000 --- a/code/unused/computer2/peripherals.dm +++ /dev/null @@ -1,209 +0,0 @@ -/obj/item/weapon/peripheral - name = "Peripheral card" - desc = "A computer circuit board." - icon = 'icons/obj/module.dmi' - icon_state = "id_mod" - item_state = "electronic" - w_class = 2 - var/obj/machinery/computer2/host - var/id = null - - New() - ..() - spawn(2) - if(istype(src.loc,/obj/machinery/computer2)) - host = src.loc - host.peripherals.Add(src) -// var/setup_id = "\ref[src]" -// src.id = copytext(setup_id,4,(length(setup_id)-1) ) - - Del() - if(host) - host.peripherals.Remove(src) - ..() - - - proc - receive_command(obj/source, command, datum/signal/signal) - if((source != host) || !(src in host)) - return 1 - - if(!command) - return 1 - - return 0 - - send_command(command, datum/signal/signal) - if(!command || !host) - return - - src.host.receive_command(src, command, signal) - - return - -/obj/item/weapon/peripheral/radio - name = "Wireless card" - var/frequency = 1419 - var/code = null - var/datum/radio_frequency/radio_connection - New() - ..() - if(radio_controller) - initialize() - - initialize() - set_frequency(frequency) - - proc - set_frequency(new_frequency) - radio_controller.remove_object(src, frequency) - frequency = new_frequency - radio_connection = radio_controller.add_object(src, frequency) - - receive_command(obj/source, command, datum/signal/signal) - if(..()) - return - - if(!signal || !radio_connection) - return - - switch(command) - if("send signal") - src.radio_connection.post_signal(src, signal) - - return - - receive_signal(datum/signal/signal) - if(!signal || (signal.encryption && signal.encryption != code)) - return - - var/datum/signal/newsignal = new - newsignal.data = signal.data - if(src.code) - newsignal.encryption = src.code - - send_command("radio signal",newsignal) - return - -/obj/item/weapon/peripheral/printer - name = "Printer module" - desc = "A small printer designed to fit into a computer casing." - icon_state = "card_mod" - var/printing = 0 - - receive_command(obj/source,command, datum/signal/signal) - if(..()) - return - - if(!signal) - return - - if((command == "print") && !src.printing) - src.printing = 1 - - var/print_data = signal.data["data"] - var/print_title = signal.data["title"] - if(!print_data) - src.printing = 0 - return - spawn(50) - var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( src.host.loc ) - P.info = print_data - if(print_title) - P.name = "paper - '[print_title]'" - - src.printing = 0 - return - - return - -/obj/item/weapon/peripheral/prize_vendor - name = "Prize vending module" - desc = "An arcade prize dispenser designed to fit inside a computer casing." - icon_state = "power_mod" - var/last_vend = 0 //Delay between vends if manually activated(ie a dude is holding it and shaking stuff out) - - receive_command(obj/source,command, datum/signal/signal) - if(..()) - return - - if(command == "vend prize") - src.vend_prize() - - return - - attack_self(mob/user as mob) - if( (last_vend + 400) < world.time) - user << "You shake something out of [src]!" - src.vend_prize() - src.last_vend = world.time - else - user << "\red [src] isn't ready to dispense a prize yet." - - return - - proc/vend_prize() - var/obj/item/prize - var/prizeselect = rand(1,4) - var/turf/prize_location = null - - if(src.host) - prize_location = src.host.loc - else - prize_location = get_turf(src) - - switch(prizeselect) - if(1) - prize = new /obj/item/weapon/money( prize_location ) - prize.name = "space ticket" - prize.desc = "It's almost like actual currency!" - if(2) - prize = new /obj/item/device/radio/beacon( prize_location ) - prize.name = "electronic blink toy game" - prize.desc = "Blink. Blink. Blink." - if(3) - prize = new /obj/item/weapon/lighter/zippo( prize_location ) - prize.name = "Burno Lighter" - prize.desc = "Almost like a decent lighter!" - if(4) - prize = new /obj/item/weapon/c_tube( prize_location ) - prize.name = "toy sword" - prize.icon = 'icons/obj/weapons.dmi' - prize.icon_state = "sword1" - prize.desc = "A sword made of cheap plastic." - -/* -/obj/item/weapon/peripheral/card_scanner - name = "ID scanner module" - icon_state = "card_mod" - var/obj/item/weapon/card/id/authid = null - - attack_self(mob/user as mob) - if(authid) - user << "The card falls out." - src.authid.loc = get_turf(user) - src.authid = null - - return - - receive_command(obj/source,command, datum/signal/signal) - if(..()) - return - - if(!signal || (signal.data["ref_id"] != "\ref[src]") ) - return - - switch(command) - if("eject card") - if(src.authid) - src.authid.loc = src.host.loc - src.authid = null - if("add card access") - var/new_access = signal.data["access"] - if(!new_access) - return - - - - return -*/ \ No newline at end of file diff --git a/code/unused/conveyor.dm b/code/unused/conveyor.dm deleted file mode 100644 index 55581eb2345..00000000000 --- a/code/unused/conveyor.dm +++ /dev/null @@ -1,398 +0,0 @@ -// converyor belt - -// moves items/mobs/movables in set direction every ptick - - -/obj/machinery/conveyor - icon = 'icons/obj/recycling.dmi' - icon_state = "conveyor0" - name = "conveyor belt" - desc = "A conveyor belt." - anchored = 1 - var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off - var/operable = 1 // true if can operate (no broken segments in this belt run) - var/basedir // this is the default (forward) direction, set by the map dir - // note dir var can vary when the direction changes - - var/list/affecting // the list of all items that will be moved this ptick - var/id = "" // the control ID - must match controller ID - // following two only used if a diverter is present - var/divert = 0 // if non-zero, direction to divert items - var/divdir = 0 // if diverting, will be conveyer dir needed to divert (otherwise dense) - - - - // create a conveyor - -/obj/machinery/conveyor/New() - ..() - basedir = dir - setdir() - - // set the dir and target turf depending on the operating direction - -/obj/machinery/conveyor/proc/setdir() - if(operating == -1) - dir = turn(basedir,180) - else - dir = basedir - update() - - - // update the icon depending on the operating condition - -/obj/machinery/conveyor/proc/update() - if(stat & BROKEN) - icon_state = "conveyor-b" - operating = 0 - return - if(!operable) - operating = 0 - icon_state = "conveyor[(operating != 0) && !(stat & NOPOWER)]" - - - // machine process - // move items to the target location -/obj/machinery/conveyor/process() - if(stat & (BROKEN | NOPOWER)) - return - if(!operating) - return - use_power(100) - - var/movedir = dir // base movement dir - if(divert && dir==divdir) // update if diverter present - movedir = divert - - - affecting = loc.contents - src // moved items will be all in loc - spawn(1) // slight delay to prevent infinite propagation due to map order - var/items_moved = 0 - for(var/atom/movable/A in affecting) - if(!A.anchored) - if(isturf(A.loc)) // this is to prevent an ugly bug that forces a player to drop what they're holding if they recently pick it up from the conveyer belt - if(ismob(A)) - var/mob/M = A - if(M.buckled == src) - var/obj/machinery/conveyor/C = locate() in get_step(src, dir) - M.buckled = null - step(M,dir) - if(C) - M.buckled = C - else - new/obj/item/weapon/cable_coil/cut(M.loc) - else - step(M,movedir) - else - step(A,movedir) - items_moved++ - if(items_moved >= 10) - break - -// attack with item, place item on conveyor - -/obj/machinery/conveyor/attackby(var/obj/item/I, mob/user) - if(istype(I, /obj/item/weapon/grab)) // special handling if grabbing a mob - var/obj/item/weapon/grab/G = I - G.affecting.Move(src.loc) - del(G) - return - else if(istype(I, /obj/item/weapon/cable_coil)) // if cable, see if a mob is present - var/mob/M = locate() in src.loc - if(M) - if (M == user) - src.visible_message("\blue [M] ties \himself to the conveyor.") - // note don't check for lying if self-tying - else - if(M.lying) - user.visible_message("\blue [M] has been tied to the conveyor by [user].", "\blue You tie [M] to the converyor!") - else - user << "\blue [M] must be lying down to be tied to the converyor!" - return - M.buckled = src - src.add_fingerprint(user) - I:use(1) - M.lying = 1 - return - - // else if no mob in loc, then allow coil to be placed - - else if(istype(I, /obj/item/weapon/wirecutters)) - var/mob/M = locate() in src.loc - if(M && M.buckled == src) - M.buckled = null - src.add_fingerprint(user) - if (M == user) - src.visible_message("\blue [M] cuts \himself free from the conveyor.") - else - src.visible_message("\blue [M] had been cut free from the conveyor by [user].") - return - - if(isrobot(user)) - return - - // otherwise drop and place on conveyor - user.drop_item() - if(I && I.loc) I.loc = src.loc - return - -// attack with hand, move pulled object onto conveyor - -/obj/machinery/conveyor/attack_hand(mob/user as mob) - if ((!( user.canmove ) || user.restrained() || !( user.pulling ))) - return - if (user.pulling.anchored) - return - if ((user.pulling.loc != user.loc && get_dist(user, user.pulling) > 1)) - return - if (ismob(user.pulling)) - var/mob/M = user.pulling - M.stop_pulling() - step(user.pulling, get_dir(user.pulling.loc, src)) - user.stop_pulling() - else - step(user.pulling, get_dir(user.pulling.loc, src)) - user.stop_pulling() - return - - -// make the conveyor broken -// also propagate inoperability to any connected conveyor with the same ID -/obj/machinery/conveyor/proc/broken() - stat |= BROKEN - update() - - var/obj/machinery/conveyor/C = locate() in get_step(src, basedir) - if(C) - C.set_operable(basedir, id, 0) - - C = locate() in get_step(src, turn(basedir,180)) - if(C) - C.set_operable(turn(basedir,180), id, 0) - - -//set the operable var if ID matches, propagating in the given direction - -/obj/machinery/conveyor/proc/set_operable(stepdir, match_id, op) - - if(id != match_id) - return - operable = op - - update() - var/obj/machinery/conveyor/C = locate() in get_step(src, stepdir) - if(C) - C.set_operable(stepdir, id, op) - -/* -/obj/machinery/conveyor/verb/destroy() - set src in view() - src.broken() -*/ - -/obj/machinery/conveyor/power_change() - ..() - update() - - -// converyor diverter -// extendable arm that can be switched so items on the conveyer are diverted sideways -// situate in same turf as conveyor -// only works if belts is running proper direction -// -// -/obj/machinery/diverter - icon = 'icons/obj/recycling.dmi' - icon_state = "diverter0" - name = "diverter" - desc = "A diverter arm for a conveyor belt." - anchored = 1 - layer = FLY_LAYER - var/obj/machinery/conveyor/conv // the conveyor this diverter works on - var/deployed = 0 // true if diverter arm is extended - var/operating = 0 // true if arm is extending/contracting - var/divert_to // the dir that diverted items will be moved - var/divert_from // the dir items must be moving to divert - - -// create a diverter -// set up divert_to and divert_from directions depending on dir state -/obj/machinery/diverter/New() - - ..() - - switch(dir) - if(NORTH) - divert_to = WEST // stuff will be moved to the west - divert_from = NORTH // if entering from the north - if(SOUTH) - divert_to = EAST - divert_from = NORTH - if(EAST) - divert_to = EAST - divert_from = SOUTH - if(WEST) - divert_to = WEST - divert_from = SOUTH - if(NORTHEAST) - divert_to = NORTH - divert_from = EAST - if(NORTHWEST) - divert_to = NORTH - divert_from = WEST - if(SOUTHEAST) - divert_to = SOUTH - divert_from = EAST - if(SOUTHWEST) - divert_to = SOUTH - divert_from = WEST - spawn(2) - // wait for map load then find the conveyor in this turf - conv = locate() in src.loc - if(conv) // divert_from dir must match possible conveyor movement - if(conv.basedir != divert_from && conv.basedir != turn(divert_from,180) ) - del(src) // if no dir match, then delete self - set_divert() - update() - -// update the icon state depending on whether the diverter is extended -/obj/machinery/diverter/proc/update() - icon_state = "diverter[deployed]" - -// call to set the diversion vars of underlying conveyor -/obj/machinery/diverter/proc/set_divert() - if(conv) - if(deployed) - conv.divert = divert_to - conv.divdir = divert_from - else - conv.divert= 0 - - -// *** TESTING click to toggle -/obj/machinery/diverter/Click() - toggle() - - -// toggle between arm deployed and not deployed, showing animation -// -/obj/machinery/diverter/proc/toggle() - if( stat & (NOPOWER|BROKEN)) - return - - if(operating) - return - - use_power(50) - operating = 1 - if(deployed) - flick("diverter10",src) - icon_state = "diverter0" - sleep(10) - deployed = 0 - else - flick("diverter01",src) - icon_state = "diverter1" - sleep(10) - deployed = 1 - operating = 0 - update() - set_divert() - -// don't allow movement into the 'backwards' direction if deployed -/obj/machinery/diverter/CanPass(atom/movable/O, var/turf/target) - var/direct = get_dir(O, target) - if(direct == divert_to) // prevent movement through body of diverter - return 0 - if(!deployed) - return 1 - return(direct != turn(divert_from,180)) - -// don't allow movement through the arm if deployed -/obj/machinery/diverter/CheckExit(atom/movable/O, var/turf/target) - var/direct = get_dir(O, target) - if(direct == turn(divert_to,180)) // prevent movement through body of diverter - return 0 - if(!deployed) - return 1 - return(direct != divert_from) - - - - - -// the conveyor control switch -// -// - -/obj/machinery/conveyor_switch - - name = "conveyor switch" - desc = "A conveyor control switch." - icon = 'icons/obj/recycling.dmi' - icon_state = "switch-off" - var/position = 0 // 0 off, -1 reverse, 1 forward - var/last_pos = -1 // last direction setting - var/operated = 1 // true if just operated - - var/id = "" // must match conveyor IDs to control them - - var/list/conveyors // the list of converyors that are controlled by this switch - anchored = 1 - - - -/obj/machinery/conveyor_switch/New() - ..() - update() - - spawn(5) // allow map load - conveyors = list() - for(var/obj/machinery/conveyor/C in world) - if(C.id == id) - conveyors += C - -// update the icon depending on the position - -/obj/machinery/conveyor_switch/proc/update() - if(position<0) - icon_state = "switch-rev" - else if(position>0) - icon_state = "switch-fwd" - else - icon_state = "switch-off" - - -// timed process -// if the switch changed, update the linked conveyors - -/obj/machinery/conveyor_switch/process() - if(!operated) - return - operated = 0 - - for(var/obj/machinery/conveyor/C in conveyors) - C.operating = position - C.setdir() - -// attack with hand, switch position -/obj/machinery/conveyor_switch/attack_hand(mob/user) - if(position == 0) - if(last_pos < 0) - position = 1 - last_pos = 0 - else - position = -1 - last_pos = 0 - else - last_pos = position - position = 0 - - operated = 1 - update() - - // find any switches with same id as this one, and set their positions to match us - for(var/obj/machinery/conveyor_switch/S in world) - if(S.id == src.id) - S.position = position - S.update() diff --git a/code/unused/disease2/cureimplanter.dm b/code/unused/disease2/cureimplanter.dm deleted file mode 100644 index 45064954561..00000000000 --- a/code/unused/disease2/cureimplanter.dm +++ /dev/null @@ -1,42 +0,0 @@ -/obj/item/weapon/cureimplanter - name = "Hypospray injector" - icon = 'icons/obj/items.dmi' - icon_state = "implanter1" - var/datum/disease2/resistance/resistance = null - var/works = 0 - var/datum/disease2/disease/virus2 = null - item_state = "syringe_0" - throw_speed = 1 - throw_range = 5 - w_class = 2.0 - - -/obj/item/weapon/cureimplanter/attack(mob/target as mob, mob/user as mob) - if(ismob(target)) - for(var/mob/O in viewers(world.view, user)) - if (target != user) - O.show_message(text("\red [] is trying to inject [] with [src.name]!", user, target), 1) - else - O.show_message("\red [user] is trying to inject themselves with [src.name]!", 1) - if(!do_mob(user, target,60)) return - - - for(var/mob/O in viewers(world.view, user)) - if (target != user) - O.show_message(text("\red [] injects [] with [src.name]!", user, target), 1) - else - O.show_message("\red [user] injects themself with [src.name]!", 1) - - - var/mob/living/carbon/M = target - - if(works == 0 && prob(25)) - M.resistances2 += resistance - if(M.virus2) - M.virus2.cure_added(resistance) - else if(works == 1) - M.adjustToxLoss(rand(20,50)) - else if(works == 2) - M.adjustToxLoss(rand(50,100)) - else if(works == 3) - infect_virus2(M,virus2,1) diff --git a/code/unused/disease2/curer.dm b/code/unused/disease2/curer.dm deleted file mode 100644 index dab15f4967e..00000000000 --- a/code/unused/disease2/curer.dm +++ /dev/null @@ -1,154 +0,0 @@ -/obj/machinery/computer/curer - name = "Cure Research Machine" - icon = 'icons/obj/computer.dmi' - icon_state = "dna" -// brightnessred = 0 -// brightnessgreen = 2 //Used for multicoloured lighting on BS12 -// brightnessblue = 2 - var/curing - var/virusing - circuit = "/obj/item/weapon/circuitboard/mining" - - var/obj/item/weapon/virusdish/dish = null - -/obj/machinery/computer/curer/attackby(var/obj/I as obj, var/mob/user as mob) - /*if(istype(I, /obj/item/weapon/screwdriver)) - playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1) - if(do_after(user, 20)) - if (src.stat & BROKEN) - user << "\blue The broken glass falls out." - 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) - C.loc = src.loc - A.circuit = M - A.state = 3 - A.icon_state = "3" - A.anchored = 1 - del(src) - else - user << "\blue You disconnect the monitor." - 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 - A.circuit = M - A.state = 4 - A.icon_state = "4" - A.anchored = 1 - del(src)*/ - if(istype(I,/obj/item/weapon/virusdish)) - var/mob/living/carbon/c = user - if(!dish) - - dish = I - c.drop_item() - I.loc = src - - //else - src.attack_hand(user) - return - -/obj/machinery/computer/curer/attack_ai(var/mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/curer/attack_paw(var/mob/user as mob) - - return src.attack_hand(user) - return - -/obj/machinery/computer/curer/attack_hand(var/mob/user as mob) - if(..()) - return - user.machine = src - var/dat - if(curing) - dat = "Antibody production in progress" - else if(virusing) - dat = "Virus production in progress" - else if(dish) - dat = "Virus dish inserted" - if(dish.virus2) - if(dish.growth >= 100) - dat += " Begin antibody production" - dat += " Begin virus production" - else - dat += " Insufficent cells to attempt to create cure" - else - dat += " Please check dish contents" - - dat += " Eject disk" - else - dat = "Please insert dish" - - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return - -/obj/machinery/computer/curer/process() - ..() - - if(stat & (NOPOWER|BROKEN)) - return - use_power(500) - src.updateDialog() - - if(curing) - curing -= 1 - if(curing == 0) - icon_state = "dna" - if(dish.virus2) - createcure(dish.virus2) - if(virusing) - virusing -= 1 - if(virusing == 0) - icon_state = "dna" - if(dish.virus2) - createvirus(dish.virus2) - - return - -/obj/machinery/computer/curer/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon))) - usr.machine = src - - if (href_list["antibody"]) - curing = 30 - dish.growth -= 50 - src.icon_state = "dna" - if (href_list["virus"]) - virusing = 30 - dish.growth -= 100 - src.icon_state = "dna" - else if(href_list["eject"]) - dish.loc = src.loc - dish = null - - src.add_fingerprint(usr) - src.updateUsrDialog() - return - - -/obj/machinery/computer/curer/proc/createcure(var/datum/disease2/disease/virus2) - var/obj/item/weapon/cureimplanter/implanter = new /obj/item/weapon/cureimplanter(src.loc) - implanter.resistance = new /datum/disease2/resistance(dish.virus2) - if(probG("Virus curing",3)) - implanter.works = 0 - else - implanter.works = rand(1,2) - state("The [src.name] Buzzes") - -/obj/machinery/computer/curer/proc/createvirus(var/datum/disease2/disease/virus2) - var/obj/item/weapon/cureimplanter/implanter = new /obj/item/weapon/cureimplanter(src.loc) - implanter.name = "Viral implanter (MAJOR BIOHAZARD)" - implanter.virus2 = dish.virus2.getcopy() - implanter.works = 3 - state("The [src.name] Buzzes") - - -/obj/machinery/computer/curer/proc/state(var/msg) - for(var/mob/O in hearers(src, null)) - O.show_message("\icon[src] \blue [msg]", 2) diff --git a/code/unused/disease2/monkeydispensor.dm b/code/unused/disease2/monkeydispensor.dm deleted file mode 100644 index 13d1b9806f6..00000000000 --- a/code/unused/disease2/monkeydispensor.dm +++ /dev/null @@ -1,30 +0,0 @@ -/obj/machinery/disease2/monkeycloner - name = "Monkey dispensor" - icon = 'icons/obj/cloning.dmi' - icon_state = "pod_0" - density = 1 - anchored = 1 - - var/cloning = 0 - -/obj/machinery/disease2/monkeycloner/attack_hand() - if(!cloning) - cloning = 150 - - icon_state = "pod_g" - -/obj/machinery/disease2/monkeycloner/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(500) - src.updateDialog() - - if(cloning) - cloning -= 1 - if(!cloning) - new /mob/living/carbon/monkey(src.loc) - icon_state = "pod_0" - - - - return diff --git a/code/unused/dna.dm b/code/unused/dna.dm deleted file mode 100644 index 604acbefc6b..00000000000 --- a/code/unused/dna.dm +++ /dev/null @@ -1,962 +0,0 @@ -/proc/scram(n) - var/t = "" - var/p = null - p = 1 - while(p <= n) - t = text("[][]", t, rand(1, 9)) - p++ - return t - -/obj/machinery/computer/dna - name = "DNA operations computer" - desc = "A Computer used to advanced DNA stuff." - icon_state = "dna" - var/obj/item/weapon/card/data/scan = null - var/obj/item/weapon/card/data/modify = null - var/obj/item/weapon/card/data/modify2 = null - var/mode = null - var/temp = null - -/obj/machinery/computer/dna/attack_ai(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/dna/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/computer/dna/attack_hand(mob/user as mob) - if(..()) - return - user.machine = src - if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai)) - var/dat = text("Please Insert the cards into the slots \n\t\t\t\tFunction Disk: [] \n\t\t\t\tTarget Disk: [] \n\t\t\t\tAux. Data Disk: [] \n\t\t\t\t\t(Not always used!) \n\t\t\t\t[]", src, (src.scan ? text("[]", src.scan.name) : "----------"), src, (src.modify ? text("[]", src.modify.name) : "----------"), src, (src.modify2 ? text("[]", src.modify2.name) : "----------"), (src.scan ? text("Execute Function", src) : "No function disk inserted!")) - if (src.temp) - dat = text("[] Clear Message", src.temp, src) - user << browse(dat, "window=dna_comp") - onclose(user, "dna_comp") - else - var/dat = text("[] \n\t\t\t\t[] [] \n\t\t\t\t[] [] \n\t\t\t\t[] [] \n\t\t\t\t\t(Not always used!) \n\t\t\t\t[]", stars("Please Insert the cards into the slots"), stars("Function Disk:"), src, (src.scan ? text("[]", src.scan.name) : "----------"), stars("Target Disk:"), src, (src.modify ? text("[]", src.modify.name) : "----------"), stars("Aux. Data Disk:"), src, (src.modify2 ? text("[]", src.modify2.name) : "----------"), (src.scan ? text("[]", src, stars("Execute Function")) : stars("No function disk inserted!"))) - if (src.temp) - dat = text("[] []", stars(src.temp), src, stars("Clear Message")) - user << browse(dat, "window=dna_comp") - onclose(user, "dna_comp") - return - -/obj/machinery/computer/dna/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai))) - usr.machine = src - if (href_list["modify"]) - if (src.modify) - src.modify.loc = src.loc - src.modify = null - src.mode = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/data)) - usr.drop_item() - I.loc = src - src.modify = I - src.mode = null - if (href_list["modify2"]) - if (src.modify2) - src.modify2.loc = src.loc - src.modify2 = null - src.mode = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/data)) - usr.drop_item() - I.loc = src - src.modify2 = I - src.mode = null - if (href_list["scan"]) - if (src.scan) - src.scan.loc = src.loc - src.scan = null - src.mode = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/data)) - usr.drop_item() - I.loc = src - src.scan = I - src.mode = null - if (href_list["clear"]) - src.temp = null - if (href_list["execute"]) - if ((src.scan && src.scan.function)) - switch(src.scan.function) - if("data_mutate") - if (src.modify) - if (!( findtext(src.scan.data, "-", 1, null) )) - if ((src.modify.data && src.scan.data && length(src.modify.data) >= length(src.scan.data))) - src.modify.data = text("[][]", src.scan.data, (length(src.modify.data) > length(src.scan.data) ? copytext(src.modify.data, length(src.scan.data) + 1, length(src.modify.data) + 1) : null)) - else - src.temp = "Disk Failure: Cannot examine data! (Null or wrong format)" - else - var/d = findtext(src.modify.data, "-", 1, null) - var/t = copytext(src.modify.data, d + 1, length(src.modify.data) + 1) - d = text2num(copytext(1, d, null)) - if ((d && t && src.modify.data && src.scan.data && length(src.modify.data) >= (length(t) + d - 1) )) - src.modify.data = text("[][][]", copytext(src.modify.data, 1, d), t, (length(src.modify.data) > length(t) + d ? copytext(src.modify.data, length(t) + d, length(src.modify.data) + 1) : null)) - else - src.temp = "Disk Failure: Cannot examine data! (Null or wrong format)" - else - src.temp = "Disk Failure: Cannot read target disk!" - if("dna_seq") - src.temp = "DNA Systems Help:\nHuman DNA sequences: (Compressed in *.dna format version 10.76)\n\tSpecies Identification Marker: (28 chromosomes)\n\t\t5BDFE293BA5500F9FFFD500AAFFE\n\tStructural Enzymes:\n\t\tCDE375C9A6C25A7DBDA50EC05AC6CEB63\n\t\tNote: The first id set is used for DNA clean up operations.\n\tUsed Enzymes:\n\t\t493DB249EB6D13236100A37000800AB71\n\tSpecies/Genus Classification: Homo Sapien\n\nMonkey DNA sequences: (Compressed in *.dna format version 10.76)\n\tSpecies Identification Marker: (16 chromosomes)\n\t\t2B6696D2B127E5A4\n\tStructural Enzymes:\n\t\tCDEAF5B90AADBC6BA8033DB0A7FD613FA\n\t\tNote: The first id set is used for DNA clean up operations.\n\tUsed Enzymes:\n\t\tC8FFFE7EC09D80AEDEDB9A5A0B4085B61\n\tSpecies/Genus Classification: Generic Monkey\n>" - if("dna_help") - src.temp = "DNA Systems Help:\nThe DNA systems consists 3 systems.\nI. DNA Scanner/Implanter - This system is slightly advanced to use. It accepts\n\t1 disk. Before you wish to run a function/program you must implant the\n\tdisk data into the temporary memory. Note that once this is done the disk can\n\tbe removed to place a data disk in.\nII. DNA computer - This is a simple yet fast computer that basically operates on data.\nIII. Restructurer - This device reorganizes the anatomical structure of the subject\n\taccording to the DNA sequences. Please note that it is illegal to perform a\n\ttransfer from one species to or from the Homo sapiens species but\n\thuman to human is acceptable under UNSD guidlines.\n\tNote: This machine is programmed to operate on specific preprogrammed species with\n\tspecialized anatomical blueprints hard coded into its databanks. It cannot operate\n\ton other species. (Current: Human, Monkey)\n\nData Disks:\n\tThese run on 2 (or 3) types: DNA scanner program disks and data modification\nfunctions (and disk modification functions)\n\nDisk-Copy\n\tThis erases the target disk and completely copies the data from the aux. disk.\nDisk-Erase\n\tThis erases everything on the target disk.\nData-Clear\n\tThis erases (clears) only the data.\n\nData-Trunicate\n\tThis removes data from the target disk (parameters gathered from data slot on target\n\tdisk). This fuction has 4 modes (a,b,c,default) defined by this way. (mode id)(#)\n\ta - This cuts # data from the end. (ex a1 on ABCD = ABC)\n\tb - This cuts # data from the beginning. (ex b1 on ABCD = BCD)\n\tc - This limits the data from the end. (ex c1 on ABCD = A)\n\tdefault - This limits the data from the end. (ex 1 on ABCD = D)\nData-Add\n\tThis adds thedata on the aux. disk to the data on the target disk.\nData-Sramble\n\tThis scrambles the data on the target disk. The length is equal to\n\tthe length of the original data.\nData-Input\n\tThis lets you input data into the data slot of any data disk.\n\tNote: This doesn't work only on storage.\nData-Mutate\n\tThis basically inserts text. You follow this format:\n\tpos-text (or just text for automatic pos 1)\n\tie 2-IVE on FOUR yields FIVE\n" - if("data_add") - if (src.modify) - if (src.modify2) - if ((src.modify.data && src.modify2.data)) - src.modify.data += src.modify2.data - src.temp = text("Done! New Data: []", src.modify.data) - else - src.temp = "Cannot read data! (may be null)" - else - src.temp = "Disk Failure: Cannot read aux. data disk!" - else - src.temp = "Disk Failure: Cannot read target disk!" - if("data_scramble") - if (src.modify) - if (length(text("[]", src.modify.data)) >= 1) - src.modify.data = scram(length(text("[]", src.modify.data))) - src.temp = text("Data scrambled: []", src.modify.data) - else - src.temp = "No data to scramble" - else - src.temp = "Disk Failure: Cannot read target disk!" - if("data_input") - if (src.modify) - var/dat = input(usr, ">", text("[]", src.name), null) as text - var/s = src.scan - var/m = src.modify - if ((usr.stat || usr.restrained() || src.modify != m || src.scan != s)) - return - if (((get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf))) - src.modify.data = dat - else - src.temp = "Disk Failure: Cannot read target disk!" - if("disk_copy") - if (src.modify) - if (src.modify2) - src.modify.function = src.modify2.function - src.modify.data = src.modify2.data - src.modify.special = src.modify2.special - src.temp = "All disk data/programs copied." - else - src.temp = "Disk Failure: Cannot read aux. data disk!" - else - src.temp = "Disk Failure: Cannot read target disk!" - if("disk_dis") - if (src.modify) - src.temp = text("Function: [][] Data: []", src.modify.function, (src.modify.special ? text("-[]", src.modify.special) : null), src.modify.data) - else - src.temp = "Disk Failure: Cannot read target disk!" - if("disk_erase") - if (src.modify) - src.modify.data = null - src.modify.function = "storage" - src.modify.special = null - src.temp = "All Disk contents deleted." - else - src.temp = "Disk Failure: Cannot read target disk!" - if("data_clear") - if (src.modify) - src.modify.data = null - src.temp = "Disk data cleared." - else - src.temp = "Disk Failure: Cannot read target disk!" - if("data_trun") - if (src.modify) - if ((src.modify.data && src.scan.data)) - var/l1 = length(src.modify.data) - var/l2 = max(round(text2num(src.scan.data)), 1) - switch(copytext(src.modify.data, 1, 2)) - if("a") - if (l1 > l2) - src.modify.data = copytext(src.modify.data, 1, (l1 - l2) + 1) - else - src.modify.data = "" - src.temp = text("Done! New Data: []", src.modify.data) - if("b") - if (l1 > l2) - src.modify.data = copytext(src.modify.data, l2, l1 + 1) - else - src.modify.data = "" - src.temp = text("Done! New Data: []", src.modify.data) - if("c") - if (l1 >= l2) - src.modify.data = copytext(src.modify.data, l1 - l2, l1 + 1) - src.temp = text("Done! New Data: []", src.modify.data) - else - if (l1 >= l2) - src.modify.data = copytext(src.modify.data, 1, l2 + 1) - src.temp = text("Done! New Data: []", src.modify.data) - else - src.temp = "Cannot read data! (may be null and note that function data slot is used instead of aux disk!!)" - else - src.temp = "Disk Failure: Cannot read target disk!" - else - else - src.temp = "System Failure: Cannot read disk function!" - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/obj/machinery/computer/dna/ex_act(severity) - switch(severity) - if(1.0) - //SN src = null - del(src) - return - if(2.0) - if (prob(50)) - //SN src = null - del(src) - return - else - return - -/obj/machinery/dna_scanner/allow_drop() - return 0 - -/obj/machinery/dna_scanner/relaymove(mob/user as mob) - if (user.stat) - return - src.go_out() - return - -/obj/machinery/dna_scanner/verb/eject() - set src in oview(1) - - if (usr.stat != 0) - return - src.go_out() - add_fingerprint(usr) - return - -/obj/machinery/dna_scanner/verb/move_inside() - set src in oview(1) - - if (usr.stat != 0) - return - if (src.occupant) - usr << "\blue The scanner is already occupied!" - return - if (usr.abiotic()) - usr << "\blue Subject cannot have abiotic items on." - return - usr.stop_pulling() - usr.client.perspective = EYE_PERSPECTIVE - usr.client.eye = src - usr.loc = src - src.occupant = usr - src.icon_state = "scanner_1" - for(var/obj/O in src) - //O = null - del(O) - //Foreach goto(124) - src.add_fingerprint(usr) - return - -/obj/machinery/dna_scanner/attackby(obj/item/weapon/grab/G as obj, user as mob) - if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) ))) - return - if (src.occupant) - user << "\blue The scanner is already occupied!" - return - if (G.affecting.abiotic()) - user << "\blue Subject cannot have abiotic items on." - return - var/mob/M = G.affecting - if (M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - M.loc = src - src.occupant = M - src.icon_state = "scanner_1" - for(var/obj/O in src) - O.loc = src.loc - //Foreach goto(154) - src.add_fingerprint(user) - //G = null - del(G) - return - -/obj/machinery/dna_scanner/proc/go_out() - if ((!( src.occupant ) || src.locked)) - return - for(var/obj/O in src) - O.loc = src.loc - //Foreach goto(30) - if (src.occupant.client) - src.occupant.client.eye = src.occupant.client.mob - src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.loc = src.loc - src.occupant = null - src.icon_state = "scanner_0" - return - -/obj/machinery/dna_scanner/ex_act(severity) - switch(severity) - if(1.0) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - //Foreach goto(35) - //SN src = null - del(src) - return - if(2.0) - if (prob(50)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - //Foreach goto(108) - //SN src = null - del(src) - return - if(3.0) - if (prob(25)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - //Foreach goto(181) - //SN src = null - del(src) - return - else - return - - -/obj/machinery/dna_scanner/blob_act() - if(prob(75)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - del(src) - -/obj/machinery/scan_console/ex_act(severity) - - switch(severity) - if(1.0) - //SN src = null - del(src) - return - if(2.0) - if (prob(50)) - //SN src = null - del(src) - return - else - return - -/obj/machinery/scan_console/blob_act() - - if(prob(75)) - del(src) - -/obj/machinery/scan_console/power_change() - if(stat & BROKEN) - icon_state = "broken" - else if(powered()) - icon_state = initial(icon_state) - stat &= ~NOPOWER - else - spawn(rand(0, 15)) - src.icon_state = "c_unpowered" - stat |= NOPOWER - -/obj/machinery/scan_console/New() - ..() - spawn( 5 ) - src.connected = locate(/obj/machinery/dna_scanner, get_step(src, WEST)) - return - return - -/obj/machinery/scan_console/process() - if(stat & (NOPOWER|BROKEN)) - return - use_power(250) - - var/mob/M - if (!( src.status )) - return - if (!( src.func )) - src.temp = "No function loaded into memory core!" - src.status = null - if ((src.connected && src.connected.occupant)) - M = src.connected.occupant - if (src.status == "load") - src.prog_p1 = null - src.prog_p2 = null - src.prog_p3 = null - src.prog_p4 = null - switch(src.func) - if("dna_trun") - if (src.data) - src.prog_p1 = copytext(src.data, 1, 2) - src.prog_p2 = text2num(src.data) - src.prog_p3 = src.special - src.status = "dna_trun" - src.temp = "Executing trunication function on occupant." - else - src.temp = "No data implanted in core memory." - src.status = null - if("dna_scan") - if (src.special) - if (src.scan) - if (istype(M, /mob)) - switch(src.special) - if("UI") - src.temp = text("Scan Complete: Data downloaded to disk! Unique Identifier: []", M.primary.uni_identity) - src.scan.data = M.primary.uni_identity - if("SE") - src.temp = text("Scan Complete: Data downloaded to disk! Structural Enzymes: []", M.primary.struc_enzyme) - src.scan.data = M.primary.struc_enzyme - if("UE") - src.temp = text("Scan Complete: Data downloaded to disk! Used Enzynmes: []", M.primary.use_enzyme) - src.scan.data = M.primary.use_enzyme - if("SI") - src.temp = text("Scan Complete: Data downloaded to disk! Species Identifier: []", M.primary.spec_identity) - src.scan.data = M.primary.spec_identity - else - else - src.temp = "No occupant to scan!" - else - src.temp = "Error: No disk to upload data to." - else - src.temp = "Error: Function program errors." - src.status = null - if("dna_replace") - if ((src.data && src.special)) - src.prog_p1 = src.special - src.prog_p2 = src.data - src.status = "dna_replace" - src.temp = "Executing repalcement function on occupant." - else - src.temp = "Error: No DNA data loaded into core or function program errors." - src.status = null - if("dna_add") - if ((src.data && src.special)) - src.prog_p1 = src.special - src.prog_p2 = src.data - src.status = "dna_add" - src.temp = "Executing addition function on occupant." - else - src.temp = "Error: No DNA data loaded into core or function program errors." - src.status = null - else - src.temp = "Cannot execute program!" - src.status = null - else - if (src.status == "dna_trun") - if (istype(M, /mob)) - var/t = null - switch(src.prog_p3) - if("UI") - t = M.primary.uni_identity - if("SE") - t = M.primary.struc_enzyme - if("UE") - t = M.primary.use_enzyme - if("SI") - t = M.primary.spec_identity - else - if (!( src.prog_p4 )) - switch(src.prog_p1) - if("a") - src.prog_p4 = length(t) - if("b") - src.prog_p4 = 1 - else - else - if (src.prog_p1 == "a") - src.prog_p4-- - else - if (src.prog_p1 == "b") - src.prog_p4-- - switch(src.prog_p1) - if("a") - if (src.prog_p4 <= 0) - src.temp = "Trunication complete" - src.status = null - else - t = copytext(t, 1, length(t)) - src.temp = text("Trunicating []'s DNA sequence... [] Status: [] units left. Emergency Abort", M.name, t, src.prog_p4, src) - if("b") - if (src.prog_p4 <= 0) - src.temp = "Trunication complete" - src.status = null - else - t = copytext(t, 2, length(t) + 1) - src.temp = text("Trunicating []'s DNA sequence... [] Status: [] units left. Emergency Abort", M.name, t, src.prog_p4, src) - if("c") - if (length(t) <= src.prog_p2) - src.temp = "Limitation complete" - src.status = null - else - t = copytext(t, 1, length(t)) - src.temp = text("Limiting []'s DNA sequence... [] Status: [] units converting to [] units. Emergency Abort", M.name, t, length(t), src.prog_p2, src) - else - if (length(t) <= src.prog_p2) - src.temp = "Limitation complete" - src.status = null - else - t = copytext(t, 2, length(t) + 1) - src.temp = text("Limiting []'s DNA sequence... [] Status: [] units converting to [] units. Emergency Abort", M.name, t, length(t), src.prog_p2, src) - switch(src.prog_p3) - if("UI") - M.primary.uni_identity = t - if("SE") - M.primary.struc_enzyme = t - if("UE") - M.primary.use_enzyme = t - if("SI") - M.primary.spec_identity = t - else - else - src.temp = "Process terminated due to lack of occupant in DNA chamber." - src.status = null - else - if (src.status == "dna_replace") - if (istype(M, /mob)) - var/t = null - switch(src.prog_p1) - if("UI") - t = M.primary.uni_identity - if("SE") - t = M.primary.struc_enzyme - if("UE") - t = M.primary.use_enzyme - if("SI") - t = M.primary.spec_identity - else - if (!( src.prog_p4 )) - src.prog_p4 = 1 - else - src.prog_p4++ - if ((src.prog_p4 > length(t) || src.prog_p4 > length(src.prog_p2))) - src.temp = "Replacement complete" - src.status = null - else - t = text("[][][]", copytext(t, 1, src.prog_p4), copytext(src.prog_p2, src.prog_p4, src.prog_p4 + 1), (src.prog_p4 < length(t) ? copytext(t, src.prog_p4 + 1, length(t) + 1) : null)) - src.temp = text("Replacing []'s DNA sequence... [] Target: [] Status: At position [] Emergency Abort", M.name, t, src.prog_p2, src.prog_p4, src) - switch(src.prog_p1) - if("UI") - M.primary.uni_identity = t - if("SE") - M.primary.struc_enzyme = t - if("UE") - M.primary.use_enzyme = t - if("SI") - M.primary.spec_identity = t - else - else - src.temp = "Process terminated due to lack of occupant in DNA chamber." - src.status = null - else - if (src.status == "dna_add") - if (istype(M, /mob)) - var/t = null - switch(src.prog_p1) - if("UI") - t = M.primary.uni_identity - if("SE") - t = M.primary.struc_enzyme - if("UE") - t = M.primary.use_enzyme - if("SI") - t = M.primary.spec_identity - else - if (!( src.prog_p4 )) - src.prog_p4 = 1 - else - src.prog_p4++ - if (src.prog_p4 > length(src.prog_p2)) - src.temp = "Addition complete" - src.status = null - else - t = text("[][]", t, copytext(src.prog_p2, src.prog_p4, src.prog_p4 + 1)) - src.temp = text("Adding to []'s DNA sequence... [] Adding: [] Position: [] Emergency Abort", M.name, t, src.prog_p2, src.prog_p4, src) - switch(src.prog_p1) - if("UI") - M.primary.uni_identity = t - if("SE") - M.primary.struc_enzyme = t - if("UE") - M.primary.use_enzyme = t - if("SI") - M.primary.spec_identity = t - else - else - src.temp = "Process terminated due to lack of occupant in DNA chamber." - src.status = null - else - src.status = null - src.temp = "Unknown system error." - src.updateDialog() - return - -/obj/machinery/scan_console/attack_paw(user as mob) - return src.attack_hand(user) - -/obj/machinery/scan_console/attack_ai(user as mob) - return src.attack_hand(user) - -/obj/machinery/scan_console/attack_hand(user as mob) - if(..()) - return - var/dat - if (src.temp) - dat = text("[] Clear Message", src.temp, src) - else - if (src.connected) - var/mob/occupant = src.connected.occupant - dat = "Occupant Statistics: " - if (occupant) - var/t1 - switch(occupant.stat) - if(0) - t1 = "Conscious" - if(1) - t1 = "Unconscious" - else - t1 = "*dead*" - dat += text("[]\tHealth %: [] ([]) ", (occupant.health > 50 ? "" : ""), occupant.health, t1) - else - dat += "The scanner is empty. " - if (!( src.connected.locked )) - dat += text("Lock (Unlocked) ", src) - else - dat += text("Unlock (Locked) ", src) - dat += text("Disk: [] \n[] \n[] ", src, - (src.scan ? text("[]", src.scan.name) : "----------"), - (src.scan ? text("Upload Data", src) : "No disk to upload"), - ((src.data || src.func || src.special) ? text("Clear Data Execute Data Function Type: [][] Data: []", src, src, src.func, (src.special ? text("-[]", src.special) : null), src.data) : "No data uploaded")) - dat += text(" Close", user) - user << browse(dat, "window=scanner;size=400x500") - onclose(user, "scanner") - return - -/obj/machinery/scan_console/Topic(href, href_list) - if(..()) - return - if ((usr.contents.Find(src) || (get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon/ai))) - usr.machine = src - if (href_list["locked"]) - if ((src.connected && src.connected.occupant)) - src.connected.locked = !( src.connected.locked ) - if (href_list["scan"]) - if (src.scan) - src.scan.loc = src.loc - src.scan = null - else - var/obj/item/I = usr.equipped() - if (istype(I, /obj/item/weapon/card/data)) - usr.drop_item() - I.loc = src - src.scan = I - if (href_list["u_dat"]) - if ((src.scan && !( src.status ))) - if ((src.scan.function && src.scan.function != "storage")) - src.func = src.scan.function - src.special = src.scan.special - if (src.scan.data) - src.data = src.scan.data - else - src.temp = "No disk found or core data access lock out!" - if (href_list["c_dat"]) - if (!src.status) - src.func = null - src.data = null - src.special = null - else - src.temp = "No disk found or core data access lock out!" - if (href_list["clear"]) - src.temp = null - if (href_list["abort"]) - src.status = null - if (href_list["e_dat"]) - if (!( src.status )) - src.status = "load" - src.temp = "Loading..." - src.add_fingerprint(usr) - src.updateUsrDialog() - return - -/obj/machinery/restruct/allow_drop() - return 0 - -/obj/machinery/restruct/verb/eject() - set src in oview(1) - - if (usr.stat != 0) - return - src.go_out() - add_fingerprint(usr) - return - -/obj/machinery/restruct/verb/operate() - set src in oview(1) - - src.add_fingerprint(usr) - if ((src.occupant && src.occupant.primary)) - switch(src.occupant.primary.spec_identity) - if("5BDFE293BA5500F9FFFD500AAFFE") - if (!istype(src.occupant, /mob/living/carbon/human)) - for(var/obj/O in src.occupant) - del(O) - - var/mob/living/carbon/human/O = new /mob/living/carbon/human( src ) - if(ticker.killer == src.occupant) - O.memory = src.occupant.memory - ticker.killer = O - var/mob/M = src.occupant - O.start = 1 - O.primary = M.primary - M.primary = null - var/t1 = hex2num(copytext(O.primary.uni_identity, 25, 28)) - if (t1 < 125) - O.gender = MALE - else - O.gender = FEMALE - M << "Genetic Transversal Complete!" - if (M.client) - M << "Transferring..." - M.client.mob = O - O << "Neural Sequencing Complete!" - O.loc = src - src.occupant = O - //M = null - del(M) - src.occupant = O - src.occupant << "Done!" - if("2B6696D2B127E5A4") - if (!istype(src.occupant, /mob/living/carbon/monkey)) - for(var/obj/O in src.occupant) - del(O) - var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey(src) - if(ticker.killer == src.occupant) - O.memory = src.occupant.memory - ticker.killer = O - var/mob/M = src.occupant - O.start = 1 - O.primary = M.primary - M.primary = null - M << "Genetic Transversal Complete!" - if (M.client) - M << "Transferring..." - M.client.mob = O - O << "Neural Sequencing Complete!" - O.loc = src - O << "Genetic Transversal Complete!" - src.occupant = O - del(M) - O.name = text("monkey ([])", copytext(md5(src.occupant.primary.uni_identity), 2, 6)) - src.occupant << "Done!" - else - if (istype(src.occupant, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = src.occupant - - var/speak = (length(H.primary.struc_enzyme) >= 25 ? hex2num(copytext(H.primary.struc_enzyme, 22, 25)) : 9999) - var/ears = (length(H.primary.struc_enzyme) >= 10 ? hex2num(copytext(H.primary.struc_enzyme, 7, 10)) : 9999) - var/vision = (length(H.primary.struc_enzyme) >= 16 ? hex2num(copytext(H.primary.struc_enzyme, 13, 16)) : 1) - var/mental1 = (length(H.primary.struc_enzyme) >= 31 ? hex2num(copytext(H.primary.struc_enzyme, 28, 31)) : 1) - var/mental2 = (length(H.primary.struc_enzyme) >= 28 ? hex2num(copytext(H.primary.struc_enzyme, 25, 28)) : 1) - var/speak2 = (length(H.primary.struc_enzyme) >= 22 ? hex2num(copytext(H.primary.struc_enzyme, 19, 22)) : 1) - H.sdisabilities = 0 - H.disabilities = 0 - if (speak < 3776) - H.disabilities = H.disabilities | 4 - else - if (speak > 3776) - H.sdisabilities = H.sdisabilities | 2 - if (speak2 < 2640) - H.disabilities = H.disabilities | 16 - if (ears > 3226) - H.sdisabilities = H.sdisabilities | 4 - if (vision < 1447) - H.sdisabilities = H.sdisabilities | 1 - else - if (vision > 1447) - H.disabilities = H.disabilities | 1 - if (mental1 < 1742) - H.disabilities = H.disabilities | 2 - if (mental2 < 1452) - H.disabilities = H.disabilities | 8 - var/t1 = null - if (length(H.primary.uni_identity) >= 20) - t1 = copytext(H.primary.uni_identity, 19, 21) - if (hex2num(t1) > 127) - H.gender = FEMALE - else - H.gender = MALE - else - H.gender = NEUTER - if (length(H.primary.uni_identity) >= 18) - t1 = copytext(H.primary.uni_identity, 17, 19) - H.ns_tone = hex2num(t1) - H.ns_tone = -H.ns_tone + 35 - else - H.ns_tone = 1 - H.ns_tone = -H.ns_tone + 35 - if (length(H.primary.uni_identity) >= 16) - t1 = copytext(H.primary.uni_identity, 15, 17) - H.b_eyes = hex2num(t1) - else - H.b_eyes = 255 - if (length(H.primary.uni_identity) >= 14) - t1 = copytext(H.primary.uni_identity, 13, 15) - H.g_eyes = hex2num(t1) - else - H.g_eyes = 255 - if (length(H.primary.uni_identity) >= 12) - t1 = copytext(H.primary.uni_identity, 11, 13) - H.r_eyes = hex2num(t1) - else - H.r_eyes = 255 - if (length(H.primary.uni_identity) >= 10) - t1 = copytext(H.primary.uni_identity, 9, 11) - H.nb_hair = hex2num(t1) - else - H.nb_hair = 255 - if (length(H.primary.uni_identity) >= 8) - t1 = copytext(H.primary.uni_identity, 7, 9) - H.ng_hair = hex2num(t1) - else - H.ng_hair = 255 - if (length(H.primary.uni_identity) >= 6) - t1 = copytext(H.primary.uni_identity, 5, 7) - H.nr_hair = hex2num(t1) - else - H.nr_hair = 255 - H.r_hair = H.nr_hair - H.g_hair = H.ng_hair - H.b_hair = H.nb_hair - H.s_tone = H.ns_tone - H.update_face() - H.update_body() - - if (reg_dna[H.primary.uni_identity]) - H.real_name = reg_dna[H.primary.uni_identity] - else - var/i - while (!i) - var/randomname - if (src.gender == MALE) - randomname = capitalize(pick(first_names_male) + " " + capitalize(pick(last_names))) - else - randomname = capitalize(pick(first_names_female) + " " + capitalize(pick(last_names))) - if (findname(randomname)) - continue - else - H.real_name = randomname - i++ - reg_dna[H.primary.uni_identity] = H.real_name - H << text("\red Your name is now [].", H.real_name) - return - -/obj/machinery/restruct/verb/move_inside() - set src in oview(1) - - if (usr.stat != 0) - return - if (src.occupant) - usr << "\blue The scanner is already occupied!" - return - if (usr.abiotic()) - usr << "\blue Subject cannot have abiotic items on." - return - usr.stop_pulling() - usr.client.perspective = EYE_PERSPECTIVE - usr.client.eye = src - usr.loc = src - src.occupant = usr - src.icon_state = "restruct_1" - for(var/obj/O in src) - //O = null - del(O) - //Foreach goto(124) - src.add_fingerprint(usr) - return - -/obj/machinery/restruct/relaymove(mob/user as mob) - if (user.stat) - return - src.go_out() - return - -/obj/machinery/restruct/attackby(obj/item/weapon/grab/G as obj, user as mob) - if(..()) - return - if ((!( istype(G, /obj/item/weapon/grab) ) || !( ismob(G.affecting) ))) - return - if (src.occupant) - user << "\blue The machine is already occupied!" - return - if (G.affecting.abiotic()) - user << "\blue Subject cannot have abiotic items on." - return - var/mob/M = G.affecting - if (M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - M.loc = src - src.occupant = M - src.icon_state = "restruct_1" - for(var/obj/O in src) - O.loc = src.loc - //Foreach goto(154) - src.add_fingerprint(user) - //G = null - del(G) - return - -/obj/machinery/restruct/proc/go_out() - if ((!( src.occupant ) || src.locked)) - return - for(var/obj/O in src) - O.loc = src.loc - //Foreach goto(30) - if (src.occupant.client) - src.occupant.client.eye = src.occupant.client.mob - src.occupant.client.perspective = MOB_PERSPECTIVE - src.occupant.loc = src.loc - src.occupant = null - src.icon_state = "restruct_0" - return - -/obj/machinery/restruct/ex_act(severity) - switch(severity) - if(1.0) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - del(src) - return - if(2.0) - if (prob(50)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - del(src) - return - if(3.0) - if (prob(25)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - ex_act(severity) - del(src) - return - else - return - -/obj/machinery/restruct/blob_act() - if(prob(75)) - for(var/atom/movable/A as mob|obj in src) - A.loc = src.loc - del(src) \ No newline at end of file diff --git a/code/unused/dna_mutations.dm b/code/unused/dna_mutations.dm deleted file mode 100644 index 10671c634d7..00000000000 --- a/code/unused/dna_mutations.dm +++ /dev/null @@ -1,101 +0,0 @@ - - -/* NOTES: - -This system could be expanded to migrate all of our current mutations to. Maybe. - - -*/ - - -/* /datum/mutations : - * - * A /datum representation of "hidden" mutations. - * - */ -/datum/mutations - - var/list/requirements = list() // list of randomly-genned requirements - var/required = 1 // the number of requirements to generate - - var/list/races = list("Human") // list of races the mutation effect - - proc/get_mutation(var/mob/living/carbon/M) // Called when check_mutation() is successful - ..() - - proc/check_mutation(var/mob/living/carbon/M) // Called in dna.dm, when a target's SE is modified - - if(! ("all" in races)) // "all" means it affects everyone! - if(istype(M, /mob/living/carbon/human)) - if(! ("Human" in races)) - return - if(istype(M, /mob/living/carbon/monkey)) - if(! ("monkey" in races)) - return - // TODO: add more races maybe?? - - - var/passes = 0 - for(var/datum/mutationreq/require in requirements) - - var/se_block[] = getblockbuffer(M.dna.struc_enzymes, require.block, 3) // focus onto the block - if(se_block.len == 3) // we want to make sure there are exactly 3 entries - - if(se_block[require.subblock] == require.reqID) - - passes++ - - if(passes == required) // all requirements met - get_mutation(M) - - - Lasereyes - /* - Lets you shoot laser beams through your eyes. Fancy! - */ - required = 2 - - get_mutation(var/mob/living/carbon/M) - M << "\blue You feel a searing heat inside your eyes!" - M.mutations.Add(M_LASER) - - Healing - /* - Lets you heal other people, and yourself. But it doesn't let you heal dead people. - */ - required = 2 - - get_mutation(var/mob/living/carbon/M) - M << "\blue You feel a pleasant warmth pulse throughout your body..." - M.mutations.Add(HEAL) - -/* /datum/mutationreq : - * - * A /datum representation of a requirement in order for a mutation to happen. - * - */ - -/datum/mutationreq - var/block // The block to read - var/subblock // The sub-block to read - var/reqID // The required hexadecimal identifier to be equal to the sub-block being read. - - - - -/* -HEY: If you want to be able to get superpowers easily just uncomment this shit. -mob/verb/checkmuts() - for(var/datum/mutations/mut in global_mutations) - - for(var/datum/mutationreq/R in mut.requirements) - src << "Block: [R.block]" - src << "Sub-Block: [R.subblock]" - src << "Required ID: [R.reqID]" - src << "" - -mob/verb/editSE(t as text) - src:dna:struc_enzymes = t - domutcheck(src) - -*/ diff --git a/code/unused/filter_control.dm b/code/unused/filter_control.dm deleted file mode 100644 index 2e7188bd104..00000000000 --- a/code/unused/filter_control.dm +++ /dev/null @@ -1,162 +0,0 @@ -// Currently only used to control /obj/machinery/inlet/filter -// todo: expand to vent control as well? - -/obj/machinery/filter_control/New() - ..() - spawn(5) //wait for world - for(var/obj/machinery/inlet/filter/F in machines) - if(F.control == src.control) - F.f_mask = src.f_mask - desc = "A remote control for a filter: [control]" - -/obj/machinery/filter_control/attack_ai(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/filter_control/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/machinery/filter_control/attackby(obj/item/weapon/W, mob/user as mob) - if(istype(W, /obj/item/weapon/detective_scanner)) - return ..() - if(istype(W, /obj/item/weapon/screwdriver)) - src.add_fingerprint(user) - user.show_message(text("\red Now [] the panel...", (src.locked) ? "unscrewing" : "reattaching"), 1) - sleep(30) - src.locked =! src.locked - src.updateicon() - return - if(istype(W, /obj/item/weapon/wirecutters) && !src.locked) - stat ^= BROKEN - src.add_fingerprint(user) - for(var/mob/O in viewers(user, null)) - O.show_message(text("\red [] has []activated []!", user, (stat&BROKEN) ? "de" : "re", src), 1) - src.updateicon() - return - if(istype(W, /obj/item/weapon/card/emag) && !emagged) - emagged++ - for(var/mob/O in viewers(user, null)) - O.show_message(text("\red [] has shorted out the []'s access system with an electromagnetic card!", user, src), 1) - src.updateicon() - return src.attack_hand(user) - return src.attack_hand(user) - -/obj/machinery/filter_control/process() - if(!(stat & NOPOWER)) - use_power(5,ENVIRON) - AutoUpdateAI(src) - src.updateUsrDialog() - src.updateicon() - -/obj/machinery/filter_control/attack_hand(mob/user as mob) - if(stat & NOPOWER) - user << browse(null, "window=filter_control") - user.machine = null - return - if(user.stat || user.lying) - return - if ((get_dist(src, user) > 1 || !istype(src.loc, /turf)) && !istype(user, /mob/living/silicon/ai)) - return 0 - - var/list/gases = list("O2", "N2", "Plasma", "CO2", "N2O") - var/dat - user.machine = src - - var/IGoodConnection = 0 - var/IBadConnection = 0 - - for(var/obj/machinery/inlet/filter/F in machines) - if((F.control == src.control) && !(F.stat && (NOPOWER|BROKEN))) - IGoodConnection++ - else if(F.control == src.control) - IBadConnection++ - var/ITotalConnections = IGoodConnection+IBadConnection - - if(ITotalConnections && !(stat & BROKEN)) //ugly - dat += "Connection status: Inlets:[ITotalConnections]/[IGoodConnection] \n Control ID: [control] \n" - else - dat += "No Connections Detected! \n Control ID: [control] \n" - if(!stat & BROKEN) - for (var/i = 1; i <= gases.len; i++) - dat += "[gases[i]]: [(src.f_mask & 1 << (i - 1)) ? "Siphoning" : "Passing"] \n" - else - dat += "Warning! Severe Internal Memory Corruption! \n \nConsult a qualified station technician immediately! \n" - dat += " \nError codes: 0x0000001E 0x0000007B \n" - - dat += " \nClose \n" - user << browse(dat, "window=filter_control;size=300x225") - onclose(user, "filter_control") -/obj/machinery/filter_control/Topic(href, href_list) - if (href_list["close"]) - usr << browse(null, "window=filter_control;") - usr.machine = null - return //Who cares if we're dead or whatever let us close the fucking window - if(..()) - return - if ((((get_dist(src, usr) <= 1 || usr.telekinesis == 1) || istype(usr, /mob/living/silicon/ai)) && istype(src.loc, /turf))) - usr.machine = src - if (src.allowed(usr) || src.emagged && !(stat & BROKEN)) - if (href_list["tg"]) //someone modified the html so I added a check here - // toggle gas - src.f_mask ^= text2num(href_list["tg"]) - for(var/obj/machinery/inlet/filter/FI in machines) - if(FI.control == src.control) - FI.f_mask ^= text2num(href_list["tg"]) - else - usr.see("\red Access Denied ([src.name] operation restricted to authorized atmospheric technicians.)") - AutoUpdateAI(src) - src.updateUsrDialog() - src.add_fingerprint(usr) - else - usr << browse(null, "window=filter_control") - usr.machine = null - return - -/obj/machinery/filter_control/proc/updateicon() - overlays.Cut() - if(stat & NOPOWER) - icon_state = "filter_control-nopower" - return - icon_state = "filter_control" - if(src.locked && (stat & BROKEN)) - overlays += image('icons/obj/stationobjs.dmi', "filter_control00") - return - else if(!src.locked) - icon_state = "filter_control-unlocked" - if(stat & BROKEN) - overlays += image('icons/obj/stationobjs.dmi', "filter_control-wirecut") - overlays += image('icons/obj/stationobjs.dmi', "filter_control00") - return - - var/GoodConnection = 0 - for(var/obj/machinery/inlet/filter/F in machines) - if((F.control == src.control) && !(F.stat && (NOPOWER|BROKEN))) - GoodConnection++ - break - - if(GoodConnection && src.f_mask) - overlays += image('icons/obj/stationobjs.dmi', "filter_control1") - else if(GoodConnection) - overlays += image('icons/obj/stationobjs.dmi', "filter_control10") - else if(src.f_mask) - overlays += image('icons/obj/stationobjs.dmi', "filter_control0") - else - overlays += image('icons/obj/stationobjs.dmi', "filter_control00") - - if (src.f_mask & (GAS_N2O|GAS_PL)) - src.overlays += image('icons/obj/stationobjs.dmi', "filter_control-tox") - if (src.f_mask & GAS_O2) - src.overlays += image('icons/obj/stationobjs.dmi', "filter_control-o2") - if (src.f_mask & GAS_N2) - src.overlays += image('icons/obj/stationobjs.dmi', "filter_control-n2") - if (src.f_mask & GAS_CO2) - src.overlays += image('icons/obj/stationobjs.dmi', "filter_control-co2") - return - -/obj/machinery/filter_control/power_change() - if(powered(ENVIRON)) - stat &= ~NOPOWER - else - stat |= NOPOWER - spawn(rand(1,15)) - src.updateicon() - return \ No newline at end of file diff --git a/code/unused/game_kit.dm b/code/unused/game_kit.dm deleted file mode 100644 index 3a96d168788..00000000000 --- a/code/unused/game_kit.dm +++ /dev/null @@ -1,138 +0,0 @@ -/* -CONTAINS: -THAT STUPID GAME KIT -Which I am commenting out /N -*/ -/* -/obj/item/weapon/game_kit/New() - src.board_stat = "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB" - src.selected = "CR" - -/obj/item/weapon/game_kit/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/item/weapon/game_kit/MouseDrop(mob/user as mob) - if (user == usr && !usr.restrained() && !usr.stat && (usr.contents.Find(src) || in_range(src, usr))) - if (usr.hand) - if (!usr.l_hand) - spawn (0) - src.attack_hand(usr, 1, 1) - else - if (!usr.r_hand) - spawn (0) - src.attack_hand(usr, 0, 1) - -/obj/item/weapon/game_kit/proc/update() - var/dat = text(" [] remove
Chips: " - for (var/piece in list("CB", "CR")) - dat += " Chess pieces: " - for (var/piece in list("WP", "WK", "WQ", "WI", "WN", "WR")) - dat += " " - for (var/piece in list("BP", "BK", "BQ", "BI", "BN", "BR")) - dat += " \nContains/Capacity [] / [] \nUpper Valve Status: [][] \n\tM - - - - [] + + + + M \nHeater Status: [] - [] \n\tTrg Tmp: - - - [] + + + \n \nPipe Valve Status: [] \n\tM - - - - [] + + + + M \n \nClose \n", src.gas.total_moles(), src.maximum, tt, (src.holding ? text(" Tank ([])", src, src.holding.gas.total_moles()) : null), src, num2text(1000000.0, 7), src, src, src, src, src.t_per, src, src, src, src, src, num2text(1000000.0, 7), ht, (src.gas.total_moles() ? (src.gas.temperature-T0C) : 20), src, src, src, src.h_tar, src, src, src, ct, src, num2text(1000000.0, 7), src, src, src, src, src.c_per, src, src, src, src, src, num2text(1000000.0, 7), user) - user << browse(dat, "window=canister;size=600x300") - onclose(user, "canister") - return */ //TODO: FIX - -/obj/machinery/atmoalter/heater/Topic(href, href_list) - ..() - if (stat & (BROKEN|NOPOWER)) - return - if (usr.stat || usr.restrained()) - return - if (((get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon/ai))) - usr.machine = src - if (href_list["c"]) - var/c = text2num(href_list["c"]) - switch(c) - if(1.0) - src.c_status = 1 - if(2.0) - src.c_status = 2 - if(3.0) - src.c_status = 3 - else - else - if (href_list["t"]) - var/t = text2num(href_list["t"]) - if (src.t_status == 0) - return - switch(t) - if(1.0) - src.t_status = 1 - if(2.0) - src.t_status = 2 - if(3.0) - src.t_status = 3 - else - else - if (href_list["h"]) - var/h = text2num(href_list["h"]) - if (h == 1) - src.h_status = 1 - else - src.h_status = null - else - if (href_list["tp"]) - var/tp = text2num(href_list["tp"]) - src.t_per += tp - src.t_per = min(max(round(src.t_per), 0), 1000000.0) - else - if (href_list["cp"]) - var/cp = text2num(href_list["cp"]) - src.c_per += cp - src.c_per = min(max(round(src.c_per), 0), 1000000.0) - else - if (href_list["ht"]) - var/cp = text2num(href_list["ht"]) - src.h_tar += cp - src.h_tar = min(max(round(src.h_tar), 0), 500) - else - if (href_list["tank"]) - var/cp = text2num(href_list["tank"]) - if ((cp == 1 && src.holding)) - src.holding.loc = src.loc - src.holding = null - if (src.t_status == 2) - src.t_status = 3 - src.updateUsrDialog() - src.add_fingerprint(usr) - else - usr << browse(null, "window=canister") - return - return - -/obj/machinery/atmoalter/heater/attackby(var/obj/W as obj, var/mob/user as mob) - - if (istype(W, /obj/item/weapon/tank)) - if (src.holding) - return - var/obj/item/weapon/tank/T = W - user.drop_item() - T.loc = src - src.holding = T - else - if (istype(W, /obj/item/weapon/wrench)) - var/obj/machinery/connector/con = locate(/obj/machinery/connector, src.loc) - - if (src.c_status) - src.anchored = initial(src.anchored) - src.c_status = 0 - user.show_message("\blue You have disconnected the heater.", 1) - if(con) - con.connected = null - else - if (con && !con.connected) - src.anchored = 1 - src.c_status = 3 - user.show_message("\blue You have connected the heater.", 1) - con.connected = src - else - user.show_message("\blue There is no connector here to attach the heater to.", 1) - return - diff --git a/code/unused/hivebot/death.dm b/code/unused/hivebot/death.dm deleted file mode 100644 index 43e7c257a53..00000000000 --- a/code/unused/hivebot/death.dm +++ /dev/null @@ -1,24 +0,0 @@ -/mob/living/silicon/hivebot/death(gibbed) - if(src.mainframe) - src.mainframe.return_to(src) - src.stat = 2 - src.canmove = 0 - - if(src.blind) - src.blind.layer = 0 - src.sight |= SEE_TURFS - src.sight |= SEE_MOBS - src.sight |= SEE_OBJS - - src.see_in_dark = 8 - src.see_invisible = SEE_INVISIBLE_LEVEL_TWO - src.updateicon() - - var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch - store_memory("Time of death: [tod]", 0) - - if (src.key) - spawn(50) - if(src.key && src.stat == 2) - src.verbs += /client/proc/ghost - return ..(gibbed) \ No newline at end of file diff --git a/code/unused/hivebot/emote.dm b/code/unused/hivebot/emote.dm deleted file mode 100644 index 12d71f6b7d2..00000000000 --- a/code/unused/hivebot/emote.dm +++ /dev/null @@ -1,140 +0,0 @@ -/mob/living/silicon/hivebot/emote(var/act) - var/param = null - if (findtext(act, "-", 1, null)) - var/t1 = findtext(act, "-", 1, null) - param = copytext(act, t1 + 1, length(act) + 1) - act = copytext(act, 1, t1) - var/m_type = 1 - var/message - - switch(act) - if ("salute") - if (!src.buckled) - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - if (!M) - param = null - - if (param) - message = "[src] salutes to [param]." - else - message = "[src] salutes." - m_type = 1 - if ("bow") - if (!src.buckled) - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - if (!M) - param = null - - if (param) - message = "[src] bows to [param]." - else - message = "[src] bows." - m_type = 1 - - if ("clap") - if (!src.restrained()) - message = "[src] claps." - m_type = 2 - if ("flap") - if (!src.restrained()) - message = "[src] flaps his wings." - m_type = 2 - - if ("aflap") - if (!src.restrained()) - message = "[src] flaps his wings ANGRILY!" - m_type = 2 - - if ("custom") - var/input = input("Choose an emote to display.") as text|null - if (!input) - return - input = sanitize(input) - var/input2 = input("Is this a visible or hearable emote?") in list("Visible","Hearable") - if (input2 == "Visible") - m_type = 1 - else if (input2 == "Hearable") - m_type = 2 - else - alert("Unable to use this emote, must be either hearable or visible.") - return - message = "[src] [input]" - - if ("twitch") - message = "[src] twitches violently." - m_type = 1 - - if ("twitch_s") - message = "[src] twitches." - m_type = 1 - - if ("nod") - message = "[src] nods." - m_type = 1 - - if ("glare") - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - if (!M) - param = null - - if (param) - message = "[src] glares at [param]." - else - message = "[src] glares." - - if ("stare") - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - if (!M) - param = null - - if (param) - message = "[src] stares at [param]." - else - message = "[src] stares." - - if ("look") - var/M = null - if (param) - for (var/mob/A in view(null, null)) - if (param == A.name) - M = A - break - - if (!M) - param = null - - if (param) - message = "[src] looks at [param]." - else - message = "[src] looks." - m_type = 1 - else - src << text("Invalid Emote: []", act) - if ((message && src.stat == 0)) - if (m_type & 1) - for(var/mob/O in viewers(src, null)) - O.show_message(message, m_type) - else - for(var/mob/O in hearers(src, null)) - O.show_message(message, m_type) - return \ No newline at end of file diff --git a/code/unused/hivebot/examine.dm b/code/unused/hivebot/examine.dm deleted file mode 100644 index 6abb42c1619..00000000000 --- a/code/unused/hivebot/examine.dm +++ /dev/null @@ -1,20 +0,0 @@ -/mob/living/silicon/hivebot/examine() - set src in oview() - - usr << "\blue *---------*" - usr << text("\blue This is \icon[src] [src.name]!") - if (src.stat == 2) - usr << text("\red [src.name] is powered-down.") - if (src.getBruteLoss()) - if (src.getBruteLoss() < 75) - usr << text("\red [src.name] looks slightly dented") - else - usr << text("\red [src.name] looks severely dented!") - if (src.getFireLoss()) - if (src.getFireLoss() < 75) - usr << text("\red [src.name] looks slightly burnt!") - else - usr << text("\red [src.name] looks severely burnt!") - if (src.stat == 1) - usr << text("\red [src.name] doesn't seem to be responding.") - return \ No newline at end of file diff --git a/code/unused/hivebot/hive_modules.dm b/code/unused/hivebot/hive_modules.dm deleted file mode 100644 index 404e5009510..00000000000 --- a/code/unused/hivebot/hive_modules.dm +++ /dev/null @@ -1,57 +0,0 @@ -/obj/item/weapon/hive_module - name = "hive robot module" - icon = 'icons/obj/module.dmi' - icon_state = "std_module" - w_class = 2.0 - item_state = "electronic" - flags = FPRINT|TABLEPASS | CONDUCT - var/list/modules = list() - -/obj/item/weapon/hive_module/standard - name = "give standard robot module" - -/obj/item/weapon/hive_module/engineering - name = "HiveBot engineering robot module" - -/obj/item/weapon/hive_module/New()//Shit all the mods have - src.modules += new /obj/item/device/flash(src) - - -/obj/item/weapon/hive_module/standard/New() - ..() - src.modules += new /obj/item/weapon/melee/baton(src) - src.modules += new /obj/item/weapon/extinguisher(src) - //var/obj/item/weapon/gun/mp5/M = new /obj/item/weapon/gun/mp5(src) - //M.weapon_lock = 0 - //src.modules += M - - -/obj/item/weapon/hive_module/engineering/New() - - src.modules += new /obj/item/weapon/extinguisher(src) - src.modules += new /obj/item/weapon/screwdriver(src) - src.modules += new /obj/item/weapon/weldingtool(src) - src.modules += new /obj/item/weapon/wrench(src) - src.modules += new /obj/item/device/analyzer(src) - src.modules += new /obj/item/device/flashlight(src) - - var/obj/item/weapon/rcd/R = new /obj/item/weapon/rcd(src) - R.matter = 30 - src.modules += R - - src.modules += new /obj/item/device/t_scanner(src) - src.modules += new /obj/item/weapon/crowbar(src) - src.modules += new /obj/item/weapon/wirecutters(src) - src.modules += new /obj/item/device/multitool(src) - - var/obj/item/stack/sheet/metal/M = new /obj/item/stack/sheet/metal(src) - M.amount = 50 - src.modules += M - - var/obj/item/stack/sheet/rglass/G = new /obj/item/stack/sheet/rglass(src) - G.amount = 50 - src.modules += G - - var/obj/item/weapon/cable_coil/W = new /obj/item/weapon/cable_coil(src) - W.amount = 50 - src.modules += W diff --git a/code/unused/hivebot/hivebot.dm b/code/unused/hivebot/hivebot.dm deleted file mode 100644 index 2589bc2f34f..00000000000 --- a/code/unused/hivebot/hivebot.dm +++ /dev/null @@ -1,504 +0,0 @@ -/mob/living/silicon/hivebot/New(loc,mainframe) - src << "\blue Your icons have been generated!" - updateicon() - - if(mainframe) - dependent = 1 - src.real_name = mainframe:name - src.name = src.real_name - else - src.real_name = "Robot [pick(rand(1, 999))]" - src.name = src.real_name - - src.radio = new /obj/item/device/radio(src) - ..() - - -/mob/living/silicon/hivebot/proc/pick_module() - if(src.module) - return - var/mod = input("Please, select a module!", "Robot", null, null) in list("Combat", "Engineering") - if(src.module) - return - switch(mod) - if("Combat") - src.module = new /obj/item/weapon/hive_module/standard(src) - - if("Engineering") - src.module = new /obj/item/weapon/hive_module/engineering(src) - - - src.hands.icon_state = "malf" - updateicon() - - -/mob/living/silicon/hivebot/blob_act() - if (src.stat != 2) - src.adjustBruteLoss(60) - src.updatehealth() - return 1 - return 0 - -/mob/living/silicon/hivebot/Stat() - ..() - statpanel("Status") - if (src.client.statpanel == "Status") - if(emergency_shuttle) - if(emergency_shuttle.has_eta() && !emergency_shuttle.returned()) - var/timeleft = emergency_shuttle.estimate_arrival_time() - if (timeleft) - stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]") -/* - if(ticker.mode.name == "AI malfunction") - stat(null, "Points left until the AI takes over: [AI_points]/[AI_points_win]") -*/ - - stat(null, text("Charge Left: [src.energy]/[src.energy_max]")) - -/mob/living/silicon/hivebot/restrained() - return 0 - -/mob/living/silicon/hivebot/ex_act(severity) - if(!blinded) - flick("flash", src.flash) - - if (src.stat == 2 && src.client) - src.gib(1) - return - - else if (src.stat == 2 && !src.client) - del(src) - return - - switch(severity) - if(1.0) - if (src.stat != 2) - adjustBruteLoss(100) - adjustFireLoss(100) - src.gib(1) - return - if(2.0) - if (src.stat != 2) - adjustBruteLoss(60) - adjustFireLoss(60) - if(3.0) - if (src.stat != 2) - adjustBruteLoss(30) - - src.updatehealth() - -/mob/living/silicon/hivebot/meteorhit(obj/O as obj) - for(var/mob/M in viewers(src, null)) - M.show_message(text("\red [src] has been hit by [O]"), 1) - //Foreach goto(19) - if (src.health > 0) - src.adjustBruteLoss(30) - if ((O.icon_state == "flaming")) - src.adjustFireLoss(40) - src.updatehealth() - return - -/mob/living/silicon/hivebot/bullet_act(flag) -/* - if (flag == PROJECTILE_BULLET) - if (src.stat != 2) - src.bruteloss += 60 - src.updatehealth() - - else if (flag == PROJECTILE_MEDBULLET) - if (src.stat != 2) - src.bruteloss += 30 - src.updatehealth() - - else if (flag == PROJECTILE_WEAKBULLET) - if (src.stat != 2) - src.bruteloss += 15 - src.updatehealth() - - else if (flag == PROJECTILE_MPBULLET) - if (src.stat != 2) - src.bruteloss += 20 - src.updatehealth() - - else if (flag == PROJECTILE_SLUG) - if (src.stat != 2) - src.bruteloss += 40 - src.updatehealth() - - else if (flag == PROJECTILE_BAG) - if (src.stat != 2) - src.bruteloss += 2 - src.updatehealth() - - - else if (flag == PROJECTILE_TASER) - return - - else if (flag == PROJECTILE_WAVE) - if (src.stat != 2) - src.bruteloss += 25 - src.updatehealth() - return - - else if(flag == PROJECTILE_LASER) - if (src.stat != 2) - src.bruteloss += 20 - src.updatehealth() - else if(flag == PROJECTILE_PULSE) - if (src.stat != 2) - src.bruteloss += 40 - src.updatehealth() -*/ - return - - - -/mob/living/silicon/hivebot/Bump(atom/movable/AM as mob|obj, yes) - spawn( 0 ) - if ((!( yes ) || src.now_pushing)) - return - src.now_pushing = 1 - if(ismob(AM)) - var/mob/tmob = AM - /*if(istype(tmob, /mob/living/carbon/human) && (M_FAT in tmob.mutations)) - if(prob(20)) - for(var/mob/M in viewers(src, null)) - if(M.client) - M << M << "\red [src] fails to push [tmob]'s fat ass out of the way." - src.now_pushing = 0 - //src.unlock_medal("That's No Moon, That's A Gourmand!", 1) - return*/ - src.now_pushing = 0 - ..() - if (!istype(AM, /atom/movable)) - return - if (!src.now_pushing) - src.now_pushing = 1 - if (!AM.anchored) - var/t = get_dir(src, AM) - step(AM, t) - src.now_pushing = null - return - return - - -/mob/living/silicon/hivebot/attackby(obj/item/weapon/W as obj, mob/user as mob) - if (istype(W, /obj/item/weapon/weldingtool) && W:welding) - if (W:remove_fuel(0)) - src.adjustBruteLoss(-30) - src.updatehealth() - src.add_fingerprint(user) - for(var/mob/O in viewers(user, null)) - O.show_message(text("\red [user] has fixed some of the dents on [src]!"), 1) - else - user << "Need more welding fuel!" - return - -/mob/living/silicon/hivebot/attack_alien(mob/living/carbon/alien/humanoid/M as mob) - - if (M.a_intent == "grab") - if (M == src) - return - var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M ) - G.assailant = M - if (M.hand) - M.l_hand = G - else - M.r_hand = G - G.layer = 20 - G.affecting = src - src.grabbed_by += G - G.synch() - playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] has grabbed [] passively!", M, src), 1) - - else if (M.a_intent == "hurt") - var/damage = rand(5, 10) - if (prob(90)) - /* - if (M.class == "combat") - damage += 15 - if(prob(20)) - src.weakened = max(src.weakened,4) - src.stunned = max(src.stunned,4) - */ - playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] has slashed at []!", M, src), 1) - if(prob(8)) - flick("noise", src.flash) - src.adjustBruteLoss(damage) - src.updatehealth() - else - playsound(src.loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] took a swipe at []!", M, src), 1) - return - - else if (M.a_intent == "disarm") - if(!(src.lying)) - var/randn = rand(1, 100) - if (randn <= 40) - src.stunned = 5 - step(src,get_dir(M,src)) - spawn(5) step(src,get_dir(M,src)) - playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] has pushed back []!", M, src), 1) - else - playsound(src.loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1) - for(var/mob/O in viewers(src, null)) - O.show_message(text("\red [] attempted to push back []!", M, src), 1) - return - -/mob/living/silicon/hivebot/attack_hand(mob/user) - ..() - return - - -/mob/living/silicon/hivebot/proc/allowed(mob/M) - //check if it doesn't require any access at all - if(src.check_access(null)) - return 1 - return 0 - -/mob/living/silicon/hivebot/proc/check_access(obj/item/weapon/card/id/I) - if(!istype(src.req_access, /list)) //something's very wrong - return 1 - - var/list/L = src.req_access - if(!L.len) //no requirements - return 1 - if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access - return 0 - for(var/req in src.req_access) - if(!(req in I.access)) //doesn't have this access - return 0 - return 1 - -/mob/living/silicon/hivebot/proc/updateicon() - - src.overlays.Cut() - - if(src.stat == 0) - src.overlays += "eyes" - else - src.overlays -= "eyes" - - -/mob/living/silicon/hivebot/proc/installed_modules() - - if(!src.module) - src.pick_module() - return - var/dat = " - - Activated Modules - - Module 1: [module_state_1 ? "[module_state_1]" : "No Module"] - Module 2: [module_state_2 ? "[module_state_2]" : "No Module"] - Module 3: [module_state_3 ? "[module_state_3]" : "No Module"] - - Installed Modules "} - - for (var/obj in src.module.modules) - if(src.activated(obj)) - dat += text("[obj]: Activated ") - else - dat += text("[obj]: Activate ") -/* - if(src.activated(obj)) - dat += text("[obj]: \[Activated | Deactivate\] ") - else - dat += text("[obj]: \[Activate | Deactivated\] ") -*/ - src << browse(dat, "window=robotmod&can_close=0") - - -/mob/living/silicon/hivebot/Topic(href, href_list) - ..() - if (href_list["mach_close"]) - var/t1 = text("window=[href_list["mach_close"]]") - src.machine = null - src << browse(null, t1) - return - - if (href_list["mod"]) - var/obj/item/O = locate(href_list["mod"]) - O.attack_self(src) - - if (href_list["act"]) - var/obj/item/O = locate(href_list["act"]) - if(activated(O)) - src << "Already activated" - return - if(!src.module_state_1) - src.module_state_1 = O - O.layer = 20 - src.contents += O - else if(!src.module_state_2) - src.module_state_2 = O - O.layer = 20 - src.contents += O - else if(!src.module_state_3) - src.module_state_3 = O - O.layer = 20 - src.contents += O - else - src << "You need to disable a module first!" - src.installed_modules() - - if (href_list["deact"]) - var/obj/item/O = locate(href_list["deact"]) - if(activated(O)) - if(src.module_state_1 == O) - src.module_state_1 = null - src.contents -= O - else if(src.module_state_2 == O) - src.module_state_2 = null - src.contents -= O - else if(src.module_state_3 == O) - src.module_state_3 = null - src.contents -= O - else - src << "Module isn't activated." - else - src << "Module isn't activated" - src.installed_modules() - return - -/mob/living/silicon/hivebot/proc/uneq_active() - if(isnull(src.module_active)) - return - if(src.module_state_1 == src.module_active) - if (src.client) - src.client.screen -= module_state_1 - src.contents -= module_state_1 - src.module_active = null - src.module_state_1 = null - src.inv1.icon_state = "inv1" - else if(src.module_state_2 == src.module_active) - if (src.client) - src.client.screen -= module_state_2 - src.contents -= module_state_2 - src.module_active = null - src.module_state_2 = null - src.inv2.icon_state = "inv2" - else if(src.module_state_3 == src.module_active) - if (src.client) - src.client.screen -= module_state_3 - src.contents -= module_state_3 - src.module_active = null - src.module_state_3 = null - src.inv3.icon_state = "inv3" - - -/mob/living/silicon/hivebot/proc/activated(obj/item/O) - if(src.module_state_1 == O) - return 1 - else if(src.module_state_2 == O) - return 1 - else if(src.module_state_3 == O) - return 1 - else - return 0 - -/mob/living/silicon/hivebot/proc/radio_menu() - var/dat = {" - -Microphone: [src.radio.broadcasting ? "Engaged" : "Disengaged"] -Speaker: [src.radio.listening ? "Engaged" : "Disengaged"] -Frequency: -- -- -[format_frequency(src.radio.frequency)] -+ -+ -------- -"} - src << browse(dat, "window=radio") - onclose(src, "radio") - return - - -/mob/living/silicon/hivebot/Move(a, b, flag) - - if (src.buckled) - return - - if (src.restrained()) - src.stop_pulling() - - var/t7 = 1 - if (src.restrained()) - for(var/mob/M in range(src, 1)) - if ((M.pulling == src && M.stat == 0 && !( M.restrained() ))) - t7 = null - if ((t7 && (src.pulling && ((get_dist(src, src.pulling) <= 1 || src.pulling.loc == src.loc) && (src.client && src.client.moving))))) - var/turf/T = src.loc - . = ..() - - if (src.pulling && src.pulling.loc) - if(!( isturf(src.pulling.loc) )) - src.stop_pulling() - return - else - if(Debug) - diary <<"src.pulling disappeared? at [__LINE__] in mob.dm - src.pulling = [src.pulling]" - diary <<"REPORT THIS" - - ///// - if(src.pulling && src.pulling.anchored) - src.stop_pulling() - return - - if (!src.restrained()) - var/diag = get_dir(src, src.pulling) - if ((diag - 1) & diag) - else - diag = null - if ((get_dist(src, src.pulling) > 1 || diag)) - if (ismob(src.pulling)) - var/mob/M = src.pulling - var/ok = 1 - if (locate(/obj/item/weapon/grab, M.grabbed_by)) - if (prob(75)) - var/obj/item/weapon/grab/G = pick(M.grabbed_by) - if (istype(G, /obj/item/weapon/grab)) - for(var/mob/O in viewers(M, null)) - O.show_message(text("\red [G.affecting] has been pulled from [G.assailant]'s grip by [src]"), 1) - del(G) - else - ok = 0 - if (locate(/obj/item/weapon/grab, M.grabbed_by.len)) - ok = 0 - if (ok) - var/atom/movable/t = M.pulling - M.stop_pulling() - step(src.pulling, get_dir(src.pulling.loc, T)) - M.start_pulling(t) - else - if (src.pulling) - step(src.pulling, get_dir(src.pulling.loc, T)) - else - src.stop_pulling() - . = ..() - if ((src.s_active && !( s_active in src.contents ) )) - src.s_active.close(src) - return - - -/mob/living/silicon/hivebot/verb/cmd_return_mainframe() - set category = "Robot Commands" - set name = "Recall to Mainframe." - return_mainframe() - -/mob/living/silicon/hivebot/proc/return_mainframe() - if(mainframe) - mainframe.return_to(src) - else - src << "\red You lack a dedicated mainframe!" - return \ No newline at end of file diff --git a/code/unused/hivebot/hivebotdefine.dm b/code/unused/hivebot/hivebotdefine.dm deleted file mode 100644 index 902c2304710..00000000000 --- a/code/unused/hivebot/hivebotdefine.dm +++ /dev/null @@ -1,46 +0,0 @@ -/mob/living/silicon/hivebot - name = "Robot" - icon = 'icons/mob/hivebot.dmi' - icon_state = "basic" - health = 80 - var/health_max = 80 - robot_talk_understand = 2 - -//HUD - var/obj/screen/cells = null - var/obj/screen/inv1 = null - var/obj/screen/inv2 = null - var/obj/screen/inv3 = null - -//3 Modules can be activated at any one time. - var/obj/item/weapon/robot_module/module = null - var/module_active = null - var/module_state_1 = null - var/module_state_2 = null - var/module_state_3 = null - - var/obj/item/device/radio/radio = null - - var/list/req_access = list(ACCESS_ROBOTICS) - var/energy = 4000 - var/energy_max = 4000 - var/jetpack = 0 - - var/mob/living/silicon/hive_mainframe/mainframe = null - var/dependent = 0 - var/shell = 1 - -/mob/living/silicon/hive_mainframe - name = "Robot Mainframe" - voice_name = "synthesized voice" - - icon_state = "hive_main" - health = 200 - var/health_max = 200 - robot_talk_understand = 2 - - anchored = 1 - var/online = 1 - var/mob/living/silicon/hivebot = null - var/hivebot_name = null - var/force_mind = 0 \ No newline at end of file diff --git a/code/unused/hivebot/hud.dm b/code/unused/hivebot/hud.dm deleted file mode 100644 index 8a88550d97d..00000000000 --- a/code/unused/hivebot/hud.dm +++ /dev/null @@ -1,251 +0,0 @@ - -/obj/hud/proc/hivebot_hud() - - src.adding = list( ) - src.other = list( ) - src.intents = list( ) - src.mon_blo = list( ) - src.m_ints = list( ) - src.mov_int = list( ) - src.vimpaired = list( ) - src.darkMask = list( ) - - src.g_dither = new src.h_type( src ) - src.g_dither.screen_loc = "WEST,SOUTH to EAST,NORTH" - src.g_dither.name = "Mask" - src.g_dither.icon_state = "dither12g" - src.g_dither.layer = 18 - src.g_dither.mouse_opacity = 0 - - src.alien_view = new src.h_type(src) - src.alien_view.screen_loc = "WEST,SOUTH to EAST,NORTH" - src.alien_view.name = "Alien" - src.alien_view.icon_state = "alien" - src.alien_view.layer = 18 - src.alien_view.mouse_opacity = 0 - - src.blurry = new src.h_type( src ) - src.blurry.screen_loc = "WEST,SOUTH to EAST,NORTH" - src.blurry.name = "Blurry" - src.blurry.icon_state = "blurry" - src.blurry.layer = 17 - src.blurry.mouse_opacity = 0 - - src.druggy = new src.h_type( src ) - src.druggy.screen_loc = "WEST,SOUTH to EAST,NORTH" - src.druggy.name = "Druggy" - src.druggy.icon_state = "druggy" - src.druggy.layer = 17 - src.druggy.mouse_opacity = 0 - - // station explosion cinematic - src.station_explosion = new src.h_type( src ) - src.station_explosion.icon = 'icons/effects/station_explosion.dmi' - src.station_explosion.icon_state = "start" - src.station_explosion.layer = 20 - src.station_explosion.mouse_opacity = 0 - src.station_explosion.screen_loc = "1,3" - - var/obj/screen/using - - -//Radio - using = new src.h_type( src ) - using.name = "radio" - using.dir = SOUTHWEST - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "radio" - using.screen_loc = ui_movi_old - using.layer = 20 - src.adding += using - -//Generic overlays - - using = new src.h_type(src) //Right hud bar - using.dir = SOUTH - using.icon = 'icons/mob/screen1_robot.dmi' - using.screen_loc = "EAST+1,SOUTH to EAST+1,NORTH" - using.layer = 19 - src.adding += using - - using = new src.h_type(src) //Lower hud bar - using.dir = EAST - using.icon = 'icons/mob/screen1_robot.dmi' - using.screen_loc = "WEST,SOUTH-1 to EAST,SOUTH-1" - using.layer = 19 - src.adding += using - - using = new src.h_type(src) //Corner Button - using.dir = NORTHWEST - using.icon = 'icons/mob/screen1_robot.dmi' - using.screen_loc = "EAST+1,SOUTH-1" - using.layer = 19 - src.adding += using - - -//Module select - - using = new src.h_type( src ) - using.name = "module1" - using.dir = SOUTHWEST - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "inv1" - using.screen_loc = ui_inv1 - using.layer = 20 - src.adding += using - mymob:inv1 = using - - using = new src.h_type( src ) - using.name = "module2" - using.dir = SOUTHWEST - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "inv2" - using.screen_loc = ui_inv2 - using.layer = 20 - src.adding += using - mymob:inv2 = using - - using = new src.h_type( src ) - using.name = "module3" - using.dir = SOUTHWEST - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "inv3" - using.screen_loc = ui_inv3 - using.layer = 20 - src.adding += using - mymob:inv3 = using - -//End of module select - -//Intent - using = new src.h_type( src ) - using.name = "act_intent" - using.dir = SOUTHWEST - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent) - using.screen_loc = ui_acti - using.layer = 20 - src.adding += using - action_intent = using - - using = new src.h_type( src ) - using.name = "arrowleft" - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "s_arrow" - using.dir = WEST - using.screen_loc = ui_iarrowleft - using.layer = 19 - src.adding += using - - using = new src.h_type( src ) - using.name = "arrowright" - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "s_arrow" - using.dir = EAST - using.screen_loc = ui_iarrowright - using.layer = 19 - src.adding += using -//End of Intent - -//Cell - mymob:cells = new /obj/screen( null ) - mymob:cells.icon = 'icons/mob/screen1_robot.dmi' - mymob:cells.icon_state = "charge-empty" - mymob:cells.name = "cell" - mymob:cells.screen_loc = ui_toxin - -//Health - mymob.healths = new /obj/screen( null ) - mymob.healths.icon = 'icons/mob/screen1_robot.dmi' - mymob.healths.icon_state = "health0" - mymob.healths.name = "health" - mymob.healths.screen_loc = ui_health - -//Installed Module - mymob.hands = new /obj/screen( null ) - mymob.hands.icon = 'icons/mob/screen1_robot.dmi' - mymob.hands.icon_state = "nomod" - mymob.hands.name = "module" - mymob.hands.screen_loc = ui_dropbutton - -//Module Panel - using = new src.h_type( src ) - using.name = "panel" - using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = "panel" - using.screen_loc = ui_throw - using.layer = 19 - src.adding += using - -//Store - mymob.throw_icon = new /obj/screen(null) - mymob.throw_icon.icon = 'icons/mob/screen1_robot.dmi' - mymob.throw_icon.icon_state = "store" - mymob.throw_icon.name = "store" - mymob.throw_icon.screen_loc = ui_hand - -//Temp - mymob.bodytemp = new /obj/screen( null ) - mymob.bodytemp.icon_state = "temp0" - mymob.bodytemp.name = "body temperature" - mymob.bodytemp.screen_loc = ui_temp - -//does nothing (fire and oxy) - mymob.oxygen = new /obj/screen( null ) - mymob.oxygen.icon = 'icons/mob/screen1_robot.dmi' - mymob.oxygen.icon_state = "oxy0" - mymob.oxygen.name = "oxygen" - mymob.oxygen.screen_loc = ui_oxygen - - mymob.fire = new /obj/screen( null ) - mymob.fire.icon = 'icons/mob/screen1_robot.dmi' - mymob.fire.icon_state = "fire0" - mymob.fire.name = "fire" - mymob.fire.screen_loc = ui_fire - - - - mymob.pullin = new /obj/screen( null ) - mymob.pullin.icon = 'icons/mob/screen1_robot.dmi' - mymob.pullin.icon_state = "pull0" - mymob.pullin.name = "pull" - mymob.pullin.screen_loc = ui_pull - - mymob.blind = new /obj/screen( null ) - mymob.blind.icon = 'icons/mob/screen1_full.dmi'' - mymob.blind.icon_state = "blackimageoverlay" - mymob.blind.name = " " - mymob.blind.screen_loc = "1,1" - mymob.blind.layer = 0 - mymob.blind.mouse_opacity = 0 - - mymob.flash = new /obj/screen( null ) - mymob.flash.icon = 'icons/mob/screen1_robot.dmi' - mymob.flash.icon_state = "blank" - mymob.flash.name = "flash" - mymob.flash.screen_loc = "1,1 to 15,15" - mymob.flash.layer = 17 - - mymob.sleep = new /obj/screen( null ) - mymob.sleep.icon = 'icons/mob/screen1_robot.dmi' - mymob.sleep.icon_state = "sleep0" - mymob.sleep.name = "sleep" - mymob.sleep.screen_loc = ui_sleep - - mymob.rest = new /obj/screen( null ) - mymob.rest.icon = 'icons/mob/screen1_robot.dmi' - mymob.rest.icon_state = "rest0" - mymob.rest.name = "rest" - mymob.rest.screen_loc = ui_rest - - - mymob.zone_sel = new /obj/screen/zone_sel( null ) - mymob.zone_sel.overlays.Cut() - mymob.zone_sel.overlays += image("icon" = 'icons/mob/zone_sel.dmi', "icon_state" = text("[]", mymob.zone_sel.selecting)) - - mymob.client.screen = null - - mymob.client.screen += list(mymob.throw_icon, mymob.zone_sel, mymob.oxygen, mymob.fire, mymob.hands, mymob.healths, mymob:cells, mymob.pullin, mymob.blind, mymob.flash, mymob.rest, mymob.sleep) //, mymob.mach ) - mymob.client.screen += src.adding + src.other - - return diff --git a/code/unused/hivebot/life.dm b/code/unused/hivebot/life.dm deleted file mode 100644 index 9ab6e8c3e89..00000000000 --- a/code/unused/hivebot/life.dm +++ /dev/null @@ -1,227 +0,0 @@ -/mob/living/silicon/hivebot/Life() - set invisibility = 0 - set background = 1 - - if (src.monkeyizing) - return - - if (src.stat != 2) - use_power() - - src.blinded = null - - clamp_values() - - handle_regular_status_updates() - - if(client) - src.shell = 0 - handle_regular_hud_updates() - update_items() - if(dependent) - mainframe_check() - - update_canmove() - - -/mob/living/silicon/hivebot - proc - clamp_values() - - stunned = max(min(stunned, 10),0) - paralysis = max(min(paralysis, 1), 0) - weakened = max(min(weakened, 15), 0) - sleeping = max(min(sleeping, 1), 0) - setToxLoss(0) - setOxyLoss(0) - - use_power() - - if (src.energy) - if(src.energy <= 0) - death() - - else if (src.energy <= 10) - src.module_active = null - src.module_state_1 = null - src.module_state_2 = null - src.module_state_3 = null - src.energy -=1 - else - if(src.module_state_1) - src.energy -=1 - if(src.module_state_2) - src.energy -=1 - if(src.module_state_3) - src.energy -=1 - src.energy -=1 - src.blinded = 0 - src.stat = 0 - else - src.blinded = 1 - src.stat = 1 - - update_canmove() - if(paralysis || stunned || weakened || buckled) canmove = 0 - else canmove = 1 - - - handle_regular_status_updates() - - health = src.health_max - (getFireLoss() + getBruteLoss()) - - if(health <= 0) - death() - - if (src.stat != 2) //Alive. - - if (src.paralysis || src.stunned || src.weakened) //Stunned etc. - if (src.stunned > 0) - src.stunned-- - src.stat = 0 - if (src.weakened > 0) - src.weakened-- - src.lying = 0 - src.stat = 0 - if (src.paralysis > 0) - src.paralysis-- - src.blinded = 0 - src.lying = 0 - src.stat = 1 - - else //Not stunned. - src.lying = 0 - src.stat = 0 - - else //Dead. - src.blinded = 1 - src.stat = 2 - - src.density = !( src.lying ) - - if ((src.sdisabilities & 1)) - src.blinded = 1 - if ((src.sdisabilities & 4)) - src.ear_deaf = 1 - - if (src.eye_blurry > 0) - src.eye_blurry-- - src.eye_blurry = max(0, src.eye_blurry) - - if (src.druggy > 0) - src.druggy-- - src.druggy = max(0, src.druggy) - - return 1 - - handle_regular_hud_updates() - - if (src.stat == 2 || M_XRAY in src.mutations) - src.sight |= SEE_TURFS - src.sight |= SEE_MOBS - src.sight |= SEE_OBJS - src.see_in_dark = 8 - src.see_invisible = SEE_INVISIBLE_LEVEL_TWO - else if (src.stat != 2) - src.sight &= ~SEE_MOBS - src.sight &= ~SEE_TURFS - src.sight &= ~SEE_OBJS - src.see_in_dark = 8 - src.see_invisible = SEE_INVISIBLE_LEVEL_TWO - - if (src.healths) - if (src.stat != 2) - switch(health) - if(health_max to INFINITY) - src.healths.icon_state = "health0" - if(src.health_max*0.80 to src.health_max) - src.healths.icon_state = "health1" - if(src.health_max*0.60 to src.health_max*0.80) - src.healths.icon_state = "health2" - if(src.health_max*0.40 to src.health_max*0.60) - src.healths.icon_state = "health3" - if(src.health_max*0.20 to src.health_max*0.40) - src.healths.icon_state = "health4" - if(0 to health_max*0.20) - src.healths.icon_state = "health5" - else - src.healths.icon_state = "health6" - else - src.healths.icon_state = "health7" - - if (src.cells) - switch(src.energy) - if(src.energy_max*0.75 to INFINITY) - src.cells.icon_state = "charge4" - if(0.5*src.energy_max to 0.75*src.energy_max) - src.cells.icon_state = "charge3" - if(0.25*src.energy_max to 0.5*src.energy_max) - src.cells.icon_state = "charge2" - if(0 to 0.25*src.energy_max) - src.cells.icon_state = "charge1" - else - src.cells.icon_state = "charge0" - - switch(src.bodytemperature) //310.055 optimal body temp - - if(335 to INFINITY) - src.bodytemp.icon_state = "temp2" - if(320 to 335) - src.bodytemp.icon_state = "temp1" - if(300 to 320) - src.bodytemp.icon_state = "temp0" - if(260 to 300) - src.bodytemp.icon_state = "temp-1" - else - src.bodytemp.icon_state = "temp-2" - - - if(src.pullin) src.pullin.icon_state = "pull[src.pulling ? 1 : 0]" - - src.client.screen -= src.hud_used.blurry - src.client.screen -= src.hud_used.druggy - src.client.screen -= src.hud_used.vimpaired - - if ((src.blind && src.stat != 2)) - if ((src.blinded)) - src.blind.layer = 18 - else - src.blind.layer = 0 - - if (src.disabilities & 1) - src.client.screen += src.hud_used.vimpaired - - if (src.eye_blurry) - src.client.screen += src.hud_used.blurry - - if (src.druggy) - src.client.screen += src.hud_used.druggy - - if (src.stat != 2) - if (src.machine) - if (!( src.machine.check_eye(src) )) - src.reset_view(null) - else - if(!client.adminobs) - reset_view(null) - - return 1 - - - update_items() - if (src.client) - src.client.screen -= src.contents - src.client.screen += src.contents - if(src.module_state_1) - src.module_state_1:screen_loc = ui_inv1 - if(src.module_state_2) - src.module_state_2:screen_loc = ui_inv2 - if(src.module_state_3) - src.module_state_3:screen_loc = ui_inv3 - - mainframe_check() - if(mainframe) - if(mainframe.stat == 2) - mainframe.return_to(src) - else - death() \ No newline at end of file diff --git a/code/unused/hivebot/login.dm b/code/unused/hivebot/login.dm deleted file mode 100644 index 3a811b4c8a9..00000000000 --- a/code/unused/hivebot/login.dm +++ /dev/null @@ -1,15 +0,0 @@ -/mob/living/silicon/hivebot/Login() - ..() - - update_clothing() - - if (!isturf(src.loc)) - src.client.eye = src.loc - src.client.perspective = EYE_PERSPECTIVE - if (src.stat == 2) - src.verbs += /client/proc/ghost - if(src.real_name == "Hiveborg") - src.real_name += " " - src.real_name += "-[rand(1, 999)]" - src.name = src.real_name - return \ No newline at end of file diff --git a/code/unused/hivebot/mainframe.dm b/code/unused/hivebot/mainframe.dm deleted file mode 100644 index e629a8f7d20..00000000000 --- a/code/unused/hivebot/mainframe.dm +++ /dev/null @@ -1,181 +0,0 @@ -/mob/living/silicon/hive_mainframe/New() - Namepick() - -/mob/living/silicon/hive_mainframe/Life() - if (src.stat == 2) - return - else - src.updatehealth() - - if (src.health <= 0) - death() - return - - if(src.force_mind) - if(!src.mind) - if(src.client) - src.mind = new - src.mind.key = src.key - src.mind.current = src - src.force_mind = 0 - -/mob/living/silicon/hive_mainframe/Stat() - ..() - statpanel("Status") - if (src.client.statpanel == "Status") - if(emergency_shuttle) - if(emergency_shuttle.has_eta() && !emergency_shuttle.returned()) - var/timeleft = emergency_shuttle.estimate_arrival_time() - if (timeleft) - stat(null, "ETA-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]") -/* - if(ticker.mode.name == "AI malfunction") - stat(null, "Points left until the AI takes over: [AI_points]/[AI_points_win]") -*/ - -/mob/living/silicon/hive_mainframe/updatehealth() - if (src.nodamage == 0) - src.health = 100 - src.getFireLoss() - src.getBruteLoss() - else - src.health = 100 - src.stat = 0 - -/mob/living/silicon/hive_mainframe/death(gibbed) - src.stat = 2 - src.canmove = 0 - if(src.blind) - src.blind.layer = 0 - src.sight |= SEE_TURFS - src.sight |= SEE_MOBS - src.sight |= SEE_OBJS - src.see_in_dark = 8 - src.see_invisible = SEE_INVISIBLE_LEVEL_TWO - src.lying = 1 - src.icon_state = "hive_main-crash" - - var/tod = time2text(world.realtime,"hh:mm:ss") //weasellos time of death patch - mind.store_memory("Time of death: [tod]", 0) - - if (src.key) - spawn(50) - if(src.key && src.stat == 2) - src.verbs += /client/proc/ghost - return ..(gibbed) - - -/mob/living/silicon/hive_mainframe/say_understands(var/other) - if (istype(other, /mob/living/carbon/human)) - return 1 - if (istype(other, /mob/living/silicon/robot)) - return 1 - if (istype(other, /mob/living/silicon/hivebot)) - return 1 - if (istype(other, /mob/living/silicon/ai)) - return 1 - if (istype(other, /mob/living/carbon/human/tajaran)) - return 1 - return ..() - -/mob/living/silicon/hive_mainframe/say_quote(var/text) - var/ending = copytext(text, length(text)) - - if (ending == "?") - return "queries, \"[text]\""; - else if (ending == "!") - return "declares, \"[copytext(text, 1, length(text))]\""; - - return "states, \"[text]\""; - - -/mob/living/silicon/hive_mainframe/proc/return_to(var/mob/user) - if(user.mind) - user.mind.transfer_to(src) - spawn(20) - user:shell = 1 - user:real_name = "Robot [pick(rand(1, 999))]" - user:name = user:real_name - - - return - -/mob/living/silicon/hive_mainframe/verb/cmd_deploy_to() - set category = "Mainframe Commands" - set name = "Deploy to shell." - deploy_to() - -/mob/living/silicon/hive_mainframe/verb/deploy_to() - - if(usr.stat == 2) - usr << "You can't deploy because you are dead!" - return - - var/list/bodies = new/list() - - for(var/mob/living/silicon/hivebot/H in mob_list) - if(H.z == src.z) - if(H.shell) - if(!H.stat) - bodies += H - - var/target_shell = input(usr, "Which body to control?") as null|anything in bodies - - if (!target_shell) - return - - else if(src.mind) - spawn(30) - target_shell:mainframe = src - target_shell:dependent = 1 - target_shell:real_name = src.name - target_shell:name = target_shell:real_name - src.mind.transfer_to(target_shell) - return - - -/client/proc/MainframeMove(n,direct,var/mob/living/silicon/hive_mainframe/user) - return -/obj/hud/proc/hive_mainframe_hud() - return - - - - - -/mob/living/silicon/hive_mainframe/Login() - ..() - update_clothing() - for(var/S in src.client.screen) - del(S) - src.flash = new /obj/screen( null ) - src.flash.icon_state = "blank" - src.flash.name = "flash" - src.flash.screen_loc = "1,1 to 15,15" - src.flash.layer = 17 - src.blind = new /obj/screen( null ) - src.blind.icon_state = "black" - src.blind.name = " " - src.blind.screen_loc = "1,1 to 15,15" - src.blind.layer = 0 - src.client.screen += list( src.blind, src.flash ) - if(!isturf(src.loc)) - src.client.eye = src.loc - src.client.perspective = EYE_PERSPECTIVE - if (src.stat == 2) - src.verbs += /client/proc/ghost - return - - - -/mob/living/silicon/hive_mainframe/proc/Namepick() - var/randomname = pick(ai_names) - var/newname = input(src,"You are the a Mainframe Unit. Would you like to change your name to something else?", "Name change",randomname) - - if (length(newname) == 0) - newname = randomname - - if (newname) - if (length(newname) >= 26) - newname = copytext(newname, 1, 26) - newname = replacetext(newname, ">", "'") - src.real_name = newname - src.name = newname \ No newline at end of file diff --git a/code/unused/jobs.dm b/code/unused/jobs.dm deleted file mode 100644 index a8b1b2b4bb6..00000000000 --- a/code/unused/jobs.dm +++ /dev/null @@ -1,291 +0,0 @@ -//WORK IN PROGRESS CONTENT - -//Project coder: Errorage - -//Readme: As part of the UI upgrade project, the intention here is for each job to have -//somewhat customizable loadouts. Players will be able to pick between jumpsuits, shoes, -//and other items. This datum will be used for all jobs and code will reference it. -//adding new jobs will be a matter of adding this datum.to a list of jobs. - -#define VITAL_PRIORITY_JOB 5 -#define HIGH_PRIORITY_JOB 4 -#define PRIORITY_JOB 3 -#define LOW_PRIORITY_JOB 2 -#define ASSISTANT_PRIORITY_JOB 1 -#define NO_PRIORITY_JOB 0 - -/datum/job - //Basic information - var/title = "Untitled" //The main (default) job title/name - var/list/alternative_titles = list() //Alternative job titles/names (alias) - var/job_number_at_round_start = 0 //Number of jobs that can be assigned at round start - var/job_number_total = 0 //Number of jobs that can be assigned total - var/list/bosses = list() //List of jobs which have authority over this job by default. - var/admin_only = 0 //If this is set to 1, the job is not available on the spawn screen - var/description = "" //A description of the job to be displayed when requested on the spawn screen - var/guides = "" //A string with links to relevent guides (likely the wiki) - var/department = "" //This is used to group jobs into departments, which means that if you don't get your desired jobs, you get another job from the same department - var/job_type = "SS13" //SS13, NT or ANTAGONIST - var/can_be_traitor = 1 - var/can_be_changeling = 1 - var/can_be_wizard = 1 - var/can_be_cultist = 1 - var/can_be_rev_head = 1 - var/is_head_position = 0 - - //Job conditions - var/change_to_mob = "Human" //The type of mob which this job will change you to (alien,cyborg,human...) - var/change_to_mutantrace = "" //What mutantrace you will be once you get this job - - //Random job assignment priority - var/assignment_priority = NO_PRIORITY_JOB //This variable determins the priority of assignment - //VITAL_PRIORITY_JOB = Absolutely vital (Someone will get assigned every round) - Use VERY, VERY lightly - //HIGH_PRIORITY_JOB = High priority - Assibned before the other jobs, candidates compete on equal terms - //PRIORITY_JOB = Priorized (Standard priority) - Candidates compete by virtue of priority (choice 1 > choice 2 > choice 3...) - //LOW_PRIORITY_JOB = Low priority (Low-priority (librarian)) - //ASSISTANT_PRIORITY_JOB = Assistant-level (Only filled when all the other jobs have been assigned) - //NO_PRIORITY_JOB = Skipped om assignment (Admin-only jobs should have this level) - - - - //Available equipment - The first thing listed is understood as the default setup. - var/list/equipment_ears = list() //list of possible ear-wear items - var/list/equipment_glasses = list() //list of possible glasses - var/list/equipment_gloves = list() //list of possible gloves - var/list/equipment_head = list() //list of possible headgear/helmets/hats - var/list/equipment_mask = list() //list of possible masks - var/list/equipment_shoes = list() //list of possible shoes - var/list/equipment_suit = list() //list of possible suits - var/list/equipment_under = list() //list of possible jumpsuits - var/list/equipment_belt = list() //list of possible belt-slot items - var/list/equipment_back = list() //list of possible back-slot items - var/obj/equipment_pda //default pda type - var/obj/equipment_id //default id type - - New(var/param_title, var/list/param_alternative_titles = list(), var/param_jobs_at_round_start = 0, var/param_global_max = 0, var/list/param_bosses = list(), var/param_admin_only = 0) - title = param_title - alternative_titles = param_alternative_titles - job_number_at_round_start = param_jobs_at_round_start - job_number_total = param_global_max - bosses = param_bosses - admin_only = param_admin_only - - //This proc tests to see if the given alias (job title/alternative job title) corresponds to this job. - //Returns 1 if it is, else returns 0 - proc/is_job_alias(var/alias) - if(alias == title) - return 1 - if(alias in alternative_titles) - return 1 - return 0 - -/datum/jobs - var/list/datum/job/all_jobs = list() - - proc/get_all_jobs() - return all_jobs - - //This proc returns all the jobs which are NOT admin only - proc/get_normal_jobs() - var/list/datum/job/normal_jobs = list() - for(var/datum/job/J in all_jobs) - if(!J.admin_only) - normal_jobs += J - return normal_jobs - - //This proc returns all the jobs which are admin only - proc/get_admin_jobs() - var/list/datum/job/admin_jobs = list() - for(var/datum/job/J in all_jobs) - if(J.admin_only) - admin_jobs += J - return admin_jobs - - //This proc returns the job datum of the job with the alias or job title given as the argument. Returns an empty string otherwise. - proc/get_job(var/alias) - for(var/datum/job/J in all_jobs) - if(J.is_job_alias(alias)) - return J - return "" - - //This proc returns a string with the default job title for the job with the given alias. Returns an empty string otherwise. - proc/get_job_title(var/alias) - for(var/datum/job/J in all_jobs) - if(J.is_job_alias(alias)) - return J.title - return "" - - //This proc returns all the job datums of the workers whose boss has the alias provided. (IE Engineer under Chief Engineer, etc.) - proc/get_jobs_under(var/boss_alias) - var/boss_title = get_job_title(boss_alias) - var/list/datum/job/employees = list() - for(var/datum/job/J in all_jobs) - if(boss_title in J.bosses) - employees += J - return employees - - //This proc returns the chosen vital and high priority jobs that the person selected. It goes from top to bottom of the list, until it finds a job which does not have such priority. - //Example: Choosing (in this order): CE, Captain, Engineer, RD will only return CE and Captain, as RD is assumed as being an unwanted choice. - //This proc is used in the allocation algorithm when deciding vital and high priority jobs. - proc/get_prefered_high_priority_jobs() - var/list/datum/job/hp_jobs = list() - for(var/datum/job/J in all_jobs) - if(J.assignment_priority == HIGH_PRIORITY_JOB || J.assignment_priority == VITAL_PRIORITY_JOB) - hp_jobs += J - else - break - return hp_jobs - - //If only priority is given, it will return the jobs of only that priority, if end_priority is set it will return the jobs with their priority higher or equal to var/priority and lower or equal to end_priority. end_priority must be higher than 0. - proc/get_jobs_by_priority(var/priority, var/end_priority = 0) - var/list/datum/job/priority_jobs = list() - if(end_priority) - if(end_priority < priority) - return - for(var/datum/job/J in all_jobs) - if(J.assignment_priority >= priority && J.assignment_priority <= end_priority) - priority_jobs += J - else - for(var/datum/job/J in all_jobs) - if(J.assignment_priority == priority) - priority_jobs += J - return priority_jobs - -//This datum is used in the plb allocation algorithm to make life easier, not used anywhere else. -/datum/player_jobs - var/mob/new_player/player - var/datum/jobs/selected_jobs - -var/datum/jobs/jobs = new/datum/jobs() - -proc/setup_jobs() - var/datum/job/JOB - - JOB = new/datum/job("Station Engineer") - JOB.alternative_titles = list("Structural Engineer","Engineer","Student of Engineering") - JOB.job_number_at_round_start = 5 - JOB.job_number_total = 5 - JOB.bosses = list("Chief Engineer") - JOB.admin_only = 0 - JOB.description = "Engineers are tasked with the maintenance of the station. Be it maintaining the power grid or rebuilding damaged sections." - JOB.guides = "" - JOB.equipment_ears = list(/obj/item/device/radio/headset/headset_eng) - JOB.equipment_glasses = list() - JOB.equipment_gloves = list() - JOB.equipment_head = list(/obj/item/clothing/head/helmet/hardhat) - JOB.equipment_mask = list() - JOB.equipment_shoes = list(/obj/item/clothing/shoes/orange,/obj/item/clothing/shoes/brown,/obj/item/clothing/shoes/black) - JOB.equipment_suit = list(/obj/item/clothing/suit/storage/hazardvest) - JOB.equipment_under = list(/obj/item/clothing/under/rank/engineer,/obj/item/clothing/under/color/yellow) - JOB.equipment_belt = list(/obj/item/weapon/storage/belt/utility/full) - JOB.equipment_back = list(/obj/item/weapon/storage/backpack/industrial,/obj/item/weapon/storage/backpack) - JOB.equipment_pda = /obj/item/device/pda/engineering - JOB.equipment_id = /obj/item/weapon/card/id - - jobs.all_jobs += JOB - -//This proc will dress the mob (employee) in the default way for the specified job title/job alias -proc/dress_for_job_default(var/mob/living/carbon/human/employee as mob, var/job_alias) - if(!ishuman(employee)) - return - - //TODO ERRORAGE - UNFINISHED - var/datum/job/JOB = jobs.get_job(job_alias) - if(JOB) - var/item = JOB.equipment_ears[1] - employee.equip_to_slot_or_del(new item(employee), employee.slot_l_ear) - item = JOB.equipment_under[1] - employee.equip_to_slot_or_del(new item(employee), employee.slot_w_uniform) - - - /* - src.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial (src), slot_back) - src.equip_to_slot_or_del(new /obj/item/weapon/storage/box/engineer(src), slot_in_backpack) - src.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_eng (src), slot_l_ear) // -- TLE - src.equip_to_slot_or_del(new /obj/item/device/pda/engineering(src), slot_belt) - src.equip_to_slot_or_del(new /obj/item/clothing/under/rank/engineer(src), slot_w_uniform) - src.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(src), slot_shoes) - src.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/hardhat(src), slot_head) - src.equip_to_slot_or_del(new /obj/item/weapon/storage/utilitybelt/full(src), slot_l_hand) //currently spawns in hand due to traitor assignment requiring a PDA to be on the belt. --Errorage - //src.equip_to_slot_or_del(new /obj/item/clothing/gloves/yellow(src), slot_gloves) removed as part of Dangercon 2011, approved by Urist_McDorf --Errorage - src.equip_to_slot_or_del(new /obj/item/device/t_scanner(src), slot_r_store) - */ - - -//This algorithm works in 5 steps: -//1: Assignment of wizard / nuke members (if appropriate game mode) -//2: Assignment of jobs based on preferenes -// 2.1: Assignment of vital and high priority jobs. Candidates compete on equal terms. If the vital jobs are not filled, a random candidate is chosen to fill them, -// 2.2: Assignment of the rest of the jobs based on player preference, -//3: Assignment of remaining jobs for remaining players based on chosen departments -//4: Random assignment of remaining jobs for remaining players based on assignment priority -//5: Assignment of traitor / changeling to assigned roles (if appropriate game mode) -proc/assignment_algorithm(var/list/mob/new_player/players) - for(var/mob/new_player/PLAYER in players) - if(!PLAYER.client) - players -= PLAYER - continue - if(!PLAYER.ready) - players -= PLAYER - continue - - var/list/datum/job/vital_jobs = list() - var/list/datum/job/high_priority_jobs = list() - var/list/datum/job/priority_jobs = list() - var/list/datum/job/low_priority_jobs = list() - var/list/datum/job/assistant_jobs = list() - var/list/datum/job/not_assigned_jobs = list() - - for(var/datum/job/J in jobs) - switch(J.assignment_priority) - if(5) - vital_jobs += J - if(4) - high_priority_jobs += J - if(3) - priority_jobs += J - if(2) - low_priority_jobs += J - if(1) - assistant_jobs += J - if(0) - not_assigned_jobs += J - - var/list/datum/player_jobs/player_jobs = list() //This datum only holds a mob/new_player and a datum/jobs. The first is the player, the 2nd is the player's selected jobs, from the preferences datum. - - for(var/mob/new_player/NP in players) - var/datum/player_jobs/PJ = new/datum/player_jobs - PJ.player = NP - PJ.selected_jobs = NP.preferences.wanted_jobs - player_jobs += PJ - - //At this point we have the player_jobs list filled. Next up we have to assign all vital and high priority positions. - - var/list/datum/job/hp_jobs = jobs.get_jobs_by_priority( HIGH_PRIORITY_JOB, VITAL_PRIORITY_JOB ) - - for(var/datum/job/J in hp_jobs) - var/list/mob/new_player/candidates = list() - for(var/datum/player_jobs/PJ in player_jobs) - if(J in PJ.selected_jobs) - candidates += PJ.player - var/mob/new_player/chosen_player - if(candidates) - chosen_player = pick(candidates) - else - if(J.assignment_priority == VITAL_PRIORITY_JOB) - if(players) //Just in case there are more vital jobs than there are players. - chosen_player = pick(players) - if(chosen_player) - chosen_player.mind.assigned_job = J - players -= chosen_player - //TODO ERRORAGE - add capability for hp jobs with more than one slots. - - - - - //1: vital and high priority jobs, assigned on equal terms - - //TODO ERRORAGE - UNFINISHED - - -//END OF WORK IN PROGRESS CONTENT diff --git a/code/unused/mining/datum_processing_recipe.dm b/code/unused/mining/datum_processing_recipe.dm deleted file mode 100644 index c9331cf0728..00000000000 --- a/code/unused/mining/datum_processing_recipe.dm +++ /dev/null @@ -1,23 +0,0 @@ -/**********************Ore to material recipes datum**************************/ - -var/list/AVAILABLE_ORES = typesof(/obj/item/weapon/ore) - -/datum/material_recipe - var/name - var/list/obj/item/weapon/ore/recipe - var/obj/prod_type //produced material/object type - - New(var/param_name, var/param_recipe, var/param_prod_type) - name = param_name - recipe = param_recipe - prod_type = param_prod_type - -var/list/datum/material_recipe/MATERIAL_RECIPES = list( - new/datum/material_recipe("Metal",list(/obj/item/weapon/ore/iron),/obj/item/stack/sheet/metal), - new/datum/material_recipe("Glass",list(/obj/item/weapon/ore/glass),/obj/item/stack/sheet/glass), - new/datum/material_recipe("Gold",list(/obj/item/weapon/ore/gold),/obj/item/stack/sheet/mineral/gold), - new/datum/material_recipe("Silver",list(/obj/item/weapon/ore/silver),/obj/item/stack/sheet/mineral/silver), - new/datum/material_recipe("Diamond",list(/obj/item/weapon/ore/diamond),/obj/item/stack/sheet/mineral/diamond), - new/datum/material_recipe("Plasma",list(/obj/item/weapon/ore/plasma),/obj/item/stack/sheet/mineral/plasma), - new/datum/material_recipe("Bananium",list(/obj/item/weapon/ore/clown),/obj/item/stack/sheet/mineral/clown), - ) \ No newline at end of file diff --git a/code/unused/mining/machine_craftlathe_unused.dm b/code/unused/mining/machine_craftlathe_unused.dm deleted file mode 100644 index dc4ca5b3af0..00000000000 --- a/code/unused/mining/machine_craftlathe_unused.dm +++ /dev/null @@ -1,235 +0,0 @@ -/*********************NEW AUTOLATHE / CRAFT LATHE***********************/ - -var/list/datum/craftlathe_item/CRAFT_ITEMS = list() -var/CRAFT_ITEMS_SETUP = 1 //this should probably be a pre-game thing, but i'll do it so the first lathe2 that's created will set-up the recipes. - -proc/check_craftlathe_recipe(var/list/param_recipe) - if(param_recipe.len != 9) - return - var/i - var/match = 0 //this one counts if there is at least one non-"" ingredient. - for(var/datum/craftlathe_item/CI in CRAFT_ITEMS) - match = 0 - for(i = 1; i <= 9; i++) - if(CI.recipe[i] != param_recipe[i]) - match = 0 //use this so it passes by the match > 0 check below, otherwise i'd need a new variable to tell the return CI below that the check failed - break - if(CI.recipe[i] != "") - match++ - if(match > 0) - return CI - return 0 - -/datum/craftlathe_item - var/id = "" //must be unique for each item type. used to create recipes - var/name = "unknown" //what the lathe will show as it's contents - var/list/recipe = list("","","","","","","","","") //the 9 items here represent what items need to be placed in the lathe to produce this item. - var/item_type = null //this is used on items like sheets which are added when inserted into the lathe. - var/amount = 1 - var/amount_attackby = 1 - -/datum/craftlathe_item/New(var/param_id,var/param_name,var/param_amount,var/param_ammount_per_attackby,var/list/param_recipe,var/param_type = null) - ..() - id = param_id - name = param_name - recipe = param_recipe - item_type = param_type - amount = param_amount; - amount_attackby = param_ammount_per_attackby - return - -//this proc checks the recipe you give in it's parameter with the entire list of available items. If any match, it returns the item from CRAFT_ITEMS. the returned item should not be changed!! - -/obj/machinery/autolathe2 - name = "Craft lathe" - icon_state = "autolathe" - density = 1 - anchored = 1 - var/datum/craftlathe_item/selected = null - var/datum/craftlathe_item/make = null - var/list/datum/craftlathe_item/craft_contents = list() - var/list/current_recipe = list("","","","","","","","","") - -/obj/machinery/autolathe2/New() - ..() - if(CRAFT_ITEMS_SETUP) - CRAFT_ITEMS_SETUP = 0 - build_recipes() - return - -/obj/machinery/autolathe2/attack_hand(mob/user as mob) - var/dat - dat = text(" Craft Lathe") - dat += text("
output connection status: ") - if (output) - dat += text("CONNECTED") - else - dat += text("NOT CONNECTED") - - dat += text(" Extract gas") - - dat += text(" Message: [message]") - - user << browse("[dat]", "window=purifier") - -/obj/machinery/mineral/gasextractor/Topic(href, href_list) - if(..()) - return - - usr.machine = src - src.add_fingerprint(usr) - if(href_list["extract"]) - if (src.output) - if (locate(/obj/machinery/portable_atmospherics/canister,output.loc)) - newtoxins = 0 - processing = 1 - var/obj/item/weapon/ore/O - while(locate(/obj/item/weapon/ore/plasma, input.loc) && locate(/obj/machinery/portable_atmospherics/canister,output.loc)) - O = locate(/obj/item/weapon/ore/plasma, input.loc) - if (istype(O,/obj/item/weapon/ore/plasma)) - var/obj/machinery/portable_atmospherics/canister/C - C = locate(/obj/machinery/portable_atmospherics/canister,output.loc) - C.air_contents.toxins += 100 - newtoxins += 100 - del(O) - sleep(5); - processing = 0; - message = "Canister filled with [newtoxins] units of toxins" - else - message = "No canister found" - src.updateUsrDialog() - return diff --git a/code/unused/mining/machine_purifier_unused.dm b/code/unused/mining/machine_purifier_unused.dm deleted file mode 100644 index 1dd47a4fc3e..00000000000 --- a/code/unused/mining/machine_purifier_unused.dm +++ /dev/null @@ -1,88 +0,0 @@ -/**********************Mineral purifier (not used, replaced with mineral processing unit)**************************/ - -/obj/machinery/mineral/purifier - name = "Ore Purifier" - desc = "A machine which makes building material out of ores" - icon = 'icons/obj/computer.dmi' - icon_state = "aiupload" - var/obj/machinery/mineral/input = null - var/obj/machinery/mineral/output = null - var/processed = 0 - var/processing = 0 - density = 1 - anchored = 1.0 - -/obj/machinery/mineral/purifier/attack_hand(user as mob) - - if(processing == 1) - user << "The machine is processing" - return - - var/dat - dat = text("input connection status: ") - if (input) - dat += text("CONNECTED") - else - dat += text("NOT CONNECTED") - dat += text(" output connection status: ") - if (output) - dat += text("CONNECTED") - else - dat += text("NOT CONNECTED") - - dat += text(" Purify") - - dat += text(" found: [processed]") - user << browse("[dat]", "window=purifier") - -/obj/machinery/mineral/purifier/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["purify"]) - if (src.output) - processing = 1; - var/obj/item/weapon/ore/O - processed = 0; - while(locate(/obj/item/weapon/ore, input.loc)) - O = locate(/obj/item/weapon/ore, input.loc) - if (istype(O,/obj/item/weapon/ore/iron)) - new /obj/item/stack/sheet/metal(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/diamond)) - new /obj/item/stack/sheet/mineral/diamond(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/plasma)) - new /obj/item/stack/sheet/mineral/plasma(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/gold)) - new /obj/item/stack/sheet/mineral/gold(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/silver)) - new /obj/item/stack/sheet/mineral/silver(output.loc) - del(O) - if (istype(O,/obj/item/weapon/ore/uranium)) - new /obj/item/weapon/ore/mineral/uranium(output.loc) - del(O) - /*if (istype(O,/obj/item/weapon/ore/adamantine)) - new /obj/item/weapon/ore/adamantine(output.loc) - del(O)*/ //Dunno what this area does so I'll keep it commented out for now -Durandan - processed++ - sleep(5); - processing = 0; - src.updateUsrDialog() - return - - -/obj/machinery/mineral/purifier/New() - ..() - spawn( 5 ) - for (var/dir in cardinal) - src.input = locate(/obj/machinery/mineral/input, get_step(src, dir)) - if(src.input) break - for (var/dir in cardinal) - src.output = locate(/obj/machinery/mineral/output, get_step(src, dir)) - if(src.output) break - return - return diff --git a/code/unused/mining/mine_generator_unused.dm b/code/unused/mining/mine_generator_unused.dm deleted file mode 100644 index 9cc7f54ce69..00000000000 --- a/code/unused/mining/mine_generator_unused.dm +++ /dev/null @@ -1,174 +0,0 @@ -/**********************Random mine generator************************/ - -//this item is intended to give the effect of entering the mine, so that light gradually fades -/obj/effect/mine_generator - name = "Random mine generator" - anchored = 1 - unacidable = 1 - var/turf/last_loc - var/turf/target_loc - var/turf/start_loc - var/randXParam //the value of these two parameters are generated by the code itself and used to - var/randYParam //determine the random XY parameters - var/mineDirection = 3 - /* - 0 = none - 1 = N - 2 = NNW - 3 = NW - 4 = WNW - 5 = W - 6 = WSW - 7 = SW - 8 = SSW - 9 = S - 10 = SSE - 11 = SE - 12 = ESE - 13 = E - 14 = ENE - 15 = NE - 16 = NNE - */ - -/obj/effect/mine_generator/New() - last_loc = src.loc - var/i - for(i = 0; i < 50; i++) - gererateTargetLoc() - //target_loc = locate(last_loc.x + rand(5), last_loc.y + rand(5), src.z) - fillWithAsteroids() - del(src) - return - - -/obj/effect/mine_generator/proc/gererateTargetLoc() //this proc determines where the next square-room will end. - switch(mineDirection) - if(1) - randXParam = 0 - randYParam = 4 - if(2) - randXParam = 1 - randYParam = 3 - if(3) - randXParam = 2 - randYParam = 2 - if(4) - randXParam = 3 - randYParam = 1 - if(5) - randXParam = 4 - randYParam = 0 - if(6) - randXParam = 3 - randYParam = -1 - if(7) - randXParam = 2 - randYParam = -2 - if(8) - randXParam = 1 - randYParam = -3 - if(9) - randXParam = 0 - randYParam = -4 - if(10) - randXParam = -1 - randYParam = -3 - if(11) - randXParam = -2 - randYParam = -2 - if(12) - randXParam = -3 - randYParam = -1 - if(13) - randXParam = -4 - randYParam = 0 - if(14) - randXParam = -3 - randYParam = 1 - if(15) - randXParam = -2 - randYParam = 2 - if(16) - randXParam = -1 - randYParam = 3 - target_loc = last_loc - if (randXParam > 0) - target_loc = locate(target_loc.x+rand(randXParam),target_loc.y,src.z) - if (randYParam > 0) - target_loc = locate(target_loc.x,target_loc.y+rand(randYParam),src.z) - if (randXParam < 0) - target_loc = locate(target_loc.x-rand(-randXParam),target_loc.y,src.z) - if (randYParam < 0) - target_loc = locate(target_loc.x,target_loc.y-rand(-randXParam),src.z) - if (mineDirection == 1 || mineDirection == 5 || mineDirection == 9 || mineDirection == 13) //if N,S,E,W, turn quickly - if(prob(50)) - mineDirection += 2 - else - mineDirection -= 2 - if(mineDirection < 1) - mineDirection += 16 - else - if(prob(50)) - if(prob(50)) - mineDirection += 1 - else - mineDirection -= 1 - if(mineDirection < 1) - mineDirection += 16 - return - - -/obj/effect/mine_generator/proc/fillWithAsteroids() - - if(last_loc) - start_loc = last_loc - - if(start_loc && target_loc) - var/x1 - var/y1 - - var/turf/line_start = start_loc - var/turf/column = line_start - - if(start_loc.x <= target_loc.x) - if(start_loc.y <= target_loc.y) //GOING NORTH-EAST - for(y1 = start_loc.y; y1 <= target_loc.y; y1++) - for(x1 = start_loc.x; x1 <= target_loc.x; x1++) - new/turf/simulated/floor/plating/airless/asteroid(column) - column = get_step(column,EAST) - line_start = get_step(line_start,NORTH) - column = line_start - last_loc = target_loc - return - else //GOING NORTH-WEST - for(y1 = start_loc.y; y1 >= target_loc.y; y1--) - for(x1 = start_loc.x; x1 <= target_loc.x; x1++) - new/turf/simulated/floor/plating/airless/asteroid(column) - column = get_step(column,WEST) - line_start = get_step(line_start,NORTH) - column = line_start - last_loc = target_loc - return - else - if(start_loc.y <= target_loc.y) //GOING SOUTH-EAST - for(y1 = start_loc.y; y1 <= target_loc.y; y1++) - for(x1 = start_loc.x; x1 >= target_loc.x; x1--) - new/turf/simulated/floor/plating/airless/asteroid(column) - column = get_step(column,EAST) - line_start = get_step(line_start,SOUTH) - column = line_start - last_loc = target_loc - return - else //GOING SOUTH-WEST - for(y1 = start_loc.y; y1 >= target_loc.y; y1--) - for(x1 = start_loc.x; x1 >= target_loc.x; x1--) - new/turf/simulated/floor/plating/airless/asteroid(column) - column = get_step(column,WEST) - line_start = get_step(line_start,SOUTH) - column = line_start - last_loc = target_loc - return - - - return \ No newline at end of file diff --git a/code/unused/mining/rail_unused.dm b/code/unused/mining/rail_unused.dm deleted file mode 100644 index bedc268715f..00000000000 --- a/code/unused/mining/rail_unused.dm +++ /dev/null @@ -1,338 +0,0 @@ -/**********************Rail track**************************/ - -/obj/machinery/rail_track - name = "Rail track" - icon = 'icons/obj/mining.dmi' - icon_state = "rail" - dir = 2 - var/id = null //this is needed for switches to work Set to the same on the whole length of the track - anchored = 1 - -/**********************Rail intersection**************************/ - -/obj/machinery/rail_track/intersections - name = "Rail track intersection" - icon_state = "rail_intersection" - -/obj/machinery/rail_track/intersections/attack_hand(user as mob) - switch (dir) - if (1) dir = 5 - if (5) dir = 4 - if (4) dir = 9 - if (9) dir = 2 - if (2) dir = 10 - if (10) dir = 8 - if (8) dir = 6 - if (6) dir = 1 - return - -/obj/machinery/rail_track/intersections/NSE - name = "Rail track T intersection" - icon_state = "rail_intersection_NSE" - dir = 2 - -/obj/machinery/rail_track/intersections/NSE/attack_hand(user as mob) - switch (dir) - if (1) dir = 5 - if (2) dir = 5 - if (5) dir = 9 - if (9) dir = 2 - return - -/obj/machinery/rail_track/intersections/SEW - name = "Rail track T intersection" - icon_state = "rail_intersection_SEW" - dir = 8 - -/obj/machinery/rail_track/intersections/SEW/attack_hand(user as mob) - switch (dir) - if (8) dir = 6 - if (4) dir = 6 - if (6) dir = 5 - if (5) dir = 8 - return - -/obj/machinery/rail_track/intersections/NSW - name = "Rail track T intersection" - icon_state = "rail_intersection_NSW" - dir = 2 - -/obj/machinery/rail_track/intersections/NSW/attack_hand(user as mob) - switch (dir) - if (1) dir = 10 - if (2) dir = 10 - if (10) dir = 6 - if (6) dir = 2 - return - -/obj/machinery/rail_track/intersections/NEW - name = "Rail track T intersection" - icon_state = "rail_intersection_NEW" - dir = 8 - -/obj/machinery/rail_track/intersections/NEW/attack_hand(user as mob) - switch (dir) - if (4) dir = 9 - if (8) dir = 9 - if (9) dir = 10 - if (10) dir = 8 - return - -/**********************Rail switch**************************/ - -/obj/machinery/rail_switch - name = "Rail switch" - icon = 'icons/obj/mining.dmi' - icon_state = "rail" - dir = 2 - icon = 'icons/obj/recycling.dmi' - icon_state = "switch-off" - var/obj/machinery/rail_track/track = null - var/id //used for to change the track pieces - -/obj/machinery/rail_switch/New() - spawn(10) - src.track = locate(/obj/machinery/rail_track, get_step(src, NORTH)) - if(track) - id = track.id - return - -/obj/machinery/rail_switch/attack_hand(user as mob) - user << "You switch the rail track's direction" - for (var/obj/machinery/rail_track/T in world) - if (T.id == src.id) - var/obj/machinery/rail_car/C = locate(/obj/machinery/rail_car, T.loc) - if (C) - switch (T.dir) - if(1) - switch(C.direction) - if("N") C.direction = "S" - if("S") C.direction = "N" - if("E") C.direction = "S" - if("W") C.direction = "S" - if(2) - switch(C.direction) - if("N") C.direction = "S" - if("S") C.direction = "N" - if("E") C.direction = "S" - if("W") C.direction = "S" - if(4) - switch(C.direction) - if("N") C.direction = "E" - if("S") C.direction = "E" - if("E") C.direction = "W" - if("W") C.direction = "E" - if(8) - switch(C.direction) - if("N") C.direction = "E" - if("S") C.direction = "E" - if("E") C.direction = "W" - if("W") C.direction = "E" - if(5) - switch(C.direction) - if("N") C.direction = "S" - if("S") C.direction = "E" - if("E") C.direction = "S" - if("W") C.direction = "S" - if(6) - switch(C.direction) - if("N") C.direction = "S" - if("S") C.direction = "W" - if("E") C.direction = "S" - if("W") C.direction = "S" - if(9) - switch(C.direction) - if("N") C.direction = "E" - if("S") C.direction = "E" - if("E") C.direction = "N" - if("W") C.direction = "E" - if(10) - switch(C.direction) - if("N") C.direction = "W" - if("S") C.direction = "W" - if("E") C.direction = "W" - if("W") C.direction = "N" - return - -/**********************Rail car**************************/ - -/obj/machinery/rail_car - name = "Rail car" - icon = 'icons/obj/storage.dmi' - icon_state = "miningcar" - var/direction = "S" //S = south, N = north, E = east, W = west. Determines whichw ay it'll look first - var/moving = 0; - anchored = 1 - density = 1 - var/speed = 0 - var/slowing = 0 - var/atom/movable/load = null //what it's carrying - -/obj/machinery/rail_car/attack_hand(user as mob) - if (moving == 0) - processing_items.Add(src) - moving = 1 - else - processing_items.Remove(src) - moving = 0 - return - -/* -for (var/client/C) - C << "Dela." -*/ - -/obj/machinery/rail_car/MouseDrop_T(var/atom/movable/C, mob/user) - - if(user.stat) - return - - if (!istype(C) || C.anchored || get_dist(user, src) > 1 || get_dist(src,C) > 1 ) - return - - if(ismob(C)) - load(C) - - -/obj/machinery/rail_car/proc/load(var/atom/movable/C) - - if(get_dist(C, src) > 1) - return - //mode = 1 - - C.loc = src.loc - sleep(2) - C.loc = src - load = C - - C.pixel_y += 9 - if(C.layer < layer) - C.layer = layer + 0.1 - overlays += C - - if(ismob(C)) - var/mob/M = C - if(M.client) - M.client.perspective = EYE_PERSPECTIVE - M.client.eye = src - - //mode = 0 - //send_status() - -/obj/machinery/rail_car/proc/unload(var/dirn = 0) - if(!load) - return - - overlays.Cut() - - load.loc = src.loc - load.pixel_y -= 9 - load.layer = initial(load.layer) - if(ismob(load)) - var/mob/M = load - if(M.client) - M.client.perspective = MOB_PERSPECTIVE - M.client.eye = src - - - if(dirn) - step(load, dirn) - - load = null - - // in case non-load items end up in contents, dump every else too - // this seems to happen sometimes due to race conditions - // with items dropping as mobs are loaded - - for(var/atom/movable/AM in src) - AM.loc = src.loc - AM.layer = initial(AM.layer) - AM.pixel_y = initial(AM.pixel_y) - if(ismob(AM)) - var/mob/M = AM - if(M.client) - M.client.perspective = MOB_PERSPECTIVE - M.client.eye = src - -/obj/machinery/rail_car/relaymove(var/mob/user) - if(user.stat) - return - if(load == user) - unload(0) - return - -/obj/machinery/rail_car/process() - if (moving == 1) - if (slowing == 1) - if (speed > 0) - speed--; - if (speed == 0) - slowing = 0 - else - if (speed < 10) - speed++; - var/i = 0 - for (i = 0; i < speed; i++) - if (moving == 1) - switch (direction) - if ("S") - for (var/obj/machinery/rail_track/R in locate(src.x,src.y-1,src.z)) - if (R.dir == 10) - direction = "W" - if (R.dir == 9) - direction = "E" - if (R.dir == 2 || R.dir == 1 || R.dir == 10 || R.dir == 9) - for (var/mob/living/M in locate(src.x,src.y-1,src.z)) - step(M,get_dir(src,R)) - step(src,get_dir(src,R)) - break - else - moving = 0 - speed = 0 - if ("N") - for (var/obj/machinery/rail_track/R in locate(src.x,src.y+1,src.z)) - if (R.dir == 5) - direction = "E" - if (R.dir == 6) - direction = "W" - if (R.dir == 5 || R.dir == 1 || R.dir == 6 || R.dir == 2) - for (var/mob/living/M in locate(src.x,src.y+1,src.z)) - step(M,get_dir(src,R)) - step(src,get_dir(src,R)) - break - else - moving = 0 - speed = 0 - if ("E") - for (var/obj/machinery/rail_track/R in locate(src.x+1,src.y,src.z)) - if (R.dir == 6) - direction = "S" - if (R.dir == 10) - direction = "N" - if (R.dir == 4 || R.dir == 8 || R.dir == 10 || R.dir == 6) - for (var/mob/living/M in locate(src.x+1,src.y,src.z)) - step(M,get_dir(src,R)) - step(src,get_dir(src,R)) - break - else - moving = 0 - speed = 0 - if ("W") - for (var/obj/machinery/rail_track/R in locate(src.x-1,src.y,src.z)) - if (R.dir == 9) - direction = "N" - if (R.dir == 5) - direction = "S" - if (R.dir == 8 || R.dir == 9 || R.dir == 5 || R.dir == 4) - for (var/mob/living/M in locate(src.x-1,src.y,src.z)) - step(M,get_dir(src,R)) - step(src,get_dir(src,R)) - break - else - moving = 0 - speed = 0 - sleep(1) - else - processing_items.Remove(src) - moving = 0 - return \ No newline at end of file diff --git a/code/unused/mining/spaceship_builder_unused.dm b/code/unused/mining/spaceship_builder_unused.dm deleted file mode 100644 index 42b4f4e3af1..00000000000 --- a/code/unused/mining/spaceship_builder_unused.dm +++ /dev/null @@ -1,173 +0,0 @@ -/**********************Spaceship builder area definitions**************************/ - -/area/shipbuilder - requires_power = 0 - luminosity = 1 - sd_lighting = 0 - -/area/shipbuilder/station - name = "shipbuilder station" - icon_state = "teleporter" - -/area/shipbuilder/ship1 - name = "shipbuilder ship1" - icon_state = "teleporter" - -/area/shipbuilder/ship2 - name = "shipbuilder ship2" - icon_state = "teleporter" - -/area/shipbuilder/ship3 - name = "shipbuilder ship3" - icon_state = "teleporter" - -/area/shipbuilder/ship4 - name = "shipbuilder ship4" - icon_state = "teleporter" - -/area/shipbuilder/ship5 - name = "shipbuilder ship5" - icon_state = "teleporter" - -/area/shipbuilder/ship6 - name = "shipbuilder ship6" - icon_state = "teleporter" - - -/**********************Spaceship builder**************************/ - -/obj/machinery/spaceship_builder - name = "Robotic Fabricator" - icon = 'icons/obj/surgery.dmi' - icon_state = "fab-idle" - density = 1 - anchored = 1 - var/metal_amount = 0 - var/operating = 0 - var/area/currentShuttleArea = null - var/currentShuttleName = null - -/obj/machinery/spaceship_builder/proc/buildShuttle(var/shuttle) - - var/shuttleat = null - var/shuttleto = "/area/shipbuilder/station" - - var/req_metal = 0 - switch(shuttle) - if("hopper") - shuttleat = "/area/shipbuilder/ship1" - currentShuttleName = "Planet hopper" - req_metal = 25000 - if("bus") - shuttleat = "/area/shipbuilder/ship2" - currentShuttleName = "Blnder Bus" - req_metal = 60000 - if("dinghy") - shuttleat = "/area/shipbuilder/ship3" - currentShuttleName = "Space dinghy" - req_metal = 100000 - if("van") - shuttleat = "/area/shipbuilder/ship4" - currentShuttleName = "Boxvan MMDLVI" - req_metal = 120000 - if("secvan") - shuttleat = "/area/shipbuilder/ship5" - currentShuttleName = "Boxvan MMDLVI - Security edition" - req_metal = 125000 - if("station4") - shuttleat = "/area/shipbuilder/ship6" - currentShuttleName = "Space station 4" - req_metal = 250000 - - if (metal_amount - req_metal < 0) - return - - if (!shuttleat) - return - - var/area/from = locate(shuttleat) - var/area/dest = locate(shuttleto) - - if(!from || !dest) - return - - currentShuttleArea = shuttleat - from.move_contents_to(dest) - return - -/obj/machinery/spaceship_builder/proc/scrapShuttle() - - var/shuttleat = "/area/shipbuilder/station" - var/shuttleto = currentShuttleArea - - if (!shuttleto) - return - - var/area/from = locate(shuttleat) - var/area/dest = locate(shuttleto) - - if(!from || !dest) - return - - currentShuttleArea = null - currentShuttleName = null - from.move_contents_to(dest) - return - -/obj/machinery/spaceship_builder/attackby(obj/item/weapon/W as obj, mob/user as mob) - - if(operating == 1) - user << "The machine is processing" - return - - if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") - usr << "\red You don't have the dexterity to do this!" - return - - if (istype(W, /obj/item/stack/sheet/metal)) - - var/obj/item/stack/sheet/metal/M = W - user << "\blue You insert all the metal into the machine." - metal_amount += M.amount * 100 - del(M) - - else - return attack_hand(user) - return - -/obj/machinery/spaceship_builder/attack_hand(user as mob) - if(operating == 1) - user << "The machine is processing" - return - - var/dat - dat = text("Ship fabricator ") - dat += text("Current ammount of Metal: [metal_amount] ") - - if (currentShuttleArea) - dat += text("Currently building [currentShuttleName] ") - dat += text("Build the shuttle to your liking. This shuttle will be sent to the station in the event of an emergency along with a centcom emergency shuttle.") - dat += text(" Scrap current shuttle") - else - dat += text("Available ships to build: ") - dat += text("Planet hopper - Tiny, Slow, 25000 metal ") - dat += text("Blunder Bus - Small, Decent speed, 60000 metal ") - dat += text("Space dinghy - Medium size, Decent speed, 100000 metal ") - dat += text("Boxvan MMDLVIr - Medium size, Decent speed, 120000 metal ") - dat += text("Boxvan MMDLVI - Security eidition - Large, Rather slow, 125000 metal ") - dat += text("Space station 4 - Huge, Slow, 250000 metal ") - - user << browse("[dat]", "window=shipbuilder") - - -/obj/machinery/spaceship_builder/Topic(href, href_list) - if(..()) - return - usr.machine = src - src.add_fingerprint(usr) - if(href_list["ship"]) - buildShuttle(href_list["ship"]) - if(href_list["scrap"]) - scrapShuttle(href_list["ship"]) - src.updateUsrDialog() - return \ No newline at end of file diff --git a/code/unused/musicplayer.dm b/code/unused/musicplayer.dm deleted file mode 100644 index ced7630e882..00000000000 --- a/code/unused/musicplayer.dm +++ /dev/null @@ -1,15 +0,0 @@ -// this toggle doesn't save across rounds -/mob/verb/musictoggle() - set name = "Music Toggle" - if(src.be_music == 0) - src.be_music = 1 - src << "\blue Music toggled on!" - return - src.be_music = 0 - src << "\blue Music toggled off!" - -// This checks a var on each area and plays that var -/area/Entered(mob/A as mob) - if (A && src.music != "" && A.client && A.be_music != 0 && (A.music_lastplayed != src.music)) - A.music_lastplayed = src.music - A << sound(src.music, repeat = 0, wait = 0, volume = 20, channel = 1) diff --git a/code/unused/new_year.dm b/code/unused/new_year.dm deleted file mode 100644 index 9dba4f3e59c..00000000000 --- a/code/unused/new_year.dm +++ /dev/null @@ -1,138 +0,0 @@ - -/obj/effect/new_year_tree - name = "The fir" - desc = "This is a fir. Real fir on dammit spess station. You smell pine-needles." - icon = 'icons/effects/160x160.dmi' - icon_state = "new-year-tree" - anchored = 1 - opacity = 1 - density = 1 - layer = 5 - pixel_x = -64 - //pixel_y = -64 - -/obj/effect/new_year_tree/attackby(obj/item/W, mob/user) - if (istype(W, /obj/item/weapon/grab)) - return - W.loc = src - if (user.client) - user.client.screen -= W - user.u_equip(W) - var/const/bottom_right_x = 115.0 - var/const/bottom_right_y = 150.0 - var/const/top_left_x = 15.0 - var/const/top_left_y = 15.0 - var/const/bottom_med_x = top_left_x+(bottom_right_x-top_left_x)/2 - var/x = rand(top_left_x,bottom_med_x) //point in half of circumscribing rectangle - var/y = rand(top_left_y,bottom_right_y) - /* - y1=a*x1+b - y2=a*x2+b b = y2-a*x2 - - y1=a*x1+ y2-a*x2 - a*(x1-x2)+y2-y1=0 - a = (y1-y2)/(x1-x2) - */ - var/a = (top_left_y-bottom_right_y)/(top_left_x-bottom_med_x) - var/b = bottom_right_y-a*bottom_med_x - - if (a*x+b < y) //if point is above diagonal top_left -> bottom_median - x = bottom_med_x + x - top_left_x - y = bottom_right_y - y + top_left_y - var/image/I = image(W.icon, W, icon_state = W.icon_state) - I.pixel_x = x - I.pixel_y = y - overlays += I -/* -/obj/item/weapon/firbang - desc = "It is set to detonate in 10 seconds." - name = "firbang" - icon = 'icons/obj/grenade.dmi' - icon_state = "flashbang" - var/state = null - var/det_time = 100.0 - w_class = 2.0 - item_state = "flashbang" - throw_speed = 4 - throw_range = 20 - flags = FPRINT | TABLEPASS | CONDUCT - slot_flags = SLOT_BELT - -/obj/item/weapon/firbang/afterattack(atom/target as mob|obj|turf|area, mob/user as mob) - if (user.get_active_hand() == src) - if ((M_CLUMSY in usr.mutations) && prob(50)) - user << "\red Huh? How does this thing work?!" - src.state = 1 - src.icon_state = "flashbang1" - playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) - spawn( 5 ) - prime() - return - else if (!( src.state )) - user << "\red You prime the [src]! [det_time/10] seconds!" - src.state = 1 - src.icon_state = "flashbang1" - playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3) - spawn( src.det_time ) - prime() - return - user.dir = get_dir(user, target) - user.drop_item() - var/t = (isturf(target) ? target : target.loc) - walk_towards(src, t, 3) - src.add_fingerprint(user) - return - -/obj/item/weapon/firbang/attack_paw(mob/user as mob) - return src.attack_hand(user) - -/obj/item/weapon/firbang/attack_hand() - walk(src, null, null) - ..() - return - -/obj/item/weapon/firbang/proc/prime() - playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) - var/turf/T = get_turf(src) - if(T) - var/datum/effect/effect/system/harmless_smoke_spread/smoke = new - smoke.set_up(3, 0, src.loc) - smoke.attach(src) - smoke.start() - var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread - s.set_up(3, 1, src) - s.start() - new /obj/effect/new_year_tree(T) - del(src) - return - -/obj/item/weapon/firbang/attack_self(mob/user as mob) - if (!src.state) - if (M_CLUMSY in user.mutations) - user << "\red Huh? How does this thing work?!" - spawn( 5 ) - prime() - return - else - user << "\red You prime the [src]! [det_time/10] seconds!" - src.state = 1 - src.icon_state = "flashbang1" - add_fingerprint(user) - spawn( src.det_time ) - prime() - return - return - -/* -/datum/supply_packs/new_year - name = "New Year Celebration Equipment" - contains = list("/obj/item/weapon/firbang", - "/obj/item/weapon/firbang", - "/obj/item/weapon/firbang", - "/obj/item/weapon/wrapping_paper", - "/obj/item/weapon/wrapping_paper", - "/obj/item/weapon/wrapping_paper") - cost = 20 - containertype = "/obj/structure/closet/crate" - containername = "New Year Celebration crate" -*/ \ No newline at end of file diff --git a/code/unused/newcombatsystem.dm b/code/unused/newcombatsystem.dm deleted file mode 100644 index 274581a04e1..00000000000 --- a/code/unused/newcombatsystem.dm +++ /dev/null @@ -1,191 +0,0 @@ -//It's not a very big change, but I think melee will benefit from it. -//Currently will only be restricted to special training weapons to test the balancedness of the system. -//1)Knockdown, stun and weaken chances are separate and dependant on the part of the body you're aiming at -//eg a mop will be better applied to legs since it has a higher base knockdown chance than the other disabling states -//while an energy gun would be better applied to the chest because of the stunning chance. -//2)Weapons also have a parry chance which is checked every time the one wielding the weapon is attacked in melee -//in the area is currently aiming at and is able to defend himself. -//More ideas to come. - -//NOTES: doesn't work with armor yet - -/obj/item/weapon/training //subclass of weapons that is currently the only one that uses the alternate combat system - name = "training weapon" - desc = "A weapon for training the advanced fighting technicues" - var/chance_parry = 0 - var/chance_weaken = 0 - var/chance_stun = 0 - var/chance_knockdown = 0 - var/chance_knockout = 0 - var/chance_disarm = 0 - -//chances - 5 is low, 10 is medium, 15 is good - -/obj/item/weapon/training/axe //hard-hitting, but doesn't have much in terms of disabling people (except by killing) - name = "training axe" - icon_state = "training_axe" - /*combat stats*/ - force = 15 - chance_parry = 5 - chance_weaken = 10 - chance_stun = 5 - chance_knockdown = 5 - chance_knockout = 5 - chance_disarm = 0 - -/obj/item/weapon/training/sword //not bad attack, good at parrying and disarming - name = "training sword" - icon_state = "training_sword" - /*combat stats*/ - force = 10 - chance_parry = 15 - chance_weaken = 5 - chance_stun = 0 - chance_knockdown = 5 - chance_knockout = 0 - chance_disarm = 15 - -/obj/item/weapon/training/staff //not bad attack either, good at tripping and parrying - name = "training staff" - icon_state = "training_staff" - /*combat stats*/ - force = 10 - chance_parry = 15 - chance_weaken = 5 - chance_stun = 0 - chance_knockdown = 15 - chance_knockout = 0 - chance_disarm = 5 - -/obj/item/weapon/training/mace //worst attack, but has a good chance of stun, knockout or weaken - name = "training mace" - icon_state = "training_mace" - /*combat stats*/ - force = 5 - chance_parry = 0 - chance_weaken = 15 - chance_stun = 10 - chance_knockdown = 0 - chance_knockout = 10 - chance_disarm = 0 - -/obj/item/weapon/training/attack(target as mob, mob/user as mob) - var/target_area = attack_location(user.zone_sel.selecting) - for(var/mob/O in viewers(src,7)) - O << "\red \b [user.name] attacks [target.name] in the [target_area] with [src.name]!" - if(!target.stat && target.zone_sel.selecting == target_area) //parrying occurs here - if(istype(target.r_hand,/obj/item/weapon/training) - if(prob(target.r_hand:chance_parry)) - for(var/mob/O in viewers(src,7)) - O << "\red \b [target.name] deftly parries the attack with [target.r_hand.name]!" - return - if(istype(target.l_hand,/obj/item/weapon/training) - if(prob(target.l_hand:chance_parry)) - for(var/mob/O in viewers(src,7)) - O << "\red \b [target.name] deftly parries the attack with [target.l_hand.name]!" - return - target.adjustBruteLoss(-src.force) - - var/modifier_knockdown = 1.0 - var/modifier_knockout = 1.0 - var/modifier_stun = 1.0 - var/modifier_weaken = 1.0 - var/modifier_disarm = 0.0 - - switch(target_area) - if("eyes") - modifier_weaken = 2.0 - modifier_stun = 0.5 - modifier_knockdown = 0.0 - if("head") - modifier_stun = 0.8 - modifier_knockout = 1.5 - modifier_weaken = 1.2 - modifier_knockdown = 0.0 - if("chest") - if("right arm","r_arm") - if("left arm","l_arm") - if("right hand","r_hand") - if("left hand","l_hand") - if("groin") - if("right leg","r_leg") - if("left leg","l_leg") - if("right foot","r_foot") - if("left foot","l_foot") - - -/proc/attack_location(var/initloc = "chest") //proc to randomise actual hit loc based on where you're aiming at - var/resultloc = "chest" //also forgot hands/feet. bleh - var/percentage = rand(1,100) - switch(initloc) - if("eyes") - switch(percentage) - if(1 to 10) - resultloc = "eyes" - if(11 to 30) - resultloc = "head" - if(31 to 100) - resultloc = "chest" - if("head") - switch(percentage) - if(1 to 5) - resultloc = "eyes" - if(6 to 40) - resultloc = "head" - if(41 to 100) - resultloc = "chest" - if("chest") - switch(percentage) - if(1 to 80) - resultloc = "chest" - if(81 to 84) - resultloc = "right arm" - if(85 to 88) - resultloc = "left arm" - if(89 to 92) - resultloc = "right leg" - if(93 to 96) - resultloc = "left leg" - if(97 to 98) - resultloc = "groin" - if(99 to 100) - resultloc = "head" - if("l_arm") - switch(percentage) - if(1 to 60) - resultloc = "left arm" - if(61 to 100) - resultloc = "chest" - if("r_arm") - switch(percentage) - if(1 to 60) - resultloc = "right arm" - if(61 to 100) - resultloc = "chest" - if("groin") - switch(percentage) - if(1 to 35) - resultloc = "groin" - if(36 to 50) - resultloc = "left leg" - if(51 to 65) - resultloc = "right leg" - if(66 to 100) - resultloc = "chest" - if("l_leg") - switch(percentage) - if(1 to 60) - resultloc = "left leg" - if(61 to 70) - resultloc = "groin" - if(71 to 100) - resultloc = "chest" - if("r_leg") - switch(percentage) - if(1 to 60) - resultloc = "right leg" - if(61 to 70) - resultloc = "groin" - if(71 to 100) - resultloc = "chest" - return resultloc \ No newline at end of file diff --git a/code/unused/optics/beam.dm b/code/unused/optics/beam.dm deleted file mode 100644 index 0607989fae4..00000000000 --- a/code/unused/optics/beam.dm +++ /dev/null @@ -1,178 +0,0 @@ -// the laser beam - - -/obj/effect/beam/laser - name = "laser beam" - icon = 'icons/effects/beam.dmi' - icon_state = "full" - density = 0 - mouse_opacity = 0 - pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE - flags = TABLEPASS - var/wavelength // the (vaccuum) wavelength of the beam - var/width = 1 // 1=thin, 2=medium, 3=wide - - var/obj/effect/beam/laser/next - var/obj/effect/beam/laser/prev - var/obj/master - - New(var/atom/newloc, var/dirn, var/lambda, var/omega=1, var/half=0) - - if(!isturf(loc)) - return - - //world << "creating beam at ([newloc.x],[newloc.y]) with [dirn] [lambda] [omega] [half]" - - icon_state = "[omega]-[half ? "half" : "full"]" - dir = dirn - set_wavelength(lambda) - ..(newloc) - spawn(0) - src.propagate() - src.verbs -= /atom/movable/verb/pull - - - - proc/propagate() - var/turf/T = get_step(src, dir) - if(T) - if(T.Enter(src)) - next = new(T, dir, wavelength, width, 0) - next.prev = src - next.master = src.master - else - spawn(5) - propagate() - - - proc/remove() - if(next) - next.remove() - del(src) - - - - proc/blocked(var/atom/A) - return density || opacity -/* -/turf/Enter(atom/movable/mover as mob|obj) - if (!mover || !isturf(mover.loc)) - return 1 - - - //First, check objects to block exit that are not on the border - for(var/obj/obstacle in mover.loc) - if((obstacle.flags & ~ON_BORDER) && (mover != obstacle) && (forget != obstacle)) - if(!obstacle.CheckExit(mover, src)) - mover.Bump(obstacle, 1) - return 0 - - //Now, check objects to block exit that are on the border - for(var/obj/border_obstacle in mover.loc) - if((border_obstacle.flags & ON_BORDER) && (mover != border_obstacle) && (forget != border_obstacle)) - if(!border_obstacle.CheckExit(mover, src)) - mover.Bump(border_obstacle, 1) - return 0 - - //Next, check objects to block entry that are on the border - for(var/obj/border_obstacle in src) - if(border_obstacle.flags & ON_BORDER) - if(!border_obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != border_obstacle)) - mover.Bump(border_obstacle, 1) - return 0 - - //Then, check the turf itself - if (!src.CanPass(mover, src)) - mover.Bump(src, 1) - return 0 - - //Finally, check objects/mobs to block entry that are not on the border - for(var/atom/movable/obstacle in src) - if(obstacle.flags & ~ON_BORDER) - if(!obstacle.CanPass(mover, mover.loc, 1, 0) && (forget != obstacle)) - mover.Bump(obstacle, 1) - return 0 - return 1 //Nothing found to block so return success! -*/ - - - HasEntered(var/atom/movable/AM) - if(istype(AM, /obj/effect/beam)) - return - if(blocked(AM)) - remove(src) - if(prev) - prev.propagate() - else if(master) - master:turn_on() - - proc/set_wavelength(var/lambda) - - var/w = round(lambda,1) // integer wavelength - wavelength = lambda - // first look for cached version of the icon at this wavelength - var/icon/cached = beam_icons["[w]"] - if(cached) - icon = cached - - return - - // no cached version, so generate a new one - - // this maps a wavelength in the range 380-780 nm to an R,G,B,A value - var/red = 0 - var/green = 0 - var/blue = 0 - var/alpha = 0 - - switch(w) - if(380 to 439) - red = (440-w) / 60 - green = 0 - blue = 1 - if(440 to 489) - red = 0 - green = (w-440) / 50 - blue = 1 - if(490 to 509) - red = 0 - green = 1 - blue = (510 - w) / 20 - if(510 to 579) - red = (w-510) / 70 - green = 1 - blue = 0 - if(580 to 644) - red = 1 - green = (645-w) / 65 - blue = 0 - if(645 to 780) - red = 1 - green = 0 - blue = 0 - - // colour is done, now calculate intensity - switch(w) - if(380 to 419) - alpha = 0.75*(w-380)/40 - if(420 to 700) - alpha = 0.75 - if(701 to 780) - alpha = 0.75*(780-w)/80 - - // remap alpha by intensity gamma - if(alpha != 0) - alpha = alpha**0.80 - - var/icon/I = icon('icons/effects/beam.dmi') - I.MapColors(red,0,0,0, 0,green,0,0, 0,0,blue,0, 0,0,0,alpha, 0,0,0,0) - icon = I - - beam_icons["[w]"] = I - - - -// global cache of beam icons -// this is an assoc list mapping (integer) wavelength to icons - -var/list/beam_icons = new() \ No newline at end of file diff --git a/code/unused/optics/laser-pointer.dm b/code/unused/optics/laser-pointer.dm deleted file mode 100644 index 8838e2d3bfa..00000000000 --- a/code/unused/optics/laser-pointer.dm +++ /dev/null @@ -1,73 +0,0 @@ -// A laser pointer. Emits a (tunable) low-power laser beam -// Used for alignment and testing of the optics system - -/obj/item/device/laser_pointer - name = "laser pointer" - desc = "A portable low-power laser used for optical system alignment. The label reads: 'Danger: Class IIIa laser device. Avoid direct eye exposure." - icon = 'optics.dmi' - icon_state = "pointer0" - var/on = 0 // true if operating - var/wavelength = 632 // operation wavelength (nm) - - var/gain_peak = 632 // gain peak (nm) - var/gain_width = 35 // gain bandwidth (nm) - var/peak_output = 0.005 // max output 5 mW - layer = OBJ_LAYER + 0.1 - - w_class = 4 - m_amt = 500 - g_amt = 100 - w_amt = 200 - - var/obj/effect/beam/laser/beam // the created beam - - flags = FPRINT | CONDUCT | TABLEPASS - - attack_ai() - return - - attack_paw() - return - - attack_self(var/mob/user) - - - on = !on - if(on) - turn_on() - else - turn_off() - - updateicon() - - verb/rotate() - set name = "Rotate" - set src in view(1) - turn_off() - dir = turn(dir, -90) - if(on) turn_on() - - Move(var/atom/newloc,var/newdir) - . = ..(newloc,newdir) - if(on && . && isturf(newloc)) - turn_off() - turn_on() - return . - - proc/turn_on() - if(!isturf(loc)) - return - - beam = new(loc, dir, wavelength, 1, 1) - beam.master = src - - proc/turn_off() - if(beam) - beam.remove() - - dropped() - turn_off() - turn_on() - - proc/updateicon() - icon_state = "pointer[on]" \ No newline at end of file diff --git a/code/unused/optics/mirror.dm b/code/unused/optics/mirror.dm deleted file mode 100644 index c50d3efc044..00000000000 --- a/code/unused/optics/mirror.dm +++ /dev/null @@ -1,83 +0,0 @@ -// Mirror object -// Part of the optics system -// -// reflects laser beams -// 16 directional states 0/22.5/45/67.5deg to allow for 0/45deg beam angles - - -// ideas: -// frame/stand icon w/ mirror directional overlay -// two sets of overlay icons for 0/45 and 22.5/67.5 deg angles - -// can rotate cw/acw - need screwdriver to loosen/tighten mirror -// use wrench to anchor/unanchor frame -// if touched, gets dirty - fingerprints, which reduce reflectivity -// if dirty and hit with high-power beam, mirror may shatter -// some kind of dust accumulation with HasProximity? Could check for mob w/o labcoat etc. -// can clean with acetone+wipes - -/obj/optical/mirror - icon = 'optical.dmi' - icon_state = "mirrorA" - dir = 1 - desc = "A large, optical-grade mirror firmly mounted on a stand." - flags = FPRINT - anchored = 0 - var/rotatable = 0 // true if mirror can be rotated - var/angle = 0 // normal of mirror, 0-15. 0=N, 1=NNE, 2=NE, 3=ENE, 4=E etc - - - New() - ..() - set_angle() - - - - //set the angle from icon_state and dir - proc/set_angle() - switch(dir) - if(1) - angle = 0 - if(5) - angle = 2 - if(4) - angle = 4 - if(6) - angle = 6 - if(2) - angle = 8 - if(10) - angle = 10 - if(8) - angle = 12 - if(9) - angle = 14 - - if(icon_state == "mirrorB") // 22.5deg turned states - angle++ - return - - // set the dir and icon_state from the angle - proc/set_dir() - if(angle%2 == 1) - icon_state = "mirrorB" - else - icon_state = "mirrorA" - switch(round(angle/2)*2) - if(0) - dir = 1 - if(2) - dir = 5 - if(4) - dir = 4 - if(6) - dir = 6 - if(8) - dir = 2 - if(10) - dir = 10 - if(12) - dir = 8 - if(14) - dir = 9 - return \ No newline at end of file diff --git a/code/unused/pda2/base_os.dm b/code/unused/pda2/base_os.dm deleted file mode 100644 index a92a3381e1f..00000000000 --- a/code/unused/pda2/base_os.dm +++ /dev/null @@ -1,446 +0,0 @@ -/datum/computer/file/pda_program/os - proc - receive_os_command(list/command_list) - if((!src.holder) || (!src.master) || (!command_list) || !(command_list["command"])) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - return 0 - -//Main os program: Provides old pda interface and four programs including file browser, notes, messenger, and atmos scan - main_os - name = "ThinkOS 7" - size = 8.0 - var/mode = 0 - //Note vars - var/note = "Congratulations, your station has chosen the Thinktronic 5150 Personal Data Assistant!" - var/note_mode = 0 //0 For note editor, 1 for note browser - var/datum/computer/file/text/note_file = null //If set, save to this file. - //Messenger vars - var/list/detected_pdas = list() - var/message_on = 1 - var/message_silent = 0 //To beep or not to beep, that is the question - var/message_mode = 0 //0 for pda list, 1 for messages - var/message_tone = "beep" //Custom ringtone - var/message_note = null //Current messages in memory (Store as separate file only later??) - //File browser vars - var/datum/computer/folder/browse_folder = null - var/datum/computer/file/clipboard = null //Current file to copy - - - - receive_os_command(list/command_list) - if(..()) - return - - //world << "[command_list["command"]]" - return - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - switch(src.mode) - if(0) - dat += " PERSONAL DATA ASSISTANT" - dat += "Owner: [src.master.owner]" - - dat += " General Functions" - dat += "
Utilities" - dat += "
Notekeeper V2.5" - - if(!src.note_mode) - dat += "Edit" - dat += " | New File" - dat += " | Save" - dat += " | Load" - - dat += src.note - else - dat += " Back" - dat += " | \[[src.holding_folder.holder.file_amount - src.holding_folder.holder.file_used]\] Free " - dat += "
SpaceMessenger V4.0.5" - - if (!src.message_mode) - - dat += "Ringer: [src.message_silent == 1 ? "Off" : "On"] | " - dat += "Send / Receive: [src.message_on == 1 ? "On" : "Off"] | " - dat += "Set Ringtone | " - dat += "Messages" - - dat += "Scan " - dat += "Detected PDAs " - - dat += "
" - - else - dat += "Clear | " - dat += "Back " - - dat += " Messages" - - dat += src.message_note - dat += "" - - if(3) - //File Browser. - //To-do(?): Setting "favorite" programs to access straight from main menu - //Not sure how needed it is, not like they have to go through 500 subfolders or whatever - if((!src.browse_folder) || !(src.browse_folder.holder in src.master)) - src.browse_folder = src.holding_folder - - dat += " | Paste" - dat += " | Drive: " - dat += "\[[src.browse_folder.holder == src.master.hd ? "MAIN" : "CART"]\] " - - dat += "Contents of [browse_folder] | Drive ID:\[[src.browse_folder.holder.title]] " - dat += "Used: \[[src.browse_folder.holder.file_used]/[src.browse_folder.holder.file_amount]\] " - - dat += "
Atmospheric Readings" - - var/turf/T = get_turf_or_move(get_turf(src.master)) - if (isnull(T)) - dat += "Unable to obtain a reading." - else - var/datum/gas_mixture/environment = T.return_air() - - var/pressure = environment.return_pressure() - var/total_moles = environment.total_moles() - - dat += "Air Pressure: [round(pressure,0.1)] kPa " - - if (total_moles()) - var/o2_level = environment.oxygen/total_moles() - var/n2_level = environment.nitrogen/total_moles() - var/co2_level = environment.carbon_dioxide/total_moles() - var/plasma_level = environment.toxins/total_moles() - var/unknown_level = 1-(o2_level+n2_level+co2_level+plasma_level) - - dat += "Nitrogen: [round(n2_level*100)]% " - - dat += "Oxygen: [round(o2_level*100)]% " - - dat += "Carbon Dioxide: [round(co2_level*100)]% " - - dat += "Plasma: [round(plasma_level*100)]% " - - if(unknown_level > 0.01) - dat += "OTHER: [round(unknown_level)]% " - - dat += "Temperature: [round(environment.temperature-T0C)]°C " - - dat += " " - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["mode"]) - var/newmode = text2num(href_list["mode"]) - src.mode = max(newmode, 0) - - else if(href_list["flight"]) - src.master.toggle_light() - - else if(href_list["scanner"]) - if(src.master.scan_program) - src.master.scan_program = null - - else if(href_list["input"]) - switch(href_list["input"]) - if("tone") - var/t = input(usr, "Please enter new ringtone", src.name, src.message_tone) as text - if (!t) - return - - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - - t = copytext(sanitize(t), 1, 20) - src.message_tone = t - - if("note") - var/t = input(usr, "Please enter note", src.name, src.note) as message - if (!t) - return - - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - - t = copytext(adminscrub(t), 1, MAX_MESSAGE_LEN) - src.note = t - - - if("message") - var/obj/item/device/pda2/P = locate(href_list["target"]) - if(!P || !istype(P)) - return - - var/t = input(usr, "Please enter message", P.name, null) as text - if (!t) - return - - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - - - var/datum/signal/signal = new - signal.data["command"] = "text message" - signal.data["message"] = t - signal.data["sender"] = src.master.owner - signal.data["tag"] = "\ref[P]" - src.post_signal(signal) - src.message_note += "→ To [P.owner]: [t] " - log_pda("[usr] sent [t] to [P.owner]") - - if("rename") - var/datum/computer/file/F = locate(href_list["target"]) - if(!F || !istype(F)) - return - - var/t = input(usr, "Please enter new name", src.name, F.name) as text - t = copytext(sanitize(t), 1, 16) - if (!t) - return - if (!in_range(src.master, usr) || !(F.holder in src.master)) - return - if(F.holder.read_only) - return - F.name = capitalize(lowertext(t)) - - - else if(href_list["message_func"]) //Messenger specific topic junk - switch(href_list["message_func"]) - if("ringer") - src.message_silent = !src.message_silent - if("on") - src.message_on = !src.message_on - if("clear") - src.message_note = null - if("scan") - if(src.message_on) - src.detected_pdas = list() - var/datum/signal/signal = new - signal.data["command"] = "report pda" - src.post_signal(signal) - - else if(href_list["note_func"]) //Note program specific topic junk - switch(href_list["note_func"]) - if("new") - src.note_file = null - src.note = null - if("save") - if(src.note_file && src.note_file.holder in src.master) - src.note_file.data = src.note - else - var/datum/computer/file/text/F = new /datum/computer/file/text - if(!src.holding_folder.add_file(F)) - del(F) - else - src.note_file = F - F.data = src.note - - if("load") - var/datum/computer/file/text/T = locate(href_list["target"]) - if(!T || !istype(T)) - return - - src.note_file = T - src.note = note_file.data - src.note_mode = 0 - - if("switchmenu") - src.note_mode = !src.note_mode - - else if(href_list["browse_func"]) //File browser specific topic junk - var/datum/computer/target = locate(href_list["target"]) - switch(href_list["browse_func"]) - if("drive") - if(src.browse_folder.holder == src.master.hd && src.master.cartridge && (src.master.cartridge.root)) - src.browse_folder = src.master.cartridge.root - else - src.browse_folder = src.holding_folder - if("open") - if(!target || !istype(target)) - return - if(istype(target, /datum/computer/file/pda_program)) - if(istype(target,/datum/computer/file/pda_program/os) && (src.master.host_program)) - return - else - src.master.run_program(target) - src.master.updateSelfDialog() - return - - if("delete") - if(!target || !istype(target)) - return - src.master.delete_file(target) - - if("copy") - if(istype(target,/datum/computer/file) && (!target.holder || (target.holder in src.master.contents))) - src.clipboard = target - - if("paste") - if(istype(target,/datum/computer/folder)) - if(!src.clipboard || !src.clipboard.holder || !(src.clipboard.holder in src.master.contents)) - return - - if(!istype(src.clipboard)) - return - - src.clipboard.copy_file_to_folder(target) - - - else if(href_list["message_mode"]) - var/newmode = text2num(href_list["message_mode"]) - src.message_mode = max(newmode, 0) - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return - - receive_signal(datum/signal/signal) - if(..()) - return - - switch(signal.data["command"]) - if("text message") - if(!message_on || !signal.data["message"]) - return - var/sender = signal.data["sender"] - if(!sender) - sender = "!Unknown!" - - src.message_note += "← From [sender]: [signal.data["message"]] " - var/alert_beep = null //Don't beep if set to silent. - if(!src.message_silent) - alert_beep = src.message_tone - - src.master.display_alert(alert_beep) - src.master.updateSelfDialog() - - if("report pda") - if(!message_on) - return - - var/datum/signal/newsignal = new - newsignal.data["command"] = "reporting pda" - newsignal.data["tag"] = "\ref[signal.source]" - src.post_signal(newsignal) - - if("reporting pda") - if(!detected_pdas) - detected_pdas = new() - - if(!(signal.source in detected_pdas)) - detected_pdas += signal.source - - src.master.updateSelfDialog() - - return - - return_text_header() - if(!src.master) - return - - var/dat - - if(src.mode) - dat += " | Main Menu" - - else if (!isnull(src.master.cartridge)) - dat += " | Eject [src.master.cartridge]" - - dat += " | Refresh" - - return dat \ No newline at end of file diff --git a/code/unused/pda2/base_program.dm b/code/unused/pda2/base_program.dm deleted file mode 100644 index f5c11efc077..00000000000 --- a/code/unused/pda2/base_program.dm +++ /dev/null @@ -1,185 +0,0 @@ -//Eventual plan: Convert all datum/data to datum/computer/file -/datum/computer/file/text - name = "text" - extension = "TEXT" - size = 2.0 - var/data = null - -/datum/computer/file/record - name = "record" - extension = "REC" - - var/list/fields = list( ) - - -//base pda program - -/datum/computer/file/pda_program - name = "blank program" - extension = "PPROG" - var/obj/item/device/pda2/master = null - var/id_tag = null - - os - name = "blank system program" - extension = "PSYS" - - scan - name = "blank scan program" - extension = "PSCAN" - - New(obj/holding as obj) - if(holding) - src.holder = holding - - if(istype(src.holder.loc,/obj/item/device/pda2)) - src.master = src.holder.loc - - proc - return_text() - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - //world << "Holder [holder] not in [master] of prg:[src]" - if(master.active_program == src) - master.active_program = null - return 1 - - if(!src.holder.root) - src.holder.root = new /datum/computer/folder - src.holder.root.holder = src - src.holder.root.name = "root" - - return 0 - - process() //This isn't actually used at the moment - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - if(!src.holder.root) - src.holder.root = new /datum/computer/folder - src.holder.root.holder = src - src.holder.root.name = "root" - - return 0 - - //maybe remove this, I haven't found a good use for it yet - send_os_command(list/command_list) - if(!src.master || !src.holder || src.master.host_program || !command_list) - return 1 - - if(!istype(src.master.host_program) || src.master.host_program == src) - return 1 - - src.master.host_program.receive_os_command() - - return 0 - - return_text_header() - if(!src.master || !src.holder) - return - - var/dat = " | Main Menu" - dat += " | Refresh" - - return dat - - post_signal(datum/signal/signal, newfreq) - if(master) - master.post_signal(signal, newfreq) - else - del(signal) - - transfer_holder(obj/item/weapon/disk/data/newholder,datum/computer/folder/newfolder) - - if((newholder.file_used + src.size) > newholder.file_amount) - return 0 - - if(!newholder.root) - newholder.root = new /datum/computer/folder - newholder.root.holder = newholder - newholder.root.name = "root" - - if(!newfolder) - newfolder = newholder.root - - if((src.holder && src.holder.read_only) || newholder.read_only) - return 0 - - if((src.holder) && (src.holder.root)) - src.holder.root.remove_file(src) - - newfolder.add_file(src) - - if(istype(newholder.loc,/obj/item/device/pda2)) - src.master = newholder.loc - - //world << "Setting [src.holder] to [newholder]" - src.holder = newholder - return 1 - - - receive_signal(datum/signal/signal) - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - return 0 - - - Topic(href, href_list) - if((!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(src.master.active_program != src) - return 1 - - if ((!usr.contents.Find(src.master) && (!in_range(src.master, usr) || !istype(src.master.loc, /turf))) && (!istype(usr, /mob/living/silicon))) - return 1 - - if(!(holder in src.master.contents)) - if(master.active_program == src) - master.active_program = null - return 1 - - usr.machine = src.master - - if (href_list["close"]) - usr.machine = null - usr << browse(null, "window=pda2") - return 0 - - if (href_list["quit"]) -// src.master.processing_programs.Remove(src) - if(src.master.host_program && src.master.host_program.holder && (src.master.host_program.holder in src.master.contents)) - src.master.run_program(src.master.host_program) - src.master.updateSelfDialog() - return 1 - else - src.master.active_program = null - src.master.updateSelfDialog() - return 1 - - return 0 \ No newline at end of file diff --git a/code/unused/pda2/pda2.dm b/code/unused/pda2/pda2.dm deleted file mode 100644 index fb3001c9a00..00000000000 --- a/code/unused/pda2/pda2.dm +++ /dev/null @@ -1,298 +0,0 @@ -//The advanced pea-green monochrome lcd of tomorrow. - - -//TO-DO: rearrange all this disk/data stuff so that fixed disks are the parent type -//because otherwise you have carts going into floppy drives and it's ALL MAD -/obj/item/weapon/disk/data/cartridge - name = "Cart 2.0" - desc = "A data cartridge for portable microcomputers." - icon = 'icons/obj/pda.dmi' - icon_state = "cart" - item_state = "electronic" - file_amount = 80.0 - title = "ROM Cart" - - pda2test - name = "Test Cart" - New() - ..() - src.root.add_file( new /datum/computer/file/computer_program/arcade(src)) - src.root.add_file( new /datum/computer/file/pda_program/manifest(src)) - src.root.add_file( new /datum/computer/file/pda_program/status_display(src)) - src.root.add_file( new /datum/computer/file/pda_program/signaler(src)) - src.root.add_file( new /datum/computer/file/pda_program/qm_records(src)) - src.root.add_file( new /datum/computer/file/pda_program/scan/health_scan(src)) - src.root.add_file( new /datum/computer/file/pda_program/records/security(src)) - src.root.add_file( new /datum/computer/file/pda_program/records/medical(src)) - src.read_only = 1 - - -/obj/item/device/pda2 - name = "PDA" - desc = "A portable microcomputer by Thinktronic Systems, LTD. Functionality determined by an EEPROM cartridge." - icon = 'icons/obj/pda.dmi' - icon_state = "pda" - item_state = "electronic" - w_class = 2.0 - flags = FPRINT | TABLEPASS - slow_flags = SLOT_BELT - - var/owner = null - var/default_cartridge = null // Access level defined by cartridge - var/obj/item/weapon/disk/data/cartridge/cartridge = null //current cartridge - var/datum/computer/file/pda_program/active_program = null - var/datum/computer/file/pda_program/os/host_program = null - var/datum/computer/file/pda_program/scan/scan_program = null - var/obj/item/weapon/disk/data/fixed_disk/hd = null - var/fon = 0 //Is the flashlight function on? - var/f_lum = 3 //Luminosity for the flashlight function -// var/datum/data/record/active1 = null //General -// var/datum/data/record/active2 = null //Medical -// var/datum/data/record/active3 = null //Security -// var/obj/item/weapon/integrated_uplink/uplink = null //Maybe replace uplink with some remote ~syndicate~ server - var/frequency = 1149 - var/datum/radio_frequency/radio_connection - - var/setup_default_cartridge = null //Cartridge contains job-specific programs - var/setup_drive_size = 24.0 //PDAs don't have much work room at all, really. - var/setup_system_os_path = /datum/computer/file/pda_program/os/main_os //Needs an operating system to...operate!! - - -/obj/item/device/pda2/pickup(mob/user) - if (src.fon) - src.sd_SetLuminosity(0) - user.sd_SetLuminosity(user.luminosity + src.f_lum) - -/obj/item/device/pda2/dropped(mob/user) - if (src.fon) - user.sd_SetLuminosity(user.luminosity - src.f_lum) - src.sd_SetLuminosity(src.f_lum) - -/obj/item/device/pda2/New() - ..() - spawn(5) - src.hd = new /obj/item/weapon/disk/data/fixed_disk(src) - src.hd.file_amount = src.setup_drive_size - src.hd.name = "Minidrive" - src.hd.title = "Minidrive" - - if(src.setup_system_os_path) - src.host_program = new src.setup_system_os_path - - src.hd.file_amount = max(src.hd.file_amount, src.host_program.size) - - src.host_program.transfer_holder(src.hd) - - if(radio_controller) - radio_controller.add_object(src, frequency) - - - if (src.default_cartridge) - src.cartridge = new src.setup_default_cartridge(src) -// if(src.owner) -// processing_items.Add(src) - -/obj/item/device/pda2/attack_self(mob/user as mob) - user.machine = src - - var/dat = " Warning: No owner information entered. Please swipe card. " - dat += "Retry" - else - if(src.active_program) - dat += src.active_program.return_text() - else - if(src.host_program) - src.run_program(src.host_program) - dat += src.active_program.return_text() - else - if(src.cartridge) - dat += " | Eject [src.cartridge] " - dat += " " - dat += "No System Software Loaded Security Record List" - - for (var/datum/data/record/R in data_core.general) - dat += "[R.fields["id"]]: [R.fields["name"]]" - - dat += " " - - if(1) - - dat += " Security Record" - - dat += "Back" - - if (istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)) - dat += "Name: [src.active1.fields["name"]] ID: [src.active1.fields["id"]] " - dat += "Sex: [src.active1.fields["sex"]] " - dat += "Age: [src.active1.fields["age"]] " - dat += "Fingerprint: [src.active1.fields["fingerprint"]] " - dat += "Physical Status: [src.active1.fields["p_stat"]] " - dat += "Mental Status: [src.active1.fields["m_stat"]] " - else - dat += "Record Lost! " - - dat += " " - - dat += " Security Data" - if (istype(src.active2, /datum/data/record) && data_core.security.Find(src.active2)) - dat += "Criminal Status: [src.active2.fields["criminal"]]" - - dat += "Minor Crimes: [src.active2.fields["mi_crim"]] " - dat += "Details: [src.active2.fields["mi_crim"]] " - - dat += "Major Crimes: [src.active2.fields["ma_crim"]] " - dat += "Details: [src.active2.fields["ma_crim_d"]] " - - dat += "Important Notes: " - dat += "[src.active2.fields["notes"]]" - else - dat += "Record Lost! " - - dat += " " - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["mode"]) - var/newmode = text2num(href_list["mode"]) - src.mode = max(newmode, 0) - - else if(href_list["select_rec"]) - var/datum/data/record/R = locate(href_list["select_rec"]) - var/datum/data/record/S = locate(href_list["select_rec"]) - - if (data_core.general.Find(R)) - for (var/datum/data/record/E in data_core.security) - if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - S = E - break - - src.active1 = R - src.active2 = S - - src.mode = 1 - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return - -/datum/computer/file/pda_program/records/medical - name = "Medical Records" - size = 8.0 - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - switch(src.mode) - if(0) - - dat += " Medical Record List" - for (var/datum/data/record/R in data_core.general) - dat += "[R.fields["id"]]: [R.fields["name"]]" - dat += " " - - if(1) - - dat += " Medical Record" - - dat += "Back" - - if (istype(src.active1, /datum/data/record) && data_core.general.Find(src.active1)) - dat += "Name: [src.active1.fields["name"]] ID: [src.active1.fields["id"]] " - dat += "Sex: [src.active1.fields["sex"]] " - dat += "Age: [src.active1.fields["age"]] " - dat += "Fingerprint: [src.active1.fields["fingerprint"]] " - dat += "Physical Status: [src.active1.fields["p_stat"]] " - dat += "Mental Status: [src.active1.fields["m_stat"]] " - else - dat += "Record Lost! " - - dat += " " - - dat += " Medical Data" - if (istype(src.active2, /datum/data/record) && data_core.medical.Find(src.active2)) - dat += "Blood Type: [src.active2.fields["b_type"]]" - - dat += "Minor Disabilities: [src.active2.fields["mi_dis"]] " - dat += "Details: [src.active2.fields["mi_dis_d"]] " - - dat += "Major Disabilities: [src.active2.fields["ma_dis"]] " - dat += "Details: [src.active2.fields["ma_dis_d"]] " - - dat += "Allergies: [src.active2.fields["alg"]] " - dat += "Details: [src.active2.fields["alg_d"]] " - - dat += "Current Diseases: [src.active2.fields["cdi"]] " - dat += "Details: [src.active2.fields["cdi_d"]] " - - dat += "Important Notes: [src.active2.fields["notes"]] " - else - dat += "Record Lost! " - - dat += " " - - return dat - - Topic(href, href_list) - if(..()) - return - - if(href_list["mode"]) - var/newmode = text2num(href_list["mode"]) - src.mode = max(newmode, 0) - - else if(href_list["select_rec"]) - var/datum/data/record/R = locate(href_list["select_rec"]) - var/datum/data/record/M = locate(href_list["select_rec"]) - - if (data_core.general.Find(R)) - for (var/datum/data/record/E in data_core.medical) - if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"])) - M = E - break - - src.active1 = R - src.active2 = M - - src.mode = 1 - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return \ No newline at end of file diff --git a/code/unused/pda2/scanners.dm b/code/unused/pda2/scanners.dm deleted file mode 100644 index 499b8679542..00000000000 --- a/code/unused/pda2/scanners.dm +++ /dev/null @@ -1,103 +0,0 @@ -//CONTENTS: -//Base scanner stuff -//Health scanner -//Forensic scanner -//Reagent scanner - -/datum/computer/file/pda_program/scan - return_text() - return src.return_text_header() - - proc/scan_atom(atom/A as mob|obj|turf|area) - - if( !A || (!src.holder) || (!src.master)) - return 1 - - if((!istype(holder)) || (!istype(master))) - return 1 - - if(!(holder in src.master.contents)) - if(master.scan_program == src) - master.scan_program = null - return 1 - - return 0 - - //Health analyzer program - health_scan - name = "Health Scan" - size = 8.0 - - scan_atom(atom/A as mob|obj|turf|area) - if(..()) - return - - var/mob/living/carbon/C = A - if(!istype(C)) - return - - var/dat = "\blue Analyzing Results for [C]:\n" - dat += "\blue \t Overall Status: [C.stat > 1 ? "dead" : "[C.health]% healthy"]\n" - dat += "\blue \t Damage Specifics: [C.getOxyLoss() > 50 ? "\red" : "\blue"][C.getOxyLoss()]-[C.getToxLoss() > 50 ? "\red" : "\blue"][C.getToxLoss()]-[C.getFireLoss() > 50 ? "\red" : "\blue"][C.getFireLoss()]-[C.getBruteLoss() > 50 ? "\red" : "\blue"][C.getBruteLoss()]\n" - dat += "\blue \t Key: Suffocation/Toxin/Burns/Brute\n" - dat += "\blue \t Body Temperature: [C.bodytemperature-T0C]°C ([C.bodytemperature*1.8-459.67]°F)" - if(C.virus) - dat += "\red \nWarning Virus Detected.\nName: [C.virus.name].\nType: [C.virus.spread].\nStage: [C.virus.stage]/[C.virus.max_stages].\nPossible Cure: [C.virus.cure]" - - return dat - - //Forensic scanner - forensic_scan - name = "Forensic Scan" - size = 8.0 - - scan_atom(atom/A as mob|obj|turf|area) - if(..()) - return - var/dat = null - - if(istype(A,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = A - if (!istype(H.dna, /datum/dna) || !isnull(H.gloves)) - dat += "\blue Unable to scan [A]'s fingerprints.\n" - else - dat += "\blue [H]'s Fingerprints: [md5(H.dna.uni_identity)]\n" - if ( !(H.blood_DNA.len) ) - dat += "\blue No blood found on [H]\n" - else - for(var/i = 1, i < H.blood_DNA.len, i++) - var/list/templist = H.blood_DNA[i] - user << "\blue Blood type: [templist[2]]\nDNA: [templist[1]]" - - if (!A.fingerprints) - dat += "\blue Unable to locate any fingerprints on [A]!\n" - else - var/list/L = params2list(A:fingerprints) - dat += "\blue Isolated [L.len] fingerprints.\n" - for(var/i in L) - dat += "\blue \t [i]\n" - - return dat - - - //Reagent scanning program - reagent_scan - name = "Reagent Scan" - size = 6.0 - - scan_atom(atom/A as mob|obj|turf|area) - if(..()) - return - var/dat = null - if(!isnull(A.reagents)) - if(A.reagents.reagent_list.len > 0) - var/reagents_length = A.reagents.reagent_list.len - dat += "\blue [reagents_length] chemical agent[reagents_length > 1 ? "s" : ""] found.\n" - for (var/datum/reagent/re in A.reagents.reagent_list) - dat += "\blue \t [re] - [re.volume]\n" - else - dat = "\blue No active chemical agents found in [A]." - else - dat = "\blue No significant chemical agents found in [A]." - - return dat diff --git a/code/unused/pda2/smallprogs.dm b/code/unused/pda2/smallprogs.dm deleted file mode 100644 index 549e8fc0f52..00000000000 --- a/code/unused/pda2/smallprogs.dm +++ /dev/null @@ -1,204 +0,0 @@ -//Assorted small programs not worthy of their own file -//CONTENTS: -//Crew Manifest viewer -//Status display controller -//Remote signaling program -//Cargo orders monitor - -//Manifest -/datum/computer/file/pda_program/manifest - name = "Manifest" - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - dat += " Crew Manifest" - dat += "Entries cannot be modified from this terminal." - - for (var/datum/data/record/t in data_core.general) - dat += "[t.fields["name"]] - [t.fields["rank"]] " - dat += " " - - return dat - -//Status Display -/datum/computer/file/pda_program/status_display - name = "Status Controller" - size = 8.0 - var/message1 // For custom messages on the displays. - var/message2 - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - dat += " Station Status Display Interlink" - - dat += "\[ Clear \]" - dat += "\[ Shuttle ETA \] " - dat += "\[ Message \]" - - dat += "
" - dat += "\[ Alert: None |" - - dat += " Red Alert |" - dat += " Lockdown |" - dat += " Biohazard \] " - - return dat - - - Topic(href, href_list) - if(..()) - return - - if(href_list["statdisp"]) - switch(href_list["statdisp"]) - if("message") - post_status("message", message1, message2) - if("alert") - post_status("alert", href_list["alert"]) - - if("setmsg1") - message1 = input("Line 1", "Enter Message Text", message1) as text|null - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - src.master.updateSelfDialog() - - if("setmsg2") - message2 = input("Line 2", "Enter Message Text", message2) as text|null - if (!src.master || !in_range(src.master, usr) && src.master.loc != usr) - return - - if(!(src.holder in src.master)) - return - - src.master.updateSelfDialog() - else - post_status(href_list["statdisp"]) - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return - - proc/post_status(var/command, var/data1, var/data2) - if(!src.master) - return - - var/datum/signal/status_signal = new - status_signal.source = src.master - status_signal.transmission_method = 1 - status_signal.data["command"] = command - - switch(command) - if("message") - status_signal.data["msg1"] = data1 - status_signal.data["msg2"] = data2 - if("alert") - status_signal.data["picture_state"] = data1 - - src.post_signal(status_signal,"1435") - -//Signaler -/datum/computer/file/pda_program/signaler - name = "Signalix 5" - size = 8.0 - var/send_freq = 1457 //Frequency signal is sent at, should be kept within normal radio ranges. - var/send_code = 30 - var/last_transmission = 0 //No signal spamming etc - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - - dat += " Remote Signaling System" - dat += {" -Send Signal- -Frequency: -- -- -[format_frequency(send_freq)] -+ -+ - -Code: -- -- -[send_code] -+ -+ "} - - return dat - - Topic(href, href_list) - if(..()) - return - - if (href_list["send"]) - if(last_transmission && world.time < (last_transmission + 5)) - return - last_transmission = world.time - spawn( 0 ) - var/time = time2text(world.realtime,"hh:mm:ss") - lastsignalers.Add("[time] : [usr.key] used [src.master] @ location ([src.master.loc.x],[src.master.loc.y],[src.master.loc.z]) : [format_frequency(send_freq)]/[send_code]") - - var/datum/signal/signal = new - signal.source = src - signal.encryption = send_code - signal.data["message"] = "ACTIVATE" - - src.post_signal(signal,"[send_freq]") - return - - else if (href_list["adj_freq"]) - src.send_freq = sanitize_frequency(src.send_freq + text2num(href_list["adj_freq"])) - - else if (href_list["adj_code"]) - src.send_code += text2num(href_list["adj_code"]) - src.send_code = round(src.send_code) - src.send_code = min(100, src.send_code) - src.send_code = max(1, src.send_code) - - src.master.add_fingerprint(usr) - src.master.updateSelfDialog() - return - -//Supply record monitor -/datum/computer/file/pda_program/qm_records - name = "Supply Records" - size = 8.0 - - return_text() - if(..()) - return - - var/dat = src.return_text_header() - dat += " Supply Record Interlink" - - dat += "Supply shuttle " - dat += "Location: [supply_shuttle_moving ? "Moving to station ([supply_shuttle_timeleft] Mins.)":supply_shuttle_at_station ? "Station":"Dock"] " - dat += "Current approved orders:
\nM - - - - - [src.f_per] + + + + + M \n" - for (var/i = 1; i <= gases.len; i++) - dat += "[gases[i]]: [(src.f_mask & 1 << (i - 1)) ? "Releasing" : "Passing"] \n" - if(gas.total_moles()) - var/totalgas = gas.total_moles() - var/pressure = round(totalgas / gas.maximum * 100) - var/nitrogen = gas.n2 / totalgas * 100 - var/oxygen = gas.oxygen / totalgas * 100 - var/plasma = gas.plasma / totalgas * 100 - var/co2 = gas.co2 / totalgas * 100 - var/no2 = gas.sl_gas / totalgas * 100 - - dat += " Gas Levels: \nPressure: [pressure]% \nNitrogen: [nitrogen]% \nOxygen: [oxygen]% \nPlasma: [plasma]% \nCO2: [co2]% \nN2O: [no2]% \n" - else - dat += " Gas Levels: \nPressure: 0% \nNitrogen: 0% \nOxygen: 0% \nPlasma: 0% \nCO2: 0% \nN2O: 0% \n" - dat += " \nClose \n" - - user << browse(dat, "window=pipefilter;size=300x365")*/ //TODO: FIX - //onclose(user, "pipefilter") - -/obj/machinery/pipefilter/Topic(href, href_list) - ..() - if(usr.restrained() || usr.lying) - return - if ((((get_dist(src, usr) <= 1 || usr.telekinesis == 1) || istype(usr, /mob/living/silicon/ai)) && istype(src.loc, /turf))) - usr.machine = src - if (href_list["close"]) - usr << browse(null, "window=pipefilter;") - usr.machine = null - return - if (src.allowed(usr) || src.emagged || src.bypassed) - if (href_list["fp"]) - src.f_per = min(max(round(src.f_per + text2num(href_list["fp"])), 0), src.maxrate) - else if (href_list["tg"]) - // toggle gas - src.f_mask ^= text2num(href_list["tg"]) - src.updateicon() - else - usr.see("\red Access Denied ([src.name] operation restricted to authorized atmospheric technicians.)") - AutoUpdateAI(src) - src.updateUsrDialog() - src.add_fingerprint(usr) - else - usr << browse(null, "window=pipefilter") - usr.machine = null - return - -/obj/machinery/pipefilter/power_change() - if(powered(ENVIRON)) - stat &= ~NOPOWER - else - stat |= NOPOWER - spawn(rand(1,15)) //so all the filters don't come on at once - updateicon() - -/obj/machinery/pipefilter/proc/updateicon() - src.overlays.Cut() - if(stat & NOPOWER) - icon_state = "filter-off" - else - icon_state = "filter" - if(emagged) //only show if powered because presumeably its the interface that has been fried - src.overlays += image('icons/obj/pipes2.dmi', "filter-emag") - if (src.f_mask & (GAS_N2O|GAS_PL)) - src.overlays += image('icons/obj/pipes2.dmi', "filter-tox") - if (src.f_mask & GAS_O2) - src.overlays += image('icons/obj/pipes2.dmi', "filter-o2") - if (src.f_mask & GAS_N2) - src.overlays += image('icons/obj/pipes2.dmi', "filter-n2") - if (src.f_mask & GAS_CO2) - src.overlays += image('icons/obj/pipes2.dmi', "filter-co2") - if(!locked) - src.overlays += image('icons/obj/pipes2.dmi', "filter-open") - if(bypassed) //should only be bypassed if unlocked - src.overlays += image('icons/obj/pipes2.dmi', "filter-bypass") \ No newline at end of file diff --git a/code/unused/powerarmor/powerarmor.dm b/code/unused/powerarmor/powerarmor.dm deleted file mode 100644 index d25dd4148d1..00000000000 --- a/code/unused/powerarmor/powerarmor.dm +++ /dev/null @@ -1,283 +0,0 @@ -/* - * File Updated to match /tg/station code standards on the 28/12/2013 (UK/GMT) by RobRichards - */ - -/obj/item/clothing/suit/space/powered - name = "Powered armor" - desc = "Not for rookies." - icon_state = "power_armour" - item_state = "swat" - w_class = 4//bulky item - - - flags = FPRINT | STOPSPRESSUREDMAGE | THICKMATERIAL - body_parts_covered = CHEST|LEGS|FEET|ARMS - armor = list(melee = 40, bullet = 30, laser = 20,energy = 15, bomb = 25, bio = 10, rad = 10) - allowed = list(/obj/item/device/flashlight,/obj/item/weapon/gun,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) - slowdown = 9 - var/fuel = 0 - - var/list/togglearmor = list(melee = 90, bullet = 70, laser = 60,energy = 40, bomb = 75, bio = 75, rad = 75) - var/active = 0 - - var/helmrequired = 1 - var/obj/item/clothing/head/space/powered/helm - - var/glovesrequired = 0 - var/obj/item/clothing/gloves/powered/gloves - - var/shoesrequired = 0 - var/obj/item/clothing/shoes/powered/shoes - //Adding gloves and shoes as possible armor components. --NEO - - var/obj/item/powerarmor/servos/servos - var/obj/item/powerarmor/reactive/reactive - var/obj/item/powerarmor/atmoseal/atmoseal - var/obj/item/powerarmor/power/power - -/obj/item/clothing/suit/space/powered/New() - verbs += /obj/item/clothing/suit/space/powered/proc/poweron - -/obj/item/clothing/suit/space/powered/proc/poweron() - set category = "Object" - set name = "Activate armor systems" - - var/mob/living/carbon/human/user = usr - - if(user.stat) - return //if you're unconscious or dead, no dicking with your armor. --NEO - - if(!istype(user)) - user << "This suit was engineered for human use only." - return - - if(user.wear_suit!=src) - user << "The suit functions best if you are inside of it." - return - - if(helmrequired && !istype(user.head, /obj/item/clothing/head/space/powered)) - user << "Helmet missing, unable to initiate power-on procedure." - return - - if(glovesrequired && !istype(user.gloves, /obj/item/clothing/gloves/powered)) - user << "Gloves missing, unable to initiate power-on procedure." - return - - if(shoesrequired && !istype(user.shoes, /obj/item/clothing/shoes/powered)) - user << "Shoes missing, unable to initiate power-on procedure." - return - - if(active) - user << "The suit is already on, you can't turn it on twice." - return - - if(!power || !power.checkpower()) - user << "Powersource missing or depleted." - return - - verbs -= /obj/item/clothing/suit/space/powered/proc/poweron - - user << "Suit interlocks engaged." - if(helmrequired) - helm = user.head - helm.flags |= NODROP - if(glovesrequired) - gloves = user.gloves - gloves.flags |= NODROP - if(shoesrequired) - shoes = user.shoes - shoes.flags |= NODROP - flags |= NODROP - sleep(20) - - if(atmoseal) - atmoseal.toggle() - sleep(20) - - if(reactive) - reactive.toggle() - sleep(20) - - if(servos) - servos.toggle() - sleep(20) - - user << "All systems online." - active = 1 - power.process() - - verbs += /obj/item/clothing/suit/space/powered/proc/poweroff - - -/obj/item/clothing/suit/space/powered/proc/poweroff() - set category = "Object" - set name = "Deactivate armor systems" - powerdown() //BYOND doesn't seem to like it if you try using a proc with vars in it as a verb, hence this. --NEO - -/obj/item/clothing/suit/space/powered/proc/powerdown(sudden = 0) - - var/delay = sudden?0:20 - - var/mob/living/carbon/human/user = usr - - if(user.stat && !sudden) - return //if you're unconscious or dead, no dicking with your armor. --NEO - - if(!active) - return - - verbs -= /obj/item/clothing/suit/space/powered/proc/poweroff - - if(sudden) - user << "Your armor loses power!" - - if(servos) - servos.toggle(sudden) - sleep(delay) - - if(reactive) - reactive.toggle(sudden) - sleep(delay) - - if(atmoseal) - if(istype(atmoseal, /obj/item/powerarmor/atmoseal/optional) && helm) - var/obj/item/powerarmor/atmoseal/optional/Atmo_seal = atmoseal - Atmo_seal.helmtoggle(sudden) - atmoseal.toggle(sudden) - - sleep(delay) - - if(!sudden) - usr << "Suit interlocks disengaged." - if(helm) - helm.flags &= ~NODROP - helm = null - if(gloves) - gloves.flags &= ~NODROP - gloves = null - if(shoes) - shoes.flags &= ~NODROP - gloves = null - flags &= ~NODROP - //Not a tabbing error, the thing only unlocks if you intentionally power-down the armor. --NEO - sleep(delay) - - if(!sudden) - usr << "All systems disengaged." - - active = 0 - verbs += /obj/item/clothing/suit/space/powered/proc/poweron - - - -/obj/item/clothing/suit/space/powered/attackby(obj/item/weapon/W as obj, mob/user as mob) - if(power && istype(power,/obj/item/powerarmor/power/plasma)) - var/obj/item/powerarmor/power/plasma/Plasma_power = power - switch(W.type) - if(/obj/item/stack/sheet/mineral/plasma) - var/obj/item/stack/sheet/mineral/plasma/P = W - if(fuel < 50) - user << "You feed some refined plasma into the armor's generator." - Plasma_power.fuel += 25 - P.amount-- - if (P.amount <= 0) - del(P) - return - else - user << "The generator already has plenty of plasma." - return - - if(/obj/item/weapon/ore/plasma) //raw plasma has impurities, so it doesn't provide as much fuel. --NEO - if(fuel < 50) - user << "You feed some plasma into the armor's generator." - Plasma_power.fuel += 15 - del(W) - return - else - user << "The generator already has plenty of plasma." - return - - ..() - -/obj/item/clothing/head/space/powered - name = "Powered armor" - icon_state = "power_armour_helmet" - desc = "Not for rookies." - flags = FPRINT | HEADCOVERSEYES | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL | BLOCKHAIR - item_state = "swat" - armor = list(melee = 40, bullet = 30, laser = 20,energy = 15, bomb = 25, bio = 10, rad = 10) - var/obj/item/clothing/suit/space/powered/parent - -/obj/item/clothing/head/space/powered/proc/atmotoggle() - set category = "Object" - set name = "Toggle helmet seals" - - var/mob/living/carbon/human/user = usr - - if(!istype(user)) - user << "This helmet is engineered for human use." - return - if(user.head != src) - user << "Can't engage the seals without wearing the helmet." - return - - if(!user.wear_suit || !istype(user.wear_suit,/obj/item/clothing/suit/space/powered)) - user << "This helmet can only couple with powered armor." - return - - var/obj/item/clothing/suit/space/powered/armor = user.wear_suit - - if(!armor.atmoseal || !istype(armor.atmoseal, /obj/item/powerarmor/atmoseal/optional)) - user << "This armor's atmospheric seals are missing or incompatible." - return - - armor.atmoseal:helmtoggle(0,1) - - - -/obj/item/clothing/gloves/powered - name = "Powered armor" - icon_state = "power_armour_gloves" - desc = "Not for rookies." - flags = FPRINT - item_state = "swat" - armor = list(melee = 40, bullet = 30, laser = 20,energy = 15, bomb = 25, bio = 10, rad = 10) - -/obj/item/clothing/shoes/powered - name = "Powered armor" - icon_state = "power_armour_boots" - desc = "Not for rookies." - flags = FPRINT - item_state = "swat" - armor = list(melee = 40, bullet = 30, laser = 20,energy = 15, bomb = 25, bio = 10, rad = 10) - - -obj/item/clothing/suit/space/powered/spawnable/badmin/New() - servos = new /obj/item/powerarmor/servos(src) - servos.parent = src - reactive = new /obj/item/powerarmor/reactive(src) - reactive.parent = src - atmoseal = new /obj/item/powerarmor/atmoseal/optional/adminbus(src) - atmoseal.parent = src - power = new /obj/item/powerarmor/power(src) - power.parent = src - - verbs += /obj/item/clothing/suit/space/powered/proc/poweron - - var/obj/item/clothing/head/space/powered/helm = new /obj/item/clothing/head/space/powered(src.loc) - helm.verbs += /obj/item/clothing/head/space/powered/proc/atmotoggle - -obj/item/clothing/suit/space/powered/spawnable/regular/New() - servos = new /obj/item/powerarmor/servos(src) - servos.parent = src - reactive = new /obj/item/powerarmor/reactive/Centcom(src) - reactive.parent = src - atmoseal = new /obj/item/powerarmor/atmoseal/optional/adminbus(src) - atmoseal.parent = src - power = new /obj/item/powerarmor/power(src) - power.parent = src - - verbs += /obj/item/clothing/suit/space/powered/proc/poweron - - var/obj/item/clothing/head/space/powered/helm = new /obj/item/clothing/head/space/powered(src.loc) - helm.verbs += /obj/item/clothing/head/space/powered/proc/atmotoggle diff --git a/code/unused/powerarmor/powerarmorcomponents.dm b/code/unused/powerarmor/powerarmorcomponents.dm deleted file mode 100644 index e4aa6ce7087..00000000000 --- a/code/unused/powerarmor/powerarmorcomponents.dm +++ /dev/null @@ -1,277 +0,0 @@ -/* - * File Updated to match /tg/station code standards on the 28/12/2013 (UK/GMT) by RobRichards - */ - -/obj/item/powerarmor - icon = 'icons/obj/PowerArmour.dmi' - icon_state = "Plates" - name = "Generic power armor component" - desc = "This is the base object, you should never see one." - var/obj/item/clothing/suit/space/powered/parent //so the component knows which armor it belongs to. - slowdown = 0 //how much the component slows down the wearer - -/obj/item/powerarmor/proc/toggle() - return - //The child objects will use this proc - - -/obj/item/powerarmor/power - name = "Adminbus power armor power source" - desc = "Runs on the rare Badminium molecule." - icon_state = "Plasma" - -/obj/item/powerarmor/process() - return - -/obj/item/powerarmor/proc/checkpower() - return 1 - -/obj/item/powerarmor/power/plasma - name = "Miniaturized plasma generator" - desc = "Runs on plasma." - slowdown = 1 - var/fuel = 0 - -/obj/item/powerarmor/power/plasma/process() - if (fuel > 0 && parent.active) - fuel-- - spawn(50) - process() - return - else if (parent.active) - parent.powerdown(1) - return - -/obj/item/powerarmor/power/plasma/checkpower() - return fuel - -/obj/item/powerarmor/power/powercell - icon_state = "Powercell" - name = "Powercell interface" - desc = "Boring, but reliable." - var/obj/item/weapon/stock_parts/cell/cell - slowdown = 0.5 - -/obj/item/powerarmor/power/powercell/process() - if (cell && cell.charge > 0 && parent.active) - cell.use(50) - spawn(50) - process() - return - else if (parent.active) - parent.powerdown(1) - return - -/obj/item/powerarmor/power/powercell/checkpower() - return max(cell.charge, 0) - -/obj/item/powerarmor/power/nuclear - icon_state = "Nuclear" - name = "Miniaturized nuclear generator" - desc = "For all your radioactive needs." - slowdown = 1.5 - -/obj/item/powerarmor/power/nuclear/process() - if(!crit_fail) - if(prob(src.reliability)) return 1 //No failure - if(prob(src.reliability)) - for (var/mob/M in range(0,src.parent)) //Only a minor failure, enjoy your radiation. - if(src.parent in M.contents) - M << "Your armor feels pleasantly warm for a moment." - else - M << "You feel a warm sensation." - M.radiation += rand(1,40) - else - for (var/mob/M in range(rand(1,4),src.parent)) //Big failure, TIME FOR RADIATION BITCHES - if (src.parent in M.contents) - M << "Your armor's reactor overloads!" - M << "You feel a wave of heat wash over you." - M.radiation += 100 - crit_fail = 1 //broken~ - parent.powerdown(1) - spawn(50) - process() - -/obj/item/powerarmor/power/nuclear/checkpower() - return !crit_fail - -/obj/item/powerarmor/reactive - icon_state = "Plates" - name = "Adminbus power armor reactive plating" - desc = "Made with the rare Badminium molecule." - var/list/togglearmor = list(melee = 250, bullet = 100, laser = 100,energy = 100, bomb = 100, bio = 100, rad = 100) - //Good lord an active energy axe does 150 damage a swing? Anyway, barring var editing, this armor loadout should be impervious to anything. Enjoy, badmins~ --NEO - -/obj/item/powerarmor/reactive/toggle(sudden = 0) - switch(parent.active) - if(1) - if(!sudden) - usr << "Reactive armor systems disengaged." - if(0) - usr << "Reactive armor systems engaged." - var/list/switchover = list() - for (var/armorvar in parent.armor) - switchover[armorvar] = togglearmor[armorvar] - togglearmor[armorvar] = parent.armor[armorvar] - parent.armor[armorvar] = switchover[armorvar] - //Probably not the most elegant way to have the vars switch over, but it works. Also propagates the values to the other objects. - if(parent.helm) - parent.helm.armor[armorvar] = parent.armor[armorvar] - if(parent.gloves) - parent.gloves.armor[armorvar] = parent.armor[armorvar] - if(parent.shoes) - parent.shoes.armor[armorvar] = parent.armor[armorvar] - -/obj/item/powerarmor/reactive/Centcom - name = "Centcom power armor reactive plating" - desc = "Pretty effective against everything, not perfect though." - togglearmor = list(melee = 90, bullet = 70, laser = 60,energy = 40, bomb = 75, bio = 75, rad = 75) - slowdown = 2 - - -/obj/item/powerarmor/servos - icon_state = "Servo" - name = "Adminbus power armor movement servos" - desc = "Made with the rare Badminium molecule." - var/toggleslowdown = 9 - -/obj/item/powerarmor/servos/toggle(sudden = 0) - switch(parent.active) - if(1) - if(!sudden) - usr << "Movement assist servos disengaged." - parent.slowdown += toggleslowdown - if(0) - usr << "Movement assist servos engaged." - parent.slowdown -= toggleslowdown - -/obj/item/powerarmor/atmoseal - icon_state = "Tubes" - name = "Power armor atmospheric seals" - desc = "Keeps the bad stuff out." - slowdown = 1 - var/sealed = 0 - -/obj/item/powerarmor/atmoseal/toggle(sudden = 0) - switch(parent.active) - if(1) - if(!sudden) - usr << "Atmospheric seals disengaged." - parent.gas_transfer_coefficient = 1 - parent.permeability_coefficient = 1 - if(parent.helmrequired) - parent.helm.gas_transfer_coefficient = 1 - parent.helm.permeability_coefficient = 1 - parent.helm.cold_protection = initial(parent.helm.cold_protection) - parent.helm.min_cold_protection_temperature = initial(parent.helm.min_cold_protection_temperature) - parent.helm.heat_protection = initial(parent.helm.heat_protection) - parent.helm.max_heat_protection_temperature = initial(parent.helm.max_heat_protection_temperature) - if(parent.glovesrequired) - parent.gloves.gas_transfer_coefficient = 1 - parent.gloves.permeability_coefficient = 1 - parent.gloves.cold_protection = initial(parent.gloves.cold_protection) - parent.gloves.min_cold_protection_temperature = initial(parent.gloves.min_cold_protection_temperature) - parent.gloves.heat_protection = initial(parent.gloves.heat_protection) - parent.gloves.max_heat_protection_temperature = initial(parent.gloves.max_heat_protection_temperature) - if(parent.shoesrequired) - parent.shoes.gas_transfer_coefficient = 1 - parent.shoes.permeability_coefficient = 1 - parent.shoes.cold_protection = initial(parent.shoes.cold_protection) - parent.shoes.min_cold_protection_temperature = initial(parent.shoes.min_cold_protection_temperature) - parent.shoes.heat_protection = initial(parent.shoes.heat_protection) - parent.shoes.max_heat_protection_temperature = initial(parent.shoes.max_heat_protection_temperature) - sealed = 0 - - if(0) - usr << "Atmospheric seals engaged." - parent.gas_transfer_coefficient = 0.01 - parent.permeability_coefficient = 0.02 - if(parent.helmrequired) - parent.helm.gas_transfer_coefficient = 0.01 - parent.helm.permeability_coefficient = 0.02 - parent.helm.cold_protection = HEAD - parent.helm.min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT - parent.helm.heat_protection = HEAD - parent.helm.max_heat_protection_temperature = SPACE_HELM_MAX_TEMP_PROTECT - if(parent.glovesrequired) - parent.gloves.gas_transfer_coefficient = 0.01 - parent.gloves.permeability_coefficient = 0.02 - parent.gloves.cold_protection = HANDS - parent.gloves.min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT - parent.gloves.heat_protection = HANDS - parent.gloves.max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT - if(parent.shoesrequired) - parent.shoes.gas_transfer_coefficient = 0.01 - parent.shoes.permeability_coefficient = 0.02 - parent.shoes.cold_protection = FEET - parent.shoes.min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT - parent.shoes.heat_protection = FEET - parent.shoes.max_heat_protection_temperature = SPACE_SUIT_MAX_TEMP_PROTECT - sealed = 1 - -/obj/item/powerarmor/atmoseal/adminbus - name = "Adminbus power armor atmospheric seals" - desc = "Made with the rare Badminium molecule." - slowdown = 0 - -/obj/item/powerarmor/atmoseal/optional - name = "Togglable power armor atmospheric seals" - desc = "Keeps the bad stuff out, but lets you remove your helmet without having to turn the whole suit off." - - -/obj/item/powerarmor/atmoseal/optional/proc/helmtoggle(sudden = 0, manual = 0) - var/mob/living/carbon/human/user = usr - var/obj/item/clothing/head/space/powered/helm - if(user.head && istype(user.head,/obj/item/clothing/head/space/powered)) - helm = user.head - - if(!sealed) - user << "Unable to initialize helmet seal, armor seals not active." - return - if(!helm.parent) - user << "Helmet locked." - helm.flags |= NODROP - parent.helm = helm - helm.parent = parent - sleep(20) - parent.helm.gas_transfer_coefficient = 0.01 - parent.helm.permeability_coefficient = 0.02 - parent.helm.cold_protection = HEAD - parent.helm.min_cold_protection_temperature = SPACE_HELM_MIN_TEMP_PROTECT - parent.helm.heat_protection = HEAD - parent.helm.max_heat_protection_temperature = SPACE_HELM_MAX_TEMP_PROTECT - - user << "Helmet atmospheric seals engaged." - if(manual) - for (var/armorvar in helm.armor) - helm.armor[armorvar] = parent.armor[armorvar] - return - else - if(manual) - user << "Helmet atmospheric seals disengaged." - parent.helm.gas_transfer_coefficient = 1 - parent.helm.permeability_coefficient = 1 - parent.helm.cold_protection = initial(parent.helm.cold_protection) - parent.helm.min_cold_protection_temperature = initial(parent.helm.min_cold_protection_temperature) - parent.helm.heat_protection = initial(parent.helm.heat_protection) - parent.helm.max_heat_protection_temperature = initial(parent.helm.max_heat_protection_temperature) - if(manual) - for (var/armorvar in helm.armor) - helm.armor[armorvar] = parent.reactive.togglearmor[armorvar] - if(!sudden) - if(manual) - sleep(20) - user << "Helmet unlocked." - helm.flags &= ~NODROP - parent.helm = null - helm.parent = null - - - -/obj/item/powerarmor/atmoseal/optional/adminbus - name = "Adminbus togglable power armor atmospheric seals" - desc = "Made with the rare Badminium molecule." - slowdown = 0 - - - diff --git a/code/unused/scrap.dm b/code/unused/scrap.dm deleted file mode 100644 index bd3dad3dba5..00000000000 --- a/code/unused/scrap.dm +++ /dev/null @@ -1,289 +0,0 @@ -// The scrap item -// a single object type represents all combinations of size and composition of scrap -// - - -/obj/item/scrap - name = "scrap" - icon = 'scrap.dmi' - icon_state = "1metal0" - item_state = "scrap-metal" - desc = "A piece of scrap" - var/classtext = "" - throwforce = 14.0 - m_amt = 0 - g_amt = 0 - w_amt = 0 - var/size = 1 // 1=piece, 2= few pieces, 3=small pile, 4=large pile - var/blood = 0 // 0=none, 1=blood-stained, 2=bloody - - throwforce = 8.0 - throw_speed = 1 - throw_range = 4 - w_class = 1 - flags = FPRINT | TABLEPASS | CONDUCT - -#define MAX_SCRAP 15000 // maximum content amount of a scrap pile - - -/obj/item/scrap/New() - src.verbs -= /atom/movable/verb/pull - ..() - update() - -// return a copy -/obj/item/scrap/proc/copy() - var/obj/item/scrap/ret = new() - ret.set_components(m_amt, g_amt, w_amt) - return ret - - -// set the metal, glass and waste content -/obj/item/scrap/proc/set_components(var/m, var/g, var/w) - m_amt = m - g_amt = g - w_amt = w - update() - -// returns the total amount of scrap in this pile -/obj/item/scrap/proc/total() - return m_amt + g_amt + w_amt - - -// sets the size, appearance, and description of the scrap depending on component amounts -/obj/item/scrap/proc/update() - var/total = total() - - - // determine size of pile - if(total<=400) - size = 1 - else if(total<=1600) - size = 2 - else - size = 3 - - w_class = size - - var/sizetext = "" - - switch(size) - if(1) - sizetext = "A piece of" - if(2) - sizetext = "A few pieces of" - if(3) - sizetext = "A pile of" - - // determine bloodiness - var/bloodtext = "" - switch(blood) - if(0) - bloodtext = "" - if(1) - bloodtext = "blood-stained " - if(2) - bloodtext = "bloody " - - - // find mixture and composition - var/class = 0 // 0 = mixed, 1=mostly. 2=pure - var/major = "waste" // the major component type - - var/max = 0 - - if(m_amt > max) - max = m_amt - else if(g_amt > max) - max = g_amt - else if(w_amt > max) - max = w_amt - - if(max == total) - class = 2 // pure - else if(max/total > 0.6) - class = 1 // mostly - else - class = 0 // mixed - - if(class>0) - var/remain = total - max - if(m_amt > remain) - major = "metal" - else if(g_amt > remain) - major = "glass" - else - major = "waste" - - - if(class == 1) - desc = "[sizetext] mostly [major] [bloodtext]scrap." - classtext = "mostly [major] [bloodtext]" - else - desc = "[sizetext] [bloodtext][major] scrap." - classtext = "[bloodtext][major] " - icon_state = "[size][major][blood]" - else - desc = "[sizetext] [bloodtext]mixed scrap." - classtext = "[bloodtext]mixed" - icon_state = "[size]mixed[blood]" - - if(size==0) - pixel_x = rand(-5,5) - pixel_y = rand(-5,5) - else - pixel_x = 0 - pixel_y = 0 - - // clear or set conduction flag depending on whether scrap is mostly metal - if(major=="metal") - flags |= CONDUCT - else - flags &= ~CONDUCT - - item_state = "scrap-[major]" - -// add a scrap item to this one -// if the resulting pile is too big, transfer only what will fit -// otherwise add them and deleted the added pile - -/obj/item/scrap/proc/add_scrap(var/obj/item/scrap/other, var/limit = MAX_SCRAP) - var/total = total() - var/other_total = other.total() - - if( (total + other_total) <= limit ) - m_amt += other.m_amt - g_amt += other.g_amt - w_amt += other.w_amt - - blood = (total*blood + other_total*other.blood) / (total + other_total) - del(other) - - else - var/space = limit - total - - var/m = round(other.m_amt/other_total*space, 1) - var/g = round(other.g_amt/other_total*space, 1) - var/w = round(other.w_amt/other_total*space, 1) - - m_amt += m - g_amt += g - w_amt += w - - other.m_amt -= m - other.g_amt -= g - other.w_amt -= w - - var/other_trans = m + g + w - other.update() - blood = (total*blood + other_trans*other.blood) / (total + other_trans) - - - blood = round(blood,1) - src.update() - -// limit this pile to maximum size -// return any remainder as a new scrap item (or null if none) -// note return item is not necessarily smaller than max size - -/obj/item/scrap/proc/remainder(var/limit = MAX_SCRAP) - var/total = total() - if(total > limit) - var/m = round( m_amt/total * limit, 1) - var/g = round( g_amt/total * limit, 1) - var/w = round( w_amt/total * limit, 1) - - var/obj/item/scrap/S = new() - S.set_components(m_amt - m,g_amt - g,w_amt - w) - src.set_components(m,g,w) - - return S - return null - -// if other pile of scrap tries to enter the same turf, then add that pile to this one - -/obj/item/scrap/CanPass(var/obj/item/scrap/O) - - if(istype(O)) - - src.add_scrap(O) - if(O) - return 0 // O still exists if not all could be transfered, so block it - return 1 - -/obj/item/scrap/proc/to_text() - return "[m_amt],[g_amt],[w_amt] ([total()])" - - -// attack with hand removes a single piece from a pile -/obj/item/scrap/attack_hand(mob/user) - add_fingerprint(user) - if(src.is_single_piece()) - return ..(user) - var/obj/item/scrap/S = src.get_single_piece() - S.attack_hand(user) - return - - -/obj/item/scrap/attackby(obj/item/I, mob/user) - ..() - if(istype(I, /obj/item/scrap)) - var/obj/item/scrap/S = I - if( (S.total()+src.total() ) > MAX_SCRAP ) - user << "The pile is full." - return - if(ismob(src.loc)) // can't combine scrap in hand - return - - src.add_scrap(S) - -// when dropped, try to make a pile if scrap is already there -/obj/item/scrap/dropped() - - spawn(2) // delay to allow drop postprocessing (since src may be destroyed) - for(var/obj/item/scrap/S in oview(0,src)) // excludes src itself - S.add_scrap(src) - -// return true if this is a single piece of scrap -// must be total<=400 and of single composition -/obj/item/scrap/proc/is_single_piece() - if(total() > 400) - return 0 - - var/empty = (m_amt == 0) + (g_amt == 0) + (w_amt == 0) - - return (empty==2) // must be 2 components with zero amount - - -// get a single piece of scrap from a pile -/obj/item/scrap/proc/get_single_piece() - - var/obj/item/scrap/S = new() - - var/cmp = pick(m_amt;1 , g_amt;2, w_amt;3) - - var/amount = 400 - switch(cmp) - if(1) - if(m_amt < amount) - amount = m_amt - - S.set_components(amount, 0, 0) - src.set_components(m_amt - amount, g_amt, w_amt) - - if(2) - if(g_amt < amount) - amount = g_amt - S.set_components(0, amount, 0) - src.set_components(m_amt, g_amt - amount, w_amt) - - if(3) - if(w_amt < amount) - amount = w_amt - S.set_components(0, 0, amount) - src.set_components(m_amt, g_amt, w_amt - amount) - - - return S - - diff --git a/code/unused/shuttle_engines.dm b/code/unused/shuttle_engines.dm deleted file mode 100644 index 457154db0f2..00000000000 --- a/code/unused/shuttle_engines.dm +++ /dev/null @@ -1,37 +0,0 @@ - -/obj/structure/shuttle - name = "shuttle" - icon = 'icons/turf/shuttle.dmi' - -/obj/structure/shuttle/engine - name = "engine" - density = 1 - anchored = 1.0 - -/obj/structure/shuttle/engine/heater - name = "heater" - icon_state = "heater" - -/obj/structure/shuttle/engine/platform - name = "platform" - icon_state = "platform" - -/obj/structure/shuttle/engine/propulsion - name = "propulsion" - icon_state = "propulsion" - opacity = 1 - -/obj/structure/shuttle/engine/propulsion/burst - name = "burst" - -/obj/structure/shuttle/engine/propulsion/burst/left - name = "left" - icon_state = "burst_l" - -/obj/structure/shuttle/engine/propulsion/burst/right - name = "right" - icon_state = "burst_r" - -/obj/structure/shuttle/engine/router - name = "router" - icon_state = "router" diff --git a/code/unused/siphs.dm b/code/unused/siphs.dm deleted file mode 100644 index 6104b3bc2d6..00000000000 --- a/code/unused/siphs.dm +++ /dev/null @@ -1,515 +0,0 @@ -/obj/machinery/atmoalter/siphs/New() - ..() - src.gas = new /datum/gas_mixture() - - return - -/obj/machinery/atmoalter/siphs/proc/releaseall() - src.t_status = 1 - src.t_per = max_valve - return - -/obj/machinery/atmoalter/siphs/proc/reset(valve, auto) - if(c_status!=0) - return - - if (valve < 0) - src.t_per = -valve - src.t_status = 1 - else - if (valve > 0) - src.t_per = valve - src.t_status = 2 - else - src.t_status = 3 - if (auto) - src.t_status = 4 - src.setstate() - return - -/obj/machinery/atmoalter/siphs/proc/release(amount, flag) - /* - var/T = src.loc - if (!( istype(T, /turf) )) - return - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - if (!( amount )) - return - if (!( flag )) - amount = min(amount, max_valve) - src.gas.turf_add(T, amount) - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/proc/siphon(amount, flag) - /* - var/T = src.loc - if (!( istype(T, /turf) )) - return - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - if (!( amount )) - return - if (!( flag )) - amount = min(amount, 900000.0) - src.gas.turf_take(T, amount) - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/proc/setstate() - - if(stat & NOPOWER) - icon_state = "siphon:0" - return - - if (src.holding) - src.icon_state = "siphon:T" - else - if (src.t_status != 3) - src.icon_state = "siphon:1" - else - src.icon_state = "siphon:0" - return - -/obj/machinery/atmoalter/siphs/fullairsiphon/New() - /* - ..() - if(!empty) - src.gas.oxygen = 2.73E7 - src.gas.n2 = 1.027E8 - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/fullairsiphon/port/reset(valve, auto) - - if (valve < 0) - src.t_per = -valve - src.t_status = 1 - else - if (valve > 0) - src.t_per = valve - src.t_status = 2 - else - src.t_status = 3 - if (auto) - src.t_status = 4 - src.setstate() - return - -/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent/attackby(W as obj, user as mob) - - if (istype(W, /obj/item/weapon/screwdriver)) - if (src.c_status) - src.anchored = 1 - src.c_status = 0 - else - if (locate(/obj/machinery/connector, src.loc)) - src.anchored = 1 - src.c_status = 3 - else - if (istype(W, /obj/item/weapon/wrench)) - src.alterable = !( src.alterable ) - return - -/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent/setstate() - - - if(stat & NOPOWER) - icon_state = "vent-p" - return - - if (src.t_status == 4) - src.icon_state = "vent2" - else - if (src.t_status == 3) - src.icon_state = "vent0" - else - src.icon_state = "vent1" - return - -/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent/reset(valve, auto) - - if (auto) - src.t_status = 4 - return - -/obj/machinery/atmoalter/siphs/scrubbers/process() - /* - if(stat & NOPOWER) return - - if(src.gas.temperature >= 3000) - src.melt() - - if (src.t_status != 3) - var/turf/T = src.loc - if (istype(T, /turf)) - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - if (T.firelevel < 900000.0) - src.gas.turf_add_all_oxy(T) - - else - T = null - switch(src.t_status) - if(1.0) - if( !portable() ) use_power(50, ENVIRON) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.holding.gas.transfer_from(src.gas, t) - else - if (T) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.turf_add(T, t) - if(2.0) - if( !portable() ) use_power(50, ENVIRON) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.transfer_from(src.holding.gas, t) - else - if (T) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (t > t2) - t = t2 - src.gas.turf_take(T, t) - if(4.0) - if( !portable() ) use_power(50, ENVIRON) - if (T) - if (T.firelevel > 900000.0) - src.f_time = world.time + 400 - else - if (world.time > src.f_time) - src.gas.extract_toxs(T) - if( !portable() ) use_power(150, ENVIRON) - var/contain = src.gas.total_moles() - if (contain > 1.3E8) - src.gas.turf_add(T, 1.3E8 - contain) - - src.setstate() - src.updateDialog() - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/scrubbers/air_filter/setstate() - - if(stat & NOPOWER) - icon_state = "vent-p" - return - - if (src.t_status == 4) - src.icon_state = "vent2" - else - if (src.t_status == 3) - src.icon_state = "vent0" - else - src.icon_state = "vent1" - return - -/obj/machinery/atmoalter/siphs/scrubbers/air_filter/attackby(W as obj, user as mob) - - if (istype(W, /obj/item/weapon/screwdriver)) - if (src.c_status) - src.anchored = 1 - src.c_status = 0 - else - if (locate(/obj/machinery/connector, src.loc)) - src.anchored = 1 - src.c_status = 3 - else - if (istype(W, /obj/item/weapon/wrench)) - src.alterable = !( src.alterable ) - return - -/obj/machinery/atmoalter/siphs/scrubbers/air_filter/reset(valve, auto) - - if (auto) - src.t_status = 4 - src.setstate() - return - -/obj/machinery/atmoalter/siphs/scrubbers/port/setstate() - - if(stat & NOPOWER) - icon_state = "scrubber:0" - return - - if (src.holding) - src.icon_state = "scrubber:T" - else - if (src.t_status != 3) - src.icon_state = "scrubber:1" - else - src.icon_state = "scrubber:0" - return - -/obj/machinery/atmoalter/siphs/scrubbers/port/reset(valve, auto) - - if (valve < 0) - src.t_per = -valve - src.t_status = 1 - else - if (valve > 0) - src.t_per = valve - src.t_status = 2 - else - src.t_status = 3 - if (auto) - src.t_status = 4 - src.setstate() - return - -//true if the siphon is portable (therfore no power needed) - -/obj/machinery/proc/portable() - return istype(src, /obj/machinery/atmoalter/siphs/fullairsiphon/port) || istype(src, /obj/machinery/atmoalter/siphs/scrubbers/port) - -/obj/machinery/atmoalter/siphs/power_change() - - if( portable() ) - return - - if(!powered(ENVIRON)) - spawn(rand(0,15)) - stat |= NOPOWER - setstate() - else - stat &= ~NOPOWER - setstate() - - -/obj/machinery/atmoalter/siphs/process() - /* -// var/dbg = (suffix=="d") && Debug - - if(stat & NOPOWER) return - - if (src.t_status != 3) - var/turf/T = src.loc - if (istype(T, /turf)) - if (locate(/obj/move, T)) - T = locate(/obj/move, T) - else - T = null - switch(src.t_status) - if(1.0) - if( !portable() ) use_power(50, ENVIRON) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.holding.gas.transfer_from(src.gas, t) - else - if (T) - var/t1 = src.gas.total_moles() - var/t2 = t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.turf_add(T, t) - if(2.0) - if( !portable() ) use_power(50, ENVIRON) - if (src.holding) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (src.t_per > t2) - t = t2 - src.gas.transfer_from(src.holding.gas, t) - else - if (T) - var/t1 = src.gas.total_moles() - var/t2 = src.maximum - t1 - var/t = src.t_per - if (t > t2) - t = t2 - //var/g = gas.total_moles() - //if(dbg) world.log << "VP0 : [t] from turf: [gas.total_moles()]" - //if(dbg) Air() - - src.gas.turf_take(T, t) - //if(dbg) world.log << "VP1 : now [gas.total_moles()]" - - //if(dbg) world.log << "[gas.total_moles()-g] ([t]) from turf to siph" - - //if(dbg) Air() - if(4.0) - if( !portable() ) - use_power(50, ENVIRON) - - if (T) - if (T.firelevel > 900000.0) - src.f_time = world.time + 300 - else - if (world.time > src.f_time) - var/difference = CELLSTANDARD - (T.oxygen + T.n2) - if (difference > 0) - var/t1 = src.gas.total_moles() - if (difference > t1) - difference = t1 - src.gas.turf_add(T, difference) - - src.updateDialog() - - src.setstate() - return - */ //TODO: FIX - -/obj/machinery/atmoalter/siphs/attack_ai(user as mob) - return src.attack_hand(user) - -/obj/machinery/atmoalter/siphs/attack_paw(user as mob) - - return src.attack_hand(user) - return - -/obj/machinery/atmoalter/siphs/attack_hand(var/mob/user as mob) - - if(stat & NOPOWER) return - - if(src.portable() && istype(user, /mob/living/silicon/ai)) //AI can't use portable siphons - return - - user.machine = src - var/tt - switch(src.t_status) - if(1.0) - tt = text("Releasing Siphon Stop", src, src) - if(2.0) - tt = text("Release Siphoning Stop", src, src) - if(3.0) - tt = text("Release Siphon Stopped Automatic", src, src, src) - else - tt = "Automatic equalizers are on!" - var/ct = null - switch(src.c_status) - if(1.0) - ct = text("Releasing Accept Stop", src, src) - if(2.0) - ct = text("Release Accepting Stop", src, src) - if(3.0) - ct = text("Release Accept Stopped", src, src) - else - ct = "Disconnected" - var/at = null - if (src.t_status == 4) - at = text("Automatic On Stop", src) - var/dat = text("Canister Valves [] \n\tContains/Capacity [] / [] \n\tUpper Valve Status: [] [] \n\t\tM - - - - [] + + + + M \n\tPipe Valve Status: [] \n\t\tM - - - - [] + + + + M \n \n\nClose \n\t", (!( src.alterable ) ? "Valves are locked. Unlock with wrench!" : "You can lock this interface with a wrench."), num2text(src.gas.return_pressure(), 10), num2text(src.maximum, 10), (src.t_status == 4 ? text("[]", at) : text("[]", tt)), (src.holding ? text(" (Tank ([])", src, src.holding.air_contents.return_pressure()) : null), src, num2text(max_valve, 7), src, src, src, src, src.t_per, src, src, src, src, src, num2text(max_valve, 7), ct, src, num2text(max_valve, 7), src, src, src, src, src.c_per, src, src, src, src, src, num2text(max_valve, 7), user) - user << browse(dat, "window=siphon;size=600x300") - onclose(user, "siphon") - return - -/obj/machinery/atmoalter/siphs/Topic(href, href_list) - ..() - - if (usr.stat || usr.restrained()) - return - if ((!( src.alterable )) && (!istype(usr, /mob/living/silicon/ai))) - return - if (((get_dist(src, usr) <= 1 || usr.telekinesis == 1) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon/ai))) - usr.machine = src - if (href_list["c"]) - var/c = text2num(href_list["c"]) - switch(c) - if(1.0) - src.c_status = 1 - if(2.0) - src.c_status = 2 - if(3.0) - src.c_status = 3 - else - else - if (href_list["t"]) - var/t = text2num(href_list["t"]) - if (src.t_status == 0) - return - switch(t) - if(1.0) - src.t_status = 1 - if(2.0) - src.t_status = 2 - if(3.0) - src.t_status = 3 - if(4.0) - src.t_status = 4 - src.f_time = 1 - else - else - if (href_list["tp"]) - var/tp = text2num(href_list["tp"]) - src.t_per += tp - src.t_per = min(max(round(src.t_per), 0), max_valve) - else - if (href_list["cp"]) - var/cp = text2num(href_list["cp"]) - src.c_per += cp - src.c_per = min(max(round(src.c_per), 0), max_valve) - else - if (href_list["tank"]) - var/cp = text2num(href_list["tank"]) - if (cp == 1) - src.holding.loc = src.loc - src.holding = null - if (src.t_status == 2) - src.t_status = 3 - src.updateUsrDialog() - - src.add_fingerprint(usr) - else - usr << browse(null, "window=canister") - return - return - -/obj/machinery/atmoalter/siphs/attackby(var/obj/W as obj, mob/user as mob) - - if (istype(W, /obj/item/weapon/tank)) - if (src.holding) - return - var/obj/item/weapon/tank/T = W - user.drop_item() - T.loc = src - src.holding = T - else - if (istype(W, /obj/item/weapon/screwdriver)) - var/obj/machinery/connector/con = locate(/obj/machinery/connector, src.loc) - if (src.c_status) - src.anchored = 0 - src.c_status = 0 - user.show_message("\blue You have disconnected the siphon.") - if(con) - con.connected = null - else - if (con && !con.connected) - src.anchored = 1 - src.c_status = 3 - user.show_message("\blue You have connected the siphon.") - con.connected = src - else - user.show_message("\blue There is nothing here to connect to the siphon.") - - - else - if (istype(W, /obj/item/weapon/wrench)) - src.alterable = !( src.alterable ) - if (src.alterable) - user << "\blue You unlock the interface!" - else - user << "\blue You lock the interface!" - return - - diff --git a/code/unused/spacecraft/manufacturing.dm b/code/unused/spacecraft/manufacturing.dm deleted file mode 100644 index 9036407ac5e..00000000000 --- a/code/unused/spacecraft/manufacturing.dm +++ /dev/null @@ -1,247 +0,0 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33 - -// Entirely unfinished. Mostly just bouncing ideas off the code. - - -// Smelting -// Grinding -// Spraying -// Crate - -/obj/deploycrate - icon = 'icons/obj/mining.dmi' - icon_state = "deploycrate" - density = 1 - var/payload - -/obj/deploycrate/attack_hand(mob/user as mob) - switch(payload) - if(null) - return - //if("cloner") - // make a cloner - // blah blah - for (var/mob/V in hearers(src)) - V.show_message("[src] lets out a pneumatic hiss, its panels rapdily unfolding and expanding to produce its payload.", 2) - del(src) - - -/obj/machinery/nanosprayer - icon = 'icons/obj/mining.dmi' - icon_state = "sprayer" - density = 1 - anchored = 1 - var/payload - var/hacked = 0 - var/temp = 100 - - var/usr_density = 5 - var/usr_lastupdate = 0 - - var/time_started = 0 - - var/points = 0 - var/totalpoints = 0 - - var/state = 0 // 0 - Idle, 1 - Spraying, 2 - Done, 3 - Overheated - -obj/machinery/nanosprayer/proc/update_temp() - // 1 second : 1 degree - if(src.state == 0) - var/diff = (world.time - usr_lastupdate) * 10 - temp -= diff - if(temp < 100) - temp = 100 - usr_lastupdate = world.time - return temp - else if(src.state == 1) - var/diff = (world.time - usr_lastupdate) * 10 - diff = diff * usr_density - temp += diff - usr_lastupdate = world.time - return temp - -obj/machinery/nanosprayer/process() - src.time_started = world.time - totalpoints = lentext(payload) * rand(5,10) - if(!totalpoints) - totalpoints = 1 - while(src.state == 1) - // Each unit of cost is 20 seconds - density - temp += density * rand(1,4) - sleep(200 - (usr_density * 10)) - if(src.temp > 350) - src.state = 3 - src.overheat() - return 0 - points += usr_density - if(points >= totalpoints) - src.state = 2 - src.complete() - return 1 - - -obj/machinery/nanosprayer/proc/cooldown() - while(state != 1) - sleep(200) - temp -= rand(5,20) - if(temp < 100) - temp = 100 - return - -obj/machinery/nanosprayer/proc/overheat() - return - -obj/machinery/nanosprayer/proc/complete() - src.totalpoints = 0 - src.points = 0 - spawn() cooldown() - return - -obj/machinery/nanosprayer/attack_hand(user as mob) - var/dat - if(..()) - return - dat += text("Core Temp: [temp]�C ") - dat += text("Nanocloud Density: [usr_density] million ") - dat += text("\[- / +\] ") - if(payload) - dat += text(" Task: [payload] ") - switch(state) - if(0) - dat += text("Status: Idling ") - if(1) - dat += text("Status: Spraying ") - if(2) - dat += text("Status: Spray Task Complete ") - if(3) - dat += text("Status: OVERHEATED ") - if(state == 1) - if(points <= 0) - points = 1 - var/complete = (points * 100)/totalpoints - if(complete < 0) - complete = 0 - if(complete > 100) - complete = 100 - dat += text("Progress: [complete]% ") - if(state == 2) - dat += text("Progress: 100% ") - dat += text("\[Release Payload\] ") - dat += text(" Set Task ") - dat += text("Start Spray ") - dat += text("Cancel Spray") - dat += text(" Refresh") - user << browse(" Smelt-o-Matic Control Interface") - dat += text("The red light is [src.closed ? "off" : "on"].") - dat += text("The green light is [src.locked ? "on" : "off"]. ") - switch(slag) - if(0) - dat += text("The meter is resting at zero. ") - if(1 to 2) - dat += text("The meter is wobbling at the mid-point marker. ") - if(3) - dat += text("The meter strains, displaying its maximum value. ") - else - dat += text("The meter has broken. ") - switch(state) - if(0) - dat += text("Status:Idle ") - if(1) - dat += text("Status:Smelting ") - if(2) - dat += text("Status:Cooling ") - if(3) - dat += text("Status:Cleaning ") - dat += text(" Turn key [src.locked ? "to upper-left position" : "to upper-right position"] ") - dat += text("Flip switch [src.closed ? "up" : "down"] ") - dat += text("Push large flashing yellow button ") - user << browse(" ") - - dat += text("The red light is [src.disabled ? "off" : "on"]. ") - dat += text("The green light is [src.shocked ? "off" : "on"]. ") - dat += text("The blue light is [src.hacked ? "off" : "on"]. ") -*/ - switch(src.build_status) - if("unbuilt") - dat += " Core Status: Undeployed" - dat += "Build Ship " - if("built") - dat += " Core Status: Deployed" - dat += "Move " - if("rebuilding") - dat += " Core Status: Recalibrating" - user << browse(" " - dat += " Installed Components:" - dat += "
Good morning soldier!. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow: In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations LEADER is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination. Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device. The nuclear authorization code is: [nuke_code ? nuke_code : "None provided"] Good luck, soldier! " - // P.name = "Spec. Ops. Manual" - - for (var/obj/effect/landmark/L in /area/shuttle/syndicate_elite) - if (L.name == "Syndicate-Commando-Bomb") - new /obj/effect/spawner/newbomb/timer/syndicate(L.loc) - // del(L) - - return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode. - - - proc/makeBorgDeathsquad() - var/list/mob/dead/observer/candidates = list() - var/mob/dead/observer/theghost = null - var/time_passed = world.time - var/list/namelist = list("Tyr","Fenrir","Lachesis","Clotho","Atropos","Nyx") - - //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. - - for(var/mob/dead/observer/G in player_list) - spawn(0) - switch(alert(G,"Do you wish to be considered for a cyborg strike team being sent in?","Please answer in 30 seconds!","Yes","No")) - if("Yes") - if((world.time-time_passed)>300)//If more than 30 game seconds passed. - return - candidates += G - if("No") - return - sleep(300) - - for(var/mob/dead/observer/G in candidates) - if(!G.client || !G.key) - candidates.Remove(G) - - if(candidates.len) - var/numagents = 3 - - //Spawns commandos and equips them. - for (var/obj/effect/landmark/L in /area/borg_deathsquad) - if(numagents<=0) - break - if (L.name == "Borg-Deathsquad") - - var/name = pick(namelist) - namelist.Remove(name) - - var/mob/living/silicon/robot/new_borg_deathsquad = create_borg_death_commando(L, name) - - - - while((!theghost || !theghost.client) && candidates.len) - theghost = pick(candidates) - candidates.Remove(theghost) - - if(!theghost) - del(new_borg_deathsquad) - break - - new_borg_deathsquad.key = theghost.key - - //So they don't forget their code or mission. - - - new_borg_deathsquad << "You are a borg deathsquad operative. Follow your laws." - numagents-- - - //Spawns the rest of the commando gear. - // for (var/obj/effect/landmark/L) - // if (L.name == "Commando_Manual") - //new /obj/item/weapon/gun/energy/pulse_rifle(L.loc) - // var/obj/item/weapon/paper/P = new(L.loc) - // P.info = "Good morning soldier!. This compact guide will familiarize you with standard operating procedure. There are three basic rules to follow: In the event that the team does not accomplish their assigned objective in a timely manner, or finds no other way to do so, attached below are instructions on how to operate a Nanotrasen Nuclear Device. Your operations LEADER is provided with a nuclear authentication disk and a pin-pointer for this reason. You may easily recognize them by their rank: Lieutenant, Captain, or Major. The nuclear device itself will be present somewhere on your destination. Hello and thank you for choosing Nanotrasen for your nuclear information needs. Today's crash course will deal with the operation of a Fission Class Nanotrasen made Nuclear Device. The nuclear authorization code is: [nuke_code ? nuke_code : "None provided"] Good luck, soldier! " - // P.name = "Spec. Ops. Manual" - - - return 1 // Has to return one before it knows if there's a wizard to prevent the parent from automatically selecting another game mode. - - - proc/makeBody(var/mob/dead/observer/G_found) // Uses stripped down and bastardized code from respawn character - if(!G_found || !G_found.key) return - - //First we spawn a dude. - var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned. - - new_character.gender = pick(MALE,FEMALE) - - var/datum/preferences/A = new() - A.randomize_appearance_for(new_character) - if(new_character.gender == MALE) - new_character.real_name = "[pick(first_names_male)] [pick(last_names)]" - else - new_character.real_name = "[pick(first_names_female)] [pick(last_names)]" - new_character.name = new_character.real_name - new_character.age = rand(17,45) - - new_character.dna.ready_dna(new_character) - new_character.key = G_found.key - - return new_character - - /proc/create_syndicate_death_commando(obj/spawn_location, syndicate_leader_selected = 0) - var/mob/living/carbon/human/new_syndicate_commando = new(spawn_location.loc) - var/syndicate_commando_leader_rank = pick("Lieutenant", "Captain", "Major") - var/syndicate_commando_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major") - var/syndicate_commando_name = pick(last_names) - - new_syndicate_commando.gender = pick(MALE, FEMALE) - - var/datum/preferences/A = new()//Randomize appearance for the commando. - A.randomize_appearance_for(new_syndicate_commando) - - new_syndicate_commando.real_name = "[!syndicate_leader_selected ? syndicate_commando_rank : syndicate_commando_leader_rank] [syndicate_commando_name]" - new_syndicate_commando.name = new_syndicate_commando.real_name - new_syndicate_commando.age = !syndicate_leader_selected ? rand(23,35) : rand(35,45) - - new_syndicate_commando.dna.ready_dna(new_syndicate_commando)//Creates DNA. - - //Creates mind stuff. - new_syndicate_commando.mind_initialize() - new_syndicate_commando.mind.assigned_role = "MODE" - new_syndicate_commando.mind.special_role = "Syndicate Commando" - - //Adds them to current traitor list. Which is really the extra antagonist list. - ticker.mode.traitors += new_syndicate_commando.mind - new_syndicate_commando.equip_syndicate_commando(syndicate_leader_selected) - - return new_syndicate_commando - - - - - - /proc/create_borg_death_commando(obj/spawn_location, name) - - var/mob/living/silicon/robot/new_borg_deathsquad = new(spawn_location.loc, 1) - - new_borg_deathsquad.real_name = name - new_borg_deathsquad.name = name - - //Creates mind stuff. - new_borg_deathsquad.mind_initialize() - new_borg_deathsquad.mind.assigned_role = "MODE" - new_borg_deathsquad.mind.special_role = "Borg Commando" - - //Adds them to current traitor list. Which is really the extra antagonist list. - ticker.mode.traitors += new_borg_deathsquad.mind - //del(spawn_location) // Commenting this out for multiple commando teams. - return new_borg_deathsquad - - - - - -/obj/machinery/computer/Borg_station - name = "Cyborg Station Terminal" - icon = 'icons/obj/computer.dmi' - icon_state = "syndishuttle" - req_access = list() - var/temp = null - var/hacked = 0 - var/jumpcomplete = 0 - -/obj/machinery/computer/Borg_station/attack_hand() - if(jumpcomplete) - return - if(alert(usr, "Are you sure you want to send a cyborg deathsquad?", "Confirmation", "Yes", "No") == "Yes") - var/area/start_location = locate(/area/borg_deathsquad/start) - var/area/end_location = locate(/area/borg_deathsquad/station) - - var/list/dstturfs = list() - var/throwy = world.maxy - - for(var/turf/T in end_location) - dstturfs += T - if(T.y < throwy) - throwy = T.y - - // hey you, get out of the way! - for(var/turf/T in dstturfs) - // find the turf to move things to - var/turf/D = locate(T.x, throwy - 1, 1) - //var/turf/E = get_step(D, SOUTH) - for(var/atom/movable/AM as mob|obj in T) - AM.Move(D) - if(istype(T, /turf/simulated)) - del(T) - - start_location.move_contents_to(end_location) - - for(var/obj/machinery/door/poddoor/P in end_location) - P.open() - jumpcomplete = 1 - command_alert("DRADIS contact! Set condition one throughout the station!") diff --git a/code/unused/toilets.dm b/code/unused/toilets.dm deleted file mode 100644 index f943a1cc548..00000000000 --- a/code/unused/toilets.dm +++ /dev/null @@ -1,96 +0,0 @@ -/* -CONTAINS: -TOILET - -/obj/item/weapon/storage/toilet - name = "toilet" - w_class = 4.0 - anchored = 1.0 - density = 0.0 - var/status = 0.0 - var/clogged = 0.0 - anchored = 1.0 - icon = 'icons/obj/stationobjs.dmi' - icon_state = "toilet" - item_state = "syringe_kit" - -/obj/item/weapon/storage/toilet/attackby(obj/item/weapon/W as obj, mob/user as mob) - ..() - if (src.contents.len >= 7) - user << "The toilet is clogged!" - return - if (istype(W, /obj/item/weapon/disk/nuclear)) - user << "This is far too important to flush!" - return - if (istype(W, /obj/item/weapon/storage/)) - return - if (istype(W, /obj/item/weapon/grab)) - playsound(src.loc, 'sound/effects/slosh.ogg', 50, 1) - for(var/mob/O in viewers(user, null)) - O << text("\blue [] gives [] a swirlie!", user, W) - return - var/t - for(var/obj/item/weapon/O in src) - t += O.w_class - t += W.w_class - if (t > 30) - user << "You cannot fit the item inside." - return - user.u_equip(W) - W.loc = src - if ((user.client && user.s_active != src)) - user.client.screen -= W - src.orient2hud(user) - W.dropped(user) - add_fingerprint(user) - for(var/mob/O in viewers(user, null)) - O.show_message(text("\blue [] has put [] in []!", user, W, src), 1) - return - -/obj/item/weapon/storage/toilet/MouseDrop_T(mob/M as mob, mob/user as mob) - if (!ticker) - user << "You can't help relieve anyone before the game starts." - return - if ((!( istype(M, /mob) ) || get_dist(src, user) > 1 || M.loc != src.loc || user.restrained() || usr.stat)) - return - if (M == usr) - for(var/mob/O in viewers(user, null)) - if ((O.client && !( O.blinded ))) - O << text("\blue [] sits on the toilet.", user) - else - for(var/mob/O in viewers(user, null)) - if ((O.client && !( O.blinded ))) - O << text("\blue [] is seated on the toilet by []!", M, user) - M.anchored = 1 - M.buckled = src - M.loc = src.loc - src.add_fingerprint(user) - return - -/obj/item/weapon/storage/toilet/attack_hand(mob/user as mob) - for(var/mob/M in src.loc) - if (M.buckled) - if (M != user) - for(var/mob/O in viewers(user, null)) - if ((O.client && !( O.blinded ))) - O << text("\blue [] is zipped up by [].", M, user) - else - for(var/mob/O in viewers(user, null)) - if ((O.client && !( O.blinded ))) - O << text("\blue [] zips up.", M) -// world << "[M] is no longer buckled to [src]" - M.anchored = 0 - M.buckled = null - src.add_fingerprint(user) - if((src.clogged < 1) || (src.contents.len < 7) || (user.loc != src.loc)) - for(var/mob/O in viewers(user, null)) - O << text("\blue [] flushes the toilet.", user) - src.clogged = 0 - src.contents.len = 0 - else if((src.clogged >= 1) || (src.contents.len >= 7) || (user.buckled != src.loc)) - for(var/mob/O in viewers(user, null)) - O << text("\blue The toilet is clogged!") - return - - -*/ \ No newline at end of file diff --git a/code/unused/traps.dm b/code/unused/traps.dm deleted file mode 100644 index 94681d1929d..00000000000 --- a/code/unused/traps.dm +++ /dev/null @@ -1,225 +0,0 @@ -/obj/effect/pressure_plate - name = "pressure plate" - desc = "A pressure plate that triggers a trap or a few of them." - density = 0 - var/list/connected_traps_names = list() //mappers, edit this when you place pressure plates on the map. don't forget to make the connected traps have an UNIQUE name - var/list/connected_traps = list() //actual references to the connected traps. leave empty, it is generated at runtime from connected_traps_names - var/trigger_type = "mob and obj" //can be "mob", "obj" or "mob and obj", the only moveable types - -/obj/effect/pressure_plate/New() - ..() - src:visibility = 0 - refresh() - -/obj/effect/pressure_plate/verb/refresh() - set name = "Refresh Pressure Plate Links" - set category = "Object" - set src in view() - connected_traps = list() //emptying the list first - for(var/trap_name in connected_traps_names) - for(var/obj/effect/trap/the_trap in world) - if(the_trap.name == trap_name) - connected_traps += the_trap //adding the trap with the matching name - -/obj/effect/pressure_plate/HasEntered(atom/victim as mob|obj) - if(victim.density && (trigger_type == "mob and obj" || (trigger_type == "mob" && istype(victim,/mob)) || (trigger_type == "obj" && istype(victim,/obj)))) - for(var/obj/effect/trap/T in connected_traps) - T.trigger(victim) - -/obj/effect/pressure_plate/Bumped(atom/victim as mob|obj) - if(victim.density && (trigger_type == "mob and obj" || (trigger_type == "mob" && istype(victim,/mob)) || (trigger_type == "obj" && istype(victim,/obj)))) - for(var/obj/effect/trap/T in connected_traps) - T.trigger(victim) - -/obj/effect/trap //has three subtypes - /aoe, /area (ie affects an entire area), /single (only the victim is affected) - name = "trap" - desc = "It's a trap!" - density = 0 - var/uses = 1 //how many times it can be triggered - var/trigger_type = "mob and obj" //can be "mob", "obj" or "mob and obj", the only moveable types. can also be "none" to not be triggered by entering its square (needs to have a pressure plate attached in that case) - var/target_type = "mob" //if it targets mobs, turfs or objs - var/include_dense = 1 //if it includes dense targets in the aoe (may be important for some reason). you'll probably want to change it to 1 if you target mobs or objs - -/obj/effect/trap/New() - ..() - src:visibility = 0 //seriously, it keeps saying "undefined var" when I try to do it in the define - -/obj/effect/trap/HasEntered(victim as mob|obj) - if(trigger_type == "mob and obj" || (trigger_type == "mob" && istype(victim,/mob)) || (trigger_type == "obj" && istype(victim,/obj))) - trigger(victim) - -/obj/effect/trap/Bumped(victim as mob|obj) - if(trigger_type == "mob and obj" || (trigger_type == "mob" && istype(victim,/mob)) || (trigger_type == "obj" && istype(victim,/obj))) - trigger(victim) - -/obj/effect/trap/proc/trigger(victim) - if(!uses) - return - uses-- - activate(victim) - -/obj/effect/trap/proc/activate() - -/obj/effect/trap/aoe - name = "aoe trap" - desc = "This trap affects a number of mobs, turfs or objs in an aoe" - var/aoe_radius = 3 //radius of aoe - var/aoe_range_or_view = "view" //if it includes all tiles in [radius] range or view - -/obj/effect/trap/aoe/proc/picktargets() - - var/list/targets = list() - - switch(target_type) - if("turf") - switch(aoe_range_or_view) - if("view") - for(var/turf/T in view(src,aoe_radius)) - if(!T.density || include_dense) - targets += T - if("range") - for(var/turf/T in range(src,aoe_radius)) - if(!T.density || include_dense) - targets += T - if("mob") - switch(aoe_range_or_view) - if("view") - for(var/mob/living/M in view(src,aoe_radius)) - if(!M.density || include_dense) - targets += M - if("range") - for(var/mob/living/M in range(src,aoe_radius)) - if(!M.density || include_dense) - targets += M - if("obj") - switch(aoe_range_or_view) - if("view") - for(var/obj/O in view(src,aoe_radius)) - if(!O.density || include_dense) - targets += O - if("range") - for(var/obj/O in range(src,aoe_radius)) - if(!O.density || include_dense) - targets += O - - return targets - -/obj/effect/trap/aoe/rocksfall - name = "rocks fall trap" - desc = "Your DM must really hate you." - target_type = "turf" - include_dense = 0 - var/rocks_amt = 10 //amount of rocks falling - var/rocks_min_dmg = 50 //min damage per rock - var/rocks_max_dmg = 100 //max damage per rock - var/rocks_hit_chance = 100 //the chance for a rock to hit you - var/list/rocks_type = list() //what rocks might it drop on the target. with var editing, not even limited to rocks. - -/obj/effect/trap/aoe/rocksfall/New() - - ..() - - rocks_type = pick_rock_types() - -/obj/effect/trap/aoe/rocksfall/proc/pick_rock_types() //since we may want subtypes of the trap with completely different rock types, which is best done this way - - var/list/varieties = list() - - varieties = typesof(/obj/item/weapon/ore) - varieties -= /obj/item/weapon/ore/diamond //don't want easily available rare ores, hmm? - varieties -= /obj/item/weapon/ore/uranium - varieties -= /obj/item/weapon/ore/slag //that'd be just stupid - - return varieties - -/obj/effect/trap/aoe/rocksfall/activate() - - var/list/targets = list() - targets = picktargets() - - if(target_type == "turf") - for(var/i=0,iNetworksPlease select the networks you'd like this console to monitor. @@ -35,3 +36,4 @@ Used In File(s): \code\game\machinery\computer\camera.dm {{/for}} | ||||||||||||||||||||||||||||||||||