Added to code/atoms.dm
/obj/item/weapon/circuitry
name = "circuitry"
icon_state = "circuitry"
flags = 322.0
force = 5.0
w_class = 2.0
throwforce = 5.0
throw_speed = 3
throw_range = 5
Added to code/game/objects/items.dm
/obj/item/weapon/circuitry/New(loc)
pixel_x = rand(-6,6)
pixel_y = rand(-6,12)
..(loc)
Also in items.dm:
Added to function /obj/item/weapon/sheet/metal/attack_self(mob/user as mob):
L["airlock"] = "airlock (5)"
(it matches the others)
Added to function /obj/item/weapon/sheet/metal/Topic(href, href_list)
if("airlock")
if (src.amount < 5)
return
var/turf/T = usr.loc
if ((usr.loc == T))
if (!istype(T, /turf/station/floor))
return
src.amount -= 5
var/obj/machinery/door/airlock/C = new/obj/machinery/door/airlock
C.req_access = list()
C.loc = usr.loc
C.build_state = 1
C.loc.buildlinks()
C.updateIconState()
(In the switch statement)
In code/game/machinery/doors/airlock.dm:
Added to /obj/machinery/door/airlock
var/build_state = 0
Added to functions
/obj/machinery/door/airlock/proc/pulse(var/wireColor)
/obj/machinery/door/airlock/proc/cut(var/wireColor)
/obj/machinery/door/airlock/proc/mend(var/wireColor)
/obj/machinery/door/airlock/proc/shock(mob/user, prb)
/obj/machinery/door/airlock/attack_ai(mob/user as mob)
/obj/machinery/door/airlock/proc/hack(mob/user as mob)
/obj/machinery/door/airlock/Topic(href, href_list)
/obj/machinery/door/airlock/open()
/obj/machinery/door/airlock/close()
if(src.build_state)
return
(I sometimes add it as an || to an already present return)
Edited /obj/machinery/door/airlock/proc/updateIconState() to
/obj/machinery/door/airlock/proc/updateIconState()
if(src.build_state)
src.icon_state = text("door_build_[]",src.build_state)
else
var/d = src.density
if (src.blocked)
d = "l"
src.icon_state = text("[]door[]", (src.p_open ? "o_" : null), d)
return
Added to the start of /obj/machinery/door/airlock/attackby(C as obj, mob/user as mob)
if(src.build_state > 0)
if (istype(C, /obj/item/weapon/crowbar))
var/area/A = user.loc
user << "Deconstructing..."
sleep(50)
if (!istype(C, /obj/item/weapon/crowbar) || !(A == user.loc) || !src.build_state)
return
if(src.build_state > 4)
new /obj/item/weapon/circuitry( src.loc )
if(src.build_state > 3)
var/obj/item/weapon/cable_coil/R = new /obj/item/weapon/cable_coil( src.loc )
R.amount = 5
var/obj/item/weapon/sheet/metal/R = new /obj/item/weapon/sheet/metal( src.loc )
R.amount = 5
del(src)
else if(src.build_state == 1)
if ((istype(C, /obj/item/weapon/weldingtool) && !( src.operating ) && src.density))
var/obj/item/weapon/weldingtool/W = C
if(W.welding)
if (W.weldfuel > 10)
W.weldfuel -= 10
else
user << "Need more welding fuel!"
return
user << "Welding"
var/area/A = user.loc
sleep(40)
if(!src)
return
if ((istype(C, /obj/item/weapon/weldingtool) && !( src.operating ) && src.density && A == user.loc))
src.build_state = 2
src.updateIconState()
return
else if(src.build_state == 2)
if (istype(C, /obj/item/weapon/screwdriver))
src.build_state = 3
src.updateIconState()
return
else if(src.build_state == 3)
if (istype(C, /obj/item/weapon/cable_coil))
var/obj/item/weapon/cable_coil/S = C
if(!S.use(5))
user << "Not enough wiring"
return
src.build_state = 4
src.updateIconState()
return
else if(src.build_state == 4)
if (istype(C, /obj/item/weapon/circuitry))
src.build_state = 5
src.updateIconState()
del(C)
else if(src.build_state == 5)
if (istype(C, /obj/item/weapon/screwdriver))
src.build_state = 6
src.updateIconState()
return
else if(src.build_state == 6)
if ((istype(C, /obj/item/weapon/weldingtool) && !( src.operating ) && src.density))
var/obj/item/weapon/weldingtool/W = C
if(W.welding)
if (W.weldfuel > 5)
W.weldfuel -= 5
else
user << "Need more welding fuel!"
return
user << "Welding"
var/area/A = user.loc
sleep(40)
if(!src)
return
if ((istype(C, /obj/item/weapon/weldingtool) && !( src.operating ) && src.density && A == user.loc))
src.build_state = 0
src.updateIconState()
return
Added icon(s)
(in this .zip file)circuitry to icons/ss13/items.dmi
circuitry_in_hand to icons/ss13/items_in_hand.dmi
door_build to icons/ss13/door1.dmi