mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 19:19:12 +01:00
Stack update
This commit is contained in:
@@ -76,14 +76,14 @@
|
||||
else if(istype(W, /obj/item/weapon/packageWrap))
|
||||
return
|
||||
else if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if(rigged)
|
||||
user << "<span class='notice'>[src] is already rigged!</span>"
|
||||
return
|
||||
user << "<span class='notice'>You rig [src].</span>"
|
||||
user.drop_item()
|
||||
del(W)
|
||||
rigged = 1
|
||||
return
|
||||
if (C.use(1))
|
||||
user << "<span class='notice'>You rig [src].</span>"
|
||||
rigged = 1
|
||||
return
|
||||
else if(istype(W, /obj/item/device/radio/electropack))
|
||||
if(rigged)
|
||||
user << "<span class='notice'>You attach [W] to [src].</span>"
|
||||
|
||||
@@ -184,14 +184,16 @@ obj/structure/door_assembly
|
||||
user << "\blue You [anchored? "un" : ""]secured the airlock assembly!"
|
||||
anchored = !anchored
|
||||
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored )
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && state == 0 && anchored)
|
||||
var/obj/item/stack/cable_coil/C = W
|
||||
if (C.get_amount() < 1)
|
||||
user << "<span class='warning'>You need one length of coil to wire the airlock assembly.</span>"
|
||||
return
|
||||
user.visible_message("[user] wires the airlock assembly.", "You start to wire the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
coil.use(1)
|
||||
src.state = 1
|
||||
user << "\blue You wire the Airlock!"
|
||||
if(do_after(user, 40) && state == 0 && anchored)
|
||||
if (C.use(1))
|
||||
src.state = 1
|
||||
user << "<span class='notice'>You wire the airlock.</span>"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters) && state == 1 )
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
@@ -236,23 +238,23 @@ obj/structure/door_assembly
|
||||
else if(istype(W, /obj/item/stack/sheet) && !glass)
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if (S)
|
||||
if (S.amount>=1)
|
||||
if (S.get_amount() >= 1)
|
||||
if(istype(S, /obj/item/stack/sheet/rglass))
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
user << "\blue You installed reinforced glass windows into the airlock assembly!"
|
||||
S.use(1)
|
||||
glass = 1
|
||||
if(do_after(user, 40) && !glass)
|
||||
if (S.use(1))
|
||||
user << "<span class='notice'>You installed reinforced glass windows into the airlock assembly.</span>"
|
||||
glass = 1
|
||||
else if(istype(S, /obj/item/stack/sheet/mineral) && S.sheettype)
|
||||
var/M = S.sheettype
|
||||
if(S.amount>=2)
|
||||
if(S.get_amount() >= 2)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
|
||||
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
|
||||
if(do_after(user, 40))
|
||||
user << "\blue You installed [M] plating into the airlock assembly!"
|
||||
S.use(2)
|
||||
glass = "[M]"
|
||||
if(do_after(user, 40) && !glass)
|
||||
if (S.use(2))
|
||||
user << "<span class='notice'>You installed [M] plating into the airlock assembly.</span>"
|
||||
glass = "[M]"
|
||||
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 )
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
|
||||
@@ -81,55 +81,50 @@
|
||||
|
||||
if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg)
|
||||
if(!anchored)
|
||||
if(S.amount < 2) return
|
||||
S.use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falsewall (src.loc)
|
||||
del(src)
|
||||
else
|
||||
if(S.amount < 2) return ..()
|
||||
user << "\blue Now adding plating..."
|
||||
if (do_after(user,40))
|
||||
if(!src || !S || S.amount < 2) return
|
||||
S.use(2)
|
||||
user << "\blue You added the plating!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall)
|
||||
for(var/turf/simulated/wall/X in Tsrc.loc)
|
||||
if(X) X.add_hiddenprint(usr)
|
||||
if(S.use(2))
|
||||
user << "<span class='notice'>You create a false wall! Push on it to open or close the passage.</span>"
|
||||
new /obj/structure/falsewall (src.loc)
|
||||
del(src)
|
||||
else
|
||||
if(S.get_amount() < 2) return ..()
|
||||
user << "<span class='notice'>Now adding plating...</span>"
|
||||
if (do_after(user,40))
|
||||
if (S.use(2))
|
||||
user << "<span class='notice'>You added the plating!</span>"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall)
|
||||
for(var/turf/simulated/wall/X in Tsrc.loc)
|
||||
if(X) X.add_hiddenprint(usr)
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(/obj/item/stack/sheet/plasteel)
|
||||
if(!anchored)
|
||||
if(S.amount < 2) return
|
||||
S.use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falserwall (src.loc)
|
||||
del(src)
|
||||
if(S.use(2))
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falserwall (src.loc)
|
||||
del(src)
|
||||
else
|
||||
if (src.icon_state == "reinforced") //I cant believe someone would actually write this line of code...
|
||||
if(S.amount < 1) return ..()
|
||||
user << "\blue Now finalising reinforced wall."
|
||||
if(S.get_amount() < 1) return ..()
|
||||
user << "<span class='notice'>Now finalising reinforced wall.</span>"
|
||||
if(do_after(user, 50))
|
||||
if(!src || !S || S.amount < 1) return
|
||||
S.use(1)
|
||||
user << "\blue Wall fully reinforced!"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/r_wall)
|
||||
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
|
||||
if(X) X.add_hiddenprint(usr)
|
||||
del(src)
|
||||
if (S.use(1))
|
||||
user << "<span class='notice'>Wall fully reinforced!</span>"
|
||||
var/turf/Tsrc = get_turf(src)
|
||||
Tsrc.ChangeTurf(/turf/simulated/wall/r_wall)
|
||||
for(var/turf/simulated/wall/r_wall/X in Tsrc.loc)
|
||||
if(X) X.add_hiddenprint(usr)
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
if(S.amount < 1) return ..()
|
||||
user << "\blue Now reinforcing girders"
|
||||
if(S.get_amount() < 1) return ..()
|
||||
user << "<span class='notice'>Now reinforcing girders...</span>"
|
||||
if (do_after(user,60))
|
||||
if(!src || !S || S.amount < 1) return
|
||||
S.use(1)
|
||||
user << "\blue Girders reinforced!"
|
||||
new/obj/structure/girder/reinforced( src.loc )
|
||||
del(src)
|
||||
if(S.use(1))
|
||||
user << "<span class='notice'>Girders reinforced!</span>"
|
||||
new/obj/structure/girder/reinforced( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
if(S.sheettype)
|
||||
|
||||
@@ -121,7 +121,8 @@
|
||||
return
|
||||
|
||||
//window placing begin
|
||||
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) )
|
||||
else if(istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass))
|
||||
var/obj/item/stack/sheet/ST = W
|
||||
var/dir_to_set = 1
|
||||
if(loc == user.loc)
|
||||
dir_to_set = user.dir
|
||||
@@ -146,24 +147,22 @@
|
||||
return
|
||||
user << "<span class='notice'>You start placing the window.</span>"
|
||||
if(do_after(user,20))
|
||||
if(!src) return //Grille destroyed while waiting
|
||||
for(var/obj/structure/window/WINDOW in loc)
|
||||
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
|
||||
user << "<span class='notice'>There is already a window facing this way there.</span>"
|
||||
return
|
||||
var/obj/structure/window/WD
|
||||
if(istype(W,/obj/item/stack/sheet/rglass))
|
||||
WD = new/obj/structure/window/reinforced(loc) //reinforced window
|
||||
else
|
||||
WD = new/obj/structure/window/basic(loc) //normal window
|
||||
WD.dir = dir_to_set
|
||||
WD.ini_dir = dir_to_set
|
||||
WD.anchored = 0
|
||||
WD.state = 0
|
||||
var/obj/item/stack/ST = W
|
||||
ST.use(1)
|
||||
user << "<span class='notice'>You place the [WD] on [src].</span>"
|
||||
WD.update_icon()
|
||||
if (ST.use(1))
|
||||
var/obj/structure/window/WD
|
||||
if(istype(W, /obj/item/stack/sheet/rglass))
|
||||
WD = new/obj/structure/window/reinforced(loc) //reinforced window
|
||||
else
|
||||
WD = new/obj/structure/window/basic(loc) //normal window
|
||||
WD.dir = dir_to_set
|
||||
WD.ini_dir = dir_to_set
|
||||
WD.anchored = 0
|
||||
WD.state = 0
|
||||
user << "<span class='notice'>You place the [WD] on [src].</span>"
|
||||
WD.update_icon()
|
||||
return
|
||||
//window placing end
|
||||
|
||||
|
||||
@@ -109,36 +109,33 @@ obj/structure/windoor_assembly/Del()
|
||||
//Adding plasteel makes the assembly a secure windoor assembly. Step 2 (optional) complete.
|
||||
else if(istype(W, /obj/item/stack/rods) && !secure)
|
||||
var/obj/item/stack/rods/R = W
|
||||
if(R.amount < 4)
|
||||
user << "\red You need more rods to do this."
|
||||
if(R.get_amount() < 4)
|
||||
user << "<span class='warning'>You need more rods to do this.</span>"
|
||||
return
|
||||
user << "\blue You start to reinforce the windoor with rods."
|
||||
user << "<span class='notice'>You start to reinforce the windoor with rods.</span>"
|
||||
|
||||
if(do_after(user,40))
|
||||
if(!src) return
|
||||
|
||||
R.use(4)
|
||||
user << "\blue You reinforce the windoor."
|
||||
src.secure = "secure_"
|
||||
if(src.anchored)
|
||||
src.name = "Secure Anchored Windoor Assembly"
|
||||
else
|
||||
src.name = "Secure Windoor Assembly"
|
||||
if(do_after(user,40) && !secure)
|
||||
if (R.use(4))
|
||||
user << "<span class='notice'>You reinforce the windoor.</span>"
|
||||
src.secure = "secure_"
|
||||
if(src.anchored)
|
||||
src.name = "Secure Anchored Windoor Assembly"
|
||||
else
|
||||
src.name = "Secure Windoor Assembly"
|
||||
|
||||
//Adding cable to the assembly. Step 5 complete.
|
||||
else if(istype(W, /obj/item/stack/cable_coil) && anchored)
|
||||
user.visible_message("[user] wires the windoor assembly.", "You start to wire the windoor assembly.")
|
||||
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
if(do_after(user, 40))
|
||||
if(!src) return
|
||||
var/obj/item/stack/cable_coil/CC = W
|
||||
CC.use(1)
|
||||
user << "\blue You wire the windoor!"
|
||||
src.state = "02"
|
||||
if(src.secure)
|
||||
src.name = "Secure Wired Windoor Assembly"
|
||||
else
|
||||
src.name = "Wired Windoor Assembly"
|
||||
if (CC.use(1))
|
||||
user << "<span class='notice'>You wire the windoor!</span>"
|
||||
src.state = "02"
|
||||
if(src.secure)
|
||||
src.name = "Secure Wired Windoor Assembly"
|
||||
else
|
||||
src.name = "Wired Windoor Assembly"
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user