mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-15 18:14:22 +01:00
RCD QoL buffs; windows and girders (#20903)
* RCDs have a Toggle Window Type verb You can now toggle the type of glass built in the Grilles and Windows mode, between normal and reinforced glass. Reinfored glass costs more. Also, removed a random line implying RCDs were banned on shuttles, except it didn't actually work or do anything. * Girders can be deconned and finished with an RCD * Moves low ammo message
This commit is contained in:
@@ -30,6 +30,8 @@ RCD
|
||||
var/mode = 1
|
||||
var/canRturf = 0
|
||||
var/airlock_type = /obj/machinery/door/airlock
|
||||
var/window_type = /obj/structure/window/fulltile
|
||||
|
||||
var/advanced_airlock_setting = 1 //Set to 1 if you want more paintjobs available
|
||||
var/sheetmultiplier = 4 //Controls the amount of matter added for each glass/metal sheet, triple for plasteel
|
||||
var/plasteelmultiplier = 3 //Plasteel is worth 3 times more than glass or metal
|
||||
@@ -42,8 +44,11 @@ RCD
|
||||
var/wallcost = 16
|
||||
var/floorcost = 2
|
||||
var/grillecost = 4
|
||||
var/girderupgradecost = 8
|
||||
var/windowcost = 8
|
||||
var/reinforcedwindowcost = 12
|
||||
var/airlockcost = 16
|
||||
var/decongirdercost = 13
|
||||
var/deconwallcost = 26
|
||||
var/deconfloorcost = 33
|
||||
var/decongrillecost = 4
|
||||
@@ -57,22 +62,37 @@ RCD
|
||||
var/grilledelay = 40
|
||||
var/windowdelay = 40
|
||||
var/airlockdelay = 50
|
||||
var/decongirderdelay = 20
|
||||
var/deconwalldelay = 40
|
||||
var/deconfloordelay = 50
|
||||
var/decongrilledelay = null //as rapid as wirecutters
|
||||
var/deconwindowdelay = 50
|
||||
var/deconairlockdelay = 50
|
||||
|
||||
var/no_ammo_message = ""
|
||||
|
||||
/obj/item/weapon/rcd/New()
|
||||
..()
|
||||
no_ammo_message = "<span class='warning'>The \'Low Ammo\' light on \the [src] blinks yellow.</span>"
|
||||
var/no_ammo_message = "<span class='warning'>The \'Low Ammo\' light on \
|
||||
the RCD blinks yellow.</span>"
|
||||
|
||||
/obj/item/weapon/rcd/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] sets the RCD to 'Wall' and points it down \his throat! It looks like \he's trying to commit suicide..</span>")
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/weapon/rcd/verb/toggle_window_type()
|
||||
set name = "Toggle Window Type"
|
||||
set category = "Object"
|
||||
set src in usr // What does this do?
|
||||
|
||||
var window_type_name
|
||||
|
||||
if (window_type == /obj/structure/window/fulltile)
|
||||
window_type = /obj/structure/window/reinforced/fulltile
|
||||
window_type_name = "reinforced glass"
|
||||
else
|
||||
window_type = /obj/structure/window/fulltile
|
||||
window_type_name = "glass"
|
||||
|
||||
usr << "<span class='notice'>You change \the [src]'s window mode \
|
||||
to [window_type_name].</span>"
|
||||
|
||||
/obj/item/weapon/rcd/verb/change_airlock_access()
|
||||
set name = "Change Airlock Access"
|
||||
set category = "Object"
|
||||
@@ -218,6 +238,7 @@ RCD
|
||||
|
||||
/obj/item/weapon/rcd/New()
|
||||
..()
|
||||
|
||||
desc = "An RCD. It currently holds [matter]/[max_matter] matter-units."
|
||||
src.spark_system = new /datum/effect_system/spark_spread
|
||||
spark_system.set_up(5, 0, src)
|
||||
@@ -229,7 +250,7 @@ RCD
|
||||
qdel(spark_system)
|
||||
spark_system = null
|
||||
rcd_list -= src
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if(iscyborg(user)) //Make sure cyborgs can't load their RCDs
|
||||
@@ -302,9 +323,9 @@ RCD
|
||||
|
||||
/obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity)
|
||||
if(!proximity) return 0
|
||||
if(istype(A,/area/shuttle)||istype(A,/turf/open/space/transit))
|
||||
if(istype(A,/turf/open/space/transit))
|
||||
return 0
|
||||
if(!(isturf(A) || istype(A, /obj/machinery/door/airlock) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/window)))
|
||||
if(!(isturf(A) || istype(A, /obj/machinery/door/airlock) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/window) || istype(A, /obj/structure/girder)))
|
||||
return 0
|
||||
|
||||
switch(mode)
|
||||
@@ -331,6 +352,21 @@ RCD
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/structure/girder))
|
||||
var/turf/open/floor/F = get_turf(A)
|
||||
if(checkResource(girderupgradecost, user))
|
||||
user << "<span class='notice'>You start finishing the \
|
||||
wall...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, walldelay, target = A))
|
||||
if(!istype(A)) return 0
|
||||
if(!useResource(girderupgradecost, user)) return 0
|
||||
activate()
|
||||
qdel(A)
|
||||
F.ChangeTurf(/turf/closed/wall)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(2)
|
||||
if(isfloorturf(A))
|
||||
if(checkResource(airlockcost, user))
|
||||
@@ -436,6 +472,17 @@ RCD
|
||||
return 1
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/structure/girder))
|
||||
if(useResource(decongirdercost, user))
|
||||
user << "<span class='notice'>You start deconstructing \
|
||||
[A]...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, decongirderdelay, target = A))
|
||||
if(!useResource(decongirdercost, user)) return 0
|
||||
activate()
|
||||
qdel(A)
|
||||
return 1
|
||||
|
||||
if (4)
|
||||
if(isfloorturf(A))
|
||||
if(checkResource(grillecost, user))
|
||||
@@ -455,14 +502,24 @@ RCD
|
||||
return 0
|
||||
return 0
|
||||
if(istype(A, /obj/structure/grille))
|
||||
if(checkResource(windowcost, user))
|
||||
user << "<span class='notice'>You start building a window...</span>"
|
||||
var wname = "window?"
|
||||
var cost = 0
|
||||
if (window_type == /obj/structure/window/fulltile)
|
||||
cost = windowcost
|
||||
wname = "window"
|
||||
else if (window_type == /obj/structure/window/reinforced/fulltile)
|
||||
cost = reinforcedwindowcost
|
||||
wname = "reinforced window"
|
||||
|
||||
if(checkResource(cost, user))
|
||||
user << "<span class='notice'>You start building a \
|
||||
[wname]...</span>"
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
if(do_after(user, windowdelay, target = A))
|
||||
if(locate(/obj/structure/window) in A.loc) return 0
|
||||
if(!useResource(windowcost, user)) return 0
|
||||
if(!useResource(cost, user)) return 0
|
||||
activate()
|
||||
var/obj/structure/window/WD = new/obj/structure/window/fulltile(A.loc)
|
||||
var /obj/structure/window/WD = new window_type(A.loc)
|
||||
WD.anchored = 1
|
||||
return 1
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user