Merge pull request #4484 from Baystation12/dev-freeze

[Standby] Dev freeze 0.1.9 staging
This commit is contained in:
DJSnapshot
2014-02-28 13:15:32 -08:00
195 changed files with 9753 additions and 7556 deletions
+9 -5
View File
@@ -372,11 +372,9 @@
#include "code\game\machinery\doors\shutters.dm"
#include "code\game\machinery\doors\unpowered.dm"
#include "code\game\machinery\doors\windowdoor.dm"
#include "code\game\machinery\embedded_controller\access_controller.dm"
#include "code\game\machinery\embedded_controller\airlock_controller.dm"
#include "code\game\machinery\embedded_controller\airlock_controllers.dm"
#include "code\game\machinery\embedded_controller\airlock_program.dm"
#include "code\game\machinery\embedded_controller\embedded_controller_base.dm"
#include "code\game\machinery\embedded_controller\simple_vent_controller.dm"
#include "code\game\machinery\embedded_controller\smart_airlock_controller.dm"
#include "code\game\machinery\kitchen\gibber.dm"
#include "code\game\machinery\kitchen\juicer.dm"
#include "code\game\machinery\kitchen\microwave.dm"
@@ -446,6 +444,7 @@
#include "code\game\objects\effects\decals\Cleanable\misc.dm"
#include "code\game\objects\effects\decals\Cleanable\robots.dm"
#include "code\game\objects\effects\decals\Cleanable\tracks.dm"
#include "code\game\objects\effects\decals\posters\bs12.dm"
#include "code\game\objects\effects\spawners\bombspawner.dm"
#include "code\game\objects\effects\spawners\gibspawner.dm"
#include "code\game\objects\effects\spawners\vaultspawner.dm"
@@ -1247,6 +1246,7 @@
#include "code\modules\scripting\Scanner\Tokens.dm"
#include "code\modules\security levels\keycard authentication.dm"
#include "code\modules\security levels\security levels.dm"
#include "code\modules\supermatter\supermatter.dm"
#include "code\modules\surgery\appendix.dm"
#include "code\modules\surgery\bones.dm"
#include "code\modules\surgery\braincore.dm"
@@ -1274,6 +1274,11 @@
#include "code\modules\virus2\helpers.dm"
#include "code\modules\virus2\isolator.dm"
#include "code\modules\virus2\items_devices.dm"
#include "code\TriDimension\controller.dm"
#include "code\TriDimension\Movement.dm"
#include "code\TriDimension\Pipes.dm"
#include "code\TriDimension\Structures.dm"
#include "code\TriDimension\Turfs.dm"
#include "code\WorkInProgress\autopsy.dm"
#include "code\WorkInProgress\buildmode.dm"
#include "code\WorkInProgress\explosion_particles.dm"
@@ -1320,7 +1325,6 @@
#include "code\WorkInProgress\Ported\policetape.dm"
#include "code\WorkInProgress\SkyMarshal\officer_stuff.dm"
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
#include "code\WorkInProgress\Yinadele\Supermatter.dm"
#include "code\ZAS\Airflow.dm"
#include "code\ZAS\Connection.dm"
#include "code\ZAS\Debug.dm"
@@ -154,8 +154,8 @@
if("power_toggle" in signal.data)
on = !on
if("set_direction" in signal.data)
pump_direction = text2num(signal.data["set_direction"])
if("direction" in signal.data)
pump_direction = text2num(signal.data["direction"])
if("checks" in signal.data)
pressure_checks = text2num(signal.data["checks"])
@@ -5,8 +5,6 @@ obj/machinery/atmospherics/trinary/filter
name = "Gas filter"
req_access = list(access_atmospherics)
var/on = 0
var/temp = null // -- TLE
@@ -5,8 +5,6 @@ obj/machinery/atmospherics/trinary/mixer
name = "Gas mixer"
req_access = list(access_atmospherics)
var/on = 0
var/target_pressure = ONE_ATMOSPHERE
@@ -26,7 +26,7 @@
process()
..()
if(!on)
if(!on || !network)
return 0
var/air_heat_capacity = air_contents.heat_capacity()
var/combined_heat_capacity = current_heat_capacity + air_heat_capacity
+1049 -1087
View File
File diff suppressed because it is too large Load Diff
+49 -46
View File
@@ -1,49 +1,52 @@
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."
/obj/item/weapon/tank/jetpack/verb/moveup()
set name = "Move Upwards"
set category = "Object"
if(allow_thrust(0.01, usr))
var/turf/controllerlocation = locate(1, 1, usr.z)
var/legal = 0
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
legal = controller.up
if (controller.up)
var/turf/T = locate(usr.x, usr.y, controller.up_target)
if(T && (istype(T, /turf/space) || istype(T, /turf/simulated/floor/open)))
var/blocked = 0
for(var/atom/A in T.contents)
if(A.density)
blocked = 1
usr << "\red You bump into [A.name]."
break
if(!blocked)
usr.Move(T)
usr << "You move upwards."
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
usr << "\red There is something in your way."
if (legal == 0)
usr << "There is nothing of interest in this direction."
return 1
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."
/obj/item/weapon/tank/jetpack/verb/movedown()
set name = "Move Downwards"
set category = "Object"
if(allow_thrust(0.01, usr))
var/turf/controllerlocation = locate(1, 1, usr.z)
var/legal = 0
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
legal = controller.down
if (controller.down == 1)
var/turf/T = locate(usr.x, usr.y, controller.down_target)
var/turf/S = locate(usr.x, usr.y, usr.z)
if(T && (istype(S, /turf/space) || istype(S, /turf/simulated/floor/open)))
var/blocked = 0
for(var/atom/A in T.contents)
if(A.density)
blocked = 1
usr << "\red You bump into [A.name]."
break
if(!blocked)
usr.Move(T)
usr << "You move downwards."
else
user << "\red The ship's gravity well keeps you in orbit!"
usr << "\red You cant move through the floor."
if (legal == 0)
usr << "There is nothing of interest in this direction."
return 1
+191
View File
@@ -0,0 +1,191 @@
////////////////////////////
// parent class for pipes //
////////////////////////////
obj/machinery/atmospherics/pipe/zpipe
icon = 'icons/obj/structures.dmi'
icon_state = "up"
name = "upwards pipe"
desc = "A pipe segment to connect upwards."
volume = 70
dir = SOUTH
initialize_directions = SOUTH
var/obj/machinery/atmospherics/node1 //connection on the same Z
var/obj/machinery/atmospherics/node2 //connection on the other Z
var/minimum_temperature_difference = 300
var/thermal_conductivity = 0 //WALL_HEAT_TRANSFER_COEFFICIENT No
var/maximum_pressure = 70*ONE_ATMOSPHERE
var/fatigue_pressure = 55*ONE_ATMOSPHERE
alert_pressure = 55*ONE_ATMOSPHERE
level = 1
obj/machinery/atmospherics/pipe/zpipe/New()
..()
switch(dir)
if(SOUTH)
initialize_directions = SOUTH
if(NORTH)
initialize_directions = NORTH
if(WEST)
initialize_directions = WEST
if(EAST)
initialize_directions = EAST
if(NORTHEAST)
initialize_directions = NORTH
if(NORTHWEST)
initialize_directions = WEST
if(SOUTHEAST)
initialize_directions = EAST
if(SOUTHWEST)
initialize_directions = SOUTH
initialize()
obj/machinery/atmospherics/pipe/zpipe/hide(var/i)
if(level == 1 && istype(loc, /turf/simulated))
invisibility = i ? 101 : 0
update_icon()
obj/machinery/atmospherics/pipe/up/process()
if(!parent) //This should cut back on the overhead calling build_network thousands of times per cycle
..()
else
. = PROCESS_KILL
obj/machinery/atmospherics/pipe/zpipe/check_pressure(pressure)
var/datum/gas_mixture/environment = loc.return_air()
var/pressure_difference = pressure - environment.return_pressure()
if(pressure_difference > maximum_pressure)
burst()
else if(pressure_difference > fatigue_pressure)
//TODO: leak to turf, doing pfshhhhh
if(prob(5))
burst()
else return 1
obj/machinery/atmospherics/pipe/zpipe/proc/burst()
src.visible_message("\red \bold [src] bursts!");
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
var/datum/effect/effect/system/smoke_spread/smoke = new
smoke.set_up(1,0, src.loc, 0)
smoke.start()
del(src)
obj/machinery/atmospherics/pipe/zpipe/proc/normalize_dir()
if(dir==3)
dir = 1
else if(dir==12)
dir = 4
obj/machinery/atmospherics/pipe/zpipe/Del()
if(node1)
node1.disconnect(src)
if(node2)
node2.disconnect(src)
..()
obj/machinery/atmospherics/pipe/zpipe/pipeline_expansion()
return list(node1, node2)
obj/machinery/atmospherics/pipe/zpipe/update_icon()
return
obj/machinery/atmospherics/pipe/zpipe/disconnect(obj/machinery/atmospherics/reference)
if(reference == node1)
if(istype(node1, /obj/machinery/atmospherics/pipe))
del(parent)
node1 = null
if(reference == node2)
if(istype(node2, /obj/machinery/atmospherics/pipe))
del(parent)
node2 = null
return null
/////////////////////////
// the elusive up pipe //
/////////////////////////
obj/machinery/atmospherics/pipe/zpipe/up
icon = 'icons/obj/structures.dmi'
icon_state = "up"
name = "upwards pipe"
desc = "A pipe segment to connect upwards."
obj/machinery/atmospherics/pipe/zpipe/up/initialize()
normalize_dir()
var/node1_dir
for(var/direction in cardinal)
if(direction&initialize_directions)
if (!node1_dir)
node1_dir = direction
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
var/turf/controllerlocation = locate(1, 1, src.z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.up)
var/turf/above = locate(src.x, src.y, controller.up_target)
if(above)
for(var/obj/machinery/atmospherics/target in above)
if(target.initialize_directions && istype(target, /obj/machinery/atmospherics/pipe/zpipe/down))
node2 = target
break
var/turf/T = src.loc // hide if turf is not intact
hide(T.intact)
///////////////////////
// and the down pipe //
///////////////////////
obj/machinery/atmospherics/pipe/zpipe/down
icon = 'icons/obj/structures.dmi'
icon_state = "down"
name = "downwards pipe"
desc = "A pipe segment to connect downwards."
obj/machinery/atmospherics/pipe/zpipe/down/initialize()
normalize_dir()
var/node1_dir
for(var/direction in cardinal)
if(direction&initialize_directions)
if (!node1_dir)
node1_dir = direction
for(var/obj/machinery/atmospherics/target in get_step(src,node1_dir))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
var/turf/controllerlocation = locate(1, 1, src.z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.down)
var/turf/below = locate(src.x, src.y, controller.down_target)
if(below)
for(var/obj/machinery/atmospherics/target in below)
if(target.initialize_directions && istype(target, /obj/machinery/atmospherics/pipe/zpipe/up))
node2 = target
break
var/turf/T = src.loc // hide if turf is not intact
hide(T.intact)
+154 -112
View File
@@ -3,11 +3,10 @@
///////////////////////////////////////
/obj/multiz
icon = 'code/TriDimension/multiz.dmi'
icon = 'icons/obj/structures.dmi'
density = 0
opacity = 0
anchored = 1
var/obj/multiz/target
CanPass(obj/mover, turf/source, height, airflow)
return airflow || !density
@@ -15,64 +14,140 @@
/obj/multiz/ladder
icon_state = "ladderdown"
name = "ladder"
desc = "A Ladder. You climb up and down it."
desc = "A ladder. You climb up and down it."
var/top_icon_state = "ladderdown"
var/bottom_icon_state = "ladderup"
var/d_state = 1
var/obj/multiz/target
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
proc/connect()
if(icon_state == "ladderdown") // the upper will connect to the lower
d_state = 1
var/turf/controllerlocation = locate(1, 1, z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.down)
var/turf/below = locate(src.x, src.y, controller.down_target)
for(var/obj/multiz/ladder/L in below)
if(L.icon_state == "ladderup")
target = L
L.target = src
d_state = 0
break
return
/* ex_act(severity)
switch(severity)
if(1.0)
if(icon_state == "ladderup" && prob(10))
Del()
if(2.0)
if(prob(50))
Del()
if(3.0)
Del()
return*/
Del()
spawn(1)
if(target)
if(target && icon_state == "ladderdown")
del target
return ..()
attack_paw(var/mob/M)
return attack_hand(M)
attackby(var/W, var/mob/M)
return attack_hand(M)
attackby(obj/item/C as obj, mob/user as mob)
(..)
// construction commented out for balance concerns
/* if (!target && istype(C, /obj/item/stack/rods))
var/turf/controllerlocation = locate(1, 1, z)
var/found = 0
var/obj/item/stack/rods/S = C
if(S.amount < 2)
user << "You dont have enough rods to finish the ladder."
return
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.down)
found = 1
var/turf/below = locate(src.x, src.y, controller.down_target)
var/blocked = 0
for(var/atom/A in below.contents)
if(A.density)
blocked = 1
break
if(!blocked && !istype(below, /turf/simulated/wall))
var/obj/multiz/ladder/X = new /obj/multiz/ladder(below)
S.amount = S.amount - 2
if(S.amount == 0) S.Del()
X.icon_state = "ladderup"
connect()
user << "You finish the ladder."
else
user << "The area below is blocked."
if(!found)
user << "You cant build a ladder down there."
return
else if (icon_state == "ladderdown" && d_state == 0 && istype(C, /obj/item/weapon/wrench))
user << "<span class='notice'>You start loosening the anchoring bolts which secure the ladder to the frame.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
sleep(30)
if(!user || !C) return
src.d_state = 1
if(target)
var/obj/item/stack/rods/R = new /obj/item/stack/rods(target.loc)
R.amount = 2
target.Del()
user << "<span class='notice'>You remove the bolts anchoring the ladder.</span>"
return
else if (icon_state == "ladderdown" && d_state == 1 && istype(C, /obj/item/weapon/weldingtool) )
var/obj/item/weapon/weldingtool/WT = C
if( WT.remove_fuel(0,user) )
user << "<span class='notice'>You begin to remove the ladder.</span>"
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
sleep(60)
if(!user || !WT || !WT.isOn()) return
var/obj/item/stack/sheet/metal/S = new /obj/item/stack/sheet/metal( src )
S.amount = 2
user << "<span class='notice'>You remove the ladder and close the hole.</span>"
Del()
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
else
src.attack_hand(user)
return*/
src.attack_hand(user)
return
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)
M << "The ladder is incomplete and can't be climbed."
else
var/turf/T = target.loc
var/blocked = 0
for(var/atom/A in T.contents)
if(A.density)
blocked = 1
break
if(blocked || istype(T, /turf/simulated/wall))
M << "Something is blocking the ladder."
else
M.visible_message("\blue \The [M] climbs [src.icon_state == "ladderup" ? "up" : "down"] \the [src]!", "You climb [src.icon_state == "ladderup" ? "up" : "down"] \the [src]!", "You hear some grunting, and clanging of a metal ladder being used.")
M.Move(target.loc)
hatch
/* hatch
icon_state = "hatchdown"
name = "hatch"
desc = "A hatch. You climb down it, and it will automatically seal against pressure loss behind you."
@@ -125,81 +200,48 @@
spawn(7)
top_hatch.icon_state = top_icon_state
bottom_hatch.overlays -= red_overlay
active = 0
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"
icon_state = "rampbottom"
var/obj/multiz/stairs/connected
var/turf/target
active
density = 1
New()
..()
var/turf/cl= locate(1, 1, src.z)
for(var/obj/effect/landmark/zcontroller/c in cl)
if(c.up)
var/turf/O = locate(src.x, src.y, c.up_target)
if(istype(O, /turf/space))
O.ChangeTurf(/turf/simulated/floor/open)
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)
spawn(1)
for(var/dir in cardinal)
var/turf/T = get_step(src.loc,dir)
for(var/obj/multiz/stairs/S in T)
if(S && S.icon_state == "rampbottom" && !S.connected)
S.dir = dir
src.dir = dir
S.connected = src
src.connected = S
src.icon_state = "ramptop"
src.density = 1
var/turf/controllerlocation = locate(1, 1, src.z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.up)
var/turf/above = locate(src.x, src.y, controller.up_target)
if(istype(above,/turf/space) || istype(above,/turf/simulated/floor/open))
src.target = above
break
if(target)
del target
return ..()
break
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
if(connected && target && istype(src, /obj/multiz/stairs) && locate(/obj/multiz/stairs) in M.loc)
var/obj/multiz/stairs/Con = locate(/obj/multiz/stairs) in M.loc
if(Con == src.connected) //make sure the atom enters from the approriate lower stairs tile
M.Move(target)
return
+93 -74
View File
@@ -1,27 +1,3 @@
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
@@ -31,66 +7,109 @@ atom/movable/Move() //Hackish
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()
getbelow()
return
Enter(var/atom/movable/AM)
if (..()) //TODO make this check if gravity is active (future use) - Sukasa
spawn(1)
// only fall down in defined areas (read: areas with artificial gravitiy)
if(!floorbelow) //make sure that there is actually something below
if(!getbelow())
return
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()
var/area/areacheck = get_area(src)
var/blocked = 0
var/soft = 0
for(var/atom/A in floorbelow.contents)
if(A.density)
blocked = 1
break
if(istype(A, /obj/machinery/atmospherics/pipe/zpipe/up) && istype(AM,/obj/item/pipe))
blocked = 1
break
if(istype(A, /obj/structure/disposalpipe/up) && istype(AM,/obj/item/pipe))
blocked = 1
break
if(istype(A, /obj/multiz/stairs))
soft = 1
//dont break here, since we still need to be sure that it isnt blocked
if (soft || (!blocked && !(areacheck.name == "Space")))
AM.Move(floorbelow)
if (!soft && istype(AM, /mob/living/carbon/human))
var/mob/living/carbon/human/H = AM
var/damage = 5
H.apply_damage(min(rand(-damage,damage),0), BRUTE, "head")
H.apply_damage(min(rand(-damage,damage),0), BRUTE, "chest")
H.apply_damage(min(rand(-damage,damage),0), BRUTE, "l_leg")
H.apply_damage(min(rand(-damage,damage),0), BRUTE, "r_leg")
H.apply_damage(min(rand(-damage,damage),0), BRUTE, "l_arm")
H.apply_damage(min(rand(-damage,damage),0), BRUTE, "r_arm")
H:weakened = max(H:weakened,2)
H:updatehealth()
return ..()
attackby()
return //nothing
/turf/simulated/floor/open/proc/getbelow()
var/turf/controllerlocation = locate(1, 1, z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
// check if there is something to draw below
if(!controller.down)
src.ChangeTurf(/turf/space)
return 0
else
floorbelow = locate(src.x, src.y, controller.down_target)
return 1
return 1
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
// override to make sure nothing is hidden
/turf/simulated/floor/open/levelupdate()
for(var/obj/O in src)
if(O.level == 1)
O.hide(0)
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
//overwrite the attackby of space to transform it to openspace if necessary
/turf/space/attackby(obj/item/C as obj, mob/user as mob)
if (istype(C, /obj/item/weapon/cable_coil))
var/turf/simulated/floor/open/W = src.ChangeTurf(/turf/simulated/floor/open)
W.attackby(C, user)
return
..()
proc/RemoveImage(var/atom/movable/o)
var/o_img = overlay_references[o]
overlays -= o_img
overlay_references -= o
/turf/simulated/floor/open/ex_act(severity)
// cant destroy empty space with an ordinary bomb
return
/turf/simulated/floor/open/attackby(obj/item/C as obj, mob/user as mob)
(..)
if (istype(C, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/cable = C
cable.turf_place(src, user)
return
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
+263
View File
@@ -0,0 +1,263 @@
/obj/effect/landmark/zcontroller
name = "Z-Level Controller"
var/initialized = 0 // when set to 1, turfs will report to the controller
var/up = 0 // 1 allows up movement
var/up_target = 0 // the Z-level that is above the current one
var/down = 0 // 1 allows down movement
var/down_target = 0 // the Z-level that is below the current one
var/list/slow = list()
var/list/normal = list()
var/list/fast = list()
var/slow_time
var/normal_time
var/fast_time
/obj/effect/landmark/zcontroller/New()
..()
for (var/turf/T in world)
if (T.z == z)
fast += T
slow_time = world.time + 3000
normal_time = world.time + 600
fast_time = world.time + 10
processing_objects.Add(src)
initialized = 1
return 1
/obj/effect/landmark/zcontroller/Del()
processing_objects.Remove(src)
return
/obj/effect/landmark/zcontroller/process()
if (world.time > fast_time)
calc(fast)
fast_time = world.time + 10
if (world.time > normal_time)
calc(normal)
normal_time = world.time + 600
/* if (world.time > slow_time)
calc(slow)
slow_time = world.time + 3000 */
return
/obj/effect/landmark/zcontroller/proc/add(var/list/L, var/I, var/transfer)
while (L.len)
var/turf/T = pick(L)
L -= T
slow -= T
normal -= T
fast -= T
if(!T || !istype(T, /turf))
continue
switch (I)
if(1) slow += T
if(2) normal += T
if(3) fast += T
if(transfer > 0)
if(up)
var/turf/controller_up = locate(1, 1, up_target)
for(var/obj/effect/landmark/zcontroller/c_up in controller_up)
var/list/temp = list()
temp += locate(T.x, T.y, up_target)
c_up.add(temp, I, transfer-1)
if(down)
var/turf/controller_down = locate(1, 1, down_target)
for(var/obj/effect/landmark/zcontroller/c_down in controller_down)
var/list/temp = list()
temp += locate(T.x, T.y, down_target)
c_down.add(temp, I, transfer-1)
return
/turf
var/list/z_overlays = list()
/turf/New()
..()
var/turf/controller = locate(1, 1, z)
for(var/obj/effect/landmark/zcontroller/c in controller)
if(c.initialized)
var/list/turf = list()
turf += src
c.add(turf,3,1)
/turf/space/New()
..()
var/turf/controller = locate(1, 1, z)
for(var/obj/effect/landmark/zcontroller/c in controller)
if(c.initialized)
var/list/turf = list()
turf += src
c.add(turf,3,1)
atom/movable/Move() //Hackish
. = ..()
var/turf/controllerlocation = locate(1, 1, src.z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.up || controller.down)
var/list/temp = list()
temp += locate(src.x, src.y, src.z)
controller.add(temp,3,1)
/obj/effect/landmark/zcontroller/proc/calc(var/list/L)
var/list/slowholder = list()
var/list/normalholder = list()
var/list/fastholder = list()
var/new_list
while(L.len)
var/turf/T = pick(L)
new_list = 0
if(!T || !istype(T, /turf))
L -= T
continue
T.overlays -= T.z_overlays
T.z_overlays -= T.z_overlays
if(down && (istype(T, /turf/space) || istype(T, /turf/simulated/floor/open)))
var/turf/below = locate(T.x, T.y, down_target)
if(below)
if(!(istype(below, /turf/space) || istype(below, /turf/simulated/floor/open)))
var/image/t_img = list()
new_list = 1
var/image/temp = image(below, dir=below.dir, layer = TURF_LAYER + 0.04)
temp.color = rgb(127,127,127)
temp.overlays += below.overlays
t_img += temp
T.overlays += t_img
T.z_overlays += t_img
// get objects
var/image/o_img = list()
for(var/obj/o in below)
// ingore objects that have any form of invisibility
if(o.invisibility) continue
new_list = 2
var/image/temp2 = image(o, dir=o.dir, layer = TURF_LAYER+0.05*o.layer)
temp2.color = rgb(127,127,127)
temp2.overlays += o.overlays
o_img += temp2
// you need to add a list to .overlays or it will not display any because space
T.overlays += o_img
T.z_overlays += o_img
// get mobs
var/image/m_img = list()
for(var/mob/m in below)
// ingore mobs that have any form of invisibility
if(m.invisibility) continue
// only add this tile to fastprocessing if there is a living mob, not a dead one
if(istype(m, /mob/living)) new_list = 3
var/image/temp2 = image(m, dir=m.dir, layer = TURF_LAYER+0.05*m.layer)
temp2.color = rgb(127,127,127)
temp2.overlays += m.overlays
m_img += temp2
// you need to add a list to .overlays or it will not display any because space
T.overlays += m_img
T.z_overlays += m_img
T.overlays -= below.z_overlays
T.z_overlays -= below.z_overlays
// this is sadly impossible to use right now
// the overlay is always opaque to mouseclicks and thus prevents interactions with everything except the turf
/*if(up)
var/turf/above = locate(T.x, T.y, up_target)
if(above)
var/eligeable = 0
for(var/d in cardinal)
var/turf/mT = get_step(above,d)
if(istype(mT, /turf/space) || istype(mT, /turf/simulated/floor/open))
eligeable = 1
/*if(mT.opacity == 0)
for(var/f in cardinal)
var/turf/nT = get_step(mT,f)
if(istype(nT, /turf/space) || istype(nT, /turf/simulated/floor/open))
eligeable = 1*/
if(istype(above, /turf/space) || istype(above, /turf/simulated/floor/open)) eligeable = 1
if(eligeable == 1)
if(!(istype(above, /turf/space) || istype(above, /turf/simulated/floor/open)))
var/image/t_img = list()
if(new_list < 1) new_list = 1
above.overlays -= above.z_overlays
var/image/temp = image(above, dir=above.dir, layer = 5 + 0.04)
above.overlays += above.z_overlays
temp.alpha = 100
temp.overlays += above.overlays
temp.overlays -= above.z_overlays
t_img += temp
T.overlays += t_img
T.z_overlays += t_img
// get objects
var/image/o_img = list()
for(var/obj/o in above)
// ingore objects that have any form of invisibility
if(o.invisibility) continue
if(new_list < 2) new_list = 2
var/image/temp2 = image(o, dir=o.dir, layer = 5+0.05*o.layer)
temp2.alpha = 100
temp2.overlays += o.overlays
o_img += temp2
// you need to add a list to .overlays or it will not display any because space
T.overlays += o_img
T.z_overlays += o_img
// get mobs
var/image/m_img = list()
for(var/mob/m in above)
// ingore mobs that have any form of invisibility
if(m.invisibility) continue
// only add this tile to fastprocessing if there is a living mob, not a dead one
if(istype(m, /mob/living) && new_list < 3) new_list = 3
var/image/temp2 = image(m, dir=m.dir, layer = 5+0.05*m.layer)
temp2.alpha = 100
temp2.overlays += m.overlays
m_img += temp2
// you need to add a list to .overlays or it will not display any because space
T.overlays += m_img
T.z_overlays += m_img
T.overlays -= above.z_overlays
T.z_overlays -= above.z_overlays*/
L -= T
if(new_list == 1)
slowholder += T
if(new_list == 2)
normalholder += T
if(new_list == 3)
fastholder += T
for(var/d in cardinal)
var/turf/mT = get_step(T,d)
if(!(mT in fastholder))
fastholder += mT
for(var/f in cardinal)
var/turf/nT = get_step(mT,f)
if(!(nT in fastholder))
fastholder += nT
add(slowholder,1, 0)
add(normalholder, 2, 0)
add(fastholder, 3, 0)
return
Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

@@ -21,10 +21,6 @@
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"
@@ -72,7 +68,3 @@
storage_hard
name = "\improper Engineering Hard Storage"
icon_state = "engine_storage"
hallway
name = "\improper Engineering storage"
icon_state = "engine_hallway"
+71
View File
@@ -11,6 +11,12 @@ proc/FloodFill(turf/simulated/start)
var/list/open = list(start)
//The list of tiles which have been evaulated.
var/list/closed = list()
/////// Z-Level stuff
//List of all space tiles bordering the zone
var/list/list_space = list()
//List of all Z-Levels of the zone where it borders space
var/list/z_space = list()
/////// Z-Level stuff
//Loop through the turfs in the open list in order to find which adjacent turfs should be added to the zone.
while(open.len)
@@ -67,10 +73,75 @@ proc/FloodFill(turf/simulated/start)
//If it cannot connect either to the north or west, connect it!
closed += O
/////// Z-Level stuff
if(istype(O,/turf/space))
if(!(O in list_space))
list_space += O
if(!(O.z in z_space))
z_space += O.z
// handle Z-level connections
var/turf/controllerlocation = locate(1, 1, T.z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
// connect upwards
if(controller.up)
var/turf/above_me = locate(T.x, T.y, controller.up_target)
// add the turf above this
if(istype(above_me, /turf/simulated/floor/open) && !(above_me in open) && !(above_me in closed))
open += above_me
if(istype(above_me,/turf/space))
if(!(above_me in list_space))
list_space += above_me
if(!(above_me.z in z_space))
z_space += above_me.z
// connect downwards
if(controller.down && istype(T, /turf/simulated/floor/open))
var/turf/below_me = locate(T.x, T.y, controller.down_target)
// add the turf below this
if(!(below_me in open) && !(below_me in closed))
open += below_me
/////// Z-Level stuff
//This tile is now evaluated, and can be moved to the list of evaluated tiles.
open -= T
closed += T
/////// Z-Level stuff
// once the zone is done, check if there is space that needs to be changed to open space
if(!open.len)
var/list/temp = list()
while(list_space.len)
var/turf/S = pick(list_space)
//check if the zone has any space borders below the evaluated space tile
//if there is some, we dont need to make open_space since the zone can vent and the zone above can vent
//through the evaluated tile
//if there is none, the zone can connect upwards to either vent from there or connect with the zone there
//also check if the turf below the space is actually part of this zone to prevent the edge tiles from transforming
var/turf/controllerloc = locate(1, 1, S.z)
for(var/obj/effect/landmark/zcontroller/controller in controllerloc)
if(controller.down)
var/turf/below = locate(S.x, S.y, controller.down_target)
if(!((S.z - 1) in z_space) && below in closed)
open += S.ChangeTurf(/turf/simulated/floor/open)
list_space -= S
else
list_space -= S
temp += S
else
list_space -= S
temp += S
// make sure the turf is removed from the list
list_space -= S
z_space -= z_space
while(temp.len)
var/turf/S = pick(temp)
if(!(S.z in z_space))
z_space += S.z
list_space += S
temp -= S
/////// Z-Level stuff
return closed
+33
View File
@@ -146,6 +146,13 @@ var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs
T.zone = src
///// Z-Level Stuff
// also add the tile below it if its open space
if(istype(T, /turf/simulated/floor/open))
var/turf/simulated/floor/open/T2 = T
src.AddTurf(T2.floorbelow)
///// Z-Level Stuff
else
if(!unsimulated_tiles)
unsimulated_tiles = list()
@@ -767,6 +774,32 @@ zone/proc/Rebuild()
if(adjacent_id && (!lowest_id || adjacent_id < lowest_id))
lowest_id = adjacent_id
/////// Z-Level stuff
var/turf/controllerlocation = locate(1, 1, current.z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
// upwards
if(controller.up)
var/turf/simulated/adjacent = locate(current.x, current.y, controller.up_target)
if(adjacent in turfs && istype(adjacent, /turf/simulated/floor/open))
current_adjacents += adjacent
adjacent_id = turfs[adjacent]
if(adjacent_id && (!lowest_id || adjacent_id < lowest_id))
lowest_id = adjacent_id
// downwards
if(controller.down && istype(current, /turf/simulated/floor/open))
var/turf/simulated/adjacent = locate(current.x, current.y, controller.down_target)
if(adjacent in turfs)
current_adjacents += adjacent
adjacent_id = turfs[adjacent]
if(adjacent_id && (!lowest_id || adjacent_id < lowest_id))
lowest_id = adjacent_id
/////// Z-Level stuff
if(!lowest_id)
lowest_id = current_identifier++
identical_ids += lowest_id
+5 -2
View File
@@ -23,6 +23,9 @@ var/global/list/all_species[0]
var/global/list/all_languages[0]
var/global/list/whitelisted_species = list("Human")
// Posters
var/global/list/datum/poster/poster_designs = typesof(/datum/poster) - /datum/poster
//Preferences stuff
//Hairstyles
var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name
@@ -33,8 +36,8 @@ var/global/list/facial_hair_styles_male_list = list()
var/global/list/facial_hair_styles_female_list = list()
var/global/list/skin_styles_female_list = list() //unused
//Underwear
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "Love-Hearts", "Black2", "Grey2", "Stripey", "Kinky", "None") //Curse whoever made male/female underwear diffrent colours
var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "Babydoll", "Baby-Blue", "Green", "Pink", "Kinky", "None")
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "None") //Curse whoever made male/female underwear diffrent colours
var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "None")
//Backpacks
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel", "Satchel Alt")
+7
View File
@@ -142,6 +142,13 @@ proc/listclearnulls(list/list)
return picked
return null
//Returns the next element in parameter list after first appearance of parameter element. If it is the last element of the list or not present in list, returns first element.
/proc/next_in_list(element, list/L)
for(var/i=1, i<L.len, i++)
if(L[i] == element)
return L[i+1]
return L[1]
/*
* Sorting
*/
+8
View File
@@ -30,12 +30,14 @@
var/vote_period = 600 // length of voting period (deciseconds, default 1 minute)
var/vote_autotransfer_initial = 108000 // Length of time before the first autotransfer vote is called
var/vote_autotransfer_interval = 36000 // length of time before next sequential autotransfer vote
var/vote_autogamemode_timeleft = 100 //Length of time before round start when autogamemode vote is called (in seconds, default 100).
var/vote_no_default = 0 // vote does not default to nochange/norestart (tbi)
var/vote_no_dead = 0 // dead people can't vote (tbi)
// var/enable_authentication = 0 // goon authentication
var/del_new_on_log = 1 // del's new players if they log before they spawn in
var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard
var/traitor_scaling = 0 //if amount of traitors scales based on amount of players
var/objectives_disabled = 0 //if objectives are disabled or not
var/protect_roles_from_antagonist = 0// If security and such can be tratior/cult/other
var/continous_rounds = 1 // Gamemodes which end instantly will instead keep on going until the round ends by escape shuttle or nuke.
var/allow_Metadata = 0 // Metadata is supported.
@@ -285,6 +287,9 @@
if ("vote_autotransfer_interval")
config.vote_autotransfer_interval = text2num(value)
if ("vote_autogamemode_timeleft")
config.vote_autogamemode_timeleft = text2num(value)
if ("allow_ai")
config.allow_ai = 1
@@ -336,6 +341,9 @@
if ("traitor_scaling")
config.traitor_scaling = 1
if ("objectives_disabled")
config.objectives_disabled = 1
if("protect_roles_from_antagonist")
config.protect_roles_from_antagonist = 1
+2 -2
View File
@@ -50,9 +50,9 @@ datum/controller/vote
initiate_vote("crew_transfer","the server")
log_debug("The server has called a crew transfer vote")
/* proc/autogamemode() //This is here for whoever can figure out how to make this work
proc/autogamemode()
initiate_vote("gamemode","the server")
log_debug("The server has called a gamemode vote")*/
log_debug("The server has called a gamemode vote")
proc/reset()
initiator = null
+5
View File
@@ -16,6 +16,11 @@
/datum/disease/appendicitis/stage_act()
..()
if(istype(affected_mob,/mob/living/carbon/human))
var/mob/living/carbon/human/H = affected_mob
if(H.species.name == "Diona" || H.species.name == "Machine" || H.species.name == "Vox") src.cure()
if(stage == 1)
if(affected_mob.op_stage.appendix == 2.0)
// appendix is removed, can't get infected again
+30 -12
View File
@@ -74,7 +74,7 @@ datum/mind
current.mind = null
if(new_character.mind) //remove any mind currently in our new body's mind variable
new_character.mind.current = null
nanomanager.user_transferred(current, new_character) // transfer active NanoUI instances to new user
current = new_character //link ourself to our new body
@@ -129,7 +129,7 @@ datum/mind
if (istype(current, /mob/living/carbon/human) || istype(current, /mob/living/carbon/monkey))
/** Impanted**/
if(istype(current, /mob/living/carbon/human))
if(H.is_loyalty_implanted(H))
if(H.is_loyalty_implanted(H))
text = "Loyalty Implant:<a href='?src=\ref[src];implant=remove'>Remove</a>|<b>Implanted</b></br>"
else
text = "Loyalty Implant:<b>No Implant</b>|<a href='?src=\ref[src];implant=add'>Implant him!</a></br>"
@@ -562,6 +562,7 @@ datum/mind
current << "\red <FONT size = 3><B>Revolution has been disappointed of your leader traits! You are a regular revolutionary now!</B></FONT>"
else if(!(src in ticker.mode.revolutionaries))
current << "\red <FONT size = 3> You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill the heads to win the revolution!</FONT>"
current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
else
return
ticker.mode.revolutionaries += src
@@ -574,6 +575,7 @@ datum/mind
ticker.mode.revolutionaries -= src
ticker.mode.update_rev_icons_removed(src)
current << "\red <FONT size = 3><B>You have proved your devotion to revoltion! You are a head revolutionary now!</B></FONT>"
current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
else if(!(src in ticker.mode.head_revolutionaries))
current << "\blue You are a member of the revolutionaries' leadership now!"
else
@@ -639,7 +641,8 @@ datum/mind
special_role = null
var/datum/game_mode/cult/cult = ticker.mode
if (istype(cult))
cult.memoize_cult_objectives(src)
if(!config.objectives_disabled)
cult.memoize_cult_objectives(src)
current << "\red <FONT size = 3><B>You have been brainwashed! You are no longer a cultist!</B></FONT>"
memory = ""
log_admin("[key_name_admin(usr)] has de-cult'ed [current].")
@@ -650,9 +653,11 @@ datum/mind
special_role = "Cultist"
current << "<font color=\"purple\"><b><i>You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie.</b></i></font>"
current << "<font color=\"purple\"><b><i>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.</b></i></font>"
current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
var/datum/game_mode/cult/cult = ticker.mode
if (istype(cult))
cult.memoize_cult_objectives(src)
if(!config.objectives_disabled)
cult.memoize_cult_objectives(src)
log_admin("[key_name_admin(usr)] has cult'ed [current].")
if("tome")
var/mob/living/carbon/human/H = current
@@ -691,6 +696,7 @@ datum/mind
special_role = "Wizard"
//ticker.mode.learn_basic_spells(current)
current << "<B>\red You are the Space Wizard!</B>"
current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
log_admin("[key_name_admin(usr)] has wizard'ed [current].")
if("lair")
current.loc = pick(wizardstart)
@@ -699,8 +705,9 @@ datum/mind
if("name")
ticker.mode.name_wizard(current)
if("autoobjectives")
ticker.mode.forge_wizard_objectives(src)
usr << "\blue The objectives for wizard [key] have been generated. You can edit them and anounce manually."
if(!config.objectives_disabled)
ticker.mode.forge_wizard_objectives(src)
usr << "\blue The objectives for wizard [key] have been generated. You can edit them and anounce manually."
else if (href_list["changeling"])
switch(href_list["changeling"])
@@ -719,9 +726,12 @@ datum/mind
ticker.mode.grant_changeling_powers(current)
special_role = "Changeling"
current << "<B><font color='red'>Your powers are awoken. A flash of memory returns to us...we are a changeling!</font></B>"
if(config.objectives_disabled)
current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
log_admin("[key_name_admin(usr)] has changeling'ed [current].")
if("autoobjectives")
ticker.mode.forge_changeling_objectives(src)
if(!config.objectives_disabled)
ticker.mode.forge_changeling_objectives(src)
usr << "\blue The objectives for changeling [key] have been generated. You can edit them and anounce manually."
if("initialdna")
@@ -754,7 +764,10 @@ datum/mind
current.real_name = "[syndicate_name()] Operative #[ticker.mode.syndicates.len-1]"
special_role = "Syndicate"
current << "\blue You are a [syndicate_name()] agent!"
ticker.mode.forge_syndicate_objectives(src)
if(config.objectives_disabled)
current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
else
ticker.mode.forge_syndicate_objectives(src)
ticker.mode.greet_syndicate(src)
log_admin("[key_name_admin(usr)] has nuke op'ed [current].")
if("lair")
@@ -806,14 +819,17 @@ datum/mind
special_role = "traitor"
current << "<B>\red You are a traitor!</B>"
log_admin("[key_name_admin(usr)] has traitor'ed [current].")
if (config.objectives_disabled)
current << "<i>You have been turned into an antagonist- <font color=blue>Within the rules,</font> try to act as an opposing force to the crew- This can be via corporate payoff, personal motives, or maybe just being a dick. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonist.</i></b>"
if(istype(current, /mob/living/silicon))
var/mob/living/silicon/A = current
call(/datum/game_mode/proc/add_law_zero)(A)
A.show_laws()
if("autoobjectives")
ticker.mode.forge_traitor_objectives(src)
usr << "\blue The objectives for traitor [key] have been generated. You can edit them and anounce manually."
if (!config.objectives_disabled)
ticker.mode.forge_traitor_objectives(src)
usr << "\blue The objectives for traitor [key] have been generated. You can edit them and anounce manually."
else if (href_list["monkey"])
var/mob/living/L = current
@@ -1023,7 +1039,8 @@ datum/mind
if(!(src in ticker.mode.traitors))
ticker.mode.traitors += src
special_role = "traitor"
ticker.mode.forge_traitor_objectives(src)
if (!config.objectives_disabled)
ticker.mode.forge_traitor_objectives(src)
ticker.mode.finalize_traitor(src)
ticker.mode.greet_traitor(src)
@@ -1062,7 +1079,8 @@ datum/mind
ticker.mode.changelings += src
ticker.mode.grant_changeling_powers(current)
special_role = "Changeling"
ticker.mode.forge_changeling_objectives(src)
if(!config.objectives_disabled)
ticker.mode.forge_changeling_objectives(src)
ticker.mode.greet_changeling(src)
proc/make_Wizard()
+26 -23
View File
@@ -45,12 +45,13 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/datum/supply_packs/food
name = "Food crate"
contains = list(/obj/item/weapon/reagent_containers/food/drinks/flour,
contains = list(/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/snacks/flour,
/obj/item/weapon/reagent_containers/food/drinks/milk,
/obj/item/weapon/reagent_containers/food/drinks/milk,
/obj/item/weapon/storage/fancy/egg_box,
/obj/item/weapon/reagent_containers/food/condiment/enzyme,
/obj/item/weapon/reagent_containers/food/snacks/grown/banana,
/obj/item/weapon/reagent_containers/food/snacks/grown/banana,
/obj/item/weapon/reagent_containers/food/snacks/grown/banana)
cost = 10
@@ -204,26 +205,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Replacement lights"
group = "Engineering"
/datum/supply_packs/costume
name = "Standard Costume crate"
contains = list(/obj/item/weapon/storage/backpack/clown,
/obj/item/clothing/shoes/clown_shoes,
/obj/item/clothing/mask/gas/clown_hat,
/obj/item/clothing/under/rank/clown,
/obj/item/weapon/bikehorn,
/obj/item/clothing/under/mime,
/obj/item/clothing/shoes/black,
/obj/item/clothing/gloves/white,
/obj/item/clothing/mask/gas/mime,
/obj/item/clothing/head/beret,
/obj/item/clothing/suit/suspenders,
/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing)
cost = 10
containertype = /obj/structure/closet/crate/secure
containername = "Standard Costumes"
access = access_theatre
group = "Operations"
/datum/supply_packs/wizard
name = "Wizard costume"
contains = list(/obj/item/weapon/staff,
@@ -902,6 +883,28 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
containername = "Pizza crate"
group = "Hospitality"
/datum/supply_packs/randomised/costume
num_contained = 2
contains = list(/obj/item/clothing/suit/pirate,
/obj/item/clothing/suit/johnny_coat,
/obj/item/clothing/suit/judgerobe,
/obj/item/clothing/suit/wcoat,
/obj/item/clothing/suit/hastur,
/obj/item/clothing/suit/imperium_monk,
/obj/item/clothing/suit/ianshirt,
/obj/item/clothing/under/gimmick/rank/captain/suit,
/obj/item/clothing/under/gimmick/rank/head_of_personnel/suit,
/obj/item/clothing/under/lawyer/purpsuit,
/obj/item/clothing/suit/suspenders,
/obj/item/clothing/suit/storage/labcoat/mad,
/obj/item/clothing/suit/bio_suit/plaguedoctorsuit)
name = "Standard Costume crate"
cost = 10
containertype = /obj/structure/closet/crate/secure
containername = "Standard Costumes"
access = access_theatre
group = "Operations"
/datum/supply_packs/formal_wear
contains = list(/obj/item/clothing/head/bowler,
/obj/item/clothing/head/that,
+5 -48
View File
@@ -171,11 +171,11 @@ We can't just insert in HTML into the nanoUI so we need the raw data to play wit
var/heads[0]
var/sec[0]
var/eng[0]
var/med[0]
var/med[0]
var/sci[0]
var/civ[0]
var/bot[0]
var/misc[0]
var/civ[0]
var/bot[0]
var/misc[0]
for(var/datum/data/record/t in data_core.general)
var/name = sanitize(t.fields["name"])
var/rank = sanitize(t.fields["rank"])
@@ -195,7 +195,7 @@ We can't just insert in HTML into the nanoUI so we need the raw data to play wit
department = 1
if(depthead && sec.len != 1)
sec.Swap(1,sec.len)
if(real_rank in engineering_positions)
eng[++eng.len] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
@@ -257,49 +257,6 @@ We can't just insert in HTML into the nanoUI so we need the raw data to play wit
var/list/container = list( )
/obj/structure/cable
level = 1
anchored =1
var/datum/powernet/powernet
name = "power cable"
desc = "A flexible superconducting cable for heavy-duty power transfer"
icon = 'icons/obj/power_cond_red.dmi'
icon_state = "0-1"
var/d1 = 0
var/d2 = 1
layer = 2.44 //Just below unary stuff, which is at 2.45 and above pipes, which are at 2.4
var/cable_color = "red"
var/obj/structure/powerswitch/power_switch
/obj/structure/cable/yellow
cable_color = "yellow"
icon = 'icons/obj/power_cond_yellow.dmi'
/obj/structure/cable/green
cable_color = "green"
icon = 'icons/obj/power_cond_green.dmi'
/obj/structure/cable/blue
cable_color = "blue"
icon = 'icons/obj/power_cond_blue.dmi'
/obj/structure/cable/pink
cable_color = "pink"
icon = 'icons/obj/power_cond_pink.dmi'
/obj/structure/cable/orange
cable_color = "orange"
icon = 'icons/obj/power_cond_orange.dmi'
/obj/structure/cable/cyan
cable_color = "cyan"
icon = 'icons/obj/power_cond_cyan.dmi'
/obj/structure/cable/white
cable_color = "white"
icon = 'icons/obj/power_cond_white.dmi'
/obj/effect/projection
name = "Projection"
desc = "This looks like a projection of something."
+47 -3
View File
@@ -664,6 +664,10 @@ var/list/ghostteleportlocs = list()
name = "Waste Disposal"
icon_state = "disposal"
/area/maintenance/evahallway
name = "\improper EVA Hallway"
icon_state = "eva"
//Hallway
/area/hallway/primary/fore
@@ -788,6 +792,14 @@ var/list/ghostteleportlocs = list()
name = "\improper Security Dormitories"
icon_state = "Sleep"
/area/crew_quarters/sleep/bedrooms
name = "\improper Dormitory Bedroom"
icon_state = "Sleep"
/area/crew_quarters/sleep/cryo
name = "\improper Cryogenic Storage"
icon_state = "Sleep"
/area/crew_quarters/sleep_male
name = "\improper Male Dorm"
icon_state = "Sleep"
@@ -922,22 +934,54 @@ var/list/ghostteleportlocs = list()
/area/engine
engine_smes
name = "\improper Engineering SMES"
name = "Engineering SMES"
icon_state = "engine_smes"
requires_power = 0//This area only covers the batteries and they deal with their own power
// requires_power = 0//This area only covers the batteries and they deal with their own power
engine_room
name = "\improper Engine Room"
icon_state = "engine"
engine_airlock
name = "\improper Engine Room Airlock"
icon_state = "engine"
engine_monitoring
name = "\improper Engine Monitoring Room"
icon_state = "engine_monitoring"
engineering_monitoring
name = "\improper Engineering Monitoring Room"
icon_state = "engine_monitoring"
engineering
name = "Engineering"
icon_state = "engine_smes"
break_room
engineering_foyer
name = "\improper Engineering Foyer"
icon_state = "engine"
break_room
name = "\improper Engineering Break Room"
icon_state = "engine"
chiefs_office
name = "\improper Chief Engineer's office"
icon_state = "engine_control"
hallway
name = "\improper Engineering Hallway"
icon_state = "engine_hallway"
workshop
name = "\improper Engineering Workshop"
icon_state = "engine_storage"
locker_room
name = "\improper Engineering Locker Room"
icon_state = "engine_storage"
//Solars
+2 -2
View File
@@ -273,7 +273,7 @@
I.loc = src
src.disk = I
user << "You insert [I]."
nanomanager.update_uis(src) // update all UIs attached to src()
nanomanager.update_uis(src) // update all UIs attached to src
return
else
src.attack_hand(user)
@@ -345,7 +345,7 @@
W.loc = src
src.disk = W
user << "You insert [W]."
nanomanager.update_uis(src) // update all UIs attached to src()
nanomanager.update_uis(src) // update all UIs attached to src
/*
/obj/machinery/computer/scan_consolenew/process() //not really used right now
if(stat & (NOPOWER|BROKEN))
+16 -9
View File
@@ -123,7 +123,8 @@
var/mob/living/newtraitor = pick(possible_traitors)
//message_admins("[newtraitor.real_name] is the new Traitor.")
forge_traitor_objectives(newtraitor.mind)
if (!config.objectives_disabled)
forge_traitor_objectives(newtraitor.mind)
if(istype(newtraitor, /mob/living/silicon))
add_law_zero(newtraitor)
@@ -136,9 +137,12 @@
newtraitor.mind.special_role = "traitor"
var/obj_count = 1
newtraitor << "\blue Your current objectives:"
for(var/datum/objective/objective in newtraitor.mind.objectives)
newtraitor << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
if(!config.objectives_disabled)
for(var/datum/objective/objective in newtraitor.mind.objectives)
newtraitor << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
else
newtraitor << "<i>You have been selected this round as an antagonist- <font color=blue>Within the rules,</font> try to act as an opposing force to the crew- This can be via corporate payoff, personal motives, or maybe just being a dick. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonist.</i></b>"
//else
//message_admins("No new traitor being added.")
//else
@@ -188,11 +192,14 @@
traitors += character.mind
character << "\red <B>You are the traitor.</B>"
character.mind.special_role = "traitor"
var/obj_count = 1
character << "\blue Your current objectives:"
for(var/datum/objective/objective in character.mind.objectives)
character << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
if (config.objectives_disabled)
character << "<i>You have been selected this round as an antagonist- <font color=blue>Within the rules,</font> try to act as an opposing force to the crew- This can be via corporate payoff, personal motives, or maybe just being a dick. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonist.</i></b>"
else
var/obj_count = 1
character << "\blue Your current objectives:"
for(var/datum/objective/objective in character.mind.objectives)
character << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
//else
//message_admins("New traitor roll failed. No new traitor.")
//else
+32 -25
View File
@@ -72,7 +72,8 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
for(var/datum/mind/changeling in changelings)
grant_changeling_powers(changeling.current)
changeling.special_role = "Changeling"
forge_changeling_objectives(changeling)
if(!config.objectives_disabled)
forge_changeling_objectives(changeling)
greet_changeling(changeling)
spawn (rand(waittime_l, waittime_h))
@@ -120,18 +121,24 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
if (you_are)
changeling.current << "<B>\red You are a changeling!</B>"
changeling.current << "<b>\red Use say \":g message\" to communicate with your fellow changelings. Remember: you get all of their absorbed DNA if you absorb them.</b>"
changeling.current << "<B>You must complete the following tasks:</B>"
if(config.objectives_disabled)
changeling.current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
if (!config.objectives_disabled)
changeling.current << "<B>You must complete the following tasks:</B>"
if (changeling.current.mind)
if (changeling.current.mind.assigned_role == "Clown")
changeling.current << "You have evolved beyond your clownish nature, allowing you to wield weapons without harming yourself."
changeling.current.mutations.Remove(CLUMSY)
var/obj_count = 1
for(var/datum/objective/objective in changeling.objectives)
changeling.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
return
if (!config.objectives_disabled)
var/obj_count = 1
for(var/datum/objective/objective in changeling.objectives)
changeling.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
return
/*/datum/game_mode/changeling/check_finished()
var/changelings_alive = 0
@@ -181,25 +188,25 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
//Removed sanity if(changeling) because we -want- a runtime to inform us that the changelings list is incorrect and needs to be fixed.
text += "<br><b>Changeling ID:</b> [changeling.changeling.changelingID]."
text += "<br><b>Genomes Absorbed:</b> [changeling.changeling.absorbedcount]"
if(changeling.objectives.len)
var/count = 1
for(var/datum/objective/objective in changeling.objectives)
if(objective.check_completion())
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font>"
feedback_add_details("changeling_objective","[objective.type]|SUCCESS")
if(!config.objectives_disabled)
if(changeling.objectives.len)
var/count = 1
for(var/datum/objective/objective in changeling.objectives)
if(objective.check_completion())
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font>"
feedback_add_details("changeling_objective","[objective.type]|SUCCESS")
else
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font>"
feedback_add_details("changeling_objective","[objective.type]|FAIL")
changelingwin = 0
count++
if(!config.objectives_disabled)
if(changelingwin)
text += "<br><font color='green'><B>The changeling was successful!</B></font>"
feedback_add_details("changeling_success","SUCCESS")
else
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font>"
feedback_add_details("changeling_objective","[objective.type]|FAIL")
changelingwin = 0
count++
if(changelingwin)
text += "<br><font color='green'><B>The changeling was successful!</B></font>"
feedback_add_details("changeling_success","SUCCESS")
else
text += "<br><font color='red'><B>The changeling has failed.</B></font>"
feedback_add_details("changeling_success","FAIL")
text += "<br><font color='red'><B>The changeling has failed.</B></font>"
feedback_add_details("changeling_success","FAIL")
world << text
@@ -37,7 +37,8 @@
for(var/datum/mind/changeling in changelings)
grant_changeling_powers(changeling.current)
changeling.special_role = "Changeling"
forge_changeling_objectives(changeling)
if(!config.objectives_disabled)
forge_changeling_objectives(changeling)
greet_changeling(changeling)
..()
return
+43 -37
View File
@@ -53,12 +53,13 @@
/datum/game_mode/cult/pre_setup()
if(prob(50))
objectives += "survive"
objectives += "sacrifice"
else
objectives += "eldergod"
objectives += "sacrifice"
if(!config.objectives_disabled)
if(prob(50))
objectives += "survive"
objectives += "sacrifice"
else
objectives += "eldergod"
objectives += "sacrifice"
if(config.protect_roles_from_antagonist)
restricted_jobs += protected_jobs
@@ -97,7 +98,10 @@
grant_runeword(cult_mind.current)
update_cult_icons_added(cult_mind)
cult_mind.current << "\blue You are a member of the cult!"
memoize_cult_objectives(cult_mind)
if(!config.objectives_disabled)
memoize_cult_objectives(cult_mind)
else
cult_mind.current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
cult_mind.special_role = "Cultist"
spawn (rand(waittime_l, waittime_h))
@@ -181,7 +185,8 @@
/datum/game_mode/cult/add_cultist(datum/mind/cult_mind) //INHERIT
if (!..(cult_mind))
return
memoize_cult_objectives(cult_mind)
if (!config.objectives_disabled)
memoize_cult_objectives(cult_mind)
/datum/game_mode/proc/remove_cultist(datum/mind/cult_mind, show_message = 1)
@@ -276,7 +281,8 @@
/datum/game_mode/cult/declare_completion()
if(config.objectives_disabled)
return 1
if(!check_cult_victory())
feedback_set_details("round_end_result","win - cult win")
feedback_set("round_end_result",acolytes_survived)
@@ -287,38 +293,38 @@
world << "\red <FONT size = 3><B> The staff managed to stop the cult!</B></FONT>"
var/text = "<b>Cultists escaped:</b> [acolytes_survived]"
if(objectives.len)
text += "<br><b>The cultists' objectives were:</b>"
for(var/obj_count=1, obj_count <= objectives.len, obj_count++)
var/explanation
switch(objectives[obj_count])
if("survive")
if(!check_survive())
explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. <font color='green'><B>Success!</B></font>"
feedback_add_details("cult_objective","cult_survive|SUCCESS|[acolytes_needed]")
else
explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. <font color='red'>Fail.</font>"
feedback_add_details("cult_objective","cult_survive|FAIL|[acolytes_needed]")
if("sacrifice")
if(sacrifice_target)
if(sacrifice_target in sacrificed)
explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. <font color='green'><B>Success!</B></font>"
feedback_add_details("cult_objective","cult_sacrifice|SUCCESS")
else if(sacrifice_target && sacrifice_target.current)
explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. <font color='red'>Fail.</font>"
feedback_add_details("cult_objective","cult_sacrifice|FAIL")
if(!config.objectives_disabled)
if(objectives.len)
text += "<br><b>The cultists' objectives were:</b>"
for(var/obj_count=1, obj_count <= objectives.len, obj_count++)
var/explanation
switch(objectives[obj_count])
if("survive")
if(!check_survive())
explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. <font color='green'><B>Success!</B></font>"
feedback_add_details("cult_objective","cult_survive|SUCCESS|[acolytes_needed]")
else
explanation = "Make sure at least [acolytes_needed] acolytes escape on the shuttle. <font color='red'>Fail.</font>"
feedback_add_details("cult_objective","cult_survive|FAIL|[acolytes_needed]")
if("sacrifice")
if(sacrifice_target)
if(sacrifice_target in sacrificed)
explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. <font color='green'><B>Success!</B></font>"
feedback_add_details("cult_objective","cult_sacrifice|SUCCESS")
else if(sacrifice_target && sacrifice_target.current)
explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. <font color='red'>Fail.</font>"
feedback_add_details("cult_objective","cult_sacrifice|FAIL")
else
explanation = "Sacrifice [sacrifice_target.name], the [sacrifice_target.assigned_role]. <font color='red'>Fail (Gibbed).</font>"
feedback_add_details("cult_objective","cult_sacrifice|FAIL|GIBBED")
if("eldergod")
if(!eldergod)
explanation = "Summon Nar-Sie. <font color='green'><B>Success!</B></font>"
feedback_add_details("cult_objective","cult_narsie|SUCCESS")
else
explanation = "Summon Nar-Sie. <font color='red'>Fail.</font>"
if("eldergod")
if(!eldergod)
explanation = "Summon Nar-Sie. <font color='green'><B>Success!</B></font>"
feedback_add_details("cult_objective","cult_narsie|SUCCESS")
else
explanation = "Summon Nar-Sie. <font color='red'>Fail.</font>"
feedback_add_details("cult_objective","cult_narsie|FAIL")
text += "<br><B>Objective #[obj_count]</B>: [explanation]"
text += "<br><B>Objective #[obj_count]</B>: [explanation]"
world << text
..()
+5
View File
@@ -382,6 +382,11 @@ var/list/sacrificed = list()
D.real_name = "[pick(first_names_male)] [pick(last_names)]"
D.universal_speak = 1
D.status_flags &= ~GODMODE
D.s_tone = 35
D.b_eyes = 200
D.r_eyes = 200
D.g_eyes = 200
D.underwear = 0
D.key = ghost.key
+3 -1
View File
@@ -56,7 +56,8 @@ var/global/datum/controller/gameticker/ticker
vote.process()
if(going)
pregame_timeleft--
if(pregame_timeleft == config.vote_autogamemode_timeleft)
vote.autogamemode()
if(pregame_timeleft <= 0)
current_state = GAME_STATE_SETTING_UP
while (!setup())
@@ -149,6 +150,7 @@ var/global/datum/controller/gameticker/ticker
master_controller.process() //Start master_controller.process()
lighting_controller.process() //Start processing DynamicAreaLighting updates
for(var/obj/multiz/ladder/L in world) L.connect() //Lazy hackfix for ladders. TODO: move this to an actual controller. ~ Z
if(config.sql_enabled)
spawn(3000)
+8 -4
View File
@@ -69,7 +69,8 @@ VOX HEIST ROUNDTYPE
continue
//Generate objectives for the group.
raid_objectives = forge_vox_objectives()
if(!config.objectives_disabled)
raid_objectives = forge_vox_objectives()
var/index = 1
@@ -167,9 +168,12 @@ VOX HEIST ROUNDTYPE
raider.current << "\blue Use :V to voxtalk, :H to talk on your encrypted channel, and don't forget to turn on your nitrogen internals!"
raider.current << "\red IF YOU HAVE NOT PLAYED A VOX BEFORE, REVIEW THIS THREAD: http://baystation12.net/forums/viewtopic.php?f=6&t=8657."
var/obj_count = 1
for(var/datum/objective/objective in raider.objectives)
raider.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
if(!config.objectives_disabled)
for(var/datum/objective/objective in raider.objectives)
raider.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
else
raider.current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew or come up with other fun ideas. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
/datum/game_mode/heist/declare_completion()
+11 -7
View File
@@ -54,7 +54,10 @@
/datum/game_mode/ninja/post_setup()
for(var/datum/mind/ninja in ninjas)
if(ninja.current && !(istype(ninja.current,/mob/living/carbon/human))) return 0
forge_ninja_objectives(ninja)
if(!config.objectives_disabled)
forge_ninja_objectives(ninja)
else
ninja.current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
var/mob/living/carbon/human/N = ninja.current
N.internal = N.s_store
N.internals.icon_state = "internal1"
@@ -176,12 +179,13 @@
else
special_role_text = "antagonist"
if(ninjawin)
text += "<br><font color='green'><B>The [special_role_text] was successful!</B></font>"
feedback_add_details("traitor_success","SUCCESS")
else
text += "<br><font color='red'><B>The [special_role_text] has failed!</B></font>"
feedback_add_details("traitor_success","FAIL")
if(!config.objectives_disabled)
if(ninjawin)
text += "<br><font color='green'><B>The [special_role_text] was successful!</B></font>"
feedback_add_details("traitor_success","SUCCESS")
else
text += "<br><font color='red'><B>The [special_role_text] has failed!</B></font>"
feedback_add_details("traitor_success","FAIL")
world << text
return 1
+10 -5
View File
@@ -139,8 +139,8 @@
synd_mind.current.real_name = "[syndicate_name()] Operative" // placeholder while we get their actual name
spawn(0)
NukeNameAssign(synd_mind)
forge_syndicate_objectives(synd_mind)
if(!config.objectives_disabled)
forge_syndicate_objectives(synd_mind)
greet_syndicate(synd_mind)
equip_syndicate(synd_mind.current)
@@ -195,9 +195,12 @@
if (you_are)
syndicate.current << "\blue You are a [syndicate_name()] agent!"
var/obj_count = 1
for(var/datum/objective/objective in syndicate.objectives)
syndicate.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
if(!config.objectives_disabled)
for(var/datum/objective/objective in syndicate.objectives)
syndicate.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
else
syndicate.current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
return
@@ -267,6 +270,8 @@
/datum/game_mode/nuclear/declare_completion()
if(config.objectives_disabled)
return
var/disk_rescued = 1
for(var/obj/item/weapon/disk/nuclear/D in world)
var/disk_area = get_area(D)
+33 -26
View File
@@ -21,7 +21,7 @@
recommended_enemies = 3
uplink_welcome = "Revolutionary Uplink Console:"
uplink_welcome = "AntagCorp Uplink Console:"
uplink_uses = 10
var/finished = 0
@@ -73,14 +73,14 @@
/datum/game_mode/revolution/post_setup()
var/list/heads = get_living_heads()
for(var/datum/mind/rev_mind in head_revolutionaries)
for(var/datum/mind/head_mind in heads)
var/datum/objective/mutiny/rev_obj = new
rev_obj.owner = rev_mind
rev_obj.target = head_mind
rev_obj.explanation_text = "Assassinate [head_mind.name], the [head_mind.assigned_role]."
rev_mind.objectives += rev_obj
if(!config.objectives_disabled)
for(var/datum/mind/head_mind in heads)
var/datum/objective/mutiny/rev_obj = new
rev_obj.owner = rev_mind
rev_obj.target = head_mind
rev_obj.explanation_text = "Assassinate [head_mind.name], the [head_mind.assigned_role]."
rev_mind.objectives += rev_obj
// equip_traitor(rev_mind.current, 1) //changing how revs get assigned their uplink so they can get PDA uplinks. --NEO
// Removing revolutionary uplinks. -Pete
@@ -107,22 +107,26 @@
/datum/game_mode/proc/forge_revolutionary_objectives(var/datum/mind/rev_mind)
var/list/heads = get_living_heads()
for(var/datum/mind/head_mind in heads)
var/datum/objective/mutiny/rev_obj = new
rev_obj.owner = rev_mind
rev_obj.target = head_mind
rev_obj.explanation_text = "Assassinate [head_mind.name], the [head_mind.assigned_role]."
rev_mind.objectives += rev_obj
if(!config.objectives_disabled)
var/list/heads = get_living_heads()
for(var/datum/mind/head_mind in heads)
var/datum/objective/mutiny/rev_obj = new
rev_obj.owner = rev_mind
rev_obj.target = head_mind
rev_obj.explanation_text = "Assassinate [head_mind.name], the [head_mind.assigned_role]."
rev_mind.objectives += rev_obj
/datum/game_mode/proc/greet_revolutionary(var/datum/mind/rev_mind, var/you_are=1)
var/obj_count = 1
if (you_are)
rev_mind.current << "\blue You are a member of the revolutionaries' leadership!"
for(var/datum/objective/objective in rev_mind.objectives)
rev_mind.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
rev_mind.special_role = "Head Revolutionary"
obj_count++
if(!config.objectives_disabled)
for(var/datum/objective/objective in rev_mind.objectives)
rev_mind.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
rev_mind.special_role = "Head Revolutionary"
obj_count++
else
rev_mind.current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
/////////////////////////////////////////////////////////////////////////////////
//This are equips the rev heads with their gear, and makes the clown not clumsy//
@@ -193,6 +197,8 @@
revolutionaries += rev_mind
rev_mind.current << "\red <FONT size = 3> You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill the heads to win the revolution!</FONT>"
rev_mind.special_role = "Revolutionary"
if(config.objectives_disabled)
rev_mind.current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
update_rev_icons_added(rev_mind)
return 1
//////////////////////////////////////////////////////////////////////////////
@@ -342,13 +348,14 @@
//Announces the end of the game with all relavent information stated//
//////////////////////////////////////////////////////////////////////
/datum/game_mode/revolution/declare_completion()
if(finished == 1)
feedback_set_details("round_end_result","win - heads killed")
world << "\red <FONT size = 3><B> The heads of staff were killed or abandoned the station! The revolutionaries win!</B></FONT>"
else if(finished == 2)
feedback_set_details("round_end_result","loss - rev heads killed")
world << "\red <FONT size = 3><B> The heads of staff managed to stop the revolution!</B></FONT>"
..()
if(!config.objectives_disabled)
if(finished == 1)
feedback_set_details("round_end_result","win - heads killed")
world << "\red <FONT size = 3><B> The heads of staff were killed or abandoned the station! The revolutionaries win!</B></FONT>"
else if(finished == 2)
feedback_set_details("round_end_result","loss - rev heads killed")
world << "\red <FONT size = 3><B> The heads of staff managed to stop the revolution!</B></FONT>"
..()
return 1
/datum/game_mode/proc/auto_declare_completion_revolution()
+25 -19
View File
@@ -8,7 +8,7 @@
required_enemies = 3
recommended_enemies = 3
uplink_welcome = "Revolutionary Uplink Console:"
uplink_welcome = "AntagCorp Uplink Console:"
uplink_uses = 5
newscaster_announcements = /datum/news_announcement/revolution_inciting_event
@@ -57,14 +57,14 @@
/datum/game_mode/revolution/rp_revolution/post_setup()
heads = get_living_heads()
for(var/datum/mind/rev_mind in head_revolutionaries)
for(var/datum/mind/head_mind in heads)
var/datum/objective/mutiny/rp/rev_obj = new
rev_obj.owner = rev_mind
rev_obj.target = head_mind
rev_obj.explanation_text = "Assassinate, convert or capture [head_mind.name], the [head_mind.assigned_role]."
rev_mind.objectives += rev_obj
if(!config.objectives_disabled)
for(var/datum/mind/head_mind in heads)
var/datum/objective/mutiny/rp/rev_obj = new
rev_obj.owner = rev_mind
rev_obj.target = head_mind
rev_obj.explanation_text = "Assassinate, convert or capture [head_mind.name], the [head_mind.assigned_role]."
rev_mind.objectives += rev_obj
update_rev_icons_added(rev_mind)
@@ -81,10 +81,13 @@
var/obj_count = 1
if (you_are)
rev_mind.current << "\blue You are a member of the revolutionaries' leadership!"
for(var/datum/objective/objective in rev_mind.objectives)
rev_mind.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
rev_mind.special_role = "Head Revolutionary"
obj_count++
if(!config.objectives_disabled)
for(var/datum/objective/objective in rev_mind.objectives)
rev_mind.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
rev_mind.special_role = "Head Revolutionary"
obj_count++
else
rev_mind.current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
// Show each head revolutionary up to 3 candidates
var/list/already_considered = list()
@@ -110,6 +113,8 @@
revolutionaries += rev_mind
rev_mind.current << "\red <FONT size = 3> You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill, capture or convert the heads to win the revolution!</FONT>"
rev_mind.special_role = "Revolutionary"
if(config.objectives_disabled)
rev_mind.current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
update_rev_icons_added(rev_mind)
return 1
@@ -140,13 +145,14 @@
//Announces the end of the game with all relavent information stated//
//////////////////////////////////////////////////////////////////////
/datum/game_mode/revolution/rp_revolution/declare_completion()
if(finished == 1)
feedback_set_details("round_end_result","win - heads overthrown")
world << "\red <FONT size = 3><B> The heads of staff were overthrown! The revolutionaries win!</B></FONT>"
else if(finished == 2)
feedback_set_details("round_end_result","loss - revolution stopped")
world << "\red <FONT size = 3><B> The heads of staff managed to stop the revolution!</B></FONT>"
..()
if(!config.objectives_disabled)
if(finished == 1)
feedback_set_details("round_end_result","win - heads overthrown")
world << "\red <FONT size = 3><B> The heads of staff were overthrown! The revolutionaries win!</B></FONT>"
else if(finished == 2)
feedback_set_details("round_end_result","loss - revolution stopped")
world << "\red <FONT size = 3><B> The heads of staff managed to stop the revolution!</B></FONT>"
..()
return 1
/datum/game_mode/revolution/proc/is_convertible(mob/M)
+49 -18
View File
@@ -12,7 +12,7 @@
recommended_enemies = 4
uplink_welcome = "Syndicate Uplink Console:"
uplink_welcome = "AntagCorp Portable Teleportation Relay:"
uplink_uses = 10
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
@@ -65,7 +65,8 @@
/datum/game_mode/traitor/post_setup()
for(var/datum/mind/traitor in traitors)
forge_traitor_objectives(traitor)
if (!config.objectives_disabled)
forge_traitor_objectives(traitor)
spawn(rand(10,100))
finalize_traitor(traitor)
greet_traitor(traitor)
@@ -131,10 +132,13 @@
/datum/game_mode/proc/greet_traitor(var/datum/mind/traitor)
traitor.current << "<B><font size=3 color=red>You are the traitor.</font></B>"
var/obj_count = 1
for(var/datum/objective/objective in traitor.objectives)
traitor.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
if (!config.objectives_disabled)
var/obj_count = 1
for(var/datum/objective/objective in traitor.objectives)
traitor.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
else
traitor.current << "<i>You have been selected this round as an antagonist- <font color=blue>Within the rules,</font> try to act as an opposing force to the crew- This can be via corporate payoff, personal motives, or maybe just being a dick. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonist.</i></b>"
return
@@ -216,19 +220,20 @@
special_role_text = lowertext(traitor.special_role)
else
special_role_text = "antagonist"
if(traitorwin)
text += "<br><font color='green'><B>The [special_role_text] was successful!</B></font>"
feedback_add_details("traitor_success","SUCCESS")
else
text += "<br><font color='red'><B>The [special_role_text] has failed!</B></font>"
feedback_add_details("traitor_success","FAIL")
if(!config.objectives_disabled)
if(traitorwin)
text += "<br><font color='green'><B>The [special_role_text] was successful!</B></font>"
feedback_add_details("traitor_success","SUCCESS")
else
text += "<br><font color='red'><B>The [special_role_text] has failed!</B></font>"
feedback_add_details("traitor_success","FAIL")
world << text
return 1
/datum/game_mode/proc/equip_traitor(mob/living/carbon/human/traitor_mob, var/safety = 0)
if (!istype(traitor_mob))
return
. = 1
@@ -239,12 +244,38 @@
// find a radio! toolbox(es), backpack, belt, headset
var/loc = ""
var/obj/item/R = locate(/obj/item/device/pda) in traitor_mob.contents //Hide the uplink in a PDA if available, otherwise radio
if(!R)
var/obj/item/R = locate() //Hide the uplink in a PDA if available, otherwise radio
if(traitor_mob.client.prefs.uplinklocation == "Headset")
R = locate(/obj/item/device/radio) in traitor_mob.contents
if(!R)
R = locate(/obj/item/device/pda) in traitor_mob.contents
traitor_mob << "Could not locate a Radio, installing in PDA instead!"
if (!R)
traitor_mob << "Unfortunately, neither a radio or a PDA relay could be installed."
else if(traitor_mob.client.prefs.uplinklocation == "PDA")
R = locate(/obj/item/device/pda) in traitor_mob.contents
if(!R)
R = locate(/obj/item/device/radio) in traitor_mob.contents
traitor_mob << "Could not locate a PDA, installing into a Radio instead!"
if (!R)
traitor_mob << "Unfortunately, neither a radio or a PDA relay could be installed."
else if(traitor_mob.client.prefs.uplinklocation == "None")
traitor_mob << "You have elected to not have an AntagCorp portable teleportation relay installed!"
R = null
else
traitor_mob << "You have not selected a location for your relay in the antagonist options! Defaulting to PDA!"
R = locate(/obj/item/device/pda) in traitor_mob.contents
if (!R)
R = locate(/obj/item/device/radio) in traitor_mob.contents
traitor_mob << "Could not locate a PDA, installing into a Radio instead!"
if (!R)
traitor_mob << "Unfortunately, neither a radio or a PDA relay could be installed."
if (!R)
traitor_mob << "Unfortunately, the Syndicate wasn't able to get you a radio."
. = 0
else
if (istype(R, /obj/item/device/radio))
@@ -263,7 +294,7 @@
var/obj/item/device/uplink/hidden/T = new(R)
target_radio.hidden_uplink = T
target_radio.traitor_frequency = freq
traitor_mob << "The Syndicate have cunningly disguised a Syndicate Uplink as your [R.name] [loc]. Simply dial the frequency [format_frequency(freq)] to unlock its hidden features."
traitor_mob << "A portable object teleportation relay has been installed in your [R.name] [loc]. Simply dial the frequency [format_frequency(freq)] to unlock its hidden features."
traitor_mob.mind.store_memory("<B>Radio Freq:</B> [format_frequency(freq)] ([R.name] [loc]).")
else if (istype(R, /obj/item/device/pda))
// generate a passcode if the uplink is hidden in a PDA
@@ -274,7 +305,7 @@
var/obj/item/device/pda/P = R
P.lock_code = pda_pass
traitor_mob << "The Syndicate have cunningly disguised a Syndicate Uplink as your [R.name] [loc]. Simply enter the code \"[pda_pass]\" into the ringtone select to unlock its hidden features."
traitor_mob << "A portable object teleportation relay has been installed in your [R.name] [loc]. Simply enter the code \"[pda_pass]\" into the ringtone select to unlock its hidden features."
traitor_mob.mind.store_memory("<B>Uplink Passcode:</B> [pda_pass] ([R.name] [loc]).")
//Begin code phrase.
if(!safety)//If they are not a rev. Can be added on to.
+25 -21
View File
@@ -50,7 +50,8 @@
/datum/game_mode/wizard/post_setup()
for(var/datum/mind/wizard in wizards)
forge_wizard_objectives(wizard)
if(!config.objectives_disabled)
forge_wizard_objectives(wizard)
//learn_basic_spells(wizard.current)
equip_wizard(wizard.current)
name_wizard(wizard.current)
@@ -132,11 +133,13 @@
if (you_are)
wizard.current << "<B>\red You are the Space Wizard!</B>"
wizard.current << "<B>The Space Wizards Federation has given you the following tasks:</B>"
var/obj_count = 1
for(var/datum/objective/objective in wizard.objectives)
wizard.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
if(!config.objectives_disabled)
var/obj_count = 1
for(var/datum/objective/objective in wizard.objectives)
wizard.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
obj_count++
else
wizard.current << "<font color=blue>Within the rules,</font> try to act as an opposing force to the crew. Further RP and try to make sure other players have </i>fun<i>! If you are confused or at a loss, always adminhelp, and before taking extreme actions, please try to also contact the administration! Think through your actions and make the roleplay immersive! <b>Please remember all rules aside from those without explicit exceptions apply to antagonists.</i></b>"
return
@@ -231,22 +234,23 @@
var/count = 1
var/wizardwin = 1
for(var/datum/objective/objective in wizard.objectives)
if(objective.check_completion())
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font>"
feedback_add_details("wizard_objective","[objective.type]|SUCCESS")
else
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font>"
feedback_add_details("wizard_objective","[objective.type]|FAIL")
wizardwin = 0
count++
if(!config.objectives_disabled)
for(var/datum/objective/objective in wizard.objectives)
if(objective.check_completion())
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font>"
feedback_add_details("wizard_objective","[objective.type]|SUCCESS")
else
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font>"
feedback_add_details("wizard_objective","[objective.type]|FAIL")
wizardwin = 0
count++
if(wizard.current && wizard.current.stat!=2 && wizardwin)
text += "<br><font color='green'><B>The wizard was successful!</B></font>"
feedback_add_details("wizard_success","SUCCESS")
else
text += "<br><font color='red'><B>The wizard has failed!</B></font>"
feedback_add_details("wizard_success","FAIL")
if(wizard.current && wizard.current.stat!=2 && wizardwin)
text += "<br><font color='green'><B>The wizard was successful!</B></font>"
feedback_add_details("wizard_success","SUCCESS")
else
text += "<br><font color='red'><B>The wizard has failed!</B></font>"
feedback_add_details("wizard_success","FAIL")
world << text
return 1
+2 -1
View File
@@ -21,7 +21,8 @@
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
var/obj/item/clothing/under/U = new /obj/item/clothing/under/rank/captain(H)
U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
if(H.age>49)
U.hastie = new /obj/item/clothing/tie/medal/gold/captain(U)
H.equip_to_slot_or_del(U, slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/captain(H), slot_belt)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/brown(H), slot_shoes)
+1 -2
View File
@@ -19,7 +19,6 @@
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_norm(H), slot_back)
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/bartender(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/device/pda/bar(H), slot_belt)
@@ -362,4 +361,4 @@
var/datum/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
return 1
return 1
+141 -124
View File
@@ -1,5 +1,5 @@
/obj/machinery/atmospherics/unary/cold_sink/freezer
name = "Freezer"
name = "gas cooling system"
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "freezer_0"
density = 1
@@ -8,84 +8,91 @@
current_heat_capacity = 1000
New()
..()
initialize_directions = dir
/obj/machinery/atmospherics/unary/cold_sink/freezer/New()
..()
initialize_directions = dir
initialize()
if(node) return
/obj/machinery/atmospherics/unary/cold_sink/freezer/initialize()
if(node) return
var/node_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
node = target
break
update_icon()
var/node_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
node = target
break
update_icon()
if(src.node)
if(src.on)
icon_state = "freezer_1"
else
icon_state = "freezer"
/obj/machinery/atmospherics/unary/cold_sink/freezer/update_icon()
if(src.node)
if(src.on)
icon_state = "freezer_1"
else
icon_state = "freezer_0"
return
icon_state = "freezer"
else
icon_state = "freezer_0"
return
attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/atmospherics/unary/cold_sink/freezer/attack_ai(mob/user as mob)
src.ui_interact(user)
attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/atmospherics/unary/cold_sink/freezer/attack_paw(mob/user as mob)
src.ui_interact(user)
attack_hand(mob/user as mob)
user.set_machine(src)
var/temp_text = ""
if(air_contents.temperature > (T0C - 20))
temp_text = "<FONT color=red>[air_contents.temperature]</FONT>"
else if(air_contents.temperature < (T0C - 20) && air_contents.temperature > (T0C - 100))
temp_text = "<FONT color=black>[air_contents.temperature]</FONT>"
/obj/machinery/atmospherics/unary/cold_sink/freezer/attack_hand(mob/user as mob)
src.ui_interact(user)
/obj/machinery/atmospherics/unary/cold_sink/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
// this is the data which will be sent to the ui
var/data[0]
data["on"] = on ? 1 : 0
data["gasPressure"] = round(air_contents.return_pressure())
data["gasTemperature"] = round(air_contents.temperature)
data["minGasTemperature"] = round(T0C - 200)
data["maxGasTemperature"] = round(T20C)
data["targetGasTemperature"] = round(current_temperature)
var/temp_class = "good"
if (air_contents.temperature > (T0C - 20))
temp_class = "bad"
else if (air_contents.temperature < (T0C - 20) && air_contents.temperature > (T0C - 100))
temp_class = "average"
data["gasTemperatureClass"] = temp_class
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Cooling System", 440, 300)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/atmospherics/unary/cold_sink/freezer/Topic(href, href_list)
if (href_list["toggleStatus"])
src.on = !src.on
update_icon()
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
src.current_temperature = min(T20C, src.current_temperature+amount)
else
temp_text = "<FONT color=blue>[air_contents.temperature]</FONT>"
var/dat = {"<B>Cryo gas cooling system</B><BR>
Current status: [ on ? "<A href='?src=\ref[src];start=1'>Off</A> <B>On</B>" : "<B>Off</B> <A href='?src=\ref[src];start=1'>On</A>"]<BR>
Current gas temperature: [temp_text]<BR>
Current air pressure: [air_contents.return_pressure()]<BR>
Target gas temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
"}
user << browse(dat, "window=freezer;size=400x500")
onclose(user, "freezer")
Topic(href, href_list)
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
usr.set_machine(src)
if (href_list["start"])
src.on = !src.on
update_icon()
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
src.current_temperature = min(T20C, src.current_temperature+amount)
else
src.current_temperature = max((T0C - 200), src.current_temperature+amount)
src.updateUsrDialog()
src.add_fingerprint(usr)
return
process()
..()
src.updateUsrDialog()
src.current_temperature = max((T0C - 200), src.current_temperature+amount)
src.add_fingerprint(usr)
return 1
/obj/machinery/atmospherics/unary/cold_sink/freezer/process()
..()
/obj/machinery/atmospherics/unary/heat_reservoir/heater
name = "Heater"
name = "gas heating system"
icon = 'icons/obj/Cryogenic2.dmi'
icon_state = "freezer_0"
density = 1
@@ -94,73 +101,83 @@
current_heat_capacity = 1000
New()
..()
initialize_directions = dir
/obj/machinery/atmospherics/unary/heat_reservoir/heater/New()
..()
initialize_directions = dir
initialize()
if(node) return
/obj/machinery/atmospherics/unary/heat_reservoir/heater/initialize()
if(node) return
var/node_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
node = target
break
update_icon()
var/node_connect = dir
for(var/obj/machinery/atmospherics/target in get_step(src,node_connect))
if(target.initialize_directions & get_dir(target,src))
node = target
break
update_icon()
if(src.node)
if(src.on)
icon_state = "heater_1"
else
icon_state = "heater"
/obj/machinery/atmospherics/unary/heat_reservoir/heater/update_icon()
if(src.node)
if(src.on)
icon_state = "heater_1"
else
icon_state = "heater_0"
return
icon_state = "heater"
else
icon_state = "heater_0"
return
attack_ai(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attack_ai(mob/user as mob)
src.ui_interact(user)
attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attack_paw(mob/user as mob)
src.ui_interact(user)
attack_hand(mob/user as mob)
user.set_machine(src)
var/temp_text = ""
if(air_contents.temperature > (T20C+40))
temp_text = "<FONT color=red>[air_contents.temperature]</FONT>"
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attack_hand(mob/user as mob)
src.ui_interact(user)
/obj/machinery/atmospherics/unary/heat_reservoir/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
// this is the data which will be sent to the ui
var/data[0]
data["on"] = on ? 1 : 0
data["gasPressure"] = round(air_contents.return_pressure())
data["gasTemperature"] = round(air_contents.temperature)
data["minGasTemperature"] = round(T20C)
data["maxGasTemperature"] = round(T20C+280)
data["targetGasTemperature"] = round(current_temperature)
var/temp_class = "normal"
if (air_contents.temperature > (T20C+40))
temp_class = "bad"
data["gasTemperatureClass"] = temp_class
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "freezer.tmpl", "Gas Heating System", 440, 300)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/atmospherics/unary/heat_reservoir/heater/Topic(href, href_list)
if (href_list["toggleStatus"])
src.on = !src.on
update_icon()
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
src.current_temperature = min((T20C+280), src.current_temperature+amount)
else
temp_text = "<FONT color=black>[air_contents.temperature]</FONT>"
src.current_temperature = max(T20C, src.current_temperature+amount)
src.add_fingerprint(usr)
return 1
var/dat = {"<B>Heating system</B><BR>
Current status: [ on ? "<A href='?src=\ref[src];start=1'>Off</A> <B>On</B>" : "<B>Off</B> <A href='?src=\ref[src];start=1'>On</A>"]<BR>
Current gas temperature: [temp_text]<BR>
Current air pressure: [air_contents.return_pressure()]<BR>
Target gas temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
"}
user << browse(dat, "window=heater;size=400x500")
onclose(user, "heater")
Topic(href, href_list)
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon/ai)))
usr.set_machine(src)
if (href_list["start"])
src.on = !src.on
update_icon()
if(href_list["temp"])
var/amount = text2num(href_list["temp"])
if(amount > 0)
src.current_temperature = min((T20C+280), src.current_temperature+amount)
else
src.current_temperature = max(T20C, src.current_temperature+amount)
src.updateUsrDialog()
src.add_fingerprint(usr)
return
process()
..()
src.updateUsrDialog()
/obj/machinery/atmospherics/unary/heat_reservoir/heater/process()
..()
+16 -3
View File
@@ -124,7 +124,8 @@ obj/machinery/airlock_sensor
var/id_tag
var/master_tag
var/frequency = 1449
var/frequency = 1379
var/command = "cycle"
var/datum/radio_frequency/radio_connection
@@ -145,7 +146,7 @@ obj/machinery/airlock_sensor/attack_hand(mob/user)
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.data["tag"] = master_tag
signal.data["command"] = "cycle"
signal.data["command"] = command
radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = RADIO_AIRLOCK)
flick("airlock_sensor_cycle", src)
@@ -183,7 +184,11 @@ obj/machinery/airlock_sensor/New()
set_frequency(frequency)
obj/machinery/airlock_sensor/airlock_interior
command = "cycle_interior"
obj/machinery/airlock_sensor/airlock_exterior
command = "cycle_exterior"
obj/machinery/access_button
icon = 'icons/obj/airlock_machines.dmi'
@@ -238,4 +243,12 @@ obj/machinery/access_button/New()
..()
if(radio_controller)
set_frequency(frequency)
set_frequency(frequency)
obj/machinery/access_button/airlock_interior
frequency = 1379
command = "cycle_interior"
obj/machinery/access_button/airlock_exterior
frequency = 1379
command = "cycle_exterior"
+81 -79
View File
@@ -173,8 +173,6 @@ update_flag
if(air_contents.temperature > PLASMA_FLASHPOINT)
air_contents.zburn()
src.updateDialog()
return
/obj/machinery/portable_atmospherics/canister/return_air()
@@ -229,6 +227,10 @@ update_flag
return
..()
nanomanager.update_uis(src) // Update all NanoUIs attached to src
/obj/machinery/portable_atmospherics/canister/attack_ai(var/mob/user as mob)
return src.attack_hand(user)
@@ -237,94 +239,94 @@ update_flag
return src.attack_hand(user)
/obj/machinery/portable_atmospherics/canister/attack_hand(var/mob/user as mob)
return src.interact(user)
return src.ui_interact(user)
/obj/machinery/portable_atmospherics/canister/interact(var/mob/user as mob)
/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
if (src.destroyed)
return
user.set_machine(src)
var/holding_text
if(holding)
holding_text = {"<BR><B>Tank Pressure</B>: [holding.air_contents.return_pressure()] KPa<BR>
<A href='?src=\ref[src];remove_tank=1'>Remove Tank</A><BR>
"}
var/output_text = {"<TT><B>[name]</B>[can_label?" <A href='?src=\ref[src];relabel=1'><small>relabel</small></a>":""]<BR>
Pressure: [air_contents.return_pressure()] KPa<BR>
Port Status: [(connected_port)?("Connected"):("Disconnected")]
[holding_text]
<BR>
Release Valve: <A href='?src=\ref[src];toggle=1'>[valve_open?("Open"):("Closed")]</A><BR>
Release Pressure: <A href='?src=\ref[src];pressure_adj=-1000'>-</A> <A href='?src=\ref[src];pressure_adj=-100'>-</A> <A href='?src=\ref[src];pressure_adj=-10'>-</A> <A href='?src=\ref[src];pressure_adj=-1'>-</A> [release_pressure] <A href='?src=\ref[src];pressure_adj=1'>+</A> <A href='?src=\ref[src];pressure_adj=10'>+</A> <A href='?src=\ref[src];pressure_adj=100'>+</A> <A href='?src=\ref[src];pressure_adj=1000'>+</A><BR>
<HR>
<A href='?src=\ref[user];mach_close=canister'>Close</A><BR>
"}
// this is the data which will be sent to the ui
var/data[0]
data["name"] = name
data["canLabel"] = can_label ? 1 : 0
data["portConnected"] = connected_port ? 1 : 0
data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
data["releasePressure"] = round(release_pressure ? release_pressure : 0)
data["minReleasePressure"] = round(ONE_ATMOSPHERE/10)
data["maxReleasePressure"] = round(10*ONE_ATMOSPHERE)
data["valveOpen"] = valve_open ? 1 : 0
data["hasHoldingTank"] = holding ? 1 : 0
if (holding)
data["holdingTank"] = list("name" = holding.name, "tankPressure" = round(holding.air_contents.return_pressure()))
user << browse("<html><head><title>[src]</title></head><body>[output_text]</body></html>", "window=canister;size=600x300")
onclose(user, "canister")
return
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "canister.tmpl", "Canister", 480, 400)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/machinery/portable_atmospherics/canister/Topic(href, href_list)
//Do not use "if(..()) return" here, canisters will stop working in unpowered areas like space or on the derelict.
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
usr << browse(null, "window=canister")
onclose(usr, "canister")
return
if (((get_dist(src, usr) <= 1) && istype(src.loc, /turf)))
usr.set_machine(src)
if(href_list["toggle"])
if (valve_open)
if (holding)
release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the [holding]<br>"
else
release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the <font color='red'><b>air</b></font><br>"
//Do not use "if(..()) return" here, canisters will stop working in unpowered areas like space or on the derelict.
if (!istype(src.loc, /turf))
return 0
if(href_list["toggle"])
if (valve_open)
if (holding)
release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the [holding]<br>"
else
if (holding)
release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the [holding]<br>"
else
release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the <font color='red'><b>air</b></font><br>"
valve_open = !valve_open
if (href_list["remove_tank"])
if(holding)
if(istype(holding, /obj/item/weapon/tank))
holding.manipulated_by = usr.real_name
holding.loc = loc
holding = null
if (href_list["pressure_adj"])
var/diff = text2num(href_list["pressure_adj"])
if(diff > 0)
release_pressure = min(10*ONE_ATMOSPHERE, release_pressure+diff)
release_log += "Valve was <b>closed</b> by [usr] ([usr.ckey]), stopping the transfer into the <font color='red'><b>air</b></font><br>"
else
if (holding)
release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the [holding]<br>"
else
release_pressure = max(ONE_ATMOSPHERE/10, release_pressure+diff)
release_log += "Valve was <b>opened</b> by [usr] ([usr.ckey]), starting the transfer into the <font color='red'><b>air</b></font><br>"
valve_open = !valve_open
if (href_list["relabel"])
if (can_label)
var/list/colors = list(\
"\[N2O\]" = "redws", \
"\[N2\]" = "red", \
"\[O2\]" = "blue", \
"\[Toxin (Bio)\]" = "orange", \
"\[CO2\]" = "black", \
"\[Air\]" = "grey", \
"\[CAUTION\]" = "yellow", \
)
var/label = input("Choose canister label", "Gas canister") as null|anything in colors
if (label)
src.canister_color = colors[label]
src.icon_state = colors[label]
src.name = "Canister: [label]"
src.updateUsrDialog()
src.add_fingerprint(usr)
update_icon()
else
usr << browse(null, "window=canister")
return
return
if (href_list["remove_tank"])
if(holding)
if(istype(holding, /obj/item/weapon/tank))
holding.manipulated_by = usr.real_name
holding.loc = loc
holding = null
if (href_list["pressure_adj"])
var/diff = text2num(href_list["pressure_adj"])
if(diff > 0)
release_pressure = min(10*ONE_ATMOSPHERE, release_pressure+diff)
else
release_pressure = max(ONE_ATMOSPHERE/10, release_pressure+diff)
if (href_list["relabel"])
if (can_label)
var/list/colors = list(\
"\[N2O\]" = "redws", \
"\[N2\]" = "red", \
"\[O2\]" = "blue", \
"\[Toxin (Bio)\]" = "orange", \
"\[CO2\]" = "black", \
"\[Air\]" = "grey", \
"\[CAUTION\]" = "yellow", \
)
var/label = input("Choose canister label", "Gas canister") as null|anything in colors
if (label)
src.canister_color = colors[label]
src.icon_state = colors[label]
src.name = "Canister: [label]"
src.add_fingerprint(usr)
update_icon()
return 1
/obj/machinery/portable_atmospherics/canister/toxins/New()
+2 -1
View File
@@ -31,7 +31,8 @@
/obj/item/toy/prize/seraph = 1,
/obj/item/toy/prize/mauler = 1,
/obj/item/toy/prize/odysseus = 1,
/obj/item/toy/prize/phazon = 1
/obj/item/toy/prize/phazon = 1,
/obj/item/toy/waterflower = 1
)
/obj/machinery/computer/arcade
+11
View File
@@ -4,8 +4,17 @@
icon = 'icons/obj/doors/rapid_pdoor.dmi'
icon_state = "pdoor1"
var/id = 1.0
dir = 1
explosion_resistance = 25
/obj/machinery/door/poddoor/New()
. = ..()
if(density)
layer = 3.3 //to override door.New() proc
else
layer = initial(layer)
return
/obj/machinery/door/poddoor/Bumped(atom/AM)
if(!density)
return ..()
@@ -39,6 +48,7 @@
src.icon_state = "pdoor0"
src.SetOpacity(0)
sleep(10)
layer = initial(layer)
src.density = 0
update_nearby_tiles()
@@ -53,6 +63,7 @@
if (src.operating)
return
src.operating = 1
layer = 3.3
flick("pdoorc1", src)
src.icon_state = "pdoor1"
src.density = 1
@@ -1,214 +0,0 @@
//States for airlock_control
#define ACCESS_STATE_INTERNAL -1
#define ACCESS_STATE_LOCKED 0
#define ACCESS_STATE_EXTERNAL 1
datum/computer/file/embedded_program/access_controller
var/id_tag
var/exterior_door_tag
var/interior_door_tag
state = ACCESS_STATE_LOCKED
var/target_state = ACCESS_STATE_LOCKED
receive_signal(datum/signal/signal, receive_method, receive_param)
var/receive_tag = signal.data["tag"]
if(!receive_tag) return
if(receive_tag==exterior_door_tag)
if(signal.data["door_status"] == "closed")
if(signal.data["lock_status"] == "locked")
memory["exterior_status"] = "locked"
else
memory["exterior_status"] = "closed"
else
memory["exterior_status"] = "open"
else if(receive_tag==interior_door_tag)
if(signal.data["door_status"] == "closed")
if(signal.data["lock_status"] == "locked")
memory["interior_status"] = "locked"
else
memory["interior_status"] = "closed"
else
memory["interior_status"] = "open"
else if(receive_tag==id_tag)
switch(signal.data["command"])
if("cycle_interior")
target_state = ACCESS_STATE_INTERNAL
if("cycle_exterior")
target_state = ACCESS_STATE_EXTERNAL
if("cycle")
if(state < ACCESS_STATE_LOCKED)
target_state = ACCESS_STATE_EXTERNAL
else
target_state = ACCESS_STATE_INTERNAL
receive_user_command(command)
switch(command)
if("cycle_closed")
target_state = ACCESS_STATE_LOCKED
if("cycle_exterior")
target_state = ACCESS_STATE_EXTERNAL
if("cycle_interior")
target_state = ACCESS_STATE_INTERNAL
process()
var/process_again = 1
while(process_again)
process_again = 0
switch(state)
if(ACCESS_STATE_INTERNAL) // state -1
if(target_state > state)
if(memory["interior_status"] == "locked")
state = ACCESS_STATE_LOCKED
process_again = 1
else
var/datum/signal/signal = new
signal.data["tag"] = interior_door_tag
if(memory["interior_status"] == "closed")
signal.data["command"] = "lock"
else
signal.data["command"] = "secure_close"
post_signal(signal)
if(ACCESS_STATE_LOCKED)
if(target_state < state)
if(memory["exterior_status"] != "locked")
var/datum/signal/signal = new
signal.data["tag"] = exterior_door_tag
if(memory["exterior_status"] == "closed")
signal.data["command"] = "lock"
else
signal.data["command"] = "secure_close"
post_signal(signal)
else
if(memory["interior_status"] == "closed" || memory["interior_status"] == "open")
state = ACCESS_STATE_INTERNAL
process_again = 1
else
var/datum/signal/signal = new
signal.data["tag"] = interior_door_tag
signal.data["command"] = "secure_open"
post_signal(signal)
else if(target_state > state)
if(memory["interior_status"] != "locked")
var/datum/signal/signal = new
signal.data["tag"] = interior_door_tag
if(memory["interior_status"] == "closed")
signal.data["command"] = "lock"
else
signal.data["command"] = "secure_close"
post_signal(signal)
else
if(memory["exterior_status"] == "closed" || memory["exterior_status"] == "open")
state = ACCESS_STATE_EXTERNAL
process_again = 1
else
var/datum/signal/signal = new
signal.data["tag"] = exterior_door_tag
signal.data["command"] = "secure_open"
post_signal(signal)
else
if(memory["interior_status"] != "locked")
var/datum/signal/signal = new
signal.data["tag"] = interior_door_tag
if(memory["interior_status"] == "closed")
signal.data["command"] = "lock"
else
signal.data["command"] = "secure_close"
post_signal(signal)
else if(memory["exterior_status"] != "locked")
var/datum/signal/signal = new
signal.data["tag"] = exterior_door_tag
if(memory["exterior_status"] == "closed")
signal.data["command"] = "lock"
else
signal.data["command"] = "secure_close"
post_signal(signal)
if(ACCESS_STATE_EXTERNAL) //state 1
if(target_state < state)
if(memory["exterior_status"] == "locked")
state = ACCESS_STATE_LOCKED
process_again = 1
else
var/datum/signal/signal = new
signal.data["tag"] = exterior_door_tag
if(memory["exterior_status"] == "closed")
signal.data["command"] = "lock"
else
signal.data["command"] = "secure_close"
post_signal(signal)
return 1
obj/machinery/embedded_controller/radio/access_controller
icon = 'icons/obj/airlock_machines.dmi'
icon_state = "access_control_standby"
name = "Access Console"
density = 0
power_channel = ENVIRON
unacidable = 1
frequency = 1449
// Setup parameters only
var/id_tag
var/exterior_door_tag
var/interior_door_tag
initialize()
..()
var/datum/computer/file/embedded_program/access_controller/new_prog = new
new_prog.id_tag = id_tag
new_prog.exterior_door_tag = exterior_door_tag
new_prog.interior_door_tag = interior_door_tag
new_prog.master = src
program = new_prog
update_icon()
if(on && program)
if(program.memory["processing"])
icon_state = "access_control_process"
else
icon_state = "access_control_standby"
else
icon_state = "access_control_off"
return_text()
var/state_options = null
var/state = 0
var/exterior_status = "----"
var/interior_status = "----"
if(program)
state = program.state
exterior_status = program.memory["exterior_status"]
interior_status = program.memory["interior_status"]
switch(state)
if(ACCESS_STATE_INTERNAL)
state_options = {"<A href='?src=\ref[src];command=cycle_closed'>Lock Interior Airlock</A><BR>
<A href='?src=\ref[src];command=cycle_exterior'>Cycle to Exterior Airlock</A><BR>"}
if(ACCESS_STATE_LOCKED)
state_options = {"<A href='?src=\ref[src];command=cycle_interior'>Unlock Interior Airlock</A><BR>
<A href='?src=\ref[src];command=cycle_exterior'>Unlock Exterior Airlock</A><BR>"}
if(ACCESS_STATE_EXTERNAL)
state_options = {"<A href='?src=\ref[src];command=cycle_interior'>Cycle to Interior Airlock</A><BR>
<A href='?src=\ref[src];command=cycle_closed'>Lock Exterior Airlock</A><BR>"}
var/output = {"<B>Access Control Console</B><HR>
[state_options]<HR>
<B>Exterior Door: </B> [exterior_status]<BR>
<B>Interior Door: </B> [interior_status]<BR>"}
return output
@@ -1,352 +0,0 @@
//States for airlock_control
#define AIRLOCK_STATE_INOPEN -2
#define AIRLOCK_STATE_PRESSURIZE -1
#define AIRLOCK_STATE_CLOSED 0
#define AIRLOCK_STATE_DEPRESSURIZE 1
#define AIRLOCK_STATE_OUTOPEN 2
#define AIRLOCK_STATE_BOTHOPEN 3
datum/computer/file/embedded_program/airlock_controller
var/id_tag
var/exterior_door_tag
var/interior_door_tag
var/airpump_tag
var/sensor_tag
var/sensor_tag_int
var/sanitize_external
state = AIRLOCK_STATE_CLOSED
var/target_state = AIRLOCK_STATE_CLOSED
var/sensor_pressure = null
var/int_sensor_pressure = ONE_ATMOSPHERE
receive_signal(datum/signal/signal, receive_method, receive_param)
var/receive_tag = signal.data["tag"]
if(!receive_tag) return
if(receive_tag==sensor_tag)
if(signal.data["pressure"])
sensor_pressure = text2num(signal.data["pressure"])
else if(receive_tag==sensor_tag_int)
if(signal.data["pressure"])
int_sensor_pressure = text2num(signal.data["pressure"])
else if(receive_tag==exterior_door_tag)
memory["exterior_status"] = signal.data["door_status"]
if(signal.data["bumped_with_access"])
target_state = AIRLOCK_STATE_OUTOPEN
else if(receive_tag==interior_door_tag)
memory["interior_status"] = signal.data["door_status"]
if(signal.data["bumped_with_access"])
target_state = AIRLOCK_STATE_INOPEN
else if(receive_tag==airpump_tag)
if(signal.data["power"])
memory["pump_status"] = signal.data["direction"]
else
memory["pump_status"] = "off"
else if(receive_tag==id_tag)
switch(signal.data["command"])
if("cycle_exterior")
target_state = AIRLOCK_STATE_OUTOPEN
if("cycle_interior")
target_state = AIRLOCK_STATE_INOPEN
if("cycle")
if(state < AIRLOCK_STATE_CLOSED)
target_state = AIRLOCK_STATE_OUTOPEN
else
target_state = AIRLOCK_STATE_INOPEN
if("cycle_interior")
target_state = AIRLOCK_STATE_INOPEN
if("cycle_exterior")
target_state = AIRLOCK_STATE_OUTOPEN
receive_user_command(command)
switch(command)
if("cycle_closed")
target_state = AIRLOCK_STATE_CLOSED
if("cycle_exterior")
target_state = AIRLOCK_STATE_OUTOPEN
if("cycle_interior")
target_state = AIRLOCK_STATE_INOPEN
if("abort")
target_state = AIRLOCK_STATE_CLOSED
if("force_both")
target_state = AIRLOCK_STATE_BOTHOPEN
state = AIRLOCK_STATE_BOTHOPEN
var/datum/signal/signal = new
signal.data["tag"] = interior_door_tag
signal.data["command"] = "secure_open"
post_signal(signal)
signal = new
signal.data["tag"] = exterior_door_tag
signal.data["command"] = "secure_open"
post_signal(signal)
if("force_exterior")
target_state = AIRLOCK_STATE_OUTOPEN
state = AIRLOCK_STATE_OUTOPEN
var/datum/signal/signal = new
signal.data["tag"] = exterior_door_tag
signal.data["command"] = "secure_open"
post_signal(signal)
if("force_interior")
target_state = AIRLOCK_STATE_INOPEN
state = AIRLOCK_STATE_INOPEN
var/datum/signal/signal = new
signal.data["tag"] = interior_door_tag
signal.data["command"] = "secure_open"
post_signal(signal)
if("close")
target_state = AIRLOCK_STATE_CLOSED
state = AIRLOCK_STATE_CLOSED
var/datum/signal/signal = new
signal.data["tag"] = exterior_door_tag
signal.data["command"] = "secure_close"
post_signal(signal)
signal = new
signal.data["tag"] = interior_door_tag
signal.data["command"] = "secure_close"
post_signal(signal)
process()
var/process_again = 1
while(process_again)
process_again = 0
switch(state)
if(AIRLOCK_STATE_INOPEN) // state -2
if(target_state > state)
if(memory["interior_status"] == "closed")
state = AIRLOCK_STATE_CLOSED
process_again = 1
else
var/datum/signal/signal = new
signal.data["tag"] = interior_door_tag
signal.data["command"] = "secure_close"
post_signal(signal)
else
if(memory["pump_status"] != "off")
var/datum/signal/signal = new
signal.data = list(
"tag" = airpump_tag,
"power" = 0,
"sigtype"="command"
)
post_signal(signal)
if(AIRLOCK_STATE_PRESSURIZE)
if(target_state < state)
if(sensor_pressure >= int_sensor_pressure*0.95)
if(memory["interior_status"] == "open")
state = AIRLOCK_STATE_INOPEN
process_again = 1
else
var/datum/signal/signal = new
signal.data["tag"] = interior_door_tag
signal.data["command"] = "secure_open"
post_signal(signal)
else
var/datum/signal/signal = new
signal.data = list(
"tag" = airpump_tag,
"sigtype"="command"
)
if(memory["pump_status"] == "siphon")
signal.data["stabalize"] = 1
else if(memory["pump_status"] != "release")
signal.data["power"] = 1
post_signal(signal)
else if(target_state > state)
state = AIRLOCK_STATE_CLOSED
process_again = 1
if(AIRLOCK_STATE_CLOSED)
if(target_state > state)
if(memory["interior_status"] == "closed")
state = AIRLOCK_STATE_DEPRESSURIZE
process_again = 1
else
var/datum/signal/signal = new
signal.data["tag"] = interior_door_tag
signal.data["command"] = "secure_close"
post_signal(signal)
else if(target_state < state)
if(memory["exterior_status"] == "closed")
state = AIRLOCK_STATE_PRESSURIZE
process_again = 1
else
var/datum/signal/signal = new
signal.data["tag"] = exterior_door_tag
signal.data["command"] = "secure_close"
post_signal(signal)
else
if(memory["pump_status"] != "off")
var/datum/signal/signal = new
signal.data = list(
"tag" = airpump_tag,
"power" = 0,
"sigtype"="command"
)
post_signal(signal)
if(AIRLOCK_STATE_DEPRESSURIZE)
var/target_pressure = ONE_ATMOSPHERE*0.04
if(sanitize_external)
target_pressure = ONE_ATMOSPHERE*0.01
if(sensor_pressure <= target_pressure)
if(target_state > state)
if(memory["exterior_status"] == "open")
state = AIRLOCK_STATE_OUTOPEN
else
var/datum/signal/signal = new
signal.data["tag"] = exterior_door_tag
signal.data["command"] = "secure_open"
post_signal(signal)
else if(target_state < state)
state = AIRLOCK_STATE_CLOSED
process_again = 1
else if((target_state < state) && !sanitize_external)
state = AIRLOCK_STATE_CLOSED
process_again = 1
else
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.data = list(
"tag" = airpump_tag,
"sigtype"="command"
)
if(memory["pump_status"] == "release")
signal.data["purge"] = 1
else if(memory["pump_status"] != "siphon")
signal.data["power"] = 1
post_signal(signal)
if(AIRLOCK_STATE_OUTOPEN) //state 2
if(target_state < state)
if(memory["exterior_status"] == "closed")
if(sanitize_external)
state = AIRLOCK_STATE_DEPRESSURIZE
process_again = 1
else
state = AIRLOCK_STATE_CLOSED
process_again = 1
else
var/datum/signal/signal = new
signal.data["tag"] = exterior_door_tag
signal.data["command"] = "secure_close"
post_signal(signal)
else
if(memory["pump_status"] != "off")
var/datum/signal/signal = new
signal.data = list(
"tag" = airpump_tag,
"power" = 0,
"sigtype"="command"
)
post_signal(signal)
memory["sensor_pressure"] = sensor_pressure
memory["int_sensor_pressure"] = int_sensor_pressure
memory["processing"] = state != target_state
//sensor_pressure = null //not sure if we can comment this out. Uncomment in case of problems -rastaf0
return 1
obj/machinery/embedded_controller/radio/airlock_controller
icon = 'icons/obj/airlock_machines.dmi'
icon_state = "airlock_control_standby"
name = "Airlock Console"
density = 0
unacidable = 1
frequency = 1449
power_channel = ENVIRON
// Setup parameters only
var/id_tag
var/exterior_door_tag
var/interior_door_tag
var/airpump_tag
var/sensor_tag
var/sensor_tag_int
var/sanitize_external
initialize()
..()
var/datum/computer/file/embedded_program/airlock_controller/new_prog = new
new_prog.id_tag = id_tag
new_prog.exterior_door_tag = exterior_door_tag
new_prog.interior_door_tag = interior_door_tag
new_prog.airpump_tag = airpump_tag
new_prog.sensor_tag = sensor_tag
new_prog.sensor_tag_int = sensor_tag_int
new_prog.sanitize_external = sanitize_external
new_prog.master = src
program = new_prog
update_icon()
if(on && program)
if(program.memory["processing"])
icon_state = "airlock_control_process"
else
icon_state = "airlock_control_standby"
else
icon_state = "airlock_control_off"
return_text()
var/state_options = null
var/state = 0
var/sensor_pressure = "----"
var/int_sensor_pressure = "----"
var/exterior_status = "----"
var/interior_status = "----"
var/pump_status = "----"
if(program)
state = program.state
sensor_pressure = program.memory["sensor_pressure"]
int_sensor_pressure = program.memory["int_sensor_pressure"]
exterior_status = program.memory["exterior_status"]
interior_status = program.memory["interior_status"]
pump_status = program.memory["pump_status"]
switch(state)
if(AIRLOCK_STATE_INOPEN)
state_options = {"<A href='?src=\ref[src];command=cycle_closed'>Close Interior Airlock</A><BR>
<A href='?src=\ref[src];command=cycle_exterior'>Cycle to Exterior Airlock</A><BR>"}
if(AIRLOCK_STATE_PRESSURIZE)
state_options = "<A href='?src=\ref[src];command=abort'>Abort Cycling</A><BR>"
if(AIRLOCK_STATE_CLOSED)
state_options = {"<A href='?src=\ref[src];command=cycle_interior'>Open Interior Airlock</A><BR>
<A href='?src=\ref[src];command=cycle_exterior'>Open Exterior Airlock</A><BR>"}
if(AIRLOCK_STATE_DEPRESSURIZE)
state_options = "<A href='?src=\ref[src];command=abort'>Abort Cycling</A><BR>"
if(AIRLOCK_STATE_OUTOPEN)
state_options = {"<A href='?src=\ref[src];command=cycle_interior'>Cycle to Interior Airlock</A><BR>
<A href='?src=\ref[src];command=cycle_closed'>Close Exterior Airlock</A><BR>"}
if(AIRLOCK_STATE_BOTHOPEN)
state_options = "<A href='?src=\ref[src];command=close'>Close Airlocks</A><BR>"
var/output = {"<B>Airlock Control Console</B><HR>
[state_options]<HR>
<B>Chamber Pressure:</B> [sensor_pressure] kPa<BR>
<B>Internal Pressure:</B> [int_sensor_pressure] kPa<BR>
<B>Exterior Door: </B> [exterior_status]<BR>
<B>Interior Door: </B> [interior_status]<BR>
<B>Control Pump: </B> [pump_status]<BR>"}
if(program && program.state == AIRLOCK_STATE_CLOSED)
output += {"<A href='?src=\ref[src];command=force_both'>Force Both Airlocks</A><br>
<A href='?src=\ref[src];command=force_interior'>Force Inner Airlock</A><br>
<A href='?src=\ref[src];command=force_exterior'>Force Outer Airlock</A>"}
return output
@@ -0,0 +1,153 @@
//Advanced airlock controller for when you want a more versatile airlock controller - useful for turning simple access control rooms into airlocks
/obj/machinery/embedded_controller/radio/advanced_airlock_controller
name = "Advanced Airlock Controller"
/obj/machinery/embedded_controller/radio/advanced_airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
var/data[0]
data = list(
"chamber_pressure" = round(program.memory["chamber_sensor_pressure"]),
"external_pressure" = round(program.memory["external_sensor_pressure"]),
"internal_pressure" = round(program.memory["internal_sensor_pressure"]),
"processing" = program.memory["processing"],
"purge" = program.memory["purge"],
"secure" = program.memory["secure"]
)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
ui = new(user, src, ui_key, "advanced_airlock_console.tmpl", name, 470, 290)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
/obj/machinery/embedded_controller/radio/advanced_airlock_controller/Topic(href, href_list)
var/clean = 0
switch(href_list["command"]) //anti-HTML-hacking checks
if("cycle_ext")
clean = 1
if("cycle_int")
clean = 1
if("force_ext")
clean = 1
if("force_int")
clean = 1
if("abort")
clean = 1
if("purge")
clean = 1
if("secure")
clean = 1
if(clean)
program.receive_user_command(href_list["command"])
return 1
//Airlock controller for airlock control - most airlocks on the station use this
/obj/machinery/embedded_controller/radio/airlock_controller
name = "Airlock Controller"
tag_secure = 1
/obj/machinery/embedded_controller/radio/airlock_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
var/data[0]
data = list(
"chamber_pressure" = round(program.memory["chamber_sensor_pressure"]),
"exterior_status" = program.memory["exterior_status"],
"interior_status" = program.memory["interior_status"],
"processing" = program.memory["processing"],
)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
ui = new(user, src, ui_key, "simple_airlock_console.tmpl", name, 470, 290)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
/obj/machinery/embedded_controller/radio/airlock_controller/Topic(href, href_list)
var/clean = 0
switch(href_list["command"]) //anti-HTML-hacking checks
if("cycle_ext")
clean = 1
if("cycle_int")
clean = 1
if("force_ext")
clean = 1
if("force_int")
clean = 1
if("abort")
clean = 1
if(clean)
program.receive_user_command(href_list["command"])
return 1
//Access controller for door control - used in virology and the like
/obj/machinery/embedded_controller/radio/access_controller
icon = 'icons/obj/airlock_machines.dmi'
icon_state = "access_control_standby"
name = "Access Controller"
tag_secure = 1
/obj/machinery/embedded_controller/radio/access_controller/update_icon()
if(on && program)
if(program.memory["processing"])
icon_state = "access_control_process"
else
icon_state = "access_control_standby"
else
icon_state = "access_control_off"
/obj/machinery/embedded_controller/radio/access_controller/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
var/data[0]
data = list(
"exterior_status" = program.memory["exterior_status"],
"interior_status" = program.memory["interior_status"],
"processing" = program.memory["processing"]
)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
ui = new(user, src, ui_key, "door_access_console.tmpl", name, 330, 220)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
/obj/machinery/embedded_controller/radio/access_controller/Topic(href, href_list)
var/clean = 0
switch(href_list["command"]) //anti-HTML-hacking checks
if("cycle_ext_door")
clean = 1
if("cycle_int_door")
clean = 1
if("force_ext")
if(program.memory["interior_status"]["state"] == "closed")
clean = 1
if("force_int")
if(program.memory["exterior_status"]["state"] == "closed")
clean = 1
if(clean)
program.receive_user_command(href_list["command"])
return 1
@@ -0,0 +1,316 @@
//Handles the control of airlocks
#define STATE_WAIT 0
#define STATE_DEPRESSURIZE 1
#define STATE_PRESSURIZE 2
#define TARGET_NONE 0
#define TARGET_INOPEN -1
#define TARGET_OUTOPEN -2
/datum/computer/file/embedded_program
var/list/memory = list()
var/obj/machinery/embedded_controller/master
var/id_tag
var/tag_exterior_door
var/tag_interior_door
var/tag_airpump
var/tag_chamber_sensor
var/tag_exterior_sensor
var/tag_interior_sensor
var/state = STATE_WAIT
var/target_state = TARGET_NONE
/datum/computer/file/embedded_program/New()
..()
memory["chamber_sensor_pressure"] = ONE_ATMOSPHERE
memory["external_sensor_pressure"] = 0 //assume vacuum for simple airlock controller
memory["internal_sensor_pressure"] = ONE_ATMOSPHERE
memory["exterior_status"] = list(state = "closed", lock = "locked") //assume closed and locked in case the doors dont report in
memory["interior_status"] = list(state = "closed", lock = "locked")
memory["pump_status"] = "unknown"
memory["target_pressure"] = ONE_ATMOSPHERE
memory["purge"] = 0
memory["secure"] = 0
/datum/computer/file/embedded_program/proc/receive_signal(datum/signal/signal, receive_method, receive_param)
var/receive_tag = signal.data["tag"]
if(!receive_tag) return
if(receive_tag==tag_chamber_sensor)
if(signal.data["pressure"])
memory["chamber_sensor_pressure"] = text2num(signal.data["pressure"])
else if(receive_tag==tag_exterior_sensor)
memory["external_sensor_pressure"] = text2num(signal.data["pressure"])
else if(receive_tag==tag_interior_sensor)
memory["internal_sensor_pressure"] = text2num(signal.data["pressure"])
else if(receive_tag==tag_exterior_door)
memory["exterior_status"]["state"] = signal.data["door_status"]
memory["exterior_status"]["lock"] = signal.data["lock_status"]
else if(receive_tag==tag_interior_door)
memory["interior_status"]["state"] = signal.data["door_status"]
memory["interior_status"]["lock"] = signal.data["lock_status"]
else if(receive_tag==tag_airpump)
if(signal.data["power"])
memory["pump_status"] = signal.data["direction"]
else
memory["pump_status"] = "off"
else if(receive_tag==id_tag)
if(istype(master, /obj/machinery/embedded_controller/radio/access_controller))
switch(signal.data["command"])
if("cycle_exterior")
receive_user_command("cycle_ext_door")
if("cycle_interior")
receive_user_command("cycle_int_door")
if("cycle")
if(memory["interior_status"]["state"] == "open") //handle backwards compatibility
receive_user_command("cycle_ext")
else
receive_user_command("cycle_int")
else
switch(signal.data["command"])
if("cycle_exterior")
receive_user_command("cycle_ext")
if("cycle_interior")
receive_user_command("cycle_int")
if("cycle")
if(memory["interior_status"]["state"] == "open") //handle backwards compatibility
receive_user_command("cycle_ext")
else
receive_user_command("cycle_int")
/datum/computer/file/embedded_program/proc/receive_user_command(command)
var/shutdown_pump = 0
switch(command)
if("cycle_ext")
state = STATE_WAIT
target_state = TARGET_OUTOPEN
if("cycle_int")
state = STATE_WAIT
target_state = TARGET_INOPEN
if("cycle_ext_door")
cycleDoors(TARGET_OUTOPEN)
if("cycle_int_door")
cycleDoors(TARGET_INOPEN)
if("abort")
state = STATE_PRESSURIZE
target_state = TARGET_NONE
memory["target_pressure"] = ONE_ATMOSPHERE
signalPump(tag_airpump, 1, 1, memory["target_pressure"])
process()
if("force_ext")
toggleDoor(memory["exterior_status"], tag_exterior_door, memory["secure"], "toggle")
if("force_int")
toggleDoor(memory["interior_status"], tag_interior_door, memory["secure"], "toggle")
if("purge")
memory["purge"] = !memory["purge"]
if(memory["purge"])
toggleDoor(memory["exterior_status"], tag_exterior_door, 1, "close")
toggleDoor(memory["interior_status"], tag_interior_door, 1, "close")
state = STATE_DEPRESSURIZE
target_state = TARGET_NONE
signalPump(tag_airpump, 1, 0, 0)
if("secure")
memory["secure"] = !memory["secure"]
if(memory["secure"])
signalDoor(tag_interior_door, "lock")
signalDoor(tag_exterior_door, "lock")
else
signalDoor(tag_interior_door, "unlock")
signalDoor(tag_exterior_door, "unlock")
if(shutdown_pump)
signalPump(tag_airpump, 0) //send a signal to stop pressurizing
/datum/computer/file/embedded_program/proc/process()
if(!state && target_state)
switch(target_state)
if(TARGET_INOPEN)
memory["target_pressure"] = memory["internal_sensor_pressure"]
if(TARGET_OUTOPEN)
memory["target_pressure"] = memory["external_sensor_pressure"]
//lock down the airlock before activating pumps
toggleDoor(memory["exterior_status"], tag_exterior_door, 1, "close")
toggleDoor(memory["interior_status"], tag_interior_door, 1, "close")
var/chamber_pressure = memory["chamber_sensor_pressure"]
var/target_pressure = memory["target_pressure"]
if(memory["purge"])
target_pressure = 0
if(chamber_pressure <= target_pressure)
state = STATE_PRESSURIZE
signalPump(tag_airpump, 1, 1, target_pressure) //send a signal to start pressurizing
else if(chamber_pressure > target_pressure)
state = STATE_DEPRESSURIZE
signalPump(tag_airpump, 1, 0, target_pressure) //send a signal to start depressurizing
//Check for vacuum - this is set after the pumps so the pumps are aiming for 0
if(!memory["target_pressure"])
memory["target_pressure"] = ONE_ATMOSPHERE * 0.05
switch(state)
if(STATE_PRESSURIZE)
if(memory["chamber_sensor_pressure"] >= memory["target_pressure"] * 0.95)
cycleDoors(target_state)
state = STATE_WAIT
target_state = TARGET_NONE
if(memory["pump_status"] != "off")
signalPump(tag_airpump, 0) //send a signal to stop pumping
if(STATE_DEPRESSURIZE)
if(memory["purge"])
if(memory["chamber_sensor_pressure"] <= ONE_ATMOSPHERE * 0.05)
state = STATE_PRESSURIZE
signalPump(tag_airpump, 1, 1, memory["target_pressure"])
else if(memory["chamber_sensor_pressure"] <= memory["target_pressure"] * 1.05)
cycleDoors(target_state)
state = STATE_WAIT
target_state = TARGET_NONE
//send a signal to stop pumping
if(memory["pump_status"] != "off")
signalPump(tag_airpump, 0)
memory["processing"] = state != target_state
return 1
/datum/computer/file/embedded_program/proc/post_signal(datum/signal/signal, comm_line)
if(master)
master.post_signal(signal, comm_line)
else
del(signal)
/datum/computer/file/embedded_program/proc/signalDoor(var/tag, var/command)
var/datum/signal/signal = new
signal.data["tag"] = tag
signal.data["command"] = command
post_signal(signal)
/datum/computer/file/embedded_program/proc/signalPump(var/tag, var/power, var/direction, var/pressure)
var/datum/signal/signal = new
signal.data = list(
"tag" = tag,
"sigtype" = "command",
"power" = power,
"direction" = direction,
"set_external_pressure" = pressure
)
post_signal(signal)
/datum/computer/file/embedded_program/proc/cycleDoors(var/target)
switch(target)
if(TARGET_OUTOPEN)
toggleDoor(memory["interior_status"], tag_interior_door, memory["secure"], "close")
toggleDoor(memory["exterior_status"], tag_exterior_door, memory["secure"], "open")
if(TARGET_INOPEN)
toggleDoor(memory["exterior_status"], tag_exterior_door, memory["secure"], "close")
toggleDoor(memory["interior_status"], tag_interior_door, memory["secure"], "open")
if(TARGET_NONE)
var/command = "unlock"
if(memory["secure"])
command = "lock"
signalDoor(tag_exterior_door, command)
signalDoor(tag_interior_door, command)
/*----------------------------------------------------------
toggleDoor()
Sends a radio command to a door to either open or close. If
the command is 'toggle' the door will be sent a command that
reverses it's current state.
Can also toggle whether the door bolts are locked or not,
depending on the state of the 'secure' flag.
Only sends a command if it is needed, i.e. if the door is
already open, passing an open command to this proc will not
send an additional command to open the door again.
----------------------------------------------------------*/
/datum/computer/file/embedded_program/proc/toggleDoor(var/list/doorStatus, var/doorTag, var/secure, var/command)
var/doorCommand = null
if(command == "toggle")
if(doorStatus["state"] == "open")
command = "close"
else if(doorStatus["state"] == "closed")
command = "open"
switch(command)
if("close")
if(secure)
if(doorStatus["state"] == "open")
doorCommand = "secure_close"
else if(doorStatus["lock"] == "unlocked")
doorCommand = "lock"
else
if(doorStatus["state"] == "open")
if(doorStatus["lock"] == "locked")
signalDoor(doorTag, "unlock")
doorCommand = "close"
else if(doorStatus["lock"] == "locked")
doorCommand = "unlock"
if("open")
if(secure)
if(doorStatus["state"] == "closed")
doorCommand = "secure_open"
else if(doorStatus["lock"] == "unlocked")
doorCommand = "lock"
else
if(doorStatus["state"] == "closed")
if(doorStatus["lock"] == "locked")
signalDoor(doorTag,"unlock")
doorCommand = "open"
else if(doorStatus["lock"] == "locked")
doorCommand = "unlock"
if(doorCommand)
signalDoor(doorTag, doorCommand)
#undef STATE_WAIT
#undef STATE_DEPRESSURIZE
#undef STATE_PRESSURIZE
#undef TARGET_NONE
#undef TARGET_INOPEN
#undef TARGET_OUTOPEN
@@ -1,84 +1,98 @@
datum/computer/file/embedded_program
var/list/memory = list()
var/state
var/obj/machinery/embedded_controller/master
proc
post_signal(datum/signal/signal, comm_line)
if(master)
master.post_signal(signal, comm_line)
else
del(signal)
receive_user_command(command)
receive_signal(datum/signal/signal, receive_method, receive_param)
return null
process()
return 0
obj/machinery/embedded_controller
/obj/machinery/embedded_controller
var/datum/computer/file/embedded_program/program
name = "Embedded Controller"
density = 0
anchored = 1
var/on = 1
attack_hand(mob/user)
user << browse(return_text(), "window=computer")
user.set_machine(src)
onclose(user, "computer")
/obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line)
return 0
update_icon()
proc/return_text()
/obj/machinery/embedded_controller/receive_signal(datum/signal/signal, receive_method, receive_param)
if(!signal || signal.encryption) return
proc/post_signal(datum/signal/signal, comm_line)
return 0
receive_signal(datum/signal/signal, receive_method, receive_param)
if(!signal || signal.encryption) return
if(program)
program.receive_signal(signal, receive_method, receive_param)
if(program)
program.receive_signal(signal, receive_method, receive_param)
//spawn(5) program.process() //no, program.process sends some signals and machines respond and we here again and we lag -rastaf0
Topic(href, href_list)
if(..())
return 0
/obj/machinery/embedded_controller/process()
if(program)
program.process()
if(program)
program.receive_user_command(href_list["command"])
spawn(5) program.process()
update_icon()
src.updateDialog()
usr.set_machine(src)
spawn(5) src.updateDialog()
/obj/machinery/embedded_controller/attack_ai(mob/user as mob)
src.ui_interact(user)
process()
if(program)
program.process()
/obj/machinery/embedded_controller/attack_paw(mob/user as mob)
user << "You do not have the dexterity to use this."
return
update_icon()
src.updateDialog()
/obj/machinery/embedded_controller/attack_hand(mob/user as mob)
src.ui_interact(user)
radio
var/frequency
var/datum/radio_frequency/radio_connection
/obj/machinery/embedded_controller/ui_interact()
return
initialize()
set_frequency(frequency)
/obj/machinery/embedded_controller/radio
icon = 'icons/obj/airlock_machines.dmi'
icon_state = "airlock_control_standby"
power_channel = ENVIRON
density = 0
post_signal(datum/signal/signal)
signal.transmission_method = TRANSMISSION_RADIO
if(radio_connection)
return radio_connection.post_signal(src, signal)
else
del(signal)
// Setup parameters only
var/id_tag
var/tag_exterior_door
var/tag_interior_door
var/tag_airpump
var/tag_chamber_sensor
var/tag_exterior_sensor
var/tag_interior_sensor
var/tag_secure = 0
proc
set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency)
var/frequency = 1379
var/datum/radio_frequency/radio_connection
unacidable = 1
/obj/machinery/embedded_controller/radio/initialize()
set_frequency(frequency)
var/datum/computer/file/embedded_program/new_prog = new
new_prog.id_tag = id_tag
new_prog.tag_exterior_door = tag_exterior_door
new_prog.tag_interior_door = tag_interior_door
new_prog.tag_airpump = tag_airpump
new_prog.tag_chamber_sensor = tag_chamber_sensor
new_prog.tag_exterior_sensor = tag_exterior_sensor
new_prog.tag_interior_sensor = tag_interior_sensor
new_prog.memory["secure"] = tag_secure
new_prog.master = src
program = new_prog
spawn(10)
program.signalDoor(tag_exterior_door, "update") //signals connected doors to update their status
program.signalDoor(tag_interior_door, "update")
/obj/machinery/embedded_controller/radio/update_icon()
if(on && program)
if(program.memory["processing"])
icon_state = "airlock_control_process"
else
icon_state = "airlock_control_standby"
else
icon_state = "airlock_control_off"
/obj/machinery/embedded_controller/radio/post_signal(datum/signal/signal)
signal.transmission_method = TRANSMISSION_RADIO
if(radio_connection)
return radio_connection.post_signal(src, signal)
else
del(signal)
/obj/machinery/embedded_controller/radio/proc/set_frequency(new_frequency)
radio_controller.remove_object(src, frequency)
frequency = new_frequency
radio_connection = radio_controller.add_object(src, frequency)
@@ -1,79 +0,0 @@
/datum/computer/file/embedded_program/simple_vent_controller
var/airpump_tag
receive_user_command(command)
switch(command)
if("vent_inactive")
var/datum/signal/signal = new
signal.data = list(
"tag" = airpump_tag,
"sigtype"="command"
)
signal.data["power"] = 0
post_signal(signal)
if("vent_pump")
var/datum/signal/signal = new
signal.data = list(
"tag" = airpump_tag,
"sigtype"="command"
)
signal.data["stabalize"] = 1
signal.data["power"] = 1
post_signal(signal)
if("vent_clear")
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.data = list(
"tag" = airpump_tag,
"sigtype"="command"
)
signal.data["purge"] = 1
signal.data["power"] = 1
post_signal(signal)
process()
return 0
/obj/machinery/embedded_controller/radio/simple_vent_controller
icon = 'icons/obj/airlock_machines.dmi'
icon_state = "airlock_control_standby"
name = "Vent Controller"
density = 0
unacidable = 1
frequency = 1229
power_channel = ENVIRON
// Setup parameters only
var/airpump_tag
initialize()
..()
var/datum/computer/file/embedded_program/simple_vent_controller/new_prog = new
new_prog.airpump_tag = airpump_tag
new_prog.master = src
program = new_prog
update_icon()
if(on && program)
icon_state = "airlock_control_standby"
else
icon_state = "airlock_control_off"
return_text()
var/state_options = null
state_options = {"<A href='?src=\ref[src];command=vent_inactive'>Deactivate Vent</A><BR>
<A href='?src=\ref[src];command=vent_pump'>Activate Vent / Pump</A><BR>
<A href='?src=\ref[src];command=vent_clear'>Activate Vent / Clear</A><BR>"}
var/output = {"<B>Vent Control Console</B><HR>
[state_options]<HR>"}
return output
@@ -1,369 +0,0 @@
//States for airlock_control
#define AIRLOCK_STATE_WAIT 0
#define AIRLOCK_STATE_DEPRESSURIZE 1
#define AIRLOCK_STATE_PRESSURIZE 2
#define AIRLOCK_TARGET_INOPEN -1
#define AIRLOCK_TARGET_NONE 0
#define AIRLOCK_TARGET_OUTOPEN 1
datum/computer/file/embedded_program/smart_airlock_controller
var/id_tag
var/tag_exterior_door
var/tag_interior_door
var/tag_airpump
var/tag_chamber_sensor
var/tag_exterior_sensor
var/tag_interior_sensor
//var/sanitize_external
state = AIRLOCK_STATE_WAIT
var/target_state = AIRLOCK_TARGET_NONE
datum/computer/file/embedded_program/smart_airlock_controller/New()
..()
memory["chamber_sensor_pressure"] = ONE_ATMOSPHERE
memory["external_sensor_pressure"] = ONE_ATMOSPHERE
memory["internal_sensor_pressure"] = ONE_ATMOSPHERE
memory["exterior_status"] = "unknown"
memory["interior_status"] = "unknown"
memory["pump_status"] = "unknown"
memory["target_pressure"] = ONE_ATMOSPHERE
datum/computer/file/embedded_program/smart_airlock_controller/receive_signal(datum/signal/signal, receive_method, receive_param)
var/receive_tag = signal.data["tag"]
if(!receive_tag) return
if(receive_tag==tag_chamber_sensor)
if(signal.data["pressure"])
memory["chamber_sensor_pressure"] = text2num(signal.data["pressure"])
else if(receive_tag==tag_exterior_sensor)
if(signal.data["pressure"])
memory["external_sensor_pressure"] = text2num(signal.data["pressure"])
else if(receive_tag==tag_interior_sensor)
if(signal.data["pressure"])
memory["internal_sensor_pressure"] = text2num(signal.data["pressure"])
else if(receive_tag==tag_exterior_door)
memory["exterior_status"] = signal.data["door_status"]
else if(receive_tag==tag_interior_door)
memory["interior_status"] = signal.data["door_status"]
else if(receive_tag==tag_airpump)
if(signal.data["power"])
memory["pump_status"] = signal.data["direction"]
else
memory["pump_status"] = "off"
else if(receive_tag==id_tag)
switch(signal.data["command"])
if("cycle_exterior")
state = AIRLOCK_STATE_WAIT
target_state = AIRLOCK_TARGET_OUTOPEN
if("cycle_interior")
state = AIRLOCK_STATE_WAIT
target_state = AIRLOCK_TARGET_INOPEN
master.updateDialog()
datum/computer/file/embedded_program/smart_airlock_controller/receive_user_command(command)
var/shutdown_pump = 0
switch(command)
if("cycle_closed")
state = AIRLOCK_STATE_WAIT
target_state = AIRLOCK_TARGET_NONE
if(memory["interior_status"] != "closed")
var/datum/signal/signal = new
signal.data["tag"] = tag_interior_door
signal.data["command"] = "secure_close"
post_signal(signal)
if(memory["exterior_status"] != "closed")
var/datum/signal/signal = new
signal.data["tag"] = tag_exterior_door
signal.data["command"] = "secure_close"
post_signal(signal)
shutdown_pump = 1
if("open_interior")
state = AIRLOCK_STATE_WAIT
target_state = AIRLOCK_TARGET_NONE
if(memory["interior_status"] != "open")
var/datum/signal/signal = new
signal.data["tag"] = tag_interior_door
signal.data["command"] = "secure_open"
post_signal(signal)
if("close_interior")
if(memory["interior_status"] != "closed")
var/datum/signal/signal = new
signal.data["tag"] = tag_interior_door
signal.data["command"] = "secure_close"
post_signal(signal)
shutdown_pump = 1
if("close_exterior")
if(memory["exterior_status"] != "closed")
var/datum/signal/signal = new
signal.data["tag"] = tag_exterior_door
signal.data["command"] = "secure_close"
post_signal(signal)
shutdown_pump = 1
if("open_exterior")
state = AIRLOCK_STATE_WAIT
target_state = AIRLOCK_TARGET_NONE
if(memory["exterior_status"] != "open")
var/datum/signal/signal = new
signal.data["tag"] = tag_exterior_door
signal.data["command"] = "secure_open"
post_signal(signal)
if("cycle_exterior")
state = AIRLOCK_STATE_WAIT
target_state = AIRLOCK_TARGET_OUTOPEN
if("cycle_interior")
state = AIRLOCK_STATE_WAIT
target_state = AIRLOCK_TARGET_INOPEN
if(shutdown_pump)
//send a signal to stop pressurizing
if(memory["pump_status"] != "off")
var/datum/signal/signal = new
signal.data = list(
"tag" = tag_airpump,
"power" = 0,
"sigtype"="command"
)
post_signal(signal)
master.updateDialog()
datum/computer/file/embedded_program/smart_airlock_controller/process()
var/process_again = 1
while(process_again)
process_again = 0
if(!state && target_state)
//we're ready to do stuff, now what do we want to do?
switch(target_state)
if(AIRLOCK_TARGET_INOPEN)
memory["target_pressure"] = memory["internal_sensor_pressure"]
if(AIRLOCK_TARGET_OUTOPEN)
memory["target_pressure"] = memory["external_sensor_pressure"]
//work out whether we need to pressurize or depressurize the chamber (5% leeway with target pressure)
var/chamber_pressure = memory["chamber_sensor_pressure"]
var/target_pressure = memory["target_pressure"]
if(chamber_pressure <= target_pressure)
state = AIRLOCK_STATE_PRESSURIZE
//send a signal to start pressurizing
var/datum/signal/signal = new
signal.data = list(
"tag" = tag_airpump,
"sigtype"="command",
"power"=1,
"direction"=1,
"set_external_pressure"=target_pressure
)
post_signal(signal)
else if(chamber_pressure > target_pressure)
state = AIRLOCK_STATE_DEPRESSURIZE
//send a signal to start depressurizing
var/datum/signal/signal = new
signal.transmission_method = 1 //radio signal
signal.data = list(
"tag" = tag_airpump,
"sigtype"="command",
"power"=1,
"direction"=0,
"set_external_pressure"=target_pressure
)
post_signal(signal)
//actually do stuff
//override commands are handled elsewhere, otherwise everything proceeds automatically
switch(state)
if(AIRLOCK_STATE_PRESSURIZE)
if(memory["chamber_sensor_pressure"] >= memory["target_pressure"] * 0.95)
if(target_state < 0)
if(memory["interior_status"] != "open")
var/datum/signal/signal = new
signal.data["tag"] = tag_interior_door
signal.data["command"] = "secure_open"
post_signal(signal)
else if(target_state > 0)
if(memory["exterior_status"] != "open")
var/datum/signal/signal = new
signal.data["tag"] = tag_exterior_door
signal.data["command"] = "secure_open"
post_signal(signal)
state = AIRLOCK_STATE_WAIT
target_state = AIRLOCK_TARGET_NONE
//send a signal to stop pumping
if(memory["pump_status"] != "off")
var/datum/signal/signal = new
signal.data = list(
"tag" = tag_airpump,
"sigtype"="command",
"power" = 0
)
post_signal(signal)
master.updateDialog()
if(AIRLOCK_STATE_DEPRESSURIZE)
if(memory["chamber_sensor_pressure"] <= memory["target_pressure"] * 1.05)
if(target_state > 0)
if(memory["exterior_status"] != "open")
var/datum/signal/signal = new
signal.data["tag"] = tag_exterior_door
signal.data["command"] = "secure_open"
post_signal(signal)
else if(target_state < 0)
if(memory["interior_status"] != "open")
var/datum/signal/signal = new
signal.data["tag"] = tag_interior_door
signal.data["command"] = "secure_open"
post_signal(signal)
state = AIRLOCK_STATE_WAIT
target_state = AIRLOCK_TARGET_NONE
//send a signal to stop pumping
if(memory["pump_status"] != "off")
var/datum/signal/signal = new
signal.data = list(
"tag" = tag_airpump,
"sigtype"="command",
"power" = 0
)
post_signal(signal)
master.updateDialog()
//memory["sensor_pressure"] = sensor_pressure
memory["processing"] = state != target_state
//sensor_pressure = null //not sure if we can comment this out. Uncomment in case of problems -rastaf0
return 1
obj/machinery/embedded_controller/radio/smart_airlock_controller
icon = 'icons/obj/airlock_machines.dmi'
icon_state = "airlock_control_standby"
name = "Cycling Airlock Console"
density = 0
unacidable = 1
frequency = 1449
power_channel = ENVIRON
// Setup parameters only
var/id_tag
var/tag_exterior_door
var/tag_interior_door
var/tag_airpump
var/tag_chamber_sensor
var/tag_exterior_sensor
var/tag_interior_sensor
//var/sanitize_external
initialize()
..()
var/datum/computer/file/embedded_program/smart_airlock_controller/new_prog = new
new_prog.id_tag = id_tag
new_prog.tag_exterior_door = tag_exterior_door
new_prog.tag_interior_door = tag_interior_door
new_prog.tag_airpump = tag_airpump
new_prog.tag_chamber_sensor = tag_chamber_sensor
new_prog.tag_exterior_sensor = tag_exterior_sensor
new_prog.tag_interior_sensor = tag_interior_sensor
//new_prog.sanitize_external = sanitize_external
new_prog.master = src
program = new_prog
update_icon()
if(on && program)
if(program.memory["processing"])
icon_state = "airlock_control_process"
else
icon_state = "airlock_control_standby"
else
icon_state = "airlock_control_off"
return_text()
var/state_options = ""
var/state = 0
var/chamber_sensor_pressure = "----"
var/external_sensor_pressure = "----"
var/internal_sensor_pressure = "----"
var/exterior_status = "----"
var/interior_status = "----"
var/pump_status = "----"
var/target_pressure = "----"
if(program)
state = program.state
chamber_sensor_pressure = program.memory["chamber_sensor_pressure"]
external_sensor_pressure = program.memory["external_sensor_pressure"]
internal_sensor_pressure = program.memory["internal_sensor_pressure"]
exterior_status = program.memory["exterior_status"]
interior_status = program.memory["interior_status"]
pump_status = program.memory["pump_status"]
target_pressure = program.memory["target_pressure"]
var/exterior_closed = 0
if(exterior_status == "closed")
exterior_closed = 1
var/interior_closed = 0
if(interior_status == "closed")
interior_closed = 1
state_options += "<B>Exterior status: </B> [exterior_status] ([external_sensor_pressure] kPa)<br>"
if(exterior_closed)
state_options += "<A href='?src=\ref[src];command=open_exterior'>Open exterior airlock</A> "
if(abs(chamber_sensor_pressure - external_sensor_pressure) > ONE_ATMOSPHERE * 0.05)
state_options += "<font color='red'><b>WARNING</b></font>"
state_options += "<BR>"
if(!state && exterior_closed && interior_closed)
state_options += "<A href='?src=\ref[src];command=cycle_exterior'>Cycle to Exterior Airlock</A><BR>"
else
state_options += "<br>"
else
state_options += "<A href='?src=\ref[src];command=close_exterior'>Close exterior airlock</A><BR>"
state_options += "<BR>"
state_options += "<B>Interior status: </B> [interior_status] ([internal_sensor_pressure] kPa)<br>"
if(interior_closed)
state_options += "<A href='?src=\ref[src];command=open_interior'>Open interior airlock</A> "
if(abs(chamber_sensor_pressure - internal_sensor_pressure) > ONE_ATMOSPHERE * 0.05)
state_options += "<font color='red'><b>WARNING</b></font>"
state_options += "<BR>"
if(!state && exterior_closed && interior_closed)
state_options += "<A href='?src=\ref[src];command=cycle_interior'>Cycle to Interior Airlock</A><BR>"
else
state_options += "<br>"
else
state_options += "<A href='?src=\ref[src];command=close_interior'>Close interior airlock</A><BR>"
state_options += "<BR>"
state_options += "<br>"
state_options += "<B>Chamber Pressure:</B> [chamber_sensor_pressure] kPa<BR>"
state_options += "<B>Target Chamber Pressure:</B> [target_pressure] kPa<BR>"
state_options += "<B>Control Pump: </B> [pump_status]<BR>"
if(state)
state_options += "<A href='?src=\ref[src];command=cycle_closed'>Abort Cycling</A><BR>"
else
state_options += "<br>"
return state_options
#undef AIRLOCK_STATE_PRESSURIZE
#undef AIRLOCK_STATE_WAIT
#undef AIRLOCK_STATE_DEPRESSURIZE
#undef AIRLOCK_TARGET_INOPEN
#undef AIRLOCK_TARGET_CLOSED
#undef AIRLOCK_TARGET_OUTOPEN
+9 -2
View File
@@ -53,6 +53,13 @@
input = /obj/item/weapon/reagent_containers/food/snacks/grown/soybeans
output = /obj/item/weapon/reagent_containers/food/snacks/soydope
wheat
input = /obj/item/weapon/reagent_containers/food/snacks/grown/wheat
output = /obj/item/weapon/reagent_containers/food/snacks/flour
spaghetti
input = /obj/item/weapon/reagent_containers/food/snacks/flour
output = /obj/item/weapon/reagent_containers/food/snacks/spagetti
/* mobs */
mob
@@ -143,13 +150,13 @@
src.processing = 1
user.visible_message("\blue [user] turns on \a [src].", \
"You turn on \a [src].", \
"You hear a food processor")
"You hear a food processor.")
playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
use_power(500)
sleep(P.time)
P.process(src.loc, O)
src.processing = 0
src.visible_message("\blue \the [src] finished processing.", \
"You hear food processor stops")
"You hear the food processor stopping/")
+64 -4
View File
@@ -23,6 +23,10 @@ Buildable meters
#define PIPE_MTVALVE 18
#define PIPE_MANIFOLD4W 19
#define PIPE_CAP 20
///// Z-Level stuff
#define PIPE_UP 21
#define PIPE_DOWN 22
///// Z-Level stuff
/obj/item/pipe
name = "pipe"
@@ -43,6 +47,7 @@ Buildable meters
if (make_from)
src.dir = make_from.dir
src.pipename = make_from.name
color = make_from.color
var/is_bent
if (make_from.initialize_directions in list(NORTH|SOUTH, WEST|EAST))
is_bent = 0
@@ -84,6 +89,12 @@ Buildable meters
src.pipe_type = PIPE_MANIFOLD4W
else if(istype(make_from, /obj/machinery/atmospherics/pipe/cap))
src.pipe_type = PIPE_CAP
///// Z-Level stuff
else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/up))
src.pipe_type = PIPE_UP
else if(istype(make_from, /obj/machinery/atmospherics/pipe/zpipe/down))
src.pipe_type = PIPE_DOWN
///// Z-Level stuff
else
src.pipe_type = pipe_type
src.dir = dir
@@ -117,6 +128,10 @@ Buildable meters
"t-valve", \
"4-way manifold", \
"pipe cap", \
///// Z-Level stuff
"pipe up", \
"pipe down", \
///// Z-Level stuff
)
name = nlist[pipe_type+1] + " fitting"
var/list/islist = list( \
@@ -141,6 +156,10 @@ Buildable meters
"mtvalve", \
"manifold4w", \
"cap", \
///// Z-Level stuff
"cap", \
"cap", \
///// Z-Level stuff
)
icon_state = islist[pipe_type + 1]
@@ -213,6 +232,10 @@ Buildable meters
return dir|flip|cw
if(PIPE_CAP)
return flip
///// Z-Level stuff
if(PIPE_UP,PIPE_DOWN)
return dir
///// Z-Level stuff
return 0
/obj/item/pipe/proc/get_pdir() //endpoints for regular pipes
@@ -277,6 +300,7 @@ Buildable meters
switch(pipe_type)
if(PIPE_SIMPLE_STRAIGHT, PIPE_SIMPLE_BENT)
var/obj/machinery/atmospherics/pipe/simple/P = new( src.loc )
P.color = color
P.dir = src.dir
P.initialize_directions = pipe_dir
var/turf/T = P.loc
@@ -329,6 +353,7 @@ Buildable meters
if(PIPE_MANIFOLD) //manifold
var/obj/machinery/atmospherics/pipe/manifold/M = new( src.loc )
M.color = color
M.dir = dir
M.initialize_directions = pipe_dir
//M.New()
@@ -348,9 +373,10 @@ Buildable meters
if (M.node3)
M.node3.initialize()
M.node3.build_network()
if(PIPE_MANIFOLD4W) //4-way manifold
var/obj/machinery/atmospherics/pipe/manifold4w/M = new( src.loc )
M.color = color
M.dir = dir
M.initialize_directions = pipe_dir
//M.New()
@@ -515,7 +541,7 @@ Buildable meters
if (P.node2)
P.node2.initialize()
P.node2.build_network()
if(PIPE_MTVALVE) //manual t-valve
var/obj/machinery/atmospherics/tvalve/V = new(src.loc)
V.dir = dir
@@ -535,7 +561,7 @@ Buildable meters
if (V.node3)
V.node3.initialize()
V.node3.build_network()
if(PIPE_CAP)
var/obj/machinery/atmospherics/pipe/cap/C = new(src.loc)
C.dir = dir
@@ -593,6 +619,40 @@ Buildable meters
if (C.node)
C.node.initialize()
C.node.build_network()
///// Z-Level stuff
if(PIPE_UP) //volume pump
var/obj/machinery/atmospherics/pipe/zpipe/up/P = new(src.loc)
P.dir = dir
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
P.build_network()
if (P.node1)
P.node1.initialize()
P.node1.build_network()
if (P.node2)
P.node2.initialize()
P.node2.build_network()
if(PIPE_DOWN) //volume pump
var/obj/machinery/atmospherics/pipe/zpipe/down/P = new(src.loc)
P.dir = dir
P.initialize_directions = pipe_dir
if (pipename)
P.name = pipename
var/turf/T = P.loc
P.level = T.intact ? 2 : 1
P.initialize()
P.build_network()
if (P.node1)
P.node1.initialize()
P.node1.build_network()
if (P.node2)
P.node2.initialize()
P.node2.build_network()
///// Z-Level stuff
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user.visible_message( \
@@ -649,4 +709,4 @@ Buildable meters
#undef PIPE_VOLUME_PUMP
#undef PIPE_OUTLET_INJECT
#undef PIPE_MTVALVE
//#undef PIPE_MANIFOLD4W
//#undef PIPE_MANIFOLD4W
+16 -2
View File
@@ -13,6 +13,7 @@
/obj/machinery/pipedispenser/attack_hand(user as mob)
if(..())
return
///// Z-Level stuff
var/dat = {"
<b>Regular pipes:</b><BR>
<A href='?src=\ref[src];make=0;dir=1'>Pipe</A><BR>
@@ -22,6 +23,8 @@
<A href='?src=\ref[src];make=20;dir=1'>Pipe Cap</A><BR>
<A href='?src=\ref[src];make=19;dir=1'>4-Way Manifold</A><BR>
<A href='?src=\ref[src];make=18;dir=1'>Manual T-Valve</A><BR>
<A href='?src=\ref[src];make=21;dir=1'>upward Pipe</A><BR>
<A href='?src=\ref[src];make=22;dir=1'>downward Pipe</A><BR>
<b>Devices:</b><BR>
<A href='?src=\ref[src];make=4;dir=1'>Connector</A><BR>
<A href='?src=\ref[src];make=7;dir=1'>Unary Vent</A><BR>
@@ -42,6 +45,7 @@
<A href='?src=\ref[src];make=12;dir=5'>Bent Pipe</A><BR>
"}
///// Z-Level stuff
//What number the make points to is in the define # at the top of construction.dm in same folder
user << browse("<HEAD><TITLE>[src]</TITLE></HEAD><TT>[dat]</TT>", "window=pipedispenser")
@@ -143,6 +147,7 @@ Nah
if(..())
return
///// Z-Level stuff
var/dat = {"<b>Disposal Pipes</b><br><br>
<A href='?src=\ref[src];dmake=0'>Pipe</A><BR>
<A href='?src=\ref[src];dmake=1'>Bent Pipe</A><BR>
@@ -152,7 +157,10 @@ Nah
<A href='?src=\ref[src];dmake=5'>Bin</A><BR>
<A href='?src=\ref[src];dmake=6'>Outlet</A><BR>
<A href='?src=\ref[src];dmake=7'>Chute</A><BR>
<A href='?src=\ref[src];dmake=21'>Upwards</A><BR>
<A href='?src=\ref[src];dmake=22'>Downwards</A><BR>
"}
///// Z-Level stuff
user << browse("<HEAD><TITLE>[src]</TITLE></HEAD><TT>[dat]</TT>", "window=pipedispenser")
return
@@ -192,6 +200,12 @@ Nah
if(7)
C.ptype = 8
C.density = 1
///// Z-Level stuff
if(21)
C.ptype = 11
if(22)
C.ptype = 12
///// Z-Level stuff
C.add_fingerprint(usr)
C.update()
wait = 1
@@ -203,7 +217,7 @@ Nah
/obj/machinery/pipedispenser/orderable
anchored = 0
unwrenched = 1
/obj/machinery/pipedispenser/disposal/orderable
anchored = 0
unwrenched = 1
unwrenched = 1
+3 -61
View File
@@ -57,7 +57,8 @@
if(src.occupant)
if (istype(occupant, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = occupant
restock_modules()
if(R.module)
R.module.respawn_consumable(R)
if(!R.cell)
return
else if(R.cell.charge >= R.cell.maxcharge)
@@ -81,60 +82,6 @@
src.use_power = 1
return
restock_modules()
if(src.occupant)
if(istype(occupant, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = occupant
if(R.module && R.module.modules)
var/list/um = R.contents|R.module.modules
// ^ makes sinle list of active (R.contents) and inactive modules (R.module.modules)
for(var/obj/O in um)
// Engineering
if(istype(O,/obj/item/stack/sheet/metal) || istype(O,/obj/item/stack/sheet/rglass) || istype(O,/obj/item/weapon/cable_coil))
if(O:amount < 50)
O:amount += 1
// Security
if(istype(O,/obj/item/device/flash))
if(O:broken)
O:broken = 0
O:times_used = 0
O:icon_state = "flash"
if(istype(O,/obj/item/weapon/gun/energy/taser/cyborg))
if(O:power_supply.charge < O:power_supply.maxcharge)
O:power_supply.give(O:charge_cost)
O:update_icon()
else
O:charge_tick = 0
if(istype(O,/obj/item/weapon/melee/baton))
if(O:charges < 10)
O:charges += 1
//Service
if(istype(O,/obj/item/weapon/reagent_containers/food/condiment/enzyme))
if(O.reagents.get_reagent_amount("enzyme") < 50)
O.reagents.add_reagent("enzyme", 2)
//Medical
if(istype(O,/obj/item/weapon/reagent_containers/glass/bottle/robot))
var/obj/item/weapon/reagent_containers/glass/bottle/robot/B = O
if(B.reagent && (B.reagents.get_reagent_amount(B.reagent) < B.volume))
B.reagents.add_reagent(B.reagent, 2)
//Janitor
if(istype(O, /obj/item/device/lightreplacer))
var/obj/item/device/lightreplacer/LR = O
LR.Charge(R)
if(R)
if(R.module)
R.module.respawn_consumable(R)
//Emagged items for janitor and medical borg
if(R.module.emag)
if(istype(R.module.emag, /obj/item/weapon/reagent_containers/spray))
var/obj/item/weapon/reagent_containers/spray/S = R.module.emag
if(S.name == "Polyacid spray")
S.reagents.add_reagent("pacid", 2)
else if(S.name == "Lube spray")
S.reagents.add_reagent("lube", 2)
verb
move_eject()
@@ -173,9 +120,4 @@
src.add_fingerprint(usr)
build_icon()
src.use_power = 2
return
return
+1
View File
@@ -616,6 +616,7 @@
/obj/item/weapon/reagent_containers/food/drinks/bottle/tomatojuice = 4,/obj/item/weapon/reagent_containers/food/drinks/bottle/limejuice = 4,
/obj/item/weapon/reagent_containers/food/drinks/bottle/cream = 4,/obj/item/weapon/reagent_containers/food/drinks/cans/tonic = 8,
/obj/item/weapon/reagent_containers/food/drinks/cans/cola = 8, /obj/item/weapon/reagent_containers/food/drinks/cans/sodawater = 15,
/obj/item/weapon/reagent_containers/food/drinks/flask/barflask = 2, /obj/item/weapon/reagent_containers/food/drinks/flask/vacuumflask = 2,
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass = 30,/obj/item/weapon/reagent_containers/food/drinks/ice = 9,
/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor = 2,/obj/item/weapon/reagent_containers/food/drinks/bottle/bluecuracao = 2,
/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe = 2,/obj/item/weapon/reagent_containers/food/drinks/bottle/grenadine = 5)
+2 -2
View File
@@ -16,8 +16,8 @@
/obj/structure/closet/walllocker/emerglocker
name = "emergency locker"
desc = "A wall mounted locker with emergency supplies"
var/list/spawnitems = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/clothing/mask/breath,/obj/item/weapon/crowbar)
var/amount = 3 // spawns each items X times.
var/list/spawnitems = list(/obj/item/weapon/tank/emergency_oxygen,/obj/item/clothing/mask/breath)
var/amount = 2 // spawns each items X times.
icon_state = "emerg"
/obj/structure/closet/walllocker/emerglocker/attack_hand(mob/user as mob)
+22 -83
View File
@@ -1,8 +1,6 @@
//########################## CONTRABAND ;3333333333333333333 -Agouri ###################################################
#define NUM_OF_POSTER_DESIGNS 10
/obj/item/weapon/contraband
name = "contraband item"
desc = "You probably shouldn't be holding this."
@@ -15,54 +13,16 @@
desc = "The poster comes with its own automatic adhesive mechanism, for easy pinning to any vertical surface."
icon_state = "rolled_poster"
var/serial_number = 0
var/obj/structure/sign/poster/resulting_poster = null //The poster that will be created is initialised and stored through contraband/poster's constructor
/obj/item/weapon/contraband/poster/New(turf/loc, var/given_serial = 0)
if(given_serial == 0)
serial_number = rand(1, NUM_OF_POSTER_DESIGNS)
resulting_poster = new(serial_number)
serial_number = rand(1, poster_designs.len)
else
serial_number = given_serial
//We don't give it a resulting_poster because if we called it with a given_serial it means that we're rerolling an already used poster.
name += " - No. [serial_number]"
..(loc)
/*/obj/item/weapon/contraband/poster/attack(mob/M as mob, mob/user as mob)
src.add_fingerprint(user)
if(resulting_poster)
resulting_poster.add_fingerprint(user)
..()*/
/*/obj/item/weapon/contraband/poster/attack(atom/A, mob/user as mob) //This shit is handled through the wall's attackby()
if(istype(A, /turf/simulated/wall))
if(resulting_poster == null)
return
else
var/turf/simulated/wall/W = A
var/check = 0
var/stuff_on_wall = 0
for(var/obj/O in W.contents) //Let's see if it already has a poster on it or too much stuff
if(istype(O,/obj/structure/sign/poster))
check = 1
break
stuff_on_wall++
if(stuff_on_wall == 3)
check = 1
break
if(check)
user << "<span class='notice'>The wall is far too cluttered to place a poster!</span>"
return
resulting_poster.loc = W //Looks like it's uncluttered enough. Place the poster
W.contents += resulting_poster
del(src)*/
//############################## THE ACTUAL DECALS ###########################
obj/structure/sign/poster
@@ -79,44 +39,13 @@ obj/structure/sign/poster/New(var/serial)
serial_number = serial
if(serial_number == loc)
serial_number = rand(1, NUM_OF_POSTER_DESIGNS) //This is for the mappers that want individual posters without having to use rolled posters.
serial_number = rand(1, poster_designs.len) //This is for the mappers that want individual posters without having to use rolled posters.
icon_state = "poster[serial_number]"
switch(serial_number)
if(1)
name += " - Free Tonto"
desc += " A framed shred of a much larger flag, colors bled together and faded from age."
if(2)
name += " - Atmosia Declaration of Independence"
desc += " A relic of a failed rebellion"
if(3)
name += " - Fun Police"
desc += " A poster condemning the station's security forces."
if(4)
name += " - Lusty Xeno"
desc += " A heretical poster depicting the titular star of an equally heretical book."
if(5)
name += " - Syndicate Recruitment Poster"
desc += " See the galaxy! Shatter corrupt megacorporations! Join today!"
if(6)
name += " - Clown"
desc += " Honk."
if(7)
name += " - Smoke"
desc += " A poster depicting a carton of cigarettes."
if(8)
name += " - Grey Tide"
desc += " A rebellious poster symbolizing assistant solidarity."
if(9)
name += " - Missing Gloves"
desc += " This poster is about the uproar that followed Nanotrasen's financial cuts towards insulated-glove purchases."
if(10)
name += " - Hacking Guide"
desc += " This poster details the internal workings of the common Nanotrasen airlock."
else
name = "This shit just bugged. Report it to Agouri - polyxenitopalidou@gmail.com"
desc = "Why are you still here?"
var/designtype = poster_designs[serial_number]
var/datum/poster/design=new designtype
name += " - [design.name]"
desc += " [design.desc]"
icon_state = design.icon_state // poster[serial_number]
..()
obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -151,14 +80,17 @@ obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
/obj/structure/sign/poster/proc/roll_and_drop(turf/newloc)
var/obj/item/weapon/contraband/poster/P = new(src, serial_number)
P.resulting_poster = src
P.loc = newloc
src.loc = P
del(src)
//seperated to reduce code duplication. Moved here for ease of reference and to unclutter r_wall/attackby()
//separated to reduce code duplication. Moved here for ease of reference and to unclutter r_wall/attackby()
/turf/simulated/wall/proc/place_poster(var/obj/item/weapon/contraband/poster/P, var/mob/user)
if(!P.resulting_poster) return
if(!istype(src,/turf/simulated/wall))
user << "\red You can't place this here!"
return
var/stuff_on_wall = 0
for(var/obj/O in contents) //Let's see if it already has a poster on it or too much stuff
@@ -173,7 +105,7 @@ obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
user << "<span class='notice'>You start placing the poster on the wall...</span>" //Looks like it's uncluttered enough. Place the poster.
//declaring D because otherwise if P gets 'deconstructed' we lose our reference to P.resulting_poster
var/obj/structure/sign/poster/D = P.resulting_poster
var/obj/structure/sign/poster/D = new(P.serial_number)
var/temp_loc = user.loc
flick("poster_being_set",D)
@@ -188,4 +120,11 @@ obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
user << "<span class='notice'>You place the poster!</span>"
else
D.roll_and_drop(temp_loc)
return
return
/datum/poster
// Name suffix. Poster - [name]
var/name=""
// Description suffix
var/desc=""
var/icon_state=""
@@ -0,0 +1,145 @@
// baystation12 posters
/datum/poster/bay_1
icon_state="bsposter1"
name = "Unlucky Space Explorer"
desc = "This particular one depicts a skeletal form within a space suit."
/datum/poster/bay_2
icon_state="bsposter2"
name = "Positronic Logic Conflicts"
desc = "This particular one depicts the cold, unmoving stare of a particular advanced AI."
/datum/poster/bay_3
icon_state="bsposter3"
name = "Paranoia"
desc = "This particular one warns of the dangers of trusting your co-workers too much."
/datum/poster/bay_4
icon_state="bsposter4"
name = "Keep Calm"
desc = "This particular one is of a famous New Earth design, although a bit modified. Someone has scribbled an O over the A on the poster."
/datum/poster/bay_5
icon_state="bsposter5"
name = "Martian Warlord"
desc = "This particular one depicts the cartoony mug of a certain Martial Warmonger."
/datum/poster/bay_6
icon_state="bsposter6"
name = "Technological Singularity"
desc = "This particular one is of the blood-curdling symbol of a long-since defeated enemy of humanity."
/datum/poster/bay_7
icon_state="bsposter7"
name = "Wasteland"
desc = "This particular one is of a couple of ragged gunmen, one male and one female, on top of a mound of rubble. The number \"12\" is visible on their blue jumpsuits."
/datum/poster/bay_8
icon_state="bsposter8"
name = "Pinup Girl Cindy"
desc = "This particular one is of Nanotrasen's PR girl, Cindy, in a particularly feminine pose."
/datum/poster/bay_9
icon_state="bsposter9"
name = "Pinup Girl Amy"
desc = "This particular one is of Amy, the nymphomaniac Urban Legend of Nanotrasen Space Stations. How this photograph came to be is not known."
/datum/poster/bay_10
icon_state="bsposter10"
name = "Don't Panic"
desc = "This particular one depicts some sort of star in a grimace. The \"Don't Panic\" is written in big, friendly letters."
/datum/poster/bay_11
icon_state="bsposter11"
name = "Underwater Laboratory"
desc = "This particular one is of the fabled last crew of Nanotrasen's previous project before going big on plasma research."
/datum/poster/bay_12
icon_state="bsposter12"
name = "Rogue AI"
desc = "This particular one depicts the shell of the infamous AI that catastropically comandeered one of Nanotrasen's earliest space stations. Back then, the corporation was just known as TriOptimum."
/datum/poster/bay_13
icon_state="bsposter13"
name = "User of the Arcane Arts"
desc = "This particular one depicts a wizard, casting a spell. You can't really make out if it's an actual photograph or a computer-generated image."
/datum/poster/bay_14
icon_state="bsposter14"
name = "Levitating Skull"
desc = "This particular one is the portrait of a flying enchanted skull. Its adventures along with its fabled companion are now fading through history..."
/datum/poster/bay_15
icon_state="bsposter15"
name = "Augmented Legend"
desc = "This particular one is of an obviously augmented individual, gazing towards the sky. The cyber-city in the backround is rather punkish."
/datum/poster/bay_16
icon_state="bsposter16"
name = "Dangerous Static"
desc = "This particular one depicts nothing remarkable other than a rather mesmerising pattern of monitor static. There's a tag on the sides of the poster, but it's ripped off."
/datum/poster/bay_17
icon_state="bsposter17"
name = "Pinup Girl Val"
desc = "Luscious Val McNeil, the vertically challenged Legal Extraordinaire, winner of Miss Space two years running and favoured pinup girl of Lawyers Weekly."
/datum/poster/bay_18
icon_state="bsposter18"
name = "Derpman, Enforcer of the State"
desc = "Here to protect and serve... your donuts! A generously proportioned man, he teaches you the value of hiding your snacks."
/datum/poster/bay_19
icon_state="bsposter19"
name = "Respect a Soghun"
desc = "This poster depicts a well dressed looking Soghun receiving a prestigious award. It appears to espouse greater co-operation and harmony between the two races."
/datum/poster/bay_20
icon_state="bsposter20"
name = "Skrell Twilight"
desc = "This poster depicts a mysteriously inscrutable, alien scene. Numerous Skrell can be seen conversing amidst great, crystalline towers rising above crashing waves"
/datum/poster/bay_21
icon_state="bsposter21"
name = "Join the Fuzz!"
desc = "It's a nice recruitment poster of a white haired Chinese woman that says; \"Big Guns, Hot Women, Good Times. Security. We get it done.\""
/datum/poster/bay_22
icon_state="bsposter22"
name = "Looking for a career with excitement?"
desc = "A recruitment poster starring a dark haired woman with glasses and a purple shirt that has \"Got Brains? Got Talent? Not afraid of electric flying monsters that want to suck the soul out of you? Then Xenobiology could use someone like you!\" written on the bottom."
/datum/poster/bay_23
icon_state="bsposter23"
name = "Safety first: because electricity doesn't wait!"
desc = "A safety poster starring a clueless looking redhead with frazzled hair. \"Every year, hundreds of NT employees expose themselves to electric shock. Play it safe. Avoid suspicious doors after electrical storms, and always wear protection when doing electric maintenance.\""
/datum/poster/bay_24
icon_state="bsposter24"
name = "Responsible medbay habits, No #259"
desc = "A poster with a nervous looking geneticist on it states; \"Friends Don't Tell Friends They're Clones. It can cause severe and irreparable emotional trauma. Always do the right thing and never tell them that they were dead.\""
/datum/poster/bay_25
icon_state="bsposter25"
name = "Irresponsible medbay habits, No #2"
desc = "This is a safety poster starring a perverted looking naked doctor. \"Sexual harassment is never okay. REPORT any acts of sexual deviance or harassment that disrupt a healthy working environment.\""
/datum/poster/bay_26
icon_state="bsposter26"
name = "The Men We Knew"
desc = "This movie poster depicts a group of soldiers fighting a large mech, the movie seems to be a patriotic war movie."
/datum/poster/bay_27
icon_state="bsposter27"
name = "Plastic Sheep Can't Scream"
desc = "This is a movie poster for an upcoming horror movie, it features an AI in the front of it."
/datum/poster/bay_28
icon_state="bsposter28"
name = "The Stars Know Love"
desc = "This is a movie poster. A bleeding woman is shown drawing a heart in her blood on the window of space ship, it seems to be a romantic Drama."
/datum/poster/bay_29
icon_state="bsposter29"
name = "Winter Is Coming"
desc = "On the poster is a frighteningly large wolf, he warns: \"Only YOU can keep the station from freezing during planetary occultation!\""
@@ -0,0 +1,50 @@
// /tg/ posters.
/datum/poster/tg_1
name = "Free Tonto"
desc = "A framed shred of a much larger flag, colors bled together and faded from age."
icon_state="poster1"
/datum/poster/tg_2
name = "Atmosia Declaration of Independence"
desc = "A relic of a failed rebellion"
icon_state="poster2"
/datum/poster/tg_3
name = "Fun Police"
desc = "A poster condemning the station's security forces."
icon_state="poster3"
/datum/poster/tg_4
name = "Lusty Xeno"
desc = "A heretical poster depicting the titular star of an equally heretical book."
icon_state="poster4"
/datum/poster/tg_5
name = "Syndicate Recruitment Poster"
desc = "See the galaxy! Shatter corrupt megacorporations! Join today!"
icon_state="poster5"
/datum/poster/tg_6
name = "Clown"
desc = "Honk."
icon_state="poster6"
/datum/poster/tg_7
name = "Smoke"
desc = "A poster depicting a carton of cigarettes."
icon_state="poster7"
/datum/poster/tg_8
name = "Grey Tide"
desc = "A rebellious poster symbolizing assistant solidarity."
icon_state="poster8"
/datum/poster/tg_9
name = "Missing Gloves"
desc = "This poster is about the uproar that followed Nanotrasen's financial cuts towards insulated-glove purchases."
icon_state="poster9"
/datum/poster/tg_10
name = "Hacking Guide"
desc = "This poster details the internal workings of the common Nanotrasen airlock."
icon_state="poster10"
+27 -21
View File
@@ -393,16 +393,15 @@ steam.start() -- spawns the effect
R.my_atom = src
return
/obj/effect/effect/smoke/chem/Move()
..()
for(var/atom/A in view(2, src))
if(reagents.has_reagent("radium")||reagents.has_reagent("uranium")||reagents.has_reagent("carbon")||reagents.has_reagent("thermite"))//Prevents unholy radium spam by reducing the number of 'greenglows' down to something reasonable -Sieve
if(prob(5))
reagents.reaction(A)
else
reagents.reaction(A)
return
/obj/effect/effect/smoke/chem/proc/applyReagents()
if(reagents.reagent_list.len)
for(var/atom/A in view(1, src))
if(!istype(A, src.type))
if(reagents.has_reagent("radium")||reagents.has_reagent("uranium")||reagents.has_reagent("carbon")||reagents.has_reagent("thermite"))//Prevents unholy radium spam by reducing the number of 'greenglows' down to something reasonable -Sieve
if(prob(5))
reagents.reaction(A)
else
reagents.reaction(A)
/obj/effect/effect/smoke/chem/affect(mob/living/carbon/M as mob )
reagents.reaction(M)
@@ -475,7 +474,7 @@ steam.start() -- spawns the effect
direction = pick(alldirs)
if(chemholder.reagents.total_volume != 1) // can't split 1 very well
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / number) // copy reagents to each smoke, divide evenly
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / number, safety = 1) // copy reagents to each smoke, divide evenly
if(color)
smoke.icon += color // give the smoke color, if it has any to begin with
@@ -487,9 +486,16 @@ steam.start() -- spawns the effect
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
sleep(10)
step(smoke,direction)
spawn(150+rand(10,30))
smoke.delete()
src.total_smoke--
//apply the reagents to the environment after the smoke has stopped moving - to reduce reagent spam
for(i=0, i<2 + pick(0,1,), i++)
smoke.applyReagents()
sleep(20)
sleep(60)
smoke.delete()
src.total_smoke--
/////////////////////////////////////////////
//////// Attach an Ion trail to any object, that spawns when it moves (like for the jetpack)
@@ -616,6 +622,7 @@ steam.start() -- spawns the effect
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
spawn(3 + metal*3)
process()
checkReagents()
spawn(120)
processing_objects.Remove(src)
sleep(30)
@@ -630,14 +637,13 @@ steam.start() -- spawns the effect
delete()
return
// on delete, transfer any reagents to the floor
/obj/effect/effect/foam/Del()
// transfer any reagents to the floor
/obj/effect/effect/foam/proc/checkReagents()
if(!metal && reagents)
for(var/atom/A in oview(0,src))
for(var/atom/A in src.loc.contents)
if(A == src)
continue
reagents.reaction(A, 1, 1)
..()
/obj/effect/effect/foam/process()
if(--amount < 0)
@@ -664,7 +670,7 @@ steam.start() -- spawns the effect
F.create_reagents(10)
if (reagents)
for(var/datum/reagent/R in reagents.reagent_list)
F.reagents.add_reagent(R.id,1)
F.reagents.add_reagent(R.id, 1, safety = 1) //added safety check since reagents in the foam have already had a chance to react
// foam disolves when heated
// except metal foams
@@ -735,9 +741,9 @@ steam.start() -- spawns the effect
if(carried_reagents)
for(var/id in carried_reagents)
F.reagents.add_reagent(id,1)
F.reagents.add_reagent(id, 1, null, 1) //makes a safety call because all reagents should have already reacted anyway
else
F.reagents.add_reagent("water", 1)
F.reagents.add_reagent("water", 1, safety = 1)
// wall formed by metal foams
// dense and opaque, but easy to break
+28 -17
View File
@@ -6,21 +6,9 @@
if(dx>=dy) return dx + (0.5*dy) //The longest side add half the shortest side approximates the hypotenuse
else return dy + (0.5*dx)
proc/trange(var/Dist=0,var/turf/Center=null)//alternative to range (ONLY processes turfs and thus less intensive)
if(Center==null) return
//var/x1=((Center.x-Dist)<1 ? 1 : Center.x-Dist)
//var/y1=((Center.y-Dist)<1 ? 1 : Center.y-Dist)
//var/x2=((Center.x+Dist)>world.maxx ? world.maxx : Center.x+Dist)
//var/y2=((Center.y+Dist)>world.maxy ? world.maxy : Center.y+Dist)
var/turf/x1y1 = locate(((Center.x-Dist)<1 ? 1 : Center.x-Dist),((Center.y-Dist)<1 ? 1 : Center.y-Dist),Center.z)
var/turf/x2y2 = locate(((Center.x+Dist)>world.maxx ? world.maxx : Center.x+Dist),((Center.y+Dist)>world.maxy ? world.maxy : Center.y+Dist),Center.z)
return block(x1y1,x2y2)
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1)
///// Z-Level Stuff
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, z_transfer = 1)
///// Z-Level Stuff
src = null //so we don't abort once src is deleted
spawn(0)
if(config.use_recursive_explosions)
@@ -28,6 +16,12 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
explosion_rec(epicenter, power)
return
///// Z-Level Stuff
if(z_transfer && (devastation_range > 0 || heavy_impact_range > 0))
//transfer the explosion in both directions
explosion_z_transfer(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range)
///// Z-Level Stuff
var/start = world.timeofday
epicenter = get_turf(epicenter)
if(!epicenter) return
@@ -61,7 +55,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
var/y0 = epicenter.y
var/z0 = epicenter.z
for(var/turf/T in trange(max(devastation_range, heavy_impact_range, light_impact_range), epicenter))
for(var/turf/T in range(epicenter, max(devastation_range, heavy_impact_range, light_impact_range)))
var/dist = cheap_pythag(T.x - x0,T.y - y0)
if(dist < devastation_range) dist = 1
@@ -98,4 +92,21 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
proc/secondaryexplosion(turf/epicenter, range)
for(var/turf/tile in range(range, epicenter))
tile.ex_act(2)
tile.ex_act(2)
///// Z-Level Stuff
proc/explosion_z_transfer(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, up = 1, down = 1)
var/turf/controllerlocation = locate(1, 1, epicenter.z)
for(var/obj/effect/landmark/zcontroller/controller in controllerlocation)
if(controller.down)
//start the child explosion, no admin log and no additional transfers
explosion(locate(epicenter.x, epicenter.y, controller.down_target), max(devastation_range - 2, 0), max(heavy_impact_range - 2, 0), max(light_impact_range - 2, 0), max(flash_range - 2, 0), 0, 0)
if(devastation_range - 2 > 0 || heavy_impact_range - 2 > 0) //only transfer further if the explosion is still big enough
explosion(locate(epicenter.x, epicenter.y, controller.down_target), max(devastation_range - 2, 0), max(heavy_impact_range - 2, 0), max(light_impact_range - 2, 0), max(flash_range - 2, 0), 0, 1)
if(controller.up)
//start the child explosion, no admin log and no additional transfers
explosion(locate(epicenter.x, epicenter.y, controller.up_target), max(devastation_range - 2, 0), max(heavy_impact_range - 2, 0), max(light_impact_range - 2, 0), max(flash_range - 2, 0), 0, 0)
if(devastation_range - 2 > 0 || heavy_impact_range - 2 > 0) //only transfer further if the explosion is still big enough
explosion(locate(epicenter.x, epicenter.y, controller.up_target), max(devastation_range - 2, 0), max(heavy_impact_range - 2, 0), max(light_impact_range - 2, 0), max(flash_range - 2, 0), 1, 0)
///// Z-Level Stuff
+6 -6
View File
@@ -312,22 +312,22 @@
if(slot_l_ear)
if(H.l_ear)
return 0
if( w_class < 2 )
return 1
if( !(slot_flags & SLOT_EARS) )
return 0
if( (slot_flags & SLOT_TWOEARS) && H.r_ear )
return 0
if( w_class < 2 )
return 1
return 1
if(slot_r_ear)
if(H.r_ear)
return 0
if( w_class < 2 )
return 1
if( !(slot_flags & SLOT_EARS) )
return 0
if( (slot_flags & SLOT_TWOEARS) && H.l_ear )
return 0
if( w_class < 2 )
return 1
return 1
if(slot_w_uniform)
if(H.w_uniform)
@@ -488,7 +488,7 @@
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
user << "\red You're going to need to remove that mask/helmet/glasses first."
user << "\red You're going to need to remove the eye covering first."
return
var/mob/living/carbon/monkey/Mo = M
@@ -496,7 +496,7 @@
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
user << "\red You're going to need to remove that mask/helmet/glasses first."
user << "\red You're going to need to remove the eye covering first."
return
if(istype(M, /mob/living/carbon/alien) || istype(M, /mob/living/carbon/slime))//Aliens don't have eyes./N slimes also don't have eyes!
+1 -1
View File
@@ -27,7 +27,7 @@
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool
light("\red [user] casually lights the [name] with [W], what a badass.")
light("\red [user] casually lights the [name] with [W].")
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
if(L.lit)
+2 -2
View File
@@ -90,8 +90,8 @@
/obj/item/toy/crayon/attack(mob/M as mob, mob/user as mob)
if(M == user)
user << "You take a bite of the crayon. Delicious!"
user.nutrition += 5
user << "You take a bite of the crayon and swallow it."
// user.nutrition += 5
if(uses)
uses -= 5
if(uses <= 0)
+79 -22
View File
@@ -682,7 +682,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
M.close()
if("Detonate")//Detonate PDA
if("Detonate")//Detonate PDA... maybe
// check if telecomms I/O route 1459 is stable
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
var/obj/machinery/message_server/useMS = null
@@ -715,7 +715,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (!P.toff && cartridge.charges > 0)
cartridge.charges--
var/difficulty = 0
var/difficulty = 2
if(P.cartridge)
difficulty += P.cartridge.access_medical
@@ -723,22 +723,23 @@ var/global/list/obj/item/device/pda/PDAs = list()
difficulty += P.cartridge.access_engine
difficulty += P.cartridge.access_clown
difficulty += P.cartridge.access_janitor
else
difficulty += 2
difficulty += 3 * P.hidden_uplink
if(prob(difficulty * 12) || (P.hidden_uplink))
if(prob(difficulty))
U.show_message("\red An error flashes on your [src].", 1)
else if (prob(difficulty * 3))
else if (prob(difficulty * 7))
U.show_message("\red Energy feeds back into your [src]!", 1)
ui.close()
explode()
detonate_act(src)
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up")
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge but failed, blowing themselves up", 1)
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge but failed.", 1)
else
U.show_message("\blue Success!", 1)
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge and succeded")
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge and succeded", 1)
P.explode()
log_admin("[key_name(U)] just attempted to blow up [P] with the Detomatix cartridge and succeeded")
message_admins("[key_name_admin(U)] just attempted to blow up [P] with the Detomatix cartridge and succeeded.", 1)
detonate_act(P)
else
U << "No charges left."
else
U << "PDA not found."
else
@@ -774,6 +775,70 @@ var/global/list/obj/item/device/pda/PDAs = list()
return 1 // return 1 tells it to refresh the UI in NanoUI
/obj/item/device/pda/proc/detonate_act(var/obj/item/device/pda/P)
//TODO: sometimes these attacks show up on the message server
var/i = rand(1,100)
var/j = rand(0,1) //Possibility of losing the PDA after the detonation
var/message = ""
var/mob/living/M = null
if(ismob(P.loc))
M = P.loc
//switch(i) //Yes, the overlapping cases are intended.
if(i<=10) //The traditional explosion
P.explode()
j=1
message += "Your [P] suddenly explodes!"
if(i>=10 && i<= 20) //The PDA burns a hole in the holder.
j=1
if(M && isliving(M))
M.apply_damage( rand(30,60) , BURN)
message += "You feel a searing heat! Your [P] is burning!"
if(i>=20 && i<=25) //EMP
empulse(P.loc, 3, 6, 1)
message += "Your [P] emits a wave of electomagnetic energy!"
if(i>=25 && i<=40) //Smoke
var/datum/effect/effect/system/smoke_spread/chem/S = new /datum/effect/effect/system/smoke_spread/chem
S.attach(P.loc)
S.set_up(P, 10, 0, P.loc)
playsound(P.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
S.start()
message += "Large clouds of smoke billow forth from your [P]!"
if(i>=40 && i<=45) //Bad smoke
var/datum/effect/effect/system/smoke_spread/bad/B = new /datum/effect/effect/system/smoke_spread/bad
B.attach(P.loc)
B.set_up(P, 10, 0, P.loc)
playsound(P.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
B.start()
message += "Large clouds of noxious smoke billow forth from your [P]!"
if(i>=65 && i<=75) //Weaken
if(M && isliving(M))
M.apply_effects(0,1)
message += "Your [P] flashes with a blinding white light! You feel weaker."
if(i>=75 && i<=85) //Stun and stutter
if(M && isliving(M))
M.apply_effects(1,0,0,0,1)
message += "Your [P] flashes with a blinding white light! You feel weaker."
if(i>=85) //Sparks
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(2, 1, P.loc)
s.start()
message += "Your [P] begins to spark violently!"
if(i>45 && i<65 && prob(50)) //Nothing happens
message += "Your [P] bleeps loudly."
j = prob(10)
if(j) //This kills the PDA
P.Del()
if(message)
message += "It melts in a puddle of plastic."
else
message += "Your [P] shatters in a thousand pieces!"
if(M && isliving(M))
message = "\red" + message
M.show_message(message, 1)
/obj/item/device/pda/proc/remove_id()
if (id)
if (ismob(loc))
@@ -1127,25 +1192,17 @@ var/global/list/obj/item/device/pda/PDAs = list()
user << "\blue Paper scanned." //concept of scanning paper copyright brainoblivion 2009
/obj/item/device/pda/proc/explode() //This needs tuning.
/obj/item/device/pda/proc/explode() //This needs tuning. //Sure did.
if(!src.detonate) return
var/turf/T = get_turf(src.loc)
if (ismob(loc))
var/mob/M = loc
M.show_message("\red Your [src] explodes!", 1)
if(T)
T.hotspot_expose(700,125)
explosion(T, -1, -1, 2, 3)
del(src)
explosion(T, 0, 0, 1, rand(1,2))
return
/obj/item/device/pda/Del()
PDAs -= src
if (src.id)
if (src.id && prob(90)) //IDs are kept in 90% of the cases
src.id.loc = get_turf(src.loc)
..()
@@ -33,6 +33,7 @@
user << "<span class='notice'>You attach the tank to the transfer valve.</span>"
update_icon()
nanomanager.update_uis(src) // update all UIs attached to src
//TODO: Have this take an assemblyholder
else if(isassembly(item))
var/obj/item/device/assembly/A = item
@@ -53,6 +54,7 @@
message_admins("[key_name_admin(user)] attached a [item] to a transfer valve.")
log_game("[key_name_admin(user)] attached a [item] to a transfer valve.")
attacher = user
nanomanager.update_uis(src) // update all UIs attached to src
return
@@ -63,49 +65,60 @@
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
user.set_machine(src)
var/dat = {"<B> Valve properties: </B>
<BR> <B> Attachment one:</B> [tank_one] [tank_one ? "<A href='?src=\ref[src];tankone=1'>Remove</A>" : ""]
<BR> <B> Attachment two:</B> [tank_two] [tank_two ? "<A href='?src=\ref[src];tanktwo=1'>Remove</A>" : ""]
<BR> <B> Valve attachment:</B> [attached_device ? "<A href='?src=\ref[src];device=1'>[attached_device]</A>" : "None"] [attached_device ? "<A href='?src=\ref[src];rem_device=1'>Remove</A>" : ""]
<BR> <B> Valve status: </B> [ valve_open ? "<A href='?src=\ref[src];open=1'>Closed</A> <B>Open</B>" : "<B>Closed</B> <A href='?src=\ref[src];open=1'>Open</A>"]"}
ui_interact(user)
/obj/item/device/transfer_valve/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
user << browse(dat, "window=trans_valve;size=600x300")
onclose(user, "trans_valve")
return
// this is the data which will be sent to the ui
var/data[0]
data["attachmentOne"] = tank_one ? tank_one.name : null
data["attachmentTwo"] = tank_two ? tank_two.name : null
data["valveAttachment"] = attached_device ? attached_device.name : null
data["valveOpen"] = valve_open ? 1 : 0
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
//ui.set_auto_update(1)
/obj/item/device/transfer_valve/Topic(href, href_list)
..()
if ( usr.stat || usr.restrained() )
return
if (src.loc == usr)
if(tank_one && href_list["tankone"])
split_gases()
valve_open = 0
tank_one.loc = get_turf(src)
tank_one = null
return 0
if (src.loc != usr)
return 0
if(tank_one && href_list["tankone"])
split_gases()
valve_open = 0
tank_one.loc = get_turf(src)
tank_one = null
update_icon()
else if(tank_two && href_list["tanktwo"])
split_gases()
valve_open = 0
tank_two.loc = get_turf(src)
tank_two = null
update_icon()
else if(href_list["open"])
toggle_valve()
else if(attached_device)
if(href_list["rem_device"])
attached_device.loc = get_turf(src)
attached_device:holder = null
attached_device = null
update_icon()
else if(tank_two && href_list["tanktwo"])
split_gases()
valve_open = 0
tank_two.loc = get_turf(src)
tank_two = null
update_icon()
else if(href_list["open"])
toggle_valve()
else if(attached_device)
if(href_list["rem_device"])
attached_device.loc = get_turf(src)
attached_device:holder = null
attached_device = null
update_icon()
if(href_list["device"])
attached_device.attack_self(usr)
src.attack_self(usr)
src.add_fingerprint(usr)
return
return
if(href_list["device"])
attached_device.attack_self(usr)
src.add_fingerprint(usr)
return 1 // Returning 1 sends an update to attached UIs
/obj/item/device/transfer_valve/process_activation(var/obj/item/device/D)
if(toggle)
+2 -2
View File
@@ -72,11 +72,11 @@
syndicate
icon_state = "target_s"
desc = "A shooting target that looks like a syndicate scum."
desc = "A shooting target that looks like a hostile agent."
hp = 2600 // i guess syndie targets are sturdier?
alien
icon_state = "target_q"
desc = "A shooting target that looks like a xenomorphic alien."
desc = "A shooting target with a threatening silhouette."
hp = 2350 // alium onest too kinda
/obj/item/target/bullet_act(var/obj/item/projectile/Proj)
@@ -166,7 +166,14 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
new/datum/stack_recipe("folder", /obj/item/weapon/folder), \
null, \
new/datum/stack_recipe_list("folders",list( \
new/datum/stack_recipe("blue folder", /obj/item/weapon/folder/blue), \
new/datum/stack_recipe("grey folder", /obj/item/weapon/folder), \
new/datum/stack_recipe("red folder", /obj/item/weapon/folder/red), \
new/datum/stack_recipe("white folder", /obj/item/weapon/folder/white), \
new/datum/stack_recipe("yellow folder", /obj/item/weapon/folder/yellow), \
)) \
)
/obj/item/stack/sheet/cardboard //BubbleWrap
+2 -2
View File
@@ -294,7 +294,7 @@
/obj/item/toy/ammo/crossbow
name = "foam dart"
desc = "Its nerf or nothing! Ages 8 and up."
desc = "It's nerf or nothing! Ages 8 and up."
icon = 'icons/obj/toy.dmi'
icon_state = "foamdart"
flags = FPRINT | TABLEPASS
@@ -365,7 +365,7 @@
/obj/item/toy/crayon
name = "crayon"
desc = "A colourful crayon. Looks tasty. Mmmm..."
desc = "A colourful crayon. Please refrain from eating it or putting it in your nose."
icon = 'icons/obj/crayons.dmi'
icon_state = "crayonred"
w_class = 1.0
@@ -86,17 +86,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.isOn())//Badasses dont get blinded while lighting their cig with a welding tool
light("<span class='notice'>[user] casually lights the [name] with [W], what a badass.</span>")
light("<span class='notice'>[user] casually lights the [name] with [W].</span>")
else if(istype(W, /obj/item/weapon/lighter/zippo))
var/obj/item/weapon/lighter/zippo/Z = W
if(Z.lit)
light("<span class='rose'>With a single flick of their wrist, [user] smoothly lights their [name] with their [W]. Damn they're cool.</span>")
light("<span class='rose'>With a flick of their wrist, [user] lights their [name] with their [W].</span>")
else if(istype(W, /obj/item/weapon/lighter))
var/obj/item/weapon/lighter/L = W
if(L.lit)
light("<span class='notice'>After some fiddling, [user] manages to light their [name] with [W].</span>")
light("<span class='notice'>[user] manages to light their [name] with [W].</span>")
else if(istype(W, /obj/item/weapon/match))
var/obj/item/weapon/match/M = W
@@ -313,7 +313,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/cigarette/pipe/cobpipe
name = "corn cob pipe"
desc = "A nicotine delivery system popularized by folksy backwoodsmen and kept popular in the modern age and beyond by space hipsters."
desc = "A nicotine delivery system popularized by folksy backwoodsmen, kept popular in the modern age and beyond by space hipsters."
icon_state = "cobpipeoff"
item_state = "cobpipeoff"
icon_on = "cobpipeon" //Note - these are in masks.dmi
@@ -364,7 +364,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(istype(src, /obj/item/weapon/lighter/zippo) )
user.visible_message("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
else
if(prob(75))
if(prob(95))
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src].</span>")
else
user << "<span class='warning'>You burn yourself while lighting the lighter.</span>"
@@ -378,7 +378,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
icon_state = icon_off
item_state = icon_off
if(istype(src, /obj/item/weapon/lighter/zippo) )
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing. Wow.")
user.visible_message("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.")
else
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].")
@@ -399,7 +399,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
cig.attackby(src, user)
else
if(istype(src, /obj/item/weapon/lighter/zippo))
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M]. Their arm is as steady as the unflickering flame they light \the [cig] with.</span>")
cig.light("<span class='rose'>[user] whips the [name] out and holds it for [M].</span>")
else
cig.light("<span class='notice'>[user] holds the [name] out for [M], and lights the [cig.name].</span>")
else
@@ -423,4 +423,4 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(lit)
user.SetLuminosity(user.luminosity-2)
SetLuminosity(2)
return
return
@@ -165,11 +165,6 @@
invisibility = INVISIBILITY_MAXIMUM //Why am i doing this?
spawn(50) //To make sure all reagents can work
del(src) //correctly before deleting the grenade.
/*else
icon_state = initial(icon_state) + "_locked"
crit_fail = 1
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.loc = get_turf(src.loc)*/
/obj/item/weapon/grenade/chem_grenade/large
@@ -240,6 +235,8 @@
B2.reagents.add_reagent("phosphorus", 25)
B2.reagents.add_reagent("sugar", 25)
detonator = new/obj/item/device/assembly_holder/timer_igniter(src)
beakers += B1
beakers += B2
icon_state = "grenade"
+9 -9
View File
@@ -95,32 +95,32 @@
/obj/item/weapon/handcuffs/cable
name = "cable restraints"
desc = "Looks like some cables tied together. Could be used to tie something up."
icon_state = "cuff_red"
icon_state = "cuff_white"
breakouttime = 300 //Deciseconds = 30s
/obj/item/weapon/handcuffs/cable/red
icon_state = "cuff_red"
color = "#DD0000"
/obj/item/weapon/handcuffs/cable/yellow
icon_state = "cuff_yellow"
color = "#DDDD00"
/obj/item/weapon/handcuffs/cable/blue
icon_state = "cuff_blue"
color = "#0000DD"
/obj/item/weapon/handcuffs/cable/green
icon_state = "cuff_green"
color = "#00DD00"
/obj/item/weapon/handcuffs/cable/pink
icon_state = "cuff_pink"
color = "#DD00DD"
/obj/item/weapon/handcuffs/cable/orange
icon_state = "cuff_orange"
color = "#DD8800"
/obj/item/weapon/handcuffs/cable/cyan
icon_state = "cuff_cyan"
color = "#00DDDD"
/obj/item/weapon/handcuffs/cable/white
icon_state = "cuff_white"
color = "#FFFFFF"
/obj/item/weapon/handcuffs/cyborg
dispenser = 1
@@ -165,7 +165,7 @@ Implant Specifics:<BR>"}
message_admins("Explosive implant triggered in [T] ([T.key]). (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>JMP</a>) ")
log_game("Explosive implant triggered in [T] ([T.key]).")
need_gib = 1
if(ishuman(imp_in))
if (elevel == "Localized Limb")
if(part) //For some reason, small_boom() didn't work. So have this bit of working copypaste.
@@ -194,7 +194,7 @@ Implant Specifics:<BR>"}
if(need_gib)
imp_in.gib()
var/turf/t = get_turf(imp_in)
if(t)
@@ -501,3 +501,4 @@ the implant may become unstable and either pre-maturely inject the subject or si
/obj/item/weapon/implant/cortical
name = "cortical stack"
desc = "A fist-sized mass of biocircuits and chips."
icon_state = "implant_evil"
+15 -12
View File
@@ -71,13 +71,13 @@
/obj/item/weapon/book/manual/supermatter_engine
name = "Supermatter Engine User's Guide"
icon_state = "bookParticleAccelerator" //TEMP FIXME
icon_state = "bookSupermatter"
author = "Waleed Asad"
title = "Supermatter Engine User's Guide"
dat = {"Engineering notes on single-stage Supermatter engine,</br>
-Waleed Asad</br>
Station,</br>
Exodus</br>
@@ -735,7 +735,7 @@
/obj/item/weapon/book/manual/chef_recipes
name = "Chef Recipes"
icon_state = "cooked_book"
author = "Lord Frenrir Cageth"
author = "Victoria Ponsonby"
title = "Chef Recipes"
dat = {"<html>
@@ -753,32 +753,35 @@
<h1>Food for Dummies</h1>
Here is a guide on basic food recipes and also how to not poison your customers accidentally.
<h2>Basics:<h2>
Knead an egg and some flour to make dough. Bake that to make a bun or flatten and cut it.
<h2>Burger:<h2>
Put 1 meat and 1 flour into the microwave and turn it on. Then wait.
Put a bun and some meat into the microwave and turn it on. Then wait.
<h2>Bread:<h2>
Put 3 flour into the microwave and then wait.
Put some dough and an egg into the microwave and then wait.
<h2>Waffles:<h2>
Add 2 flour and 2 egg to the microwave and then wait.
Add two lumps of dough and 10u of sugar to the microwave and then wait.
<h2>Popcorn:<h2>
Add 1 corn to the microwave and wait.
<h2>Meat Steak:<h2>
Put 1 meat, 1 unit of salt and 1 unit of pepper into the microwave and wait.
Put a slice of meat, 1 unit of salt and 1 unit of pepper into the microwave and wait.
<h2>Meat Pie:<h2>
Put 1 meat and 2 flour into the microwave and wait.
Put a flattened piece of dough and some meat into the microwave and wait.
<h2>Boiled Spagetti:<h2>
Put 1 spagetti and 5 units of water into the microwave and wait.
<h2>Boiled Spaghetti:<h2>
Put the spaghetti (processed flour) and 5 units of water into the microwave and wait.
<h2>Donuts:<h2>
Add 1 egg and 1 flour to the microwave and wait.
Add some dough and 5 units of sugar to the microwave and wait.
<h2>Fries:<h2>
Add one potato to the processor and wait.
Add one potato to the processor, then bake them in the microwave.
</body>
+12 -7
View File
@@ -36,6 +36,11 @@ var/global/list/cached_icons = list()
..()
reagents.add_reagent("paint_[paint_type]", volume)
on_reagent_change() //Until we have a generic "paint", this will give new colours to all paints in the can
var/mixedcolor = mix_color_from_reagents(reagents.reagent_list)
for(var/datum/reagent/paint/P in reagents.reagent_list)
P.color = mixedcolor
red
icon_state = "paint_red"
paint_type = "red"
@@ -171,9 +176,9 @@ var/global/list/cached_icons = list()
datum/reagent/paint
name = "Paint"
id = "paint_"
description = "Floor paint is used to color floor tiles."
reagent_state = 2
color = "#808080"
description = "This paint will only adhere to floor tiles."
reaction_turf(var/turf/T, var/volume)
if(!istype(T) || istype(T, /turf/space))
@@ -192,26 +197,26 @@ datum/reagent/paint
red
name = "Red Paint"
id = "paint_red"
color = "#FF0000"
color = "#FE191A"
green
name = "Green Paint"
color = "#00FF00"
color = "#18A31A"
id = "paint_green"
blue
name = "Blue Paint"
color = "#0000FF"
color = "#247CFF"
id = "paint_blue"
yellow
name = "Yellow Paint"
color = "#FFFF00"
color = "#FDFE7D"
id = "paint_yellow"
violet
name = "Violet Paint"
color = "#FF00FF"
color = "#CC0099"
id = "paint_violet"
black
@@ -221,7 +226,7 @@ datum/reagent/paint
white
name = "White Paint"
color = "#FFFFFF"
color = "#F0F8FF"
id = "paint_white"
datum/reagent/paint_remover
@@ -167,3 +167,32 @@
desc = "No bother to sink or swim when you can just float!"
icon_state = "inflatable"
item_state = "inflatable"
/obj/item/weapon/storage/belt/security/tactical
name = "combat belt"
desc = "Can hold security gear like handcuffs and flashes, with more pouches for more storage."
icon_state = "swatbelt"
item_state = "swatbelt"
storage_slots = 9
max_w_class = 3
max_combined_w_class = 21
can_hold = list(
"/obj/item/weapon/grenade/flashbang",
"/obj/item/weapon/reagent_containers/spray/pepper",
"/obj/item/weapon/handcuffs",
"/obj/item/device/flash",
"/obj/item/clothing/glasses",
"/obj/item/ammo_casing/shotgun",
"/obj/item/ammo_magazine",
"/obj/item/weapon/reagent_containers/food/snacks/donut/normal",
"/obj/item/weapon/reagent_containers/food/snacks/donut/jelly",
"/obj/item/weapon/melee/baton",
"/obj/item/weapon/gun/energy/taser",
"/obj/item/weapon/lighter/zippo",
"/obj/item/weapon/cigpacket",
"/obj/item/clothing/glasses/hud/security",
"/obj/item/device/flashlight",
"/obj/item/device/pda",
"/obj/item/device/radio/headset",
"/obj/item/weapon/melee"
)
+61 -44
View File
@@ -1,3 +1,6 @@
#define TANK_MAX_RELEASE_PRESSURE (3*ONE_ATMOSPHERE)
#define TANK_DEFAULT_RELEASE_PRESSURE 24
/obj/item/weapon/tank
name = "tank"
icon = 'icons/obj/tank.dmi'
@@ -24,8 +27,7 @@
src.air_contents.volume = volume //liters
src.air_contents.temperature = T20C
processing_objects.Add(src)
processing_objects.Add(src)
return
/obj/item/weapon/tank/Del()
@@ -121,7 +123,10 @@
/obj/item/weapon/tank/attack_self(mob/user as mob)
if (!(src.air_contents))
return
user.set_machine(src)
ui_interact(user)
/obj/item/weapon/tank/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null)
var/using_internal
if(istype(loc,/mob/living/carbon))
@@ -129,57 +134,69 @@
if(location.internal==src)
using_internal = 1
var/message = {"
<b>Tank</b><BR>
<FONT color='blue'><b>Tank Pressure:</b> [air_contents.return_pressure()]</FONT><BR>
<BR>
<b>Mask Release Pressure:</b> <A href='?src=\ref[src];dist_p=-10'>-</A> <A href='?src=\ref[src];dist_p=-1'>-</A> [distribute_pressure] <A href='?src=\ref[src];dist_p=1'>+</A> <A href='?src=\ref[src];dist_p=10'>+</A><BR>
<b>Mask Release Valve:</b> <A href='?src=\ref[src];stat=1'>[using_internal?("Open"):("Closed")]</A>
"}
user << browse(message, "window=tank;size=600x300")
onclose(user, "tank")
return
// this is the data which will be sent to the ui
var/data[0]
data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
data["releasePressure"] = round(distribute_pressure ? distribute_pressure : 0)
data["defaultReleasePressure"] = round(TANK_DEFAULT_RELEASE_PRESSURE)
data["maxReleasePressure"] = round(TANK_MAX_RELEASE_PRESSURE)
data["valveOpen"] = using_internal ? 1 : 0
data["maskConnected"] = 0
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src || (location.wear_mask && (location.wear_mask.flags & MASKINTERNALS)))
data["maskConnected"] = 1
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data)
if (!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "tanks.tmpl", "Tank", 500, 300)
// when the ui is first opened this is the data it will use
ui.set_initial_data(data)
// open the new ui window
ui.open()
// auto update every Master Controller tick
ui.set_auto_update(1)
/obj/item/weapon/tank/Topic(href, href_list)
..()
if (usr.stat|| usr.restrained())
return
if (src.loc == usr)
usr.set_machine(src)
if (href_list["dist_p"])
return 0
if (src.loc != usr)
return 0
if (href_list["dist_p"])
if (href_list["dist_p"] == "reset")
src.distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
else if (href_list["dist_p"] == "max")
src.distribute_pressure = TANK_MAX_RELEASE_PRESSURE
else
var/cp = text2num(href_list["dist_p"])
src.distribute_pressure += cp
src.distribute_pressure = min(max(round(src.distribute_pressure), 0), 3*ONE_ATMOSPHERE)
if (href_list["stat"])
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src)
location.internal = null
src.distribute_pressure = min(max(round(src.distribute_pressure), 0), TANK_MAX_RELEASE_PRESSURE)
if (href_list["stat"])
if(istype(loc,/mob/living/carbon))
var/mob/living/carbon/location = loc
if(location.internal == src)
location.internal = null
location.internals.icon_state = "internal0"
usr << "\blue You close the tank release valve."
if (location.internals)
location.internals.icon_state = "internal0"
usr << "\blue You close the tank release valve."
else
if(location.wear_mask && (location.wear_mask.flags & MASKINTERNALS))
location.internal = src
usr << "\blue You open \the [src] valve."
if (location.internals)
location.internals.icon_state = "internal0"
location.internals.icon_state = "internal1"
else
if(location.wear_mask && (location.wear_mask.flags & MASKINTERNALS))
location.internal = src
usr << "\blue You open \the [src] valve."
if (location.internals)
location.internals.icon_state = "internal1"
else
usr << "\blue You need something to connect to \the [src]."
usr << "\blue You need something to connect to \the [src]."
src.add_fingerprint(usr)
/*
* the following is needed for a tank lying on the floor. But currently we restrict players to use not weared tanks as intrals. --rastaf
for(var/mob/M in viewers(1, src.loc))
if ((M.client && M.machine == src))
src.attack_self(M)
*/
src.attack_self(usr)
else
usr << browse(null, "window=tank")
return
return
src.add_fingerprint(usr)
return 1
/obj/item/weapon/tank/remove_air(amount)
@@ -65,6 +65,7 @@
icon_closed = "blue"
/obj/structure/closet/lawcloset/New()
..()
new /obj/item/clothing/under/lawyer/female(src)
new /obj/item/clothing/under/lawyer/black(src)
new /obj/item/clothing/under/lawyer/red(src)
@@ -124,12 +124,12 @@
/obj/structure/closet/secure_closet/atmos_personal
name = "Technician's Locker"
req_access = list(access_atmospherics)
icon_state = "secureeng1"
icon_closed = "secureeng"
icon_locked = "secureeng1"
icon_opened = "secureengopen"
icon_broken = "secureengbroken"
icon_off = "secureengoff"
icon_state = "secureatm1"
icon_closed = "secureatm"
icon_locked = "secureatm1"
icon_opened = "secureatmopen"
icon_broken = "secureatmbroken"
icon_off = "secureatmoff"
New()
@@ -151,4 +151,4 @@
new /obj/item/clothing/mask/gas(src)
new /obj/item/weapon/cartridge/atmos(src)
new /obj/item/taperoll/engineering(src)
return
return
@@ -19,9 +19,11 @@
New()
..()
sleep(2)
for(var/i = 0, i < 3, i++)
new /obj/item/weapon/reagent_containers/food/drinks/flour(src)
for(var/i = 0, i < 6, i++)
new /obj/item/weapon/reagent_containers/food/snacks/flour(src)
new /obj/item/weapon/reagent_containers/food/condiment/sugar(src)
for(var/i = 0, i < 3, i++)
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src)
return
@@ -64,7 +66,7 @@
sleep(2)
for(var/i = 0, i < 5, i++)
new /obj/item/weapon/reagent_containers/food/drinks/milk(src)
for(var/i = 0, i < 5, i++)
for(var/i = 0, i < 3, i++)
new /obj/item/weapon/reagent_containers/food/drinks/soymilk(src)
for(var/i = 0, i < 2, i++)
new /obj/item/weapon/storage/fancy/egg_box(src)
@@ -301,6 +301,7 @@
var/id = null
New()
..()
new /obj/item/clothing/under/color/orange( src )
new /obj/item/clothing/shoes/orange( src )
return
@@ -56,6 +56,7 @@
del(src)*/
/obj/structure/closet/emcloset/legacy/New()
..()
new /obj/item/weapon/tank/oxygen(src)
new /obj/item/clothing/mask/gas(src)
@@ -108,6 +109,7 @@
icon_opened = "toolclosetopen"
/obj/structure/closet/toolcloset/New()
..()
if(prob(40))
new /obj/item/clothing/suit/storage/hazardvest(src)
if(prob(70))
@@ -154,6 +156,8 @@
..()
new /obj/item/clothing/suit/radiation(src)
new /obj/item/clothing/head/radiation(src)
new /obj/item/clothing/suit/radiation(src)
new /obj/item/clothing/head/radiation(src)
/*
* Bombsuit closet
@@ -380,3 +380,20 @@
new /obj/item/clothing/shoes/red(src)
new /obj/item/clothing/shoes/leather(src)
return
/obj/structure/closet/wardrobe/tactical
name = "tactical equipment"
icon_state = "syndicate1"
icon_closed = "syndicate1"
icon_opened = "syndicate1open"
/obj/structure/closet/wardrobe/tactical/New()
new /obj/item/clothing/under/tactical(src)
new /obj/item/clothing/suit/armor/tactical(src)
new /obj/item/clothing/head/helmet/tactical(src)
new /obj/item/clothing/mask/balaclava/tactical(src)
new /obj/item/clothing/glasses/sunglasses/sechud/tactical(src)
new /obj/item/weapon/storage/belt/security/tactical(src)
new /obj/item/clothing/shoes/jackboots(src)
new /obj/item/clothing/gloves/black(src)
return
@@ -276,6 +276,36 @@
new /obj/item/weapon/rcd_ammo(src)
new /obj/item/weapon/rcd(src)
/obj/structure/closet/crate/solar
name = "Solar Pack crate"
/obj/structure/closet/crate/solar/New()
..()
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/solar_assembly(src)
new /obj/item/weapon/circuitboard/solar_control(src)
new /obj/item/weapon/tracker_electronics(src)
new /obj/item/weapon/paper/solar(src)
/obj/structure/closet/crate/freezer
desc = "A freezer."
name = "Freezer"
@@ -303,6 +333,15 @@
newgas.temperature = target_temp
return newgas
/obj/structure/closet/crate/freezer/rations //Fpr use in the escape shuttle
desc = "A crate of emergency rations."
name = "Emergency Rations"
/obj/structure/closet/crate/freezer/rations/New()
..()
new /obj/item/weapon/storage/box/donkpockets(src)
new /obj/item/weapon/storage/box/donkpockets(src)
/obj/structure/closet/crate/bin
desc = "A large bin."
+4 -2
View File
@@ -10,7 +10,9 @@
/obj/structure/lattice/New()
..()
if(!(istype(src.loc, /turf/space)))
///// Z-Level Stuff
if(!(istype(src.loc, /turf/space) || istype(src.loc, /turf/simulated/floor/open)))
///// Z-Level Stuff
del(src)
for(var/obj/structure/lattice/LAT in src.loc)
if(LAT != src)
@@ -80,4 +82,4 @@
dir_sum += direction
icon_state = "lattice[dir_sum]"
return
return
+3
View File
@@ -9,6 +9,9 @@
..()
name = "floor"
/turf/simulated/floor/airless/ceiling
icon_state = "rockvault"
/turf/simulated/floor/light
name = "Light floor"
luminosity = 5
+15 -1
View File
@@ -200,6 +200,20 @@
if (!N)
return
///// Z-Level Stuff ///// This makes sure that turfs are not changed to space when one side is part of a zone
if(N == /turf/space)
var/turf/controller = locate(1, 1, src.z)
for(var/obj/effect/landmark/zcontroller/c in controller)
if(c.down)
var/turf/below = locate(src.x, src.y, c.down_target)
if((below.zone || zone) && !istype(below, /turf/space)) // dont make open space into space, its pointless and makes people drop out of the station
var/turf/W = src.ChangeTurf(/turf/simulated/floor/open)
var/list/temp = list()
temp += W
c.add(temp,3,1) // report the new open space to the zcontroller
return W
///// Z-Level Stuff
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
if(ispath(N, /turf/simulated/floor))
@@ -337,4 +351,4 @@
if(!t.density)
if(!LinkBlocked(src, t) && !TurfBlockedNonWindow(t))
L.Add(t)
return L
return L
-13
View File
@@ -68,19 +68,6 @@ var/global/vox_tick = 1
W.handle_item_insertion(C)
spawn_money(rand(50,150)*10,W)
equip_to_slot_or_del(W, slot_wear_id)
var/obj/item/weapon/implant/cortical/I = new(src)
I.imp_in = src
I.implanted = 1
var/datum/organ/external/affected = src.get_organ("head")
affected.implants += I
I.part = affected
if(ticker.mode && ( istype( ticker.mode,/datum/game_mode/heist ) ) )
var/datum/game_mode/heist/M = ticker.mode
M.cortical_stacks += I
M.raiders[mind] = I
vox_tick++
if (vox_tick > 4) vox_tick = 1
+4 -23
View File
@@ -242,30 +242,11 @@
//send resources to the client. It's here in its own proc so we can move it around easiliy if need be
/client/proc/send_resources()
// preload_vox() //Causes long delays with initial start window and subsequent windows when first logged in.
// Send NanoUI resources to this client
nanomanager.send_resources(src)
getFiles(
'nano/js/libraries.min.js',
'nano/js/nano_update.js',
'nano/js/nano_config.js',
'nano/js/nano_base_helpers.js',
'nano/css/shared.css',
'nano/css/icons.css',
'nano/templates/chem_dispenser.tmpl',
'nano/templates/cryo.tmpl',
'nano/templates/geoscanner.tmpl',
'nano/templates/dna_modifier.tmpl',
'nano/templates/telescience_console.tmpl',
'nano/templates/pda.tmpl',
'nano/templates/smes.tmpl',
'nano/templates/uplink.tmpl',
'nano/images/uiBackground.png',
'nano/images/uiIcons16.png',
'nano/images/uiIcons24.png',
'nano/images/uiBackground-Syndicate.png',
'nano/images/uiLinkPendingIcon.gif',
'nano/images/uiMaskBackground.png',
'nano/images/uiNoticeBackground.jpg',
'nano/images/uiTitleFluff.png',
'nano/images/uiTitleFluff-Syndicate.png',
'html/search.js',
'html/panels.css',
'icons/pda_icons/pda_atmos.png',
+40 -1
View File
@@ -109,6 +109,8 @@ datum/preferences
var/nanotrasen_relation = "Neutral"
var/uplinklocation = "PDA"
// OOC Metadata:
var/metadata = ""
var/slot_name = ""
@@ -245,7 +247,7 @@ datum/preferences
dat += "<b>UI Style:</b> <a href='?_src_=prefs;preference=ui'><b>[UI_style]</b></a><br>"
dat += "<b>Custom UI</b>(recommended for White UI):<br>"
dat += "-Color: <a href='?_src_=prefs;preference=UIcolor'><b>[UI_style_color]</b></a> <table style='display:inline;' bgcolor='[UI_style_color]'><tr><td>__</td></tr></table><br>"
dat += "-Alpha(transparence): <a href='?_src_=prefs;preference=UIalpha'><b>[UI_style_alpha]</b></a><br>"
dat += "-Alpha(transparency): <a href='?_src_=prefs;preference=UIalpha'><b>[UI_style_alpha]</b></a><br>"
dat += "<b>Play admin midis:</b> <a href='?_src_=prefs;preference=hear_midis'><b>[(toggles & SOUND_MIDI) ? "Yes" : "No"]</b></a><br>"
dat += "<b>Play lobby music:</b> <a href='?_src_=prefs;preference=lobby_music'><b>[(toggles & SOUND_LOBBY) ? "Yes" : "No"]</b></a><br>"
dat += "<b>Ghost ears:</b> <a href='?_src_=prefs;preference=ghost_ears'><b>[(toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]</b></a><br>"
@@ -349,6 +351,8 @@ datum/preferences
else
dat += "<b><a href=\"byond://?src=\ref[user];preference=records;record=1\">Character Records</a></b><br>"
dat += "<b><a href=\"byond://?src=\ref[user];preference=antagoptions;active=0\">Set Antag Options</b></a><br>"
dat += "\t<a href=\"byond://?src=\ref[user];preference=skills\"><b>Set Skills</b> (<i>[GetSkillClass(used_skillpoints)][used_skillpoints > 0 ? " [used_skillpoints]" : "0"])</i></a><br>"
dat += "<a href='byond://?src=\ref[user];preference=flavor_text;task=input'><b>Set Flavor Text</b></a><br>"
@@ -547,6 +551,24 @@ datum/preferences
user << browse(HTML, "window=records;size=350x300")
return
proc/SetAntagoptions(mob/user)
var/HTML = "<body>"
HTML += "<tt><center>"
HTML += "<b>Antagonist Options</b> <hr />"
HTML += "<br>"
HTML +="Uplink Type : <b><a href='?src=\ref[user];preference=antagoptions;antagtask=uplinktype;active=1'>[uplinklocation]</a></b>"
HTML +="<br>"
HTML +="<hr />"
HTML +="<a href='?src=\ref[user];preference=antagoptions;antagtask=done;active=1'>\[Done\]</a>"
HTML += "</center></tt>"
user << browse(null, "window=preferences")
user << browse(HTML, "window=antagoptions")
return
proc/GetPlayerAltTitle(datum/job/job)
return player_alt_titles.Find(job.title) > 0 \
? player_alt_titles[job.title] \
@@ -782,6 +804,23 @@ datum/preferences
gen_record = genmsg
SetRecords(user)
else if (href_list["preference"] == "antagoptions")
if(text2num(href_list["active"]) == 0)
SetAntagoptions(user)
return
if (href_list["antagtask"] == "uplinktype")
if (uplinklocation == "PDA")
uplinklocation = "Headset"
else if(uplinklocation == "Headset")
uplinklocation = "None"
else
uplinklocation = "PDA"
SetAntagoptions(user)
if (href_list["antagtask"] == "done")
user << browse(null, "window=antagoptions")
ShowChoices(user)
return 1
switch(href_list["task"])
if("random")
switch(href_list["preference"])
@@ -156,6 +156,8 @@
S["nanotrasen_relation"] >> nanotrasen_relation
//S["skin_style"] >> skin_style
S["uplinklocation"] >> uplinklocation
//Sanitize
metadata = sanitize_text(metadata, initial(metadata))
real_name = reject_bad_name(real_name)
@@ -260,6 +262,8 @@
S["nanotrasen_relation"] << nanotrasen_relation
//S["skin_style"] << skin_style
S["uplinklocation"] << uplinklocation
return 1
+5
View File
@@ -150,6 +150,11 @@
src.hud = new/obj/item/clothing/glasses/hud/security(src)
return
/obj/item/clothing/glasses/sunglasses/sechud/tactical
name = "tactical HUD"
desc = "Flash-resistant goggles with inbuilt combat and security information."
icon_state = "swatgoggles"
/obj/item/clothing/glasses/thermal
name = "Optical Thermal Scanner"
desc = "Thermals in the shape of glasses."
+11 -1
View File
@@ -58,4 +58,14 @@
flags = FPRINT|TABLEPASS|HEADCOVERSEYES|HEADCOVERSMOUTH|BLOCKHAIR
item_state = "gladiator"
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES
siemens_coefficient = 1
siemens_coefficient = 1
/obj/item/clothing/head/helmet/tactical
name = "tactical helmet"
desc = "An armored helmet capable of being fitted with a multitude of attachments."
icon_state = "swathelm"
item_state = "helmet"
flags = FPRINT|TABLEPASS|HEADCOVERSEYES
armor = list(melee = 62, bullet = 50, laser = 50,energy = 35, bomb = 10, bio = 2, rad = 0)
flags_inv = HIDEEARS
siemens_coefficient = 0.7
+9
View File
@@ -7,6 +7,15 @@
flags_inv = HIDEFACE
w_class = 2
/obj/item/clothing/mask/balaclava/tactical
name = "green balaclava"
desc = "Designed to both hide identities and keep your face comfy and warm."
icon_state = "swatclava"
item_state = "balaclava"
flags = FPRINT|TABLEPASS|BLOCKHAIR
flags_inv = HIDEFACE
w_class = 2
/obj/item/clothing/mask/luchador
name = "Luchador Mask"
desc = "Worn by robust fighters, flying high to defeat their foes!"
+44 -1
View File
@@ -183,4 +183,47 @@
desc = "Pukish armor."
icon_state = "tdgreen"
item_state = "tdgreen"
siemens_coefficient = 1
siemens_coefficient = 1
/obj/item/clothing/suit/armor/tactical
name = "tactical armor"
desc = "A suit of armor most often used by Special Weapons and Tactics squads. Includes padded vest with pockets along with shoulder and kneeguards."
icon_state = "swatarmor"
item_state = "armor"
var/obj/item/weapon/gun/holstered = null
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
slowdown = 1
armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 20, bio = 0, rad = 0)
siemens_coefficient = 0.7
/obj/item/clothing/suit/armor/tactical/verb/holster()
set name = "Holster"
set category = "Object"
set src in usr
if(!istype(usr, /mob/living)) return
if(usr.stat) return
if(!holstered)
if(!istype(usr.get_active_hand(), /obj/item/weapon/gun))
usr << "\blue You need your gun equiped to holster it."
return
var/obj/item/weapon/gun/W = usr.get_active_hand()
if (!W.isHandgun())
usr << "\red This gun won't fit in \the belt!"
return
holstered = usr.get_active_hand()
usr.drop_item()
holstered.loc = src
usr.visible_message("\blue \The [usr] holsters \the [holstered].", "You holster \the [holstered].")
else
if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj))
usr << "\red You need an empty hand to draw the gun!"
else
if(usr.a_intent == "hurt")
usr.visible_message("\red \The [usr] draws \the [holstered], ready to shoot!", \
"\red You draw \the [holstered], ready to shoot!")
else
usr.visible_message("\blue \The [usr] draws \the [holstered], pointing it at the ground.", \
"\blue You draw \the [holstered], pointing it at the ground.")
usr.put_in_hands(holstered)
holstered = null
+3 -3
View File
@@ -10,7 +10,7 @@
*/
/obj/item/clothing/suit/bluetag
name = "blue laser tag armour"
desc = "Blue Pride, Station Wide"
desc = "Blue Pride, Station Wide."
icon_state = "bluetag"
item_state = "bluetag"
blood_overlay_type = "armor"
@@ -20,7 +20,7 @@
/obj/item/clothing/suit/redtag
name = "red laser tag armour"
desc = "Pew pew pew"
desc = "Reputed to go faster."
icon_state = "redtag"
item_state = "redtag"
blood_overlay_type = "armor"
@@ -76,7 +76,7 @@
/obj/item/clothing/suit/justice
name = "justice suit"
desc = "this pretty much looks ridiculous"
desc = "This pretty much looks ridiculous."
icon_state = "justice"
item_state = "justice"
flags = FPRINT | TABLEPASS
@@ -58,6 +58,16 @@
item_state = "warden_corporate"
item_color = "warden_corporate"
/obj/item/clothing/under/tactical
name = "tactical jumpsuit"
desc = "It's made of a slightly sturdier material than standard jumpsuits, to allow for robust protection."
icon_state = "swatunder"
item_state = "swatunder"
item_color = "swatunder"
armor = list(melee = 10, bullet = 5, laser = 5,energy = 0, bomb = 0, bio = 0, rad = 0)
flags = FPRINT | TABLEPASS
siemens_coefficient = 0.9
/*
* Detective
*/

Some files were not shown because too many files have changed in this diff Show More