Merge pull request #1229 from SinTwo/construction_update

Construction update
This commit is contained in:
Neerti
2016-03-26 15:45:19 -04:00
81 changed files with 1740 additions and 519 deletions

View File

@@ -6,8 +6,10 @@
w_class = 4.0
canhear_range = 2
flags = CONDUCT | NOBLOODY
var/circuit = /obj/item/weapon/circuitboard/intercom
var/number = 0
var/last_tick //used to delay the powercheck
var/wiresexposed = 0
/obj/item/device/radio/intercom/custom
name = "station intercom (Custom)"
@@ -81,6 +83,41 @@
spawn (0)
attack_self(user)
/obj/item/device/radio/intercom/attackby(obj/item/W as obj, mob/user as mob)
src.add_fingerprint(user)
if(istype(W, /obj/item/weapon/screwdriver)) // Opening the intercom up.
wiresexposed = !wiresexposed
user << "The wires have been [wiresexposed ? "exposed" : "unexposed"]"
if(wiresexposed)
if(!on)
icon_state = "intercom-p_open"
else
icon_state = "intercom_open"
else
icon_state = "intercom"
return
if (wiresexposed && istype(W, /obj/item/weapon/wirecutters))
user.visible_message("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "You have cut the wires inside \the [src].")
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
new/obj/item/stack/cable_coil(get_turf(src), 5)
var/obj/structure/frame/A = new /obj/structure/frame( src.loc )
var/obj/item/weapon/circuitboard/M = new circuit( A )
A.frame_type = "intercom"
A.pixel_x = pixel_x
A.pixel_y = pixel_y
A.circuit = M
A.set_dir(dir)
A.anchored = 1
for (var/obj/C in src)
C.forceMove(loc)
A.state = 2
A.icon_state = "intercom_2"
M.deconstruct(src)
qdel(src)
else
src.attack_hand(user)
return
/obj/item/device/radio/intercom/receive_range(freq, level)
if (!on)
return -1
@@ -110,9 +147,15 @@
on = A.powered(EQUIP) // set "on" to the power status
if(!on)
icon_state = "intercom-p"
if(wiresexposed)
icon_state = "intercom-p_open"
else
icon_state = "intercom-p"
else
icon_state = initial(icon_state)
if(wiresexposed)
icon_state = "intercom_open"
else
icon_state = initial(icon_state)
/obj/item/device/radio/intercom/locked
var/locked_frequency

View File

@@ -29,6 +29,16 @@
network = list("MINE")
req_access = list()
/obj/item/weapon/circuitboard/security/telescreen/entertainment
name = T_BOARD("entertainment camera monitor")
build_path = /obj/machinery/computer/security/telescreen/entertainment
board_type = "display"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/security/telescreen/entertainment/New()
..()
network = NETWORK_THUNDER
/obj/item/weapon/circuitboard/security/construct(var/obj/machinery/computer/security/C)
if (..(C))
C.network = network.Copy()

View File

@@ -0,0 +1,253 @@
#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#endif
//Circuitboards for frames (mostly wall based frames). Most of these don't fit into other categories.
//Display
/obj/item/weapon/circuitboard/guestpass
name = T_BOARD("guestpass console")
build_path = /obj/machinery/computer/guestpass
board_type = "guestpass"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/status_display
name = T_BOARD("status display")
build_path = /obj/machinery/status_display
board_type = "display"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/ai_status_display
name = T_BOARD("ai status display")
build_path = /obj/machinery/ai_status_display
board_type = "display"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/newscaster
name = T_BOARD("newscaster")
build_path = /obj/machinery/newscaster
board_type = "newscaster"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/atm
name = T_BOARD("atm")
build_path = /obj/machinery/atm
board_type = "atm"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
//Alarm
/obj/item/weapon/circuitboard/firealarm
name = T_BOARD("fire alarm")
build_path = /obj/machinery/firealarm
board_type = "firealarm"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/airalarm
name = T_BOARD("air alarm")
build_path = /obj/machinery/alarm
board_type = "airalarm"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/intercom
name = T_BOARD("intercom")
build_path = /obj/item/device/radio/intercom
board_type = "intercom"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
/obj/item/weapon/circuitboard/keycard_auth
name = T_BOARD("keycard authenticator")
build_path = /obj/machinery/keycard_auth
board_type = "keycard"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
//Computer
/obj/item/weapon/circuitboard/holopad
name = T_BOARD("holopad")
build_path = /obj/machinery/hologram/holopad
board_type = "holopad"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
//Machine
/obj/item/weapon/circuitboard/photocopier
name = T_BOARD("photocopier")
build_path = /obj/machinery/photocopier
board_type = "photocopier"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/scanning_module" = 1,
"/obj/item/weapon/stock_parts/motor" = 1,
"/obj/item/weapon/stock_parts/micro_laser" = 1,
"/obj/item/weapon/stock_parts/matter_bin" = 1)
/obj/item/weapon/circuitboard/fax
name = T_BOARD("fax")
build_path = /obj/machinery/photocopier/faxmachine
board_type = "fax"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/scanning_module" = 1,
"/obj/item/weapon/stock_parts/motor" = 1,
"/obj/item/weapon/stock_parts/micro_laser" = 1,
"/obj/item/weapon/stock_parts/matter_bin" = 1)
/obj/item/weapon/circuitboard/conveyor
name = T_BOARD("conveyor")
build_path = /obj/machinery/conveyor
board_type = "conveyor"
req_components = list(
"/obj/item/weapon/stock_parts/gear" = 2,
"/obj/item/weapon/stock_parts/motor" = 2,
"/obj/item/stack/cable_coil" = 5)
/obj/item/weapon/circuitboard/microwave
name = T_BOARD("microwave")
build_path = /obj/machinery/microwave
board_type = "microwave"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/stock_parts/motor" = 1,
"/obj/item/weapon/stock_parts/capacitor" = 1)
/obj/item/weapon/circuitboard/vending
name = T_BOARD("vending")
build_path = /obj/machinery/vending
board_type = "vending"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/stock_parts/motor" = 2,
"/obj/item/weapon/stock_parts/spring" = 2,
"/obj/item/stack/material/glass/reinforced" = 2)
/obj/item/weapon/circuitboard/recharger
name = T_BOARD("recharger")
build_path = /obj/machinery/recharger
board_type = "recharger"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/capacitor" = 1,
"/obj/item/stack/cable_coil" = 5)
/obj/item/weapon/circuitboard/recharger/wrecharger
name = T_BOARD("wall recharger")
build_path = /obj/machinery/recharger/wallcharger
board_type = "wrecharger"
/obj/item/weapon/circuitboard/washing
name = T_BOARD("washing machine")
build_path = /obj/machinery/washing_machine
board_type = "washing"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/motor" = 1,
"/obj/item/weapon/stock_parts/gear" = 2)
/obj/item/weapon/circuitboard/grinder
name = T_BOARD("reagent grinder")
build_path = /obj/machinery/reagentgrinder
board_type = "grinder"
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
req_components = list(
"/obj/item/weapon/stock_parts/motor" = 1,
"/obj/item/weapon/stock_parts/gear" = 1,
"/obj/item/weapon/reagent_containers/glass/beaker/large" = 1)
//for testing - If this is still in when I commit, someone shoot me. --leaving in for now, shouldn't be able to get these on station anyways.
/obj/item/weapon/storage/box/frame_parts
display_contents_with_number = 1
New()
..()
new /obj/item/weapon/circuitboard/guestpass( src )
new /obj/item/weapon/circuitboard/status_display( src )
new /obj/item/weapon/circuitboard/ai_status_display( src )
new /obj/item/weapon/circuitboard/newscaster( src )
new /obj/item/weapon/circuitboard/atm( src )
new /obj/item/weapon/circuitboard/firealarm( src )
new /obj/item/weapon/circuitboard/airalarm( src )
new /obj/item/weapon/circuitboard/intercom( src )
new /obj/item/weapon/circuitboard/keycard_auth( src )
new /obj/item/weapon/circuitboard/holopad( src )
new /obj/item/weapon/circuitboard/photocopier( src )
new /obj/item/weapon/circuitboard/fax( src )
new /obj/item/weapon/circuitboard/microwave( src )
new /obj/item/weapon/circuitboard/vending( src )
new /obj/item/weapon/circuitboard/washing( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/weapon/stock_parts/scanning_module( src )
new /obj/item/weapon/stock_parts/motor( src )
new /obj/item/weapon/stock_parts/micro_laser( src )
new /obj/item/weapon/stock_parts/matter_bin( src )
new /obj/item/weapon/stock_parts/gear( src )
new /obj/item/weapon/stock_parts/console_screen( src )
new /obj/item/weapon/stock_parts/capacitor( src )
new /obj/item/weapon/stock_parts/spring( src )
new /obj/item/stack/cable_coil( src , 5 )
new /obj/item/stack/material/glass/reinforced( src , 2 )

View File

@@ -1,5 +1,5 @@
#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#error T_BOARD macro is not defined but we need it!
#endif
//Stuff that doesn't fit into any category goes here
@@ -7,4 +7,4 @@
/obj/item/weapon/circuitboard/aicore
name = T_BOARD("AI core")
origin_tech = list(TECH_DATA = 4, TECH_BIO = 2)
board_type = "other"
board_type = "other"

View File

@@ -35,6 +35,21 @@
icon_state = "open"
layer = SHOWER_OPEN_LAYER
/obj/structure/curtain/attackby(obj/item/P, mob/user)
if(istype(P, /obj/item/weapon/wirecutters))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
user << "<span class='notice'>You start to cut the shower curtains.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 10))
user << "<span class='notice'>You cut the shower curtains.</span>"
var/obj/item/stack/material/plastic/A = new /obj/item/stack/material/plastic( src.loc )
A.amount = 3
qdel(src)
return
else
src.attack_hand(user)
return
/obj/structure/curtain/black
name = "black curtain"
color = "#222222"

View File

@@ -8,9 +8,19 @@
var/obj/item/weapon/extinguisher/has_extinguisher
var/opened = 0
/obj/structure/extinguisher_cabinet/New()
/obj/structure/extinguisher_cabinet/New(var/loc, var/dir, var/building = 0)
..()
has_extinguisher = new/obj/item/weapon/extinguisher(src)
if(building)
if(loc)
src.loc = loc
pixel_x = (dir & 3)? 0 : (dir == 4 ? -27 : 27)
pixel_y = (dir & 3)? (dir ==1 ? -27 : 27) : 0
update_icon()
return
else
has_extinguisher = new/obj/item/weapon/extinguisher(src)
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user)
if(isrobot(user))
@@ -23,6 +33,15 @@
user << "<span class='notice'>You place [O] in [src].</span>"
else
opened = !opened
if(istype(O, /obj/item/weapon/wrench))
if(!has_extinguisher)
user << "<span class='notice'>You start to unwrench the extinguisher cabinet.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 15))
user << "<span class='notice'>You unwrench the extinguisher cabinet.</span>"
new /obj/item/frame/extinguisher_cabinet( src.loc )
qdel(src)
return
else
opened = !opened
update_icon()

