mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 15:47:15 +01:00
Merge pull request #11433 from Core0verload/framed
Buttons and wall frames rework
This commit is contained in:
@@ -1227,17 +1227,29 @@ var/list/WALLITEMS = list(
|
||||
/obj/machinery/power/apc, /obj/machinery/alarm, /obj/item/device/radio/intercom,
|
||||
/obj/structure/extinguisher_cabinet, /obj/structure/reagent_dispensers/peppertank,
|
||||
/obj/machinery/status_display, /obj/machinery/requests_console, /obj/machinery/light_switch, /obj/structure/sign,
|
||||
/obj/machinery/newscaster, /obj/machinery/firealarm, /obj/structure/noticeboard, /obj/machinery/door_control,
|
||||
/obj/machinery/newscaster, /obj/machinery/firealarm, /obj/structure/noticeboard, /obj/machinery/button,
|
||||
/obj/machinery/computer/security/telescreen, /obj/machinery/embedded_controller/radio/simple_vent_controller,
|
||||
/obj/item/weapon/storage/secure/safe, /obj/machinery/door_timer, /obj/machinery/flasher, /obj/machinery/keycard_auth,
|
||||
/obj/structure/mirror, /obj/structure/fireaxecabinet, /obj/machinery/computer/security/telescreen/entertainment
|
||||
)
|
||||
/proc/gotwallitem(loc, dir)
|
||||
|
||||
var/list/WALLITEMS_EXTERNAL = list(
|
||||
/obj/machinery/camera, /obj/machinery/camera_assembly,
|
||||
/obj/machinery/light_construct, /obj/machinery/light)
|
||||
|
||||
var/list/WALLITEMS_INVERSE = list(
|
||||
/obj/machinery/light_construct, /obj/machinery/light)
|
||||
|
||||
|
||||
/proc/gotwallitem(loc, dir, var/check_external = 0)
|
||||
var/locdir = get_step(loc, dir)
|
||||
for(var/obj/O in loc)
|
||||
if(is_type_in_list(O, WALLITEMS))
|
||||
if(is_type_in_list(O, WALLITEMS) && check_external != 2)
|
||||
//Direction works sometimes
|
||||
if(O.dir == dir)
|
||||
if(is_type_in_list(O, WALLITEMS_INVERSE))
|
||||
if(O.dir == turn(dir, 180))
|
||||
return 1
|
||||
else if(O.dir == dir)
|
||||
return 1
|
||||
|
||||
//Some stuff doesn't use dir properly, so we need to check pixel instead
|
||||
@@ -1245,9 +1257,16 @@ var/list/WALLITEMS = list(
|
||||
if(get_turf_pixel(O) == locdir)
|
||||
return 1
|
||||
|
||||
if(is_type_in_list(O, WALLITEMS_EXTERNAL) && check_external)
|
||||
if(is_type_in_list(O, WALLITEMS_INVERSE))
|
||||
if(O.dir == turn(dir, 180))
|
||||
return 1
|
||||
else if(O.dir == dir)
|
||||
return 1
|
||||
|
||||
//Some stuff is placed directly on the wallturf (signs)
|
||||
for(var/obj/O in locdir)
|
||||
if(is_type_in_list(O, WALLITEMS))
|
||||
if(is_type_in_list(O, WALLITEMS) && check_external != 2)
|
||||
if(O.pixel_x == 0 && O.pixel_y == 0)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -481,7 +481,7 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
|
||||
/obj/item/solar_assembly,
|
||||
/obj/item/solar_assembly, // 21 Solar Assemblies. 1 Extra for the controller
|
||||
/obj/item/weapon/circuitboard/solar_control,
|
||||
/obj/item/weapon/tracker_electronics,
|
||||
/obj/item/weapon/electronics/tracker,
|
||||
/obj/item/weapon/paper/solar)
|
||||
cost = 20
|
||||
containername = "solar pack crate"
|
||||
|
||||
@@ -122,12 +122,9 @@
|
||||
var/list/air_vent_info = list()
|
||||
var/list/air_scrub_info = list()
|
||||
|
||||
/obj/machinery/alarm/New(nloc, ndir, nbuild)
|
||||
/obj/machinery/alarm/New(loc, ndir, nbuild)
|
||||
..()
|
||||
wires = new(src)
|
||||
if(nloc)
|
||||
loc = nloc
|
||||
|
||||
if(ndir)
|
||||
dir = ndir
|
||||
|
||||
@@ -753,7 +750,7 @@
|
||||
if (do_after(user, 20, target = src))
|
||||
if (buildstage == 1)
|
||||
user <<"<span class='notice'>You remove the air alarm electronics.</span>"
|
||||
new /obj/item/weapon/airalarm_electronics( src.loc )
|
||||
new /obj/item/weapon/electronics/airalarm( src.loc )
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
buildstage = 0
|
||||
update_icon()
|
||||
@@ -780,7 +777,7 @@
|
||||
update_icon()
|
||||
return
|
||||
if(0)
|
||||
if(istype(W, /obj/item/weapon/airalarm_electronics))
|
||||
if(istype(W, /obj/item/weapon/electronics/airalarm))
|
||||
if(user.unEquip(W))
|
||||
user << "<span class='notice'>You insert the circuit.</span>"
|
||||
buildstage = 1
|
||||
@@ -791,7 +788,7 @@
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You detach \the [src] from the wall.</span>"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
new /obj/item/alarm_frame( user.loc )
|
||||
new /obj/item/wallframe/alarm( user.loc )
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -820,58 +817,20 @@
|
||||
AIR ALARM CIRCUIT
|
||||
Just a object used in constructing air alarms
|
||||
*/
|
||||
/obj/item/weapon/airalarm_electronics
|
||||
/obj/item/weapon/electronics/airalarm
|
||||
name = "air alarm electronics"
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "airalarm_electronics"
|
||||
desc = "Looks like a circuit. Probably is."
|
||||
w_class = 2.0
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=50)
|
||||
|
||||
|
||||
/*
|
||||
AIR ALARM ITEM
|
||||
Handheld air alarm frame, for placing on walls
|
||||
Code shamelessly copied from apc_frame
|
||||
*/
|
||||
/obj/item/alarm_frame
|
||||
/obj/item/wallframe/alarm
|
||||
name = "air alarm frame"
|
||||
desc = "Used for building Air Alarms"
|
||||
icon = 'icons/obj/monitors.dmi'
|
||||
icon_state = "alarm_bitem"
|
||||
flags = CONDUCT
|
||||
|
||||
/obj/item/alarm_frame/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/alarm_frame/proc/try_build(turf/on_wall)
|
||||
if (get_dist(on_wall,usr)>1)
|
||||
return
|
||||
|
||||
var/ndir = get_dir(on_wall,usr)
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "<span class='warning'>Air Alarm cannot be placed on this spot!</span>"
|
||||
return
|
||||
if (A.requires_power == 0 || A.name == "Space")
|
||||
usr << "<span class='warning'>Air Alarm cannot be placed in this area!</span>"
|
||||
return
|
||||
|
||||
if(gotwallitem(loc, ndir))
|
||||
usr << "<span class='warning'>There's already an item on this wall!</span>"
|
||||
return
|
||||
|
||||
new /obj/machinery/alarm(loc, ndir, 1)
|
||||
|
||||
qdel(src)
|
||||
result_path = /obj/machinery/alarm
|
||||
|
||||
|
||||
/*
|
||||
@@ -895,7 +854,6 @@ FIRE ALARM
|
||||
var/buildstage = 2 // 2 = complete, 1 = no wires, 0 = circuit gone
|
||||
|
||||
/obj/machinery/firealarm/update_icon()
|
||||
|
||||
src.overlays = list()
|
||||
|
||||
var/area/A = src.loc
|
||||
@@ -1016,11 +974,11 @@ FIRE ALARM
|
||||
user << "<span class='notice'>You remove the destroyed circuit.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You pry out the circuit.</span>"
|
||||
new /obj/item/weapon/firealarm_electronics(user.loc)
|
||||
new /obj/item/weapon/electronics/firealarm(user.loc)
|
||||
buildstage = 0
|
||||
update_icon()
|
||||
if(0)
|
||||
if(istype(W, /obj/item/weapon/firealarm_electronics))
|
||||
if(istype(W, /obj/item/weapon/electronics/firealarm))
|
||||
user << "<span class='notice'>You insert the circuit.</span>"
|
||||
qdel(W)
|
||||
buildstage = 1
|
||||
@@ -1029,7 +987,7 @@ FIRE ALARM
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
user.visible_message("[user] removes the fire alarm assembly from the wall.", \
|
||||
"<span class='notice'>You remove the fire alarm assembly from the wall.</span>")
|
||||
var/obj/item/firealarm_frame/frame = new /obj/item/firealarm_frame()
|
||||
var/obj/item/wallframe/firealarm/frame = new /obj/item/wallframe/firealarm()
|
||||
frame.loc = user.loc
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
qdel(src)
|
||||
@@ -1153,14 +1111,11 @@ FIRE ALARM
|
||||
//playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0)
|
||||
return
|
||||
|
||||
/obj/machinery/firealarm/New(loc, dir, building)
|
||||
/obj/machinery/firealarm/New(loc, ndir, building)
|
||||
..()
|
||||
|
||||
if(loc)
|
||||
src.loc = loc
|
||||
|
||||
if(dir)
|
||||
src.dir = dir
|
||||
if(ndir)
|
||||
src.dir = ndir
|
||||
|
||||
if(building)
|
||||
buildstage = 0
|
||||
@@ -1180,59 +1135,21 @@ FIRE ALARM
|
||||
FIRE ALARM CIRCUIT
|
||||
Just a object used in constructing fire alarms
|
||||
*/
|
||||
/obj/item/weapon/firealarm_electronics
|
||||
/obj/item/weapon/electronics/firealarm
|
||||
name = "fire alarm electronics"
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
icon_state = "door_electronics"
|
||||
desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\""
|
||||
w_class = 2.0
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=50)
|
||||
|
||||
|
||||
/*
|
||||
FIRE ALARM ITEM
|
||||
Handheld fire alarm frame, for placing on walls
|
||||
Code shamelessly copied from apc_frame
|
||||
*/
|
||||
/obj/item/firealarm_frame
|
||||
/obj/item/wallframe/firealarm
|
||||
name = "fire alarm frame"
|
||||
desc = "Used for building Fire Alarms"
|
||||
icon = 'icons/obj/monitors.dmi'
|
||||
icon_state = "fire_bitem"
|
||||
flags = CONDUCT
|
||||
|
||||
|
||||
/obj/item/firealarm_frame/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/firealarm_frame/proc/try_build(turf/on_wall)
|
||||
if (get_dist(on_wall,usr)>1)
|
||||
return
|
||||
|
||||
var/ndir = get_dir(on_wall,usr)
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "<span class='warning'>Fire Alarm cannot be placed on this spot.</span>"
|
||||
return
|
||||
if (A.requires_power == 0 || A.name == "Space")
|
||||
usr << "<span class='warning'>Fire Alarm cannot be placed in this area.</span>"
|
||||
return
|
||||
|
||||
if(gotwallitem(loc, ndir))
|
||||
usr << "<span class='warning'>There's already an item on this wall!</span>"
|
||||
return
|
||||
|
||||
new /obj/machinery/firealarm(loc, ndir, 1)
|
||||
|
||||
qdel(src)
|
||||
result_path = /obj/machinery/firealarm
|
||||
|
||||
/*
|
||||
* Party button
|
||||
|
||||
+208
-36
@@ -1,47 +1,219 @@
|
||||
/obj/machinery/driver_button
|
||||
/obj/machinery/button
|
||||
name = "button"
|
||||
desc = "A remote control switch."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "doorctrl"
|
||||
var/skin = "doorctrl"
|
||||
power_channel = ENVIRON
|
||||
var/obj/item/device/assembly/device
|
||||
var/obj/item/weapon/electronics/airlock/board
|
||||
var/device_type = null
|
||||
var/id = null
|
||||
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
|
||||
|
||||
/obj/machinery/button/New(loc, ndir = 0, built = 0)
|
||||
..()
|
||||
if(built)
|
||||
dir = ndir
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -24 : 24)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -24 : 24) : 0
|
||||
panel_open = 1
|
||||
update_icon()
|
||||
|
||||
if(id && !built && !device && device_type)
|
||||
device = new device_type(src)
|
||||
|
||||
src.check_access(null)
|
||||
|
||||
if(req_access.len || req_one_access.len)
|
||||
board = new(src)
|
||||
if(req_access.len)
|
||||
board.conf_access = req_access
|
||||
else
|
||||
board.use_one_access = 1
|
||||
board.conf_access = req_one_access
|
||||
|
||||
if(id && istype(device, /obj/item/device/assembly/control))
|
||||
var/obj/item/device/assembly/control/A = device
|
||||
A.id = id
|
||||
|
||||
|
||||
/obj/machinery/button/update_icon()
|
||||
overlays.Cut()
|
||||
if(panel_open)
|
||||
icon_state = "button-open"
|
||||
if(device)
|
||||
overlays += "button-device"
|
||||
if(board)
|
||||
overlays += "button-board"
|
||||
|
||||
else
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
icon_state = "[skin]-p"
|
||||
else
|
||||
icon_state = skin
|
||||
|
||||
/obj/machinery/button/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/device/detective_scanner))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(panel_open || allowed(user))
|
||||
default_deconstruction_screwdriver(user, "button-open", "[skin]",W)
|
||||
update_icon()
|
||||
else
|
||||
user << "<span class='danger'>Maintenance Access Denied</span>"
|
||||
flick("[skin]-denied", src)
|
||||
return
|
||||
|
||||
if(panel_open)
|
||||
if(!device && istype(W, /obj/item/device/assembly))
|
||||
if(!user.unEquip(W))
|
||||
user << "<span class='warning'>\The [W] is stuck to you!</span>"
|
||||
return
|
||||
W.loc = src
|
||||
device = W
|
||||
user << "<span class='notice'>You add [W] to the button.</span>"
|
||||
|
||||
if(!board && istype(W, /obj/item/weapon/electronics/airlock))
|
||||
if(!user.unEquip(W))
|
||||
user << "<span class='warning'>\The [W] is stuck to you!</span>"
|
||||
return
|
||||
W.loc = src
|
||||
board = W
|
||||
if(board.use_one_access)
|
||||
req_one_access = board.conf_access
|
||||
else
|
||||
req_access = board.conf_access
|
||||
user << "<span class='notice'>You add [W] to the button.</span>"
|
||||
|
||||
if(!device && !board && istype(W, /obj/item/weapon/wrench))
|
||||
user << "<span class='notice'>You start unsecuring the button frame...</span>"
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 40, target = src))
|
||||
user << "<span class='notice'>You unsecure the button frame.</span>"
|
||||
transfer_fingerprints_to(new /obj/item/wallframe/button(get_turf(src)))
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
qdel(src)
|
||||
|
||||
update_icon()
|
||||
return
|
||||
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/button/emag_act(mob/user)
|
||||
req_access = list()
|
||||
req_one_access = list()
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
|
||||
/obj/machinery/button/attack_ai(mob/user)
|
||||
if(!panel_open)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/button/attack_hand(mob/user)
|
||||
src.add_fingerprint(user)
|
||||
if(panel_open)
|
||||
if(device || board)
|
||||
if(device)
|
||||
device.loc = get_turf(src)
|
||||
device = null
|
||||
if(board)
|
||||
board.loc = get_turf(src)
|
||||
req_access = list()
|
||||
req_one_access = list()
|
||||
board = null
|
||||
update_icon()
|
||||
user << "<span class='notice'>You remove electronics from the button frame.</span>"
|
||||
|
||||
else
|
||||
if(skin == "doorctrl")
|
||||
skin = "launcher"
|
||||
else
|
||||
skin = "doorctrl"
|
||||
user << "<span class='notice'>You change the button frame's front panel.</span>"
|
||||
return
|
||||
|
||||
if((stat & (NOPOWER|BROKEN)))
|
||||
return
|
||||
|
||||
if(device && device.cooldown)
|
||||
return
|
||||
|
||||
if(!allowed(user))
|
||||
user << "<span class='danger'>Access Denied</span>"
|
||||
flick("[skin]-denied", src)
|
||||
return
|
||||
|
||||
use_power(5)
|
||||
icon_state = "[skin]1"
|
||||
|
||||
if(device)
|
||||
device.pulsed()
|
||||
|
||||
spawn(15)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/button/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
|
||||
|
||||
/obj/machinery/button/door
|
||||
name = "door button"
|
||||
desc = "A door remote control switch."
|
||||
var/normaldoorcontrol = 0
|
||||
var/specialfunctions = OPEN // Bitflag, see assembly file
|
||||
|
||||
/obj/machinery/button/door/New(loc, ndir = 0, built = 0)
|
||||
if(id && !built && !device)
|
||||
if(normaldoorcontrol)
|
||||
var/obj/item/device/assembly/control/airlock/A = new(src)
|
||||
device = A
|
||||
A.specialfunctions = specialfunctions
|
||||
else
|
||||
device = new /obj/item/device/assembly/control(src)
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/button/massdriver
|
||||
name = "mass driver button"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "launcherbtt"
|
||||
desc = "A remote control switch for a mass driver."
|
||||
var/id = null
|
||||
var/active = 0
|
||||
anchored = 1.0
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 4
|
||||
icon_state = "launcher"
|
||||
skin = "launcher"
|
||||
device_type = /obj/item/device/assembly/control/massdriver
|
||||
|
||||
/obj/machinery/ignition_switch
|
||||
/obj/machinery/button/ignition
|
||||
name = "ignition switch"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "launcherbtt"
|
||||
desc = "A remote control switch for a mounted igniter."
|
||||
var/id = null
|
||||
var/active = 0
|
||||
anchored = 1.0
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 4
|
||||
icon_state = "launcher"
|
||||
skin = "launcher"
|
||||
device_type = /obj/item/device/assembly/control/igniter
|
||||
|
||||
/obj/machinery/flasher_button
|
||||
/obj/machinery/button/flasher
|
||||
name = "flasher button"
|
||||
desc = "A remote control switch for a mounted flasher."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "launcherbtt"
|
||||
var/id = null
|
||||
var/active = 0
|
||||
anchored = 1.0
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 4
|
||||
icon_state = "launcher"
|
||||
skin = "launcher"
|
||||
device_type = /obj/item/device/assembly/control/flasher
|
||||
|
||||
/obj/machinery/crema_switch
|
||||
desc = "Burn baby burn!"
|
||||
/obj/machinery/button/crematorium
|
||||
name = "crematorium igniter"
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "crema_switch"
|
||||
anchored = 1.0
|
||||
desc = "Burn baby burn!"
|
||||
icon_state = "launcher"
|
||||
skin = "launcher"
|
||||
device_type = /obj/item/device/assembly/control/crematorium
|
||||
req_access = list(access_crematorium)
|
||||
var/on = 0
|
||||
var/area/area = null
|
||||
var/otherarea = null
|
||||
var/id = 1
|
||||
id = 1
|
||||
|
||||
/obj/item/wallframe/button
|
||||
name = "button frame"
|
||||
desc = "Used for building buttons."
|
||||
icon = 'icons/obj/apc_repair.dmi'
|
||||
icon_state = "button_frame"
|
||||
result_path = /obj/machinery/button
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
|
||||
@@ -17,7 +17,7 @@
|
||||
var/start_active = 0 //If it ignores the random chance to start broken on round start
|
||||
var/invuln = null
|
||||
var/obj/item/device/camera_bug/bug = null
|
||||
var/obj/item/weapon/camera_assembly/assembly = null
|
||||
var/obj/machinery/camera_assembly/assembly = null
|
||||
|
||||
//OTHER
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
/obj/machinery/camera/New()
|
||||
assembly = new(src)
|
||||
assembly.state = 4
|
||||
assembly.anchored = 1
|
||||
assembly.update_icon()
|
||||
|
||||
/* // Use this to look for cameras that have the same c_tag.
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
@@ -151,7 +149,6 @@
|
||||
assembly.loc = src.loc
|
||||
assembly.state = 1
|
||||
assembly.dir = src.dir
|
||||
assembly.update_icon()
|
||||
assembly = null
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -1,41 +1,36 @@
|
||||
/obj/item/weapon/camera_assembly
|
||||
/obj/item/wallframe/camera
|
||||
name = "camera assembly"
|
||||
desc = "The basic construction for Nanotrasen-Always-Watching-You cameras."
|
||||
icon = 'icons/obj/monitors.dmi'
|
||||
icon_state = "cameracase"
|
||||
w_class = 2
|
||||
anchored = 0
|
||||
|
||||
materials = list(MAT_METAL=400, MAT_GLASS=250)
|
||||
result_path = /obj/machinery/camera_assembly
|
||||
|
||||
|
||||
/obj/machinery/camera_assembly
|
||||
name = "camera assembly"
|
||||
desc = "The basic construction for Nanotrasen-Always-Watching-You cameras."
|
||||
icon = 'icons/obj/monitors.dmi'
|
||||
icon_state = "camera1"
|
||||
// Motion, EMP-Proof, X-Ray
|
||||
var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/plasma, /obj/item/device/analyzer)
|
||||
var/list/upgrades = list()
|
||||
var/state = 0
|
||||
var/state = 1
|
||||
var/busy = 0
|
||||
/*
|
||||
0 = Nothing done to it
|
||||
1 = Wrenched in place
|
||||
2 = Welded in place
|
||||
3 = Wires attached to it (you can now attach/dettach upgrades)
|
||||
4 = Screwdriver panel closed and is fully built (you cannot attach upgrades)
|
||||
1 = Wrenched in place
|
||||
2 = Welded in place
|
||||
3 = Wires attached to it (you can now attach/dettach upgrades)
|
||||
4 = Screwdriver panel closed and is fully built (you cannot attach upgrades)
|
||||
*/
|
||||
|
||||
/obj/item/weapon/camera_assembly/attackby(obj/item/W, mob/living/user, params)
|
||||
/obj/machinery/camera_assembly/New(loc, ndir, building)
|
||||
..()
|
||||
if(building)
|
||||
dir = ndir
|
||||
|
||||
/obj/machinery/camera_assembly/attackby(obj/item/W, mob/living/user, params)
|
||||
switch(state)
|
||||
|
||||
if(0)
|
||||
// State 0
|
||||
if(istype(W, /obj/item/weapon/wrench) && isturf(src.loc))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'>You wrench the assembly into place.</span>"
|
||||
anchored = 1
|
||||
state = 1
|
||||
update_icon()
|
||||
auto_turn()
|
||||
return
|
||||
|
||||
if(1)
|
||||
// State 1
|
||||
if(istype(W, /obj/item/weapon/weldingtool))
|
||||
@@ -48,9 +43,8 @@
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
user << "<span class='notice'>You unattach the assembly from its place.</span>"
|
||||
anchored = 0
|
||||
update_icon()
|
||||
state = 0
|
||||
new /obj/item/wallframe/camera(get_turf(src))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(2)
|
||||
@@ -93,25 +87,14 @@
|
||||
var/obj/machinery/camera/C = new(src.loc)
|
||||
src.loc = C
|
||||
C.assembly = src
|
||||
|
||||
C.auto_turn()
|
||||
C.dir = src.dir
|
||||
|
||||
C.network = tempnetwork
|
||||
var/area/A = get_area_master(src)
|
||||
C.c_tag = "[A.name] ([rand(1, 999)])"
|
||||
|
||||
for(var/i = 5; i >= 0; i -= 1)
|
||||
var/direct = input(user, "Direction?", "Assembling Camera", null) in list("LEAVE IT", "NORTH", "EAST", "SOUTH", "WEST" )
|
||||
if(direct != "LEAVE IT")
|
||||
C.dir = text2dir(direct)
|
||||
if(i != 0)
|
||||
var/confirm = alert(user, "Is this what you want? Chances Remaining: [i]", "Confirmation", "Yes", "No")
|
||||
if(confirm == "Yes")
|
||||
break
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters))
|
||||
|
||||
new/obj/item/stack/cable_coil(get_turf(src), 2)
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
user << "<span class='notice'>You cut the wires from the circuits.</span>"
|
||||
@@ -139,18 +122,7 @@
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/camera_assembly/update_icon()
|
||||
if(anchored)
|
||||
icon_state = "camera1"
|
||||
else
|
||||
icon_state = "cameracase"
|
||||
|
||||
/obj/item/weapon/camera_assembly/attack_hand(mob/user)
|
||||
if(!anchored)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/camera_assembly/proc/weld(obj/item/weapon/weldingtool/WT, mob/living/user)
|
||||
|
||||
/obj/machinery/camera_assembly/proc/weld(obj/item/weapon/weldingtool/WT, mob/living/user)
|
||||
if(busy)
|
||||
return 0
|
||||
if(!WT.remove_fuel(0, user))
|
||||
@@ -165,4 +137,4 @@
|
||||
return 0
|
||||
return 1
|
||||
busy = 0
|
||||
return 0
|
||||
return 0
|
||||
@@ -1,170 +0,0 @@
|
||||
/obj/machinery/door_control
|
||||
name = "remote door-control"
|
||||
desc = "It controls doors, remotely."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "doorctrl0"
|
||||
desc = "A remote control-switch for a door."
|
||||
power_channel = ENVIRON
|
||||
var/id = null
|
||||
var/normaldoorcontrol = 0
|
||||
var/specialfunctions = 1
|
||||
/*
|
||||
Bitflag, 1= open
|
||||
2= idscan,
|
||||
4= bolts
|
||||
8= shock
|
||||
16= door safties
|
||||
|
||||
*/
|
||||
|
||||
var/exposedwires = 0
|
||||
var/wires = 3
|
||||
/*
|
||||
Bitflag, 1=checkID
|
||||
2=Network Access
|
||||
*/
|
||||
|
||||
anchored = 1.0
|
||||
use_power = 1
|
||||
idle_power_usage = 2
|
||||
active_power_usage = 4
|
||||
|
||||
/obj/machinery/door_control/attack_ai(mob/user)
|
||||
if(wires & 2)
|
||||
return src.attack_hand(user)
|
||||
else
|
||||
user << "Error, no route to host."
|
||||
|
||||
/obj/machinery/door_control/attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/door_control/attackby(obj/item/weapon/W, mob/user, params)
|
||||
/* For later implementation
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
{
|
||||
if(wiresexposed)
|
||||
icon_state = "doorctrl0"
|
||||
wiresexposed = 0
|
||||
|
||||
else
|
||||
icon_state = "doorctrl-open"
|
||||
wiresexposed = 1
|
||||
|
||||
return
|
||||
}
|
||||
*/
|
||||
if(istype(W, /obj/item/device/detective_scanner))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/door_control/emag_act(mob/user)
|
||||
req_access = list()
|
||||
req_one_access = list()
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
|
||||
/obj/machinery/door_control/attack_hand(mob/user)
|
||||
src.add_fingerprint(usr)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
if(!allowed(user) && (wires & 1))
|
||||
user << "<span class='danger'>Access Denied</span>"
|
||||
flick("doorctrl-denied",src)
|
||||
return
|
||||
|
||||
use_power(5)
|
||||
icon_state = "doorctrl1"
|
||||
add_fingerprint(user)
|
||||
|
||||
if(normaldoorcontrol)
|
||||
for(var/obj/machinery/door/airlock/D in world)
|
||||
if(D.id_tag == src.id)
|
||||
if(specialfunctions & OPEN)
|
||||
spawn(0)
|
||||
if(D)
|
||||
if(D.density) D.open()
|
||||
else D.close()
|
||||
return
|
||||
if(specialfunctions & IDSCAN)
|
||||
D.aiDisabledIdScanner = !D.aiDisabledIdScanner
|
||||
if(specialfunctions & BOLTS)
|
||||
if(!D.isWireCut(4) && D.hasPower())
|
||||
D.locked = !D.locked
|
||||
D.update_icon()
|
||||
if(specialfunctions & SHOCK)
|
||||
D.secondsElectrified = D.secondsElectrified ? 0 : -1
|
||||
if(specialfunctions & SAFE)
|
||||
D.safe = !D.safe
|
||||
else
|
||||
var/openclose
|
||||
for(var/obj/machinery/door/poddoor/M in world)
|
||||
if(M.id == src.id)
|
||||
if(openclose == null)
|
||||
openclose = M.density
|
||||
spawn(0)
|
||||
if(M)
|
||||
if(openclose) M.open()
|
||||
else M.close()
|
||||
return
|
||||
|
||||
spawn(15)
|
||||
if(!(stat & NOPOWER))
|
||||
icon_state = "doorctrl0"
|
||||
|
||||
/obj/machinery/door_control/power_change()
|
||||
..()
|
||||
if(stat & NOPOWER)
|
||||
icon_state = "doorctrl-p"
|
||||
else
|
||||
icon_state = "doorctrl0"
|
||||
|
||||
/obj/machinery/driver_button/attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/driver_button/attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/driver_button/attackby(obj/item/weapon/W, mob/user, params)
|
||||
|
||||
if(istype(W, /obj/item/device/detective_scanner))
|
||||
return
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/driver_button/attack_hand(mob/user)
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(active)
|
||||
return
|
||||
add_fingerprint(user)
|
||||
|
||||
use_power(5)
|
||||
|
||||
active = 1
|
||||
icon_state = "launcheract"
|
||||
|
||||
for(var/obj/machinery/door/poddoor/M in world)
|
||||
if (M.id == src.id)
|
||||
spawn( 0 )
|
||||
M.open()
|
||||
return
|
||||
|
||||
sleep(20)
|
||||
|
||||
for(var/obj/machinery/mass_driver/M in world)
|
||||
if(M.id == src.id)
|
||||
M.drive()
|
||||
|
||||
sleep(50)
|
||||
|
||||
for(var/obj/machinery/door/poddoor/M in world)
|
||||
if (M.id == src.id)
|
||||
spawn( 0 )
|
||||
M.close()
|
||||
return
|
||||
|
||||
icon_state = "launcherbtt"
|
||||
active = 0
|
||||
|
||||
return
|
||||
@@ -42,7 +42,7 @@
|
||||
var/justzap = 0
|
||||
var/safe = 1
|
||||
normalspeed = 1
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
var/obj/item/weapon/electronics/airlock/electronics = null
|
||||
var/hasShocked = 0 //Prevents multiple shocks from happening
|
||||
var/autoclose = 1
|
||||
var/obj/item/device/doorCharge/charge = null //If applied, causes an explosion upon opening the door
|
||||
@@ -990,9 +990,9 @@ About the new airlock wires panel:
|
||||
return
|
||||
user << "<span class='notice'>You remove the airlock electronics.</span>"
|
||||
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
var/obj/item/weapon/electronics/airlock/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
ae = new/obj/item/weapon/electronics/airlock( src.loc )
|
||||
if(req_one_access)
|
||||
ae.use_one_access = 1
|
||||
ae.conf_access = src.req_one_access
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
/obj/item/weapon/airlock_electronics
|
||||
/obj/item/weapon/electronics/airlock
|
||||
name = "airlock electronics"
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
icon_state = "door_electronics"
|
||||
w_class = 2.0 //It should be tiny! -Agouri
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=50)
|
||||
|
||||
req_access = list(access_maint_tunnels)
|
||||
|
||||
@@ -14,7 +10,7 @@
|
||||
var/last_configurator = null
|
||||
var/locked = 1
|
||||
|
||||
/obj/item/weapon/airlock_electronics/attack_self(mob/user)
|
||||
/obj/item/weapon/electronics/airlock/attack_self(mob/user)
|
||||
if (!ishuman(user))
|
||||
return ..(user)
|
||||
|
||||
@@ -67,7 +63,7 @@
|
||||
popup.open()
|
||||
onclose(user, "airlock")
|
||||
|
||||
/obj/item/weapon/airlock_electronics/Topic(href, href_list)
|
||||
/obj/item/weapon/electronics/airlock/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained() || !ishuman(usr))
|
||||
return
|
||||
@@ -95,7 +91,7 @@
|
||||
|
||||
attack_self(usr)
|
||||
|
||||
/obj/item/weapon/airlock_electronics/proc/toggle_access(acc)
|
||||
/obj/item/weapon/electronics/airlock/proc/toggle_access(acc)
|
||||
if (acc == "all")
|
||||
conf_access = null
|
||||
else if(acc == "one")
|
||||
|
||||
@@ -170,13 +170,10 @@
|
||||
icon = 'icons/obj/doors/Doorfire.dmi'
|
||||
glass = 0
|
||||
|
||||
/obj/item/weapon/firelock_board
|
||||
/obj/item/weapon/electronics/firelock
|
||||
name = "firelock circuitry"
|
||||
desc = "A circuit board used in construction of firelocks."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "mainboard"
|
||||
w_class = 2
|
||||
materials = list(MAT_METAL = 50, MAT_GLASS = 50)
|
||||
|
||||
/obj/structure/firelock_frame
|
||||
name = "firelock frame"
|
||||
@@ -270,7 +267,7 @@
|
||||
if(constructionStep != CONSTRUCTION_GUTTED) return
|
||||
user.visible_message("<span class='notice'>[user] removes [src]'s circuit board.</span>", \
|
||||
"<span class='notice'>You remove the circuit board from [src].</span>")
|
||||
new /obj/item/weapon/firelock_board(get_turf(src))
|
||||
new /obj/item/weapon/electronics/firelock(get_turf(src))
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
constructionStep = CONSTRUCTION_NOCIRCUIT
|
||||
update_icon()
|
||||
@@ -308,7 +305,7 @@
|
||||
M.amount = 3
|
||||
qdel(src)
|
||||
return
|
||||
if(istype(C, /obj/item/weapon/firelock_board))
|
||||
if(istype(C, /obj/item/weapon/electronics/firelock))
|
||||
user.visible_message("<span class='notice'>[user] starts adding [C] to [src]...</span>", \
|
||||
"<span class='notice'>You begin adding a circuit board to [src]...</span>")
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
visible = 0.0
|
||||
flags = ON_BORDER
|
||||
opacity = 0
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
var/obj/item/weapon/electronics/airlock/electronics = null
|
||||
var/reinf = 0
|
||||
|
||||
/obj/machinery/door/window/New()
|
||||
@@ -309,9 +309,9 @@
|
||||
|
||||
user << "<span class='notice'>You remove the airlock electronics.</span>"
|
||||
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
var/obj/item/weapon/electronics/airlock/ae
|
||||
if(!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
ae = new/obj/item/weapon/electronics/airlock( src.loc )
|
||||
if(req_one_access)
|
||||
ae.use_one_access = 1
|
||||
ae.conf_access = src.req_one_access
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
density = 1
|
||||
|
||||
/obj/machinery/flasher/New()
|
||||
..() // ..() is EXTREMELY IMPORTANT, never forget to add it
|
||||
bulb = new /obj/item/device/flash/handheld(src)
|
||||
|
||||
/obj/machinery/flasher/power_change()
|
||||
@@ -68,6 +69,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/flasher/proc/flash()
|
||||
|
||||
if (!powered() || !bulb)
|
||||
return
|
||||
|
||||
@@ -132,37 +134,4 @@
|
||||
power_change()
|
||||
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/flasher_button/attack_ai(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/flasher_button/attack_paw(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/flasher_button/attackby(obj/item/weapon/W, mob/user, params)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/flasher_button/attack_hand(mob/user)
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(active)
|
||||
return
|
||||
|
||||
use_power(5)
|
||||
|
||||
active = 1
|
||||
icon_state = "launcheract"
|
||||
|
||||
for(var/obj/machinery/flasher/M in world)
|
||||
if(M.id == id)
|
||||
spawn()
|
||||
M.flash()
|
||||
|
||||
sleep(50)
|
||||
|
||||
icon_state = "launcherbtt"
|
||||
active = 0
|
||||
|
||||
return
|
||||
..()
|
||||
@@ -115,43 +115,4 @@
|
||||
..(severity)
|
||||
return
|
||||
ignite()
|
||||
..(severity)
|
||||
|
||||
/obj/machinery/ignition_switch/attack_ai(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/ignition_switch/attack_paw(mob/user)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/ignition_switch/attackby(obj/item/weapon/W, mob/user, params)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/ignition_switch/attack_hand(mob/user)
|
||||
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
if(active)
|
||||
return
|
||||
|
||||
use_power(5)
|
||||
|
||||
active = 1
|
||||
icon_state = "launcheract"
|
||||
|
||||
for(var/obj/machinery/sparker/M in world)
|
||||
if (M.id == src.id)
|
||||
spawn( 0 )
|
||||
M.ignite()
|
||||
|
||||
for(var/obj/machinery/igniter/M in world)
|
||||
if(M.id == src.id)
|
||||
use_power(50)
|
||||
M.on = !( M.on )
|
||||
M.icon_state = text("igniter[]", M.on)
|
||||
|
||||
sleep(50)
|
||||
|
||||
icon_state = "launcherbtt"
|
||||
active = 0
|
||||
|
||||
return
|
||||
..(severity)
|
||||
@@ -159,34 +159,12 @@ var/list/obj/machinery/newscaster/allCasters = list()
|
||||
|
||||
|
||||
|
||||
/obj/item/newscaster_frame
|
||||
/obj/item/wallframe/newscaster
|
||||
name = "newscaster frame"
|
||||
desc = "Used to build newscasters, just secure to the wall."
|
||||
icon_state = "newscaster"
|
||||
item_state = "syringe_kit"
|
||||
materials = list(MAT_METAL=14000, MAT_GLASS=8000)
|
||||
|
||||
/obj/item/newscaster_frame/proc/try_build(turf/on_wall)
|
||||
if (get_dist(on_wall,usr)>1)
|
||||
return
|
||||
var/ndir = get_dir(usr,on_wall)
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "<span class='warning'>Newscaster cannot be placed on this spot!</span>"
|
||||
return
|
||||
if (A.requires_power == 0 || A.name == "Space")
|
||||
usr << "<span class='warning'>Newscaster cannot be placed in this area!</span>"
|
||||
return
|
||||
for(var/obj/machinery/newscaster/T in loc)
|
||||
usr << "<span class='warning'>There is another newscaster here!</span>"
|
||||
return
|
||||
var/obj/machinery/newscaster/N = new(loc)
|
||||
N.pixel_y -= (loc.y - on_wall.y) * 32
|
||||
N.pixel_x -= (loc.x - on_wall.x) * 32
|
||||
qdel(src)
|
||||
result_path = /obj/machinery/newscaster
|
||||
|
||||
|
||||
/obj/machinery/newscaster
|
||||
@@ -200,7 +178,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
|
||||
var/isbroken = 0
|
||||
var/ispowered = 1
|
||||
var/screen = 0
|
||||
var/paper_remaining = 0
|
||||
var/paper_remaining = 15
|
||||
var/securityCaster = 0
|
||||
var/unit_no = 0
|
||||
var/alert_delay = 500
|
||||
@@ -220,13 +198,17 @@ var/list/obj/machinery/newscaster/allCasters = list()
|
||||
name = "security newscaster"
|
||||
securityCaster = 1
|
||||
|
||||
/obj/machinery/newscaster/New()
|
||||
/obj/machinery/newscaster/New(loc, ndir, building)
|
||||
..()
|
||||
if(building)
|
||||
dir = ndir
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -32 : 32) : 0
|
||||
|
||||
allCasters += src
|
||||
paper_remaining = 15
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
unit_no++
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/machinery/newscaster/Destroy()
|
||||
allCasters -= src
|
||||
@@ -743,7 +725,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
|
||||
playsound(loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user, 60, target = src))
|
||||
user << "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>"
|
||||
new /obj/item/newscaster_frame(loc)
|
||||
new /obj/item/wallframe/newscaster(loc)
|
||||
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -910,7 +910,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
||||
icon_state = "engivend"
|
||||
icon_deny = "engivend-deny"
|
||||
req_access_txt = "11" //Engineering Equipment access
|
||||
products = list(/obj/item/clothing/glasses/meson/engine = 2,/obj/item/device/multitool = 4,/obj/item/weapon/airlock_electronics = 10,/obj/item/weapon/module/power_control = 10,/obj/item/weapon/airalarm_electronics = 10,/obj/item/weapon/stock_parts/cell/high = 10, /obj/item/weapon/rcd/loaded = 3,)
|
||||
products = list(/obj/item/clothing/glasses/meson/engine = 2,/obj/item/device/multitool = 4,/obj/item/weapon/electronics/airlock = 10,/obj/item/weapon/electronics/apc = 10,/obj/item/weapon/electronics/airalarm = 10,/obj/item/weapon/stock_parts/cell/high = 10, /obj/item/weapon/rcd/loaded = 3,)
|
||||
contraband = list(/obj/item/weapon/stock_parts/cell/potato = 3)
|
||||
premium = list(/obj/item/weapon/storage/belt/utility = 3)
|
||||
|
||||
|
||||
@@ -1,32 +1,78 @@
|
||||
// APC HULL
|
||||
/obj/item/wallframe
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT*2)
|
||||
flags = CONDUCT
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
item_state = "syringe_kit"
|
||||
w_class = 2
|
||||
var/result_path
|
||||
var/inverse = 0
|
||||
// For inverse dir frames like light fixtures.
|
||||
|
||||
/obj/item/apc_frame
|
||||
/obj/item/wallframe/proc/try_build(turf/on_wall)
|
||||
if(get_dist(on_wall,usr)>1)
|
||||
return
|
||||
var/ndir = get_dir(on_wall, usr)
|
||||
if(!(ndir in cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if(!istype(loc, /turf/simulated/floor))
|
||||
usr << "<span class='warning'>You cannot place [src] on this spot!</span>"
|
||||
return
|
||||
if(A.requires_power == 0 || istype(A, /area/space))
|
||||
usr << "<span class='warning'>You cannot place [src] in this area!</span>"
|
||||
return
|
||||
if(gotwallitem(loc, ndir, inverse*2))
|
||||
usr << "<span class='warning'>There's already an item on this wall!</span>"
|
||||
return
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/wallframe/proc/attach(turf/on_wall)
|
||||
if(result_path)
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 75, 1)
|
||||
usr.visible_message("[usr.name] attaches [src] to the wall.",
|
||||
"<span class='notice'>You attach [src] to the wall.</span>",
|
||||
"<span class='italics'>You hear clicking.</span>")
|
||||
var/ndir = get_dir(on_wall,usr)
|
||||
if(inverse)
|
||||
ndir = turn(ndir, 180)
|
||||
|
||||
var/obj/O = new result_path(get_turf(usr), ndir, 1)
|
||||
transfer_fingerprints_to(O)
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/wallframe/attackby(obj/item/weapon/W, mob/user, params)
|
||||
..()
|
||||
var/metal_amt = round(materials[MAT_METAL]/MINERAL_MATERIAL_AMOUNT)
|
||||
var/glass_amt = round(materials[MAT_GLASS]/MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
if (istype(W, /obj/item/weapon/wrench) && (metal_amt || glass_amt))
|
||||
user << "<span class='notice'>You dismantle [src].</span>"
|
||||
if(metal_amt)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src), metal_amt)
|
||||
if(glass_amt)
|
||||
new /obj/item/stack/sheet/glass(get_turf(src), glass_amt)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
// APC HULL
|
||||
/obj/item/wallframe/apc
|
||||
name = "\improper APC frame"
|
||||
desc = "Used for repairing or building APCs"
|
||||
icon = 'icons/obj/apc_repair.dmi'
|
||||
icon_state = "apc_frame"
|
||||
flags = CONDUCT
|
||||
result_path = /obj/machinery/power/apc
|
||||
|
||||
/obj/item/apc_frame/attackby(obj/item/weapon/W, mob/user, params)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/metal( get_turf(src.loc), 2 )
|
||||
qdel(src)
|
||||
|
||||
/obj/item/apc_frame/proc/try_build(turf/on_wall)
|
||||
if (get_dist(on_wall,usr)>1)
|
||||
return
|
||||
var/ndir = get_dir(usr,on_wall)
|
||||
if (!(ndir in cardinal))
|
||||
/obj/item/wallframe/apc/try_build(turf/on_wall)
|
||||
if(!..())
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
var/area/A = loc.loc
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "<span class='warning'>APC cannot be placed on this spot!</span>"
|
||||
return
|
||||
if (A.requires_power == 0 || istype(A, /area/space))
|
||||
usr << "<span class='warning'>APC cannot be placed in this area!</span>"
|
||||
return
|
||||
if (A.get_apc())
|
||||
usr << "<span class='warning'>This area already has APC!</span>"
|
||||
return //only one APC per area
|
||||
@@ -39,5 +85,15 @@
|
||||
C.amount = 10
|
||||
usr << "<span class='notice'>You cut the cables and disassemble the unused power terminal.</span>"
|
||||
qdel(T)
|
||||
new /obj/machinery/power/apc(loc, ndir, 1)
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/electronics
|
||||
desc = "Looks like a circuit. Probably is."
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "door_electronics"
|
||||
item_state = "electronic"
|
||||
flags = CONDUCT
|
||||
w_class = 2
|
||||
origin_tech = "engineering=2;programming=1"
|
||||
materials = list(MAT_METAL=50, MAT_GLASS=50)
|
||||
@@ -33,12 +33,13 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("grenade casing", /obj/item/weapon/grenade/chem_grenade), \
|
||||
new/datum/stack_recipe("light fixture frame", /obj/item/light_fixture_frame, 2), \
|
||||
new/datum/stack_recipe("small light fixture frame", /obj/item/light_fixture_frame/small, 1), \
|
||||
new/datum/stack_recipe("light fixture frame", /obj/item/wallframe/light_fixture, 2), \
|
||||
new/datum/stack_recipe("small light fixture frame", /obj/item/wallframe/light_fixture/small, 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \
|
||||
new/datum/stack_recipe("air alarm frame", /obj/item/alarm_frame, 2), \
|
||||
new/datum/stack_recipe("fire alarm frame", /obj/item/firealarm_frame, 2), \
|
||||
new/datum/stack_recipe("apc frame", /obj/item/wallframe/apc, 2), \
|
||||
new/datum/stack_recipe("air alarm frame", /obj/item/wallframe/alarm, 2), \
|
||||
new/datum/stack_recipe("fire alarm frame", /obj/item/wallframe/firealarm, 2), \
|
||||
new/datum/stack_recipe("button frame", /obj/item/wallframe/button, 1), \
|
||||
null, \
|
||||
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
@@ -357,7 +357,7 @@ RCD
|
||||
activate()
|
||||
var/obj/machinery/door/airlock/T = new airlock_type( A )
|
||||
|
||||
T.electronics = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
T.electronics = new/obj/item/weapon/electronics/airlock( src.loc )
|
||||
|
||||
if(conf_access)
|
||||
T.electronics.conf_access = conf_access.Copy()
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
new /obj/item/weapon/storage/toolbox/electrical(src)
|
||||
new /obj/item/weapon/storage/toolbox/electrical(src)
|
||||
new /obj/item/weapon/storage/toolbox/electrical(src)
|
||||
new /obj/item/weapon/module/power_control(src)
|
||||
new /obj/item/weapon/module/power_control(src)
|
||||
new /obj/item/weapon/module/power_control(src)
|
||||
new /obj/item/weapon/electronics/apc(src)
|
||||
new /obj/item/weapon/electronics/apc(src)
|
||||
new /obj/item/weapon/electronics/apc(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/icontext = ""
|
||||
var/base_icon_state = "door_as_"
|
||||
var/glass_base_icon_state = "door_as_g"
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
var/obj/item/weapon/electronics/airlock/electronics = null
|
||||
var/airlock_type = /obj/machinery/door/airlock //the type path of the airlock once completed
|
||||
var/glass_type = /obj/machinery/door/airlock/glass
|
||||
var/created_name = null
|
||||
@@ -506,7 +506,7 @@
|
||||
src.state = 0
|
||||
src.name = "secured airlock assembly"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 )
|
||||
else if(istype(W, /obj/item/weapon/electronics/airlock) && state == 1 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.visible_message("[user] installs the electronics into the airlock assembly.", \
|
||||
"<span class='notice'>You start to install electronics into the airlock assembly...</span>")
|
||||
@@ -534,9 +534,9 @@
|
||||
user << "<span class='notice'>You remove the airlock electronics.</span>"
|
||||
src.state = 1
|
||||
src.name = "wired airlock assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
var/obj/item/weapon/electronics/airlock/ae
|
||||
if (!electronics)
|
||||
ae = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
ae = new/obj/item/weapon/electronics/airlock( src.loc )
|
||||
else
|
||||
ae = electronics
|
||||
electronics = null
|
||||
|
||||
@@ -176,10 +176,11 @@ var/global/list/crematoriums = new/list()
|
||||
for(var/mob/living/M in contents)
|
||||
if (M.stat!=2)
|
||||
M.emote("scream")
|
||||
//Logging for this causes runtimes resulting in the cremator locking up. Commenting it out until that's figured out.
|
||||
//M.attack_log += "\[[time_stamp()]\] Has been cremated by <b>[user]/[user.ckey]</b>" //No point in this when the mob's about to be deleted
|
||||
user.attack_log +="\[[time_stamp()]\] Cremated <b>[M]/[M.ckey]</b>"
|
||||
log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> cremated <b>[M]/[M.ckey]</b>")
|
||||
if(user)
|
||||
user.attack_log +="\[[time_stamp()]\] Cremated <b>[M]/[M.ckey]</b>"
|
||||
log_attack("\[[time_stamp()]\] <b>[user]/[user.ckey]</b> cremated <b>[M]/[M.ckey]</b>")
|
||||
else
|
||||
log_attack("\[[time_stamp()]\] <b>UNKNOWN</b> cremated <b>[M]/[M.ckey]</b>")
|
||||
M.death(1)
|
||||
M.ghostize()
|
||||
qdel(M)
|
||||
@@ -194,26 +195,6 @@ var/global/list/crematoriums = new/list()
|
||||
update_icon()
|
||||
playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) //you horrible people
|
||||
|
||||
/*
|
||||
Crematorium Switch
|
||||
*/
|
||||
/obj/machinery/crema_switch/attack_hand(mob/user)
|
||||
if(src.allowed(usr))
|
||||
for (var/obj/structure/bodycontainer/crematorium/C in crematoriums)
|
||||
if (C.id != id)
|
||||
continue
|
||||
|
||||
C.cremate(user)
|
||||
else
|
||||
usr << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
/obj/machinery/crema_switch/attackby(obj/item/W, mob/user, params)
|
||||
if(W.GetID())
|
||||
attack_hand(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/*
|
||||
* Generic Tray
|
||||
@@ -286,4 +267,4 @@ Crematorium Switch
|
||||
if(locate(/obj/structure/table) in get_turf(mover))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
dir = NORTH
|
||||
|
||||
var/ini_dir
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
var/obj/item/weapon/electronics/airlock/electronics = null
|
||||
var/created_name = null
|
||||
|
||||
//Vars to help with the icon's name
|
||||
@@ -189,7 +189,7 @@
|
||||
name = "anchored windoor assembly"
|
||||
|
||||
//Adding airlock electronics for access. Step 6 complete.
|
||||
else if(istype(W, /obj/item/weapon/airlock_electronics))
|
||||
else if(istype(W, /obj/item/weapon/electronics/airlock))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
@@ -219,7 +219,7 @@
|
||||
return
|
||||
user << "<span class='notice'>You remove the airlock electronics.</span>"
|
||||
name = "wired windoor assembly"
|
||||
var/obj/item/weapon/airlock_electronics/ae
|
||||
var/obj/item/weapon/electronics/airlock/ae
|
||||
ae = electronics
|
||||
electronics = null
|
||||
ae.loc = loc
|
||||
|
||||
@@ -159,25 +159,10 @@
|
||||
|
||||
/turf/simulated/wall/proc/try_wallmount(obj/item/weapon/W, mob/user, turf/T)
|
||||
//check for wall mounted frames
|
||||
if(istype(W,/obj/item/apc_frame))
|
||||
var/obj/item/apc_frame/AH = W
|
||||
AH.try_build(src)
|
||||
return 1
|
||||
else if(istype(W,/obj/item/newscaster_frame))
|
||||
var/obj/item/newscaster_frame/AH = W
|
||||
AH.try_build(src)
|
||||
return 1
|
||||
else if(istype(W,/obj/item/alarm_frame))
|
||||
var/obj/item/alarm_frame/AH = W
|
||||
AH.try_build(src)
|
||||
return 1
|
||||
else if(istype(W,/obj/item/firealarm_frame))
|
||||
var/obj/item/firealarm_frame/AH = W
|
||||
AH.try_build(src)
|
||||
return 1
|
||||
else if(istype(W,/obj/item/light_fixture_frame))
|
||||
var/obj/item/light_fixture_frame/AH = W
|
||||
AH.try_build(src)
|
||||
if(istype(W,/obj/item/wallframe))
|
||||
var/obj/item/wallframe/F = W
|
||||
if(F.try_build(src))
|
||||
F.attach(src)
|
||||
return 1
|
||||
//Poster stuff
|
||||
else if(istype(W,/obj/item/weapon/contraband/poster))
|
||||
|
||||
@@ -52,9 +52,11 @@
|
||||
//Called when another assembly acts on this one, var/radio will determine where it came from for wire calcs
|
||||
/obj/item/device/assembly/proc/pulsed(radio = 0)
|
||||
if(holder && (wires & WIRE_RECEIVE))
|
||||
activate()
|
||||
spawn(0)
|
||||
activate()
|
||||
if(radio && (wires & WIRE_RADIO_RECEIVE))
|
||||
activate()
|
||||
spawn(0)
|
||||
activate()
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
/obj/item/device/assembly/control
|
||||
name = "blast door controller"
|
||||
desc = "A small electronic device able to control a blast door remotely."
|
||||
icon_state = "control"
|
||||
origin_tech = "magnets=1;programming=2"
|
||||
attachable = 1
|
||||
var/id = null
|
||||
var/can_change_id = 0
|
||||
|
||||
/obj/item/device/assembly/control/examine(mob/user)
|
||||
..()
|
||||
if(id)
|
||||
user << "It's channel ID is '[id]'."
|
||||
|
||||
|
||||
/obj/item/device/assembly/control/activate()
|
||||
cooldown = 1
|
||||
var/openclose
|
||||
for(var/obj/machinery/door/poddoor/M in machines)
|
||||
if(M.id == src.id)
|
||||
if(openclose == null)
|
||||
openclose = M.density
|
||||
spawn(0)
|
||||
if(M)
|
||||
if(openclose) M.open()
|
||||
else M.close()
|
||||
return
|
||||
sleep(10)
|
||||
cooldown = 0
|
||||
|
||||
|
||||
/obj/item/device/assembly/control/airlock
|
||||
name = "airlock controller"
|
||||
desc = "A small electronic device able to control an airlock remotely."
|
||||
id = "badmin" // Set it to null for MEGAFUN.
|
||||
var/specialfunctions = OPEN
|
||||
/*
|
||||
Bitflag, 1= open (OPEN)
|
||||
2= idscan (IDSCAN)
|
||||
4= bolts (BOLTS)
|
||||
8= shock (SHOCK)
|
||||
16= door safties (SAFE)
|
||||
*/
|
||||
|
||||
/obj/item/device/assembly/control/airlock/activate()
|
||||
cooldown = 1
|
||||
for(var/obj/machinery/door/airlock/D in airlocks)
|
||||
if(D.id_tag == src.id)
|
||||
if(specialfunctions & OPEN)
|
||||
spawn(0)
|
||||
if(D)
|
||||
if(D.density) D.open()
|
||||
else D.close()
|
||||
return
|
||||
if(specialfunctions & IDSCAN)
|
||||
D.aiDisabledIdScanner = !D.aiDisabledIdScanner
|
||||
if(specialfunctions & BOLTS)
|
||||
if(!D.isWireCut(4) && D.hasPower())
|
||||
D.locked = !D.locked
|
||||
D.update_icon()
|
||||
if(specialfunctions & SHOCK)
|
||||
D.secondsElectrified = D.secondsElectrified ? 0 : -1
|
||||
if(specialfunctions & SAFE)
|
||||
D.safe = !D.safe
|
||||
sleep(10)
|
||||
cooldown = 0
|
||||
|
||||
|
||||
/obj/item/device/assembly/control/massdriver
|
||||
name = "mass driver controller"
|
||||
desc = "A small electronic device able to control a mass driver."
|
||||
|
||||
/obj/item/device/assembly/control/massdriver/activate()
|
||||
cooldown = 1
|
||||
for(var/obj/machinery/door/poddoor/M in machines)
|
||||
if (M.id == src.id)
|
||||
spawn( 0 )
|
||||
M.open()
|
||||
return
|
||||
|
||||
sleep(10)
|
||||
|
||||
for(var/obj/machinery/mass_driver/M in machines)
|
||||
if(M.id == src.id)
|
||||
M.drive()
|
||||
|
||||
sleep(60)
|
||||
|
||||
for(var/obj/machinery/door/poddoor/M in machines)
|
||||
if (M.id == src.id)
|
||||
spawn( 0 )
|
||||
M.close()
|
||||
return
|
||||
|
||||
sleep(10)
|
||||
cooldown = 0
|
||||
|
||||
|
||||
/obj/item/device/assembly/control/igniter
|
||||
name = "ignition controller"
|
||||
desc = "A remote controller for a mounted igniter."
|
||||
|
||||
/obj/item/device/assembly/control/igniter/activate()
|
||||
cooldown = 1
|
||||
for(var/obj/machinery/sparker/M in machines)
|
||||
if (M.id == src.id)
|
||||
spawn( 0 )
|
||||
M.ignite()
|
||||
|
||||
for(var/obj/machinery/igniter/M in machines)
|
||||
if(M.id == src.id)
|
||||
M.use_power(50)
|
||||
M.on = !M.on
|
||||
M.icon_state = "igniter[M.on]"
|
||||
|
||||
sleep(30)
|
||||
cooldown = 0
|
||||
|
||||
|
||||
/obj/item/device/assembly/control/flasher
|
||||
name = "flasher controller"
|
||||
desc = "A remote controller for a mounted flasher."
|
||||
|
||||
/obj/item/device/assembly/control/flasher/activate()
|
||||
cooldown = 1
|
||||
for(var/obj/machinery/flasher/M in machines)
|
||||
if(M.id == src.id)
|
||||
spawn(0)
|
||||
M.flash()
|
||||
|
||||
sleep(50)
|
||||
cooldown = 0
|
||||
|
||||
|
||||
/obj/item/device/assembly/control/crematorium
|
||||
name = "crematorium controller"
|
||||
desc = "An evil-looking remote controller for a crematorium."
|
||||
|
||||
/obj/item/device/assembly/control/crematorium/activate()
|
||||
cooldown = 1
|
||||
for (var/obj/structure/bodycontainer/crematorium/C in crematoriums)
|
||||
if (C.id == id)
|
||||
C.cremate(usr)
|
||||
|
||||
sleep(50)
|
||||
cooldown = 0
|
||||
@@ -398,7 +398,7 @@
|
||||
user.visible_message(\
|
||||
"[user.name] has removed the power control board from [src.name]!",\
|
||||
"<span class='notice'>You remove the power control board.</span>")
|
||||
new /obj/item/weapon/module/power_control(loc)
|
||||
new /obj/item/weapon/electronics/apc(loc)
|
||||
else if (opened!=2) //cover isn't removed
|
||||
opened = 0
|
||||
update_icon()
|
||||
@@ -496,7 +496,7 @@
|
||||
else if (istype(W, /obj/item/weapon/wirecutters) && terminal && opened && has_electronics!=2)
|
||||
terminal.dismantle(user)
|
||||
|
||||
else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack))
|
||||
else if (istype(W, /obj/item/weapon/electronics/apc) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack))
|
||||
user.visible_message("[user.name] inserts the power control board into [src].", \
|
||||
"<span class='notice'>You start to insert the power control board into the frame...</span>")
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
@@ -505,7 +505,7 @@
|
||||
has_electronics = 1
|
||||
user << "<span class='notice'>You place the power control board inside the frame.</span>"
|
||||
qdel(W)
|
||||
else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && ((stat & BROKEN) || malfhack))
|
||||
else if (istype(W, /obj/item/weapon/electronics/apc) && opened && has_electronics==0 && ((stat & BROKEN) || malfhack))
|
||||
user << "<span class='warning'>You cannot put the board inside, the frame is damaged!</span>"
|
||||
return
|
||||
else if (istype(W, /obj/item/weapon/weldingtool) && opened && has_electronics==0 && !terminal)
|
||||
@@ -525,13 +525,13 @@
|
||||
"[user.name] has cut [src] apart with [W].",\
|
||||
"<span class='notice'>You disassembled the broken APC frame.</span>")
|
||||
else
|
||||
new /obj/item/apc_frame(loc)
|
||||
new /obj/item/wallframe/apc(loc)
|
||||
user.visible_message(\
|
||||
"[user.name] has cut [src] from the wall with [W].",\
|
||||
"<span class='notice'>You cut the APC frame from the wall.</span>")
|
||||
qdel(src)
|
||||
return
|
||||
else if (istype(W, /obj/item/apc_frame) && opened && emagged)
|
||||
else if (istype(W, /obj/item/wallframe/apc) && opened && emagged)
|
||||
emagged = 0
|
||||
if (opened==2)
|
||||
opened = 1
|
||||
@@ -540,7 +540,7 @@
|
||||
"<span class='notice'>You replace the damaged APC frontal panel with a new one.</span>")
|
||||
qdel(W)
|
||||
update_icon()
|
||||
else if (istype(W, /obj/item/apc_frame) && opened && ((stat & BROKEN) || malfhack))
|
||||
else if (istype(W, /obj/item/wallframe/apc) && opened && ((stat & BROKEN) || malfhack))
|
||||
if (has_electronics)
|
||||
user << "<span class='warning'>You cannot repair this APC until you remove the electronics still inside!</span>"
|
||||
return
|
||||
@@ -1232,15 +1232,7 @@
|
||||
#undef APC_UPDATE_ICON_COOLDOWN
|
||||
|
||||
/*Power module, used for APC construction*/
|
||||
/obj/item/weapon/module
|
||||
icon = 'icons/obj/module.dmi'
|
||||
icon_state = "std_module"
|
||||
w_class = 2.0
|
||||
item_state = "electronic"
|
||||
flags = CONDUCT
|
||||
|
||||
|
||||
/obj/item/weapon/module/power_control
|
||||
/obj/item/weapon/electronics/apc
|
||||
name = "power control module"
|
||||
icon_state = "power_mod"
|
||||
desc = "Heavy-duty switching circuits for power control."
|
||||
|
||||
@@ -11,61 +11,20 @@
|
||||
|
||||
|
||||
|
||||
/obj/item/light_fixture_frame
|
||||
/obj/item/wallframe/light_fixture
|
||||
name = "light fixture frame"
|
||||
desc = "Used for building lights."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "tube-construct-item"
|
||||
flags = CONDUCT
|
||||
var/fixture_type = "tube"
|
||||
var/obj/machinery/light/newlight = null
|
||||
var/sheets_refunded = 2
|
||||
result_path = /obj/machinery/light_construct
|
||||
inverse = 1
|
||||
|
||||
/obj/item/light_fixture_frame/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
|
||||
qdel(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/light_fixture_frame/proc/try_build(turf/on_wall)
|
||||
if (get_dist(on_wall,usr)>1)
|
||||
return
|
||||
var/ndir = get_dir(usr,on_wall)
|
||||
if (!(ndir in cardinal))
|
||||
return
|
||||
var/turf/loc = get_turf(usr)
|
||||
if (!istype(loc, /turf/simulated/floor))
|
||||
usr << "<span class='warning'>[src.name] cannot be placed on this spot!</span>"
|
||||
return
|
||||
usr << "<span class='notice'>You begin attaching [src] to the wall...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 75, 1)
|
||||
var/constrdir = usr.dir
|
||||
var/constrloc = usr.loc
|
||||
if (!do_after(usr, 30, target = src))
|
||||
return
|
||||
switch(fixture_type)
|
||||
if("bulb")
|
||||
newlight = new /obj/machinery/light_construct/small(constrloc)
|
||||
if("tube")
|
||||
newlight = new /obj/machinery/light_construct(constrloc)
|
||||
newlight.dir = constrdir
|
||||
newlight.fingerprints = src.fingerprints
|
||||
newlight.fingerprintshidden = src.fingerprintshidden
|
||||
newlight.fingerprintslast = src.fingerprintslast
|
||||
|
||||
usr.visible_message("[usr.name] attaches [src] to the wall.", \
|
||||
"<span class='notice'>You attach [src] to the wall.</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/light_fixture_frame/small
|
||||
/obj/item/wallframe/light_fixture/small
|
||||
name = "small light fixture frame"
|
||||
desc = "Used for building small lights."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "bulb-construct-item"
|
||||
flags = CONDUCT
|
||||
fixture_type = "bulb"
|
||||
sheets_refunded = 1
|
||||
result_path = /obj/machinery/light_construct/small
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
|
||||
/obj/machinery/light_construct
|
||||
name = "light fixture frame"
|
||||
@@ -79,10 +38,10 @@
|
||||
var/sheets_refunded = 2
|
||||
var/obj/machinery/light/newlight = null
|
||||
|
||||
/obj/machinery/light_construct/New()
|
||||
/obj/machinery/light_construct/New(loc, ndir, building)
|
||||
..()
|
||||
if (fixture_type == "bulb")
|
||||
icon_state = "bulb-construct-stage1"
|
||||
if(building)
|
||||
dir = ndir
|
||||
|
||||
/obj/machinery/light_construct/examine(mob/user)
|
||||
..()
|
||||
@@ -172,12 +131,7 @@
|
||||
|
||||
/obj/machinery/light_construct/small
|
||||
name = "small light fixture frame"
|
||||
desc = "A small light fixture under construction."
|
||||
icon = 'icons/obj/lighting.dmi'
|
||||
icon_state = "bulb-construct-stage1"
|
||||
anchored = 1
|
||||
layer = 5
|
||||
stage = 1
|
||||
fixture_type = "bulb"
|
||||
sheets_refunded = 1
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
return 1
|
||||
|
||||
if(!tracker)
|
||||
if(istype(W, /obj/item/weapon/tracker_electronics))
|
||||
if(istype(W, /obj/item/weapon/electronics/tracker))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
tracker = 1
|
||||
@@ -264,7 +264,7 @@
|
||||
return 1
|
||||
else
|
||||
if(istype(W, /obj/item/weapon/crowbar))
|
||||
new /obj/item/weapon/tracker_electronics(src.loc)
|
||||
new /obj/item/weapon/electronics/tracker(src.loc)
|
||||
tracker = 0
|
||||
user.visible_message("[user] takes out the electronics from the solar assembly.", "<span class='notice'>You take out the electronics from the solar assembly.</span>")
|
||||
return 1
|
||||
|
||||
@@ -76,9 +76,5 @@
|
||||
|
||||
// Tracker Electronic
|
||||
|
||||
/obj/item/weapon/tracker_electronics
|
||||
|
||||
name = "tracker electronics"
|
||||
icon = 'icons/obj/doors/door_assembly.dmi'
|
||||
icon_state = "door_electronics"
|
||||
w_class = 2.0
|
||||
/obj/item/weapon/electronics/tracker
|
||||
name = "tracker electronics"
|
||||
@@ -208,15 +208,6 @@
|
||||
if(!compressor)
|
||||
stat |= BROKEN
|
||||
|
||||
|
||||
// THIS MAKES IT WORK!!!!!
|
||||
|
||||
// OLD FIX . Dunno how other engines handle this but this is how it should work: Turbine and compressor should be
|
||||
// treated as walls to avoid conductivity and gas spread. This was the problem of the original turbine which was just
|
||||
// a machinery - it didn't block the gas passage.
|
||||
// /obj/machinery/power/turbine/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
// return !density
|
||||
|
||||
/obj/machinery/power/turbine/RefreshParts()
|
||||
var/P = 0
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/C in component_parts)
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
id = "power control"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_METAL = 100, MAT_GLASS = 100)
|
||||
build_path = /obj/item/weapon/module/power_control
|
||||
build_path = /obj/item/weapon/electronics/apc
|
||||
category = list("initial", "Electronics")
|
||||
|
||||
/datum/design/airlock_board
|
||||
@@ -119,7 +119,7 @@
|
||||
id = "airlock_board"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_METAL = 50, MAT_GLASS = 50)
|
||||
build_path = /obj/item/weapon/airlock_electronics
|
||||
build_path = /obj/item/weapon/electronics/airlock
|
||||
category = list("initial", "Electronics")
|
||||
|
||||
/datum/design/firelock_board
|
||||
@@ -127,7 +127,7 @@
|
||||
id = "firelock_board"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_METAL = 50, MAT_GLASS = 50)
|
||||
build_path = /obj/item/weapon/firelock_board
|
||||
build_path = /obj/item/weapon/electronics/firelock
|
||||
category = list("initial", "Electronics")
|
||||
|
||||
/datum/design/airalarm_electronics
|
||||
@@ -135,7 +135,7 @@
|
||||
id = "airalarm_electronics"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_METAL = 50, MAT_GLASS = 50)
|
||||
build_path = /obj/item/weapon/airalarm_electronics
|
||||
build_path = /obj/item/weapon/electronics/airalarm
|
||||
category = list("initial", "Electronics")
|
||||
|
||||
/datum/design/firealarm_electronics
|
||||
@@ -143,7 +143,7 @@
|
||||
id = "firealarm_electronics"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_METAL = 50, MAT_GLASS = 50)
|
||||
build_path = /obj/item/weapon/firealarm_electronics
|
||||
build_path = /obj/item/weapon/electronics/firealarm
|
||||
category = list("initial", "Electronics")
|
||||
|
||||
/datum/design/pipe_painter
|
||||
@@ -383,7 +383,7 @@
|
||||
id = "camera_assembly"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_METAL = 400, MAT_GLASS = 250)
|
||||
build_path = /obj/item/weapon/camera_assembly
|
||||
build_path = /obj/item/wallframe/camera
|
||||
category = list("initial", "Construction")
|
||||
|
||||
/datum/design/newscaster_frame
|
||||
@@ -391,7 +391,7 @@
|
||||
id = "newscaster_frame"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_METAL = 14000, MAT_GLASS = 8000)
|
||||
build_path = /obj/item/newscaster_frame
|
||||
build_path = /obj/item/wallframe/newscaster
|
||||
category = list("initial", "Construction")
|
||||
|
||||
/datum/design/syringe
|
||||
|
||||
Reference in New Issue
Block a user