View File

@@ -8,9 +8,18 @@
anchored = 1
var/shattered = 0
var/list/ui_users = list()
var/glass = 1
/obj/structure/mirror/New(var/loc, var/dir, var/building = 0, mob/user as mob)
if(building)
glass = 0
icon_state = "mirror_frame"
pixel_x = (dir & 3)? 0 : (dir == 4 ? -28 : 28)
pixel_y = (dir & 3)? (dir == 1 ? -30 : 30) : 0
return
/obj/structure/mirror/attack_hand(mob/user as mob)
if(!glass) return
if(shattered) return
if(ishuman(user))
@@ -22,6 +31,7 @@
AC.ui_interact(user)
/obj/structure/mirror/proc/shatter()
if(!glass) return
if(shattered) return
shattered = 1
icon_state = "mirror_broke"
@@ -34,18 +44,57 @@
if(prob(Proj.get_structure_damage() * 2))
if(!shattered)
shatter()
else
else if(glass)
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
..()
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
if(shattered)
if(istype(I, /obj/item/weapon/wrench))
if(!glass)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 20))
user << "<span class='notice'>You unfasten the frame.</span>"
new /obj/item/frame/mirror( src.loc )
qdel(src)
return
if(istype(I, /obj/item/weapon/crowbar))
if(shattered && glass)
user << "<span class='notice'>The broken glass falls out.</span>"
icon_state = "mirror_frame"
glass = !glass
new /obj/item/weapon/material/shard( src.loc )
return
if(!shattered && glass)
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
user << "<span class='notice'>You remove the glass.</span>"
glass = !glass
icon_state = "mirror_frame"
new /obj/item/stack/material/glass( src.loc, 2 )
return
if(istype(I, /obj/item/stack/material/glass))
if(!glass)
var/obj/item/stack/material/glass/G = I
if (G.get_amount() < 2)
user << "<span class='warning'>You need two sheets of glass to add them to the frame.</span>"
return
user << "<span class='notice'>You start to add the glass to the frame.</span>"
if(do_after(user, 20))
if (G.use(2))
shattered = 0
glass = 1
icon_state = "mirror"
user << "<span class='notice'>You add the glass to the frame.</span>"
return
if(shattered && glass)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
if(prob(I.force * 2))
visible_message("<span class='warning'>[user] smashes [src] with [I]!</span>")
shatter()
if(glass)
shatter()
else
visible_message("<span class='warning'>[user] hits [src] with [I]!</span>")
playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
@@ -53,13 +102,14 @@
/obj/structure/mirror/attack_generic(var/mob/user, var/damage)
user.do_attack_animation(src)
if(shattered)
if(shattered && glass)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return 0
if(damage)
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
shatter()
if(glass)
shatter()
else
user.visible_message("<span class='danger'>[user] hits [src] and bounces off!</span>")
return 1

View File

@@ -7,6 +7,18 @@
anchored = 1
var/notices = 0
/obj/structure/noticeboard/New(var/loc, var/dir, var/building = 0)
..()
if(building)
if(loc)
src.loc = loc
pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32)
pixel_y = (dir & 3)? (dir ==1 ? -27 : 27) : 0
update_icon()
return
/obj/structure/noticeboard/initialize()
for(var/obj/item/I in loc)
if(notices > 4) break
@@ -28,6 +40,14 @@
user << "<span class='notice'>You pin the paper to the noticeboard.</span>"
else
user << "<span class='notice'>You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.</span>"
if(istype(O, /obj/item/weapon/wrench))
user << "<span class='notice'>You start to unwrench the noticeboard.</span>"
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
if(do_after(user, 15))
user << "<span class='notice'>You unwrench the noticeboard.</span>"
new /obj/item/frame/noticeboard( src.loc )
qdel(src)
return
/obj/structure/noticeboard/attack_hand(var/mob/user)
examine(user)