mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
EngiMarket Part Four - Ranged RCD and Rapid Lighting Device (RLD) (#25263)
Two new items, one brand new, the other an RCD that works at range without any other bells and whistles. The RLD allows you to create floor and wall lighting along with temporary (they use fuel like flares) glowsticks at range. It can also deconstruct lights. The best part of this feature (besides the visual "ammo" updating icons) is the ability to select absolutely any color you desire. 🆑 Robustin add: Ranged RCD added to the game add: Rapid Lighting Device (also ranged) has been added. It can create wall, floor, and temporary lights of any color you desire. /🆑
This commit is contained in:
@@ -145,7 +145,7 @@
|
|||||||
/area/ruin/unpowered)
|
/area/ruin/unpowered)
|
||||||
"u" = (
|
"u" = (
|
||||||
/obj/structure/closet/crate/engineering,
|
/obj/structure/closet/crate/engineering,
|
||||||
/obj/item/weapon/rcd/loaded,
|
/obj/item/weapon/construction/rcd/loaded,
|
||||||
/turf/open/floor/engine/cult{
|
/turf/open/floor/engine/cult{
|
||||||
baseturf = /turf/open/floor/plating/lava/smooth
|
baseturf = /turf/open/floor/plating/lava/smooth
|
||||||
},
|
},
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -198,6 +198,9 @@
|
|||||||
if(target == C.internal)
|
if(target == C.internal)
|
||||||
button.icon_state = "template_active"
|
button.icon_state = "template_active"
|
||||||
|
|
||||||
|
/datum/action/item_action/pick_color
|
||||||
|
name = "Choose A Color"
|
||||||
|
|
||||||
/datum/action/item_action/toggle_mister
|
/datum/action/item_action/toggle_mister
|
||||||
name = "Toggle Mister"
|
name = "Toggle Mister"
|
||||||
|
|
||||||
|
|||||||
@@ -445,10 +445,10 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
|
|||||||
/atom/proc/ratvar_act()
|
/atom/proc/ratvar_act()
|
||||||
return
|
return
|
||||||
|
|
||||||
/atom/proc/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
/atom/proc/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/atom/proc/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
/atom/proc/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/atom/proc/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
|
/atom/proc/storage_contents_dump_act(obj/item/weapon/storage/src_object, mob/user)
|
||||||
|
|||||||
@@ -197,8 +197,8 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
for(var/I in GLOB.rcd_list)
|
for(var/I in GLOB.rcd_list)
|
||||||
if(!istype(I, /obj/item/weapon/rcd/borg)) //Ensures that cyborg RCDs are spared.
|
if(!istype(I, /obj/item/weapon/construction/rcd/borg)) //Ensures that cyborg RCDs are spared.
|
||||||
var/obj/item/weapon/rcd/RCD = I
|
var/obj/item/weapon/construction/rcd/RCD = I
|
||||||
RCD.detonate_pulse()
|
RCD.detonate_pulse()
|
||||||
|
|
||||||
to_chat(src, "<span class='warning'>RCD detonation pulse emitted.</span>")
|
to_chat(src, "<span class='warning'>RCD detonation pulse emitted.</span>")
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ GLOBAL_VAR_INIT(hsboxspawn, TRUE)
|
|||||||
if("hsbrcd")
|
if("hsbrcd")
|
||||||
if(!GLOB.hsboxspawn) return
|
if(!GLOB.hsboxspawn) return
|
||||||
|
|
||||||
new/obj/item/weapon/rcd/combat(usr.loc)
|
new/obj/item/weapon/construction/rcd/combat(usr.loc)
|
||||||
|
|
||||||
//
|
//
|
||||||
// New sandbox airlock maker
|
// New sandbox airlock maker
|
||||||
|
|||||||
@@ -1540,13 +1540,13 @@
|
|||||||
ae.loc = src.loc
|
ae.loc = src.loc
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
/obj/machinery/door/airlock/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
/obj/machinery/door/airlock/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||||
switch(the_rcd.mode)
|
switch(the_rcd.mode)
|
||||||
if(RCD_DECONSTRUCT)
|
if(RCD_DECONSTRUCT)
|
||||||
return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 32)
|
return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 32)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/obj/machinery/door/airlock/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
/obj/machinery/door/airlock/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||||
switch(passed_mode)
|
switch(passed_mode)
|
||||||
if(RCD_DECONSTRUCT)
|
if(RCD_DECONSTRUCT)
|
||||||
to_chat(user, "<span class='notice'>You deconstruct the airlock.</span>")
|
to_chat(user, "<span class='notice'>You deconstruct the airlock.</span>")
|
||||||
|
|||||||
@@ -1052,7 +1052,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
|||||||
icon_state = "engivend"
|
icon_state = "engivend"
|
||||||
icon_deny = "engivend-deny"
|
icon_deny = "engivend-deny"
|
||||||
req_access_txt = "11" //Engineering Equipment access
|
req_access_txt = "11" //Engineering Equipment access
|
||||||
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, /obj/item/device/geiger_counter = 5)
|
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/construction/rcd/loaded = 3, /obj/item/device/geiger_counter = 5)
|
||||||
contraband = list(/obj/item/weapon/stock_parts/cell/potato = 3)
|
contraband = list(/obj/item/weapon/stock_parts/cell/potato = 3)
|
||||||
premium = list(/obj/item/weapon/storage/belt/utility = 3)
|
premium = list(/obj/item/weapon/storage/belt/utility = 3)
|
||||||
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50)
|
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 50)
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
|
#define GLOW_MODE 3
|
||||||
|
#define LIGHT_MODE 2
|
||||||
|
#define REMOVE_MODE 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CONTAINS:
|
CONTAINS:
|
||||||
RCD
|
RCD
|
||||||
|
ARCD
|
||||||
*/
|
*/
|
||||||
/obj/item/weapon/rcd
|
|
||||||
name = "rapid-construction-device (RCD)"
|
obj/item/weapon/construction
|
||||||
desc = "A device used to rapidly build and deconstruct walls and floors."
|
|
||||||
icon = 'icons/obj/tools.dmi'
|
|
||||||
icon_state = "rcd"
|
|
||||||
opacity = 0
|
opacity = 0
|
||||||
density = 0
|
density = 0
|
||||||
anchored = 0
|
anchored = 0
|
||||||
@@ -25,30 +25,114 @@ RCD
|
|||||||
resistance_flags = FIRE_PROOF
|
resistance_flags = FIRE_PROOF
|
||||||
var/datum/effect_system/spark_spread/spark_system
|
var/datum/effect_system/spark_spread/spark_system
|
||||||
var/matter = 0
|
var/matter = 0
|
||||||
var/max_matter = 160
|
var/max_matter = 100
|
||||||
var/working = 0
|
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
|
||||||
|
var/no_ammo_message = "<span class='warning'>The \'Low Ammo\' light on the device blinks yellow.</span>"
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/Initialize()
|
||||||
|
..()
|
||||||
|
desc = "A [src]. It currently holds [matter]/[max_matter] matter-units."
|
||||||
|
spark_system = new /datum/effect_system/spark_spread
|
||||||
|
spark_system.set_up(5, 0, src)
|
||||||
|
spark_system.attach(src)
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/Destroy()
|
||||||
|
QDEL_NULL(spark_system)
|
||||||
|
. = ..()
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/attackby(obj/item/weapon/W, mob/user, params)
|
||||||
|
if(iscyborg(user))
|
||||||
|
return
|
||||||
|
var/loaded = 0
|
||||||
|
if(istype(W, /obj/item/weapon/rcd_ammo))
|
||||||
|
var/obj/item/weapon/rcd_ammo/R = W
|
||||||
|
if((matter + R.ammoamt) > max_matter)
|
||||||
|
to_chat(user, "<span class='warning'>The [src] can't hold any more matter-units!</span>")
|
||||||
|
return
|
||||||
|
qdel(W)
|
||||||
|
matter += R.ammoamt
|
||||||
|
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||||
|
loaded = 1
|
||||||
|
else if(istype(W, /obj/item/stack/sheet/metal) || istype(W, /obj/item/stack/sheet/glass))
|
||||||
|
loaded = loadwithsheets(W, sheetmultiplier, user)
|
||||||
|
else if(istype(W, /obj/item/stack/sheet/plasteel))
|
||||||
|
loaded = loadwithsheets(W, plasteelmultiplier*sheetmultiplier, user) //Plasteel is worth 3 times more than glass or metal
|
||||||
|
if(loaded)
|
||||||
|
to_chat(user, "<span class='notice'>The [src] now holds [matter]/[max_matter] matter-units.</span>")
|
||||||
|
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
|
||||||
|
else
|
||||||
|
return ..()
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/proc/loadwithsheets(obj/item/stack/sheet/S, value, mob/user)
|
||||||
|
var/maxsheets = round((max_matter-matter)/value) //calculate the max number of sheets that will fit in RCD
|
||||||
|
if(maxsheets > 0)
|
||||||
|
var/amount_to_use = min(S.amount, maxsheets)
|
||||||
|
S.use(amount_to_use)
|
||||||
|
matter += value*amount_to_use
|
||||||
|
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||||
|
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the [src]. </span>")
|
||||||
|
return 1
|
||||||
|
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the [src]!")
|
||||||
|
return 0
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/proc/activate()
|
||||||
|
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/attack_self(mob/user)
|
||||||
|
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||||
|
if(prob(20))
|
||||||
|
spark_system.start()
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/proc/useResource(amount, mob/user)
|
||||||
|
if(matter < amount)
|
||||||
|
if(user)
|
||||||
|
to_chat(user, no_ammo_message)
|
||||||
|
return 0
|
||||||
|
matter -= amount
|
||||||
|
desc = "A [src]. It currently holds [matter]/[max_matter] matter-units."
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/proc/checkResource(amount, mob/user)
|
||||||
|
. = matter >= amount
|
||||||
|
if(!. && user)
|
||||||
|
to_chat(user, no_ammo_message)
|
||||||
|
return .
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/proc/range_check(atom/A, mob/user)
|
||||||
|
if(!(A in view(7, get_turf(user))))
|
||||||
|
to_chat(user, "<span class='warning'>The \'Out of Range\' light on the [src] blinks red.</span>")
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/proc/prox_check(proximity)
|
||||||
|
if(!proximity)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/rcd
|
||||||
|
name = "rapid-construction-device (RCD)"
|
||||||
|
desc = "A device used to rapidly build and deconstruct walls and floors."
|
||||||
|
icon = 'icons/obj/tools.dmi'
|
||||||
|
icon_state = "rcd"
|
||||||
|
max_matter = 160
|
||||||
var/mode = 1
|
var/mode = 1
|
||||||
var/canRturf = 0
|
var/canRturf = 0
|
||||||
|
var/ranged = FALSE
|
||||||
var/airlock_type = /obj/machinery/door/airlock
|
var/airlock_type = /obj/machinery/door/airlock
|
||||||
var/window_type = /obj/structure/window/fulltile
|
var/window_type = /obj/structure/window/fulltile
|
||||||
|
|
||||||
var/advanced_airlock_setting = 1 //Set to 1 if you want more paintjobs available
|
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
|
|
||||||
|
|
||||||
var/list/conf_access = null
|
var/list/conf_access = null
|
||||||
var/use_one_access = 0 //If the airlock should require ALL or only ONE of the listed accesses.
|
var/use_one_access = 0 //If the airlock should require ALL or only ONE of the listed accesses.
|
||||||
|
|
||||||
var/delay_mod = 1
|
var/delay_mod = 1
|
||||||
|
|
||||||
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)
|
/obj/item/weapon/construction/rcd/suicide_act(mob/user)
|
||||||
user.visible_message("<span class='suicide'>[user] sets the RCD to 'Wall' and points it down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide..</span>")
|
user.visible_message("<span class='suicide'>[user] sets the RCD to 'Wall' and points it down [user.p_their()] throat! It looks like [user.p_theyre()] trying to commit suicide..</span>")
|
||||||
return (BRUTELOSS)
|
return (BRUTELOSS)
|
||||||
|
|
||||||
/obj/item/weapon/rcd/verb/toggle_window_type()
|
/obj/item/weapon/construction/rcd/verb/toggle_window_type()
|
||||||
set name = "Toggle Window Type"
|
set name = "Toggle Window Type"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
set src in usr // What does this do?
|
set src in usr // What does this do?
|
||||||
@@ -64,7 +148,7 @@ RCD
|
|||||||
|
|
||||||
to_chat(usr, "<span class='notice'>You change \the [src]'s window mode to [window_type_name].</span>")
|
to_chat(usr, "<span class='notice'>You change \the [src]'s window mode to [window_type_name].</span>")
|
||||||
|
|
||||||
/obj/item/weapon/rcd/verb/change_airlock_access()
|
/obj/item/weapon/construction/rcd/verb/change_airlock_access()
|
||||||
set name = "Change Airlock Access"
|
set name = "Change Airlock Access"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
set src in usr
|
set src in usr
|
||||||
@@ -79,7 +163,6 @@ RCD
|
|||||||
var/t1 = text("")
|
var/t1 = text("")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(use_one_access)
|
if(use_one_access)
|
||||||
t1 += "Restriction Type: <a href='?src=\ref[src];access=one'>At least one access required</a><br>"
|
t1 += "Restriction Type: <a href='?src=\ref[src];access=one'>At least one access required</a><br>"
|
||||||
else
|
else
|
||||||
@@ -114,7 +197,7 @@ RCD
|
|||||||
popup.open()
|
popup.open()
|
||||||
onclose(usr, "airlock")
|
onclose(usr, "airlock")
|
||||||
|
|
||||||
/obj/item/weapon/rcd/Topic(href, href_list)
|
/obj/item/weapon/construction/rcd/Topic(href, href_list)
|
||||||
..()
|
..()
|
||||||
if (usr.stat || usr.restrained())
|
if (usr.stat || usr.restrained())
|
||||||
return
|
return
|
||||||
@@ -127,7 +210,7 @@ RCD
|
|||||||
|
|
||||||
change_airlock_access()
|
change_airlock_access()
|
||||||
|
|
||||||
/obj/item/weapon/rcd/proc/toggle_access(acc)
|
/obj/item/weapon/construction/rcd/proc/toggle_access(acc)
|
||||||
if (acc == "all")
|
if (acc == "all")
|
||||||
conf_access = null
|
conf_access = null
|
||||||
else if(acc == "one")
|
else if(acc == "one")
|
||||||
@@ -145,7 +228,7 @@ RCD
|
|||||||
if (!conf_access.len)
|
if (!conf_access.len)
|
||||||
conf_access = null
|
conf_access = null
|
||||||
|
|
||||||
/obj/item/weapon/rcd/verb/change_airlock_setting()
|
/obj/item/weapon/construction/rcd/verb/change_airlock_setting()
|
||||||
set name = "Change Airlock Setting"
|
set name = "Change Airlock Setting"
|
||||||
set category = "Object"
|
set category = "Object"
|
||||||
set src in usr
|
set src in usr
|
||||||
@@ -207,59 +290,16 @@ RCD
|
|||||||
airlock_type = /obj/machinery/door/airlock
|
airlock_type = /obj/machinery/door/airlock
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/rcd/New()
|
/obj/item/weapon/construction/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)
|
|
||||||
spark_system.attach(src)
|
|
||||||
GLOB.rcd_list += src
|
GLOB.rcd_list += src
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/rcd/Destroy()
|
||||||
/obj/item/weapon/rcd/Destroy()
|
|
||||||
qdel(spark_system)
|
|
||||||
spark_system = null
|
|
||||||
GLOB.rcd_list -= src
|
GLOB.rcd_list -= src
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user, params)
|
/obj/item/weapon/construction/rcd/attack_self(mob/user)
|
||||||
if(iscyborg(user)) //Make sure cyborgs can't load their RCDs
|
..()
|
||||||
return
|
|
||||||
var/loaded = 0
|
|
||||||
if(istype(W, /obj/item/weapon/rcd_ammo))
|
|
||||||
var/obj/item/weapon/rcd_ammo/R = W
|
|
||||||
if((matter + R.ammoamt) > max_matter)
|
|
||||||
to_chat(user, "<span class='warning'>The RCD can't hold any more matter-units!</span>")
|
|
||||||
return
|
|
||||||
qdel(W)
|
|
||||||
matter += R.ammoamt
|
|
||||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
|
||||||
loaded = 1
|
|
||||||
else if(istype(W, /obj/item/stack/sheet/metal) || istype(W, /obj/item/stack/sheet/glass))
|
|
||||||
loaded = loadwithsheets(W, sheetmultiplier, user)
|
|
||||||
else if(istype(W, /obj/item/stack/sheet/plasteel))
|
|
||||||
loaded = loadwithsheets(W, plasteelmultiplier*sheetmultiplier, user) //Plasteel is worth 3 times more than glass or metal
|
|
||||||
if(loaded)
|
|
||||||
to_chat(user, "<span class='notice'>The RCD now holds [matter]/[max_matter] matter-units.</span>")
|
|
||||||
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
|
|
||||||
else
|
|
||||||
return ..()
|
|
||||||
|
|
||||||
/obj/item/weapon/rcd/proc/loadwithsheets(obj/item/stack/sheet/S, value, mob/user)
|
|
||||||
var/maxsheets = round((max_matter-matter)/value) //calculate the max number of sheets that will fit in RCD
|
|
||||||
if(maxsheets > 0)
|
|
||||||
var/amount_to_use = min(S.amount, maxsheets)
|
|
||||||
S.use(amount_to_use)
|
|
||||||
matter += value*amount_to_use
|
|
||||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
|
||||||
to_chat(user, "<span class='notice'>You insert [amount_to_use] [S.name] sheets into the RCD. </span>")
|
|
||||||
return 1
|
|
||||||
to_chat(user, "<span class='warning'>You can't insert any more [S.name] sheets into the RCD!")
|
|
||||||
return 0
|
|
||||||
|
|
||||||
/obj/item/weapon/rcd/attack_self(mob/user)
|
|
||||||
//Change the mode
|
|
||||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
|
||||||
switch(mode)
|
switch(mode)
|
||||||
if(1)
|
if(1)
|
||||||
mode = 2
|
mode = 2
|
||||||
@@ -274,16 +314,14 @@ RCD
|
|||||||
mode = 1
|
mode = 1
|
||||||
to_chat(user, "<span class='notice'>You change RCD's mode to 'Floor & Walls'.</span>")
|
to_chat(user, "<span class='notice'>You change RCD's mode to 'Floor & Walls'.</span>")
|
||||||
|
|
||||||
if(prob(20))
|
/obj/item/weapon/construction/rcd/proc/target_check(atom/A, mob/user) // only returns true for stuff the device can actually work with
|
||||||
src.spark_system.start()
|
if((isturf(A) && A.density && mode==RCD_DECONSTRUCT) || (isturf(A) && !A.density) || (istype(A, /obj/machinery/door/airlock) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/grille) || (istype(A, /obj/structure/window) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/girder))
|
||||||
|
return TRUE
|
||||||
/obj/item/weapon/rcd/proc/activate()
|
else
|
||||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity)
|
|
||||||
if(!proximity)
|
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/rcd/afterattack(atom/A, mob/user, proximity)
|
||||||
|
prox_check()
|
||||||
var/list/rcd_results = A.rcd_vals(user, src)
|
var/list/rcd_results = A.rcd_vals(user, src)
|
||||||
if(!rcd_results)
|
if(!rcd_results)
|
||||||
return FALSE
|
return FALSE
|
||||||
@@ -295,40 +333,26 @@ RCD
|
|||||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/obj/item/weapon/rcd/proc/useResource(amount, mob/user)
|
|
||||||
if(matter < amount)
|
|
||||||
if(user)
|
|
||||||
to_chat(user, no_ammo_message)
|
|
||||||
return 0
|
|
||||||
matter -= amount
|
|
||||||
desc = "An RCD. It currently holds [matter]/[max_matter] matter-units."
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/obj/item/weapon/rcd/proc/checkResource(amount, mob/user)
|
/obj/item/weapon/construction/rcd/proc/detonate_pulse()
|
||||||
. = matter >= amount
|
|
||||||
if(!. && user)
|
|
||||||
to_chat(user, no_ammo_message)
|
|
||||||
return .
|
|
||||||
|
|
||||||
/obj/item/weapon/rcd/proc/detonate_pulse()
|
|
||||||
audible_message("<span class='danger'><b>[src] begins to vibrate and \
|
audible_message("<span class='danger'><b>[src] begins to vibrate and \
|
||||||
buzz loudly!</b></span>","<span class='danger'><b>[src] begins \
|
buzz loudly!</b></span>","<span class='danger'><b>[src] begins \
|
||||||
vibrating violently!</b></span>")
|
vibrating violently!</b></span>")
|
||||||
// 5 seconds to get rid of it
|
// 5 seconds to get rid of it
|
||||||
addtimer(CALLBACK(src, .proc/detonate_pulse_explode), 50)
|
addtimer(CALLBACK(src, .proc/detonate_pulse_explode), 50)
|
||||||
|
|
||||||
/obj/item/weapon/rcd/proc/detonate_pulse_explode()
|
/obj/item/weapon/construction/rcd/proc/detonate_pulse_explode()
|
||||||
explosion(src, 0, 0, 3, 1, flame_range = 1)
|
explosion(src, 0, 0, 3, 1, flame_range = 1)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/rcd/borg/New()
|
/obj/item/weapon/construction/rcd/borg/New()
|
||||||
..()
|
..()
|
||||||
no_ammo_message = "<span class='warning'>Insufficient charge.</span>"
|
no_ammo_message = "<span class='warning'>Insufficient charge.</span>"
|
||||||
desc = "A device used to rapidly build walls and floors."
|
desc = "A device used to rapidly build walls and floors."
|
||||||
canRturf = 1
|
canRturf = 1
|
||||||
|
|
||||||
/obj/item/weapon/rcd/borg/useResource(amount, mob/user)
|
/obj/item/weapon/construction/rcd/borg/useResource(amount, mob/user)
|
||||||
if(!iscyborg(user))
|
if(!iscyborg(user))
|
||||||
return 0
|
return 0
|
||||||
var/mob/living/silicon/robot/borgy = user
|
var/mob/living/silicon/robot/borgy = user
|
||||||
@@ -341,7 +365,7 @@ RCD
|
|||||||
to_chat(user, no_ammo_message)
|
to_chat(user, no_ammo_message)
|
||||||
return .
|
return .
|
||||||
|
|
||||||
/obj/item/weapon/rcd/borg/checkResource(amount, mob/user)
|
/obj/item/weapon/construction/rcd/borg/checkResource(amount, mob/user)
|
||||||
if(!iscyborg(user))
|
if(!iscyborg(user))
|
||||||
return 0
|
return 0
|
||||||
var/mob/living/silicon/robot/borgy = user
|
var/mob/living/silicon/robot/borgy = user
|
||||||
@@ -354,10 +378,10 @@ RCD
|
|||||||
to_chat(user, no_ammo_message)
|
to_chat(user, no_ammo_message)
|
||||||
return .
|
return .
|
||||||
|
|
||||||
/obj/item/weapon/rcd/loaded
|
/obj/item/weapon/construction/rcd/loaded
|
||||||
matter = 160
|
matter = 160
|
||||||
|
|
||||||
/obj/item/weapon/rcd/combat
|
/obj/item/weapon/construction/rcd/combat
|
||||||
name = "industrial RCD"
|
name = "industrial RCD"
|
||||||
max_matter = 500
|
max_matter = 500
|
||||||
matter = 500
|
matter = 500
|
||||||
@@ -378,7 +402,188 @@ RCD
|
|||||||
ammoamt = 160
|
ammoamt = 160
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/rcd/admin
|
/obj/item/weapon/construction/rcd/admin
|
||||||
name = "admin RCD"
|
name = "admin RCD"
|
||||||
max_matter = INFINITY
|
max_matter = INFINITY
|
||||||
matter = INFINITY
|
matter = INFINITY
|
||||||
|
|
||||||
|
|
||||||
|
// Ranged RCD
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/rcd/arcd
|
||||||
|
name = "advanced rapid-construction-device (ARCD)"
|
||||||
|
desc = "A prototype RCD with ranged capability and extended capacity"
|
||||||
|
max_matter = 300
|
||||||
|
matter = 300
|
||||||
|
delay_mod = 0.6
|
||||||
|
ranged = TRUE
|
||||||
|
icon_state = "arcd"
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/rcd/arcd/afterattack(atom/A, mob/user)
|
||||||
|
range_check(A,user)
|
||||||
|
if(target_check(A,user))
|
||||||
|
user.Beam(A,icon_state="rped_upgrade",time=30)
|
||||||
|
..()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// RAPID LIGHTING DEVICE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/rld
|
||||||
|
name = "rapid-light-device (RLD)"
|
||||||
|
desc = "A device used to rapidly provide lighting sources to an area."
|
||||||
|
icon = 'icons/obj/tools.dmi'
|
||||||
|
icon_state = "rld-5"
|
||||||
|
matter = 200
|
||||||
|
max_matter = 200
|
||||||
|
var/mode = LIGHT_MODE
|
||||||
|
actions_types = list(/datum/action/item_action/pick_color)
|
||||||
|
|
||||||
|
var/wallcost = 10
|
||||||
|
var/floorcost = 15
|
||||||
|
var/launchcost = 5
|
||||||
|
var/deconcost = 10
|
||||||
|
|
||||||
|
var/walldelay = 10
|
||||||
|
var/floordelay = 10
|
||||||
|
var/decondelay = 15
|
||||||
|
|
||||||
|
var/color_choice = null
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/rld/ui_action_click(mob/user, var/datum/action/A)
|
||||||
|
if(istype(A, /datum/action/item_action/pick_color))
|
||||||
|
color_choice = input(user,"Choose Color") as color
|
||||||
|
else
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/rld/update_icon()
|
||||||
|
icon_state = "rld-[round(matter/35)]"
|
||||||
|
..()
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/rld/attack_self(mob/user)
|
||||||
|
..()
|
||||||
|
switch(mode)
|
||||||
|
if(REMOVE_MODE)
|
||||||
|
mode = LIGHT_MODE
|
||||||
|
to_chat(user, "<span class='notice'>You change RLD's mode to 'Permanent Light Construction'.</span>")
|
||||||
|
if(LIGHT_MODE)
|
||||||
|
mode = GLOW_MODE
|
||||||
|
to_chat(user, "<span class='notice'>You change RLD's mode to 'Light Launcher'.</span>")
|
||||||
|
if(GLOW_MODE)
|
||||||
|
mode = REMOVE_MODE
|
||||||
|
to_chat(user, "<span class='notice'>You change RLD's mode to 'Deconstruct'.</span>")
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/rld/proc/checkdupes(var/target)
|
||||||
|
. = list()
|
||||||
|
var/turf/checking = get_turf(target)
|
||||||
|
for(var/obj/machinery/light/dupe in checking)
|
||||||
|
if(istype(dupe, /obj/machinery/light))
|
||||||
|
. |= dupe
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/construction/rld/afterattack(atom/A, mob/user)
|
||||||
|
range_check(A,user)
|
||||||
|
var/turf/start = get_turf(src)
|
||||||
|
switch(mode)
|
||||||
|
if(REMOVE_MODE)
|
||||||
|
if(istype(A, /obj/machinery/light/))
|
||||||
|
if(checkResource(deconcost, user))
|
||||||
|
to_chat(user, "<span class='notice'>You start deconstructing [A]...</span>")
|
||||||
|
user.Beam(A,icon_state="nzcrentrs_power",time=15)
|
||||||
|
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||||
|
if(do_after(user, decondelay, target = A))
|
||||||
|
if(!useResource(deconcost, user))
|
||||||
|
return 0
|
||||||
|
activate()
|
||||||
|
qdel(A)
|
||||||
|
return TRUE
|
||||||
|
return FALSE
|
||||||
|
if(LIGHT_MODE)
|
||||||
|
if(iswallturf(A))
|
||||||
|
var/turf/closed/wall/W = A
|
||||||
|
if(checkResource(floorcost, user))
|
||||||
|
to_chat(user, "<span class='notice'>You start building a wall light...</span>")
|
||||||
|
user.Beam(A,icon_state="nzcrentrs_power",time=15)
|
||||||
|
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||||
|
playsound(src.loc, 'sound/effects/light_flicker.ogg', 50, 0)
|
||||||
|
if(do_after(user, floordelay, target = A))
|
||||||
|
if(!istype(W))
|
||||||
|
return FALSE
|
||||||
|
var/list/candidates = list()
|
||||||
|
var/turf/open/winner = null
|
||||||
|
var/winning_dist = null
|
||||||
|
for(var/direction in GLOB.cardinal)
|
||||||
|
var/turf/C = get_step(W, direction)
|
||||||
|
var/list/dupes = checkdupes(C)
|
||||||
|
if(start.CanAtmosPass(C) && !dupes.len)
|
||||||
|
candidates += C
|
||||||
|
if(!candidates.len)
|
||||||
|
to_chat(user, "<span class='warning'>Valid target not found...</span>")
|
||||||
|
playsound(src.loc, 'sound/misc/compiler-failure.ogg', 30, 1)
|
||||||
|
return FALSE
|
||||||
|
for(var/turf/open/O in candidates)
|
||||||
|
if(istype(O))
|
||||||
|
var/x0 = O.x
|
||||||
|
var/y0 = O.y
|
||||||
|
var/contender = cheap_hypotenuse(start.x, start.y, x0, y0)
|
||||||
|
if(!winner)
|
||||||
|
winner = O
|
||||||
|
winning_dist = contender
|
||||||
|
else
|
||||||
|
if(contender < winning_dist) // lower is better
|
||||||
|
winner = O
|
||||||
|
winning_dist = contender
|
||||||
|
activate()
|
||||||
|
if(!useResource(wallcost, user))
|
||||||
|
return FALSE
|
||||||
|
var/light = get_turf(winner)
|
||||||
|
var/align = get_dir(winner, A)
|
||||||
|
var/obj/machinery/light/L = new /obj/machinery/light(light)
|
||||||
|
L.dir = align
|
||||||
|
L.color = color_choice
|
||||||
|
L.light_color = L.color
|
||||||
|
return TRUE
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
if(isfloorturf(A))
|
||||||
|
var/turf/open/floor/F = A
|
||||||
|
if(checkResource(floorcost, user))
|
||||||
|
to_chat(user, "<span class='notice'>You start building a floor light...</span>")
|
||||||
|
user.Beam(A,icon_state="nzcrentrs_power",time=15)
|
||||||
|
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||||
|
playsound(src.loc, 'sound/effects/light_flicker.ogg', 50, 1)
|
||||||
|
if(do_after(user, floordelay, target = A))
|
||||||
|
if(!istype(F))
|
||||||
|
return 0
|
||||||
|
if(!useResource(floorcost, user))
|
||||||
|
return 0
|
||||||
|
activate()
|
||||||
|
var/destination = get_turf(A)
|
||||||
|
var/obj/machinery/light/floor/FL = new /obj/machinery/light/floor(destination)
|
||||||
|
FL.color = color_choice
|
||||||
|
FL.light_color = FL.color
|
||||||
|
return TRUE
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
if(GLOW_MODE)
|
||||||
|
if(useResource(launchcost, user))
|
||||||
|
activate()
|
||||||
|
to_chat(user, "<span class='notice'>You fire a glowstick!</span>")
|
||||||
|
var/obj/item/device/flashlight/glowstick/G = new /obj/item/device/flashlight/glowstick(start)
|
||||||
|
G.color = color_choice
|
||||||
|
G.light_color = G.color
|
||||||
|
G.throw_at(A, 9, 3, user)
|
||||||
|
G.on = TRUE
|
||||||
|
G.update_brightness()
|
||||||
|
return TRUE
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
#undef GLOW_MODE
|
||||||
|
#undef LIGHT_MODE
|
||||||
|
#undef REMOVE_MODE
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
..()
|
..()
|
||||||
for(var/i in 1 to 4)
|
for(var/i in 1 to 4)
|
||||||
new /obj/item/weapon/rcd_ammo(src)
|
new /obj/item/weapon/rcd_ammo(src)
|
||||||
new /obj/item/weapon/rcd(src)
|
new /obj/item/weapon/construction/rcd(src)
|
||||||
|
|
||||||
/obj/structure/closet/crate/science
|
/obj/structure/closet/crate/science
|
||||||
name = "science crate"
|
name = "science crate"
|
||||||
|
|||||||
@@ -396,7 +396,7 @@
|
|||||||
new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1)
|
new/obj/item/stack/sheet/runed_metal/(get_turf(src), 1)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
/obj/structure/girder/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
/obj/structure/girder/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||||
switch(the_rcd.mode)
|
switch(the_rcd.mode)
|
||||||
if(RCD_FLOORWALL)
|
if(RCD_FLOORWALL)
|
||||||
return list("mode" = RCD_FLOORWALL, "delay" = 20, "cost" = 8)
|
return list("mode" = RCD_FLOORWALL, "delay" = 20, "cost" = 8)
|
||||||
@@ -404,7 +404,7 @@
|
|||||||
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 13)
|
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 13)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/obj/structure/girder/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
/obj/structure/girder/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||||
var/turf/T = get_turf(src)
|
var/turf/T = get_turf(src)
|
||||||
switch(passed_mode)
|
switch(passed_mode)
|
||||||
if(RCD_FLOORWALL)
|
if(RCD_FLOORWALL)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
var/grille_type = null
|
var/grille_type = null
|
||||||
var/broken_type = /obj/structure/grille/broken
|
var/broken_type = /obj/structure/grille/broken
|
||||||
|
|
||||||
/obj/structure/grille/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
/obj/structure/grille/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||||
switch(the_rcd.mode)
|
switch(the_rcd.mode)
|
||||||
if(RCD_DECONSTRUCT)
|
if(RCD_DECONSTRUCT)
|
||||||
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 5)
|
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 5)
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
return list("mode" = RCD_WINDOWGRILLE, "delay" = 40, "cost" = 10)
|
return list("mode" = RCD_WINDOWGRILLE, "delay" = 40, "cost" = 10)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/obj/structure/grille/rcd_act(mob/user, var/obj/item/weapon/rcd/the_rcd, passed_mode)
|
/obj/structure/grille/rcd_act(mob/user, var/obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||||
switch(passed_mode)
|
switch(passed_mode)
|
||||||
if(RCD_DECONSTRUCT)
|
if(RCD_DECONSTRUCT)
|
||||||
to_chat(user, "<span class='notice'>You deconstruct the grille.</span>")
|
to_chat(user, "<span class='notice'>You deconstruct the grille.</span>")
|
||||||
|
|||||||
@@ -57,13 +57,13 @@
|
|||||||
if(rods)
|
if(rods)
|
||||||
debris += new /obj/item/stack/rods(src, rods)
|
debris += new /obj/item/stack/rods(src, rods)
|
||||||
|
|
||||||
/obj/structure/window/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
/obj/structure/window/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||||
switch(the_rcd.mode)
|
switch(the_rcd.mode)
|
||||||
if(RCD_DECONSTRUCT)
|
if(RCD_DECONSTRUCT)
|
||||||
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 5)
|
return list("mode" = RCD_DECONSTRUCT, "delay" = 20, "cost" = 5)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/obj/structure/window/rcd_act(mob/user, var/obj/item/weapon/rcd/the_rcd)
|
/obj/structure/window/rcd_act(mob/user, var/obj/item/weapon/construction/rcd/the_rcd)
|
||||||
switch(the_rcd.mode)
|
switch(the_rcd.mode)
|
||||||
if(RCD_DECONSTRUCT)
|
if(RCD_DECONSTRUCT)
|
||||||
to_chat(user, "<span class='notice'>You deconstruct the window.</span>")
|
to_chat(user, "<span class='notice'>You deconstruct the window.</span>")
|
||||||
|
|||||||
@@ -200,7 +200,7 @@
|
|||||||
/turf/open/floor/acid_melt()
|
/turf/open/floor/acid_melt()
|
||||||
ChangeTurf(baseturf)
|
ChangeTurf(baseturf)
|
||||||
|
|
||||||
/turf/open/floor/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
/turf/open/floor/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||||
switch(the_rcd.mode)
|
switch(the_rcd.mode)
|
||||||
if(RCD_FLOORWALL)
|
if(RCD_FLOORWALL)
|
||||||
return list("mode" = RCD_FLOORWALL, "delay" = 20, "cost" = 16)
|
return list("mode" = RCD_FLOORWALL, "delay" = 20, "cost" = 16)
|
||||||
@@ -212,7 +212,7 @@
|
|||||||
return list("mode" = RCD_WINDOWGRILLE, "delay" = 40, "cost" = 4)
|
return list("mode" = RCD_WINDOWGRILLE, "delay" = 40, "cost" = 4)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/turf/open/floor/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
/turf/open/floor/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||||
switch(passed_mode)
|
switch(passed_mode)
|
||||||
if(RCD_FLOORWALL)
|
if(RCD_FLOORWALL)
|
||||||
to_chat(user, "<span class='notice'>You build a wall.</span>")
|
to_chat(user, "<span class='notice'>You build a wall.</span>")
|
||||||
|
|||||||
@@ -251,12 +251,12 @@
|
|||||||
if(prob(30))
|
if(prob(30))
|
||||||
dismantle_wall()
|
dismantle_wall()
|
||||||
|
|
||||||
/turf/closed/wall/r_wall/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
/turf/closed/wall/r_wall/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||||
if(!the_rcd.canRturf)
|
if(!the_rcd.canRturf)
|
||||||
return FALSE
|
return FALSE
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/turf/closed/wall/r_wall/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
/turf/closed/wall/r_wall/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||||
if(!the_rcd.canRturf)
|
if(!the_rcd.canRturf)
|
||||||
return FALSE
|
return FALSE
|
||||||
return ..()
|
return ..()
|
||||||
|
|||||||
@@ -258,13 +258,13 @@
|
|||||||
/turf/closed/wall/acid_melt()
|
/turf/closed/wall/acid_melt()
|
||||||
dismantle_wall(1)
|
dismantle_wall(1)
|
||||||
|
|
||||||
/turf/closed/wall/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
/turf/closed/wall/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||||
switch(the_rcd.mode)
|
switch(the_rcd.mode)
|
||||||
if(RCD_DECONSTRUCT)
|
if(RCD_DECONSTRUCT)
|
||||||
return list("mode" = RCD_DECONSTRUCT, "delay" = 40, "cost" = 26)
|
return list("mode" = RCD_DECONSTRUCT, "delay" = 40, "cost" = 26)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/turf/closed/wall/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
/turf/closed/wall/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||||
switch(passed_mode)
|
switch(passed_mode)
|
||||||
if(RCD_DECONSTRUCT)
|
if(RCD_DECONSTRUCT)
|
||||||
to_chat(user, "<span class='notice'>You deconstruct the wall.</span>")
|
to_chat(user, "<span class='notice'>You deconstruct the wall.</span>")
|
||||||
|
|||||||
@@ -159,15 +159,16 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
/turf/open/space/rcd_vals(mob/user, obj/item/weapon/rcd/the_rcd)
|
/turf/open/space/rcd_vals(mob/user, obj/item/weapon/construction/rcd/the_rcd)
|
||||||
if(!CanBuildHere())
|
if(!CanBuildHere())
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
switch(the_rcd.mode)
|
switch(the_rcd.mode)
|
||||||
if(RCD_FLOORWALL)
|
if(RCD_FLOORWALL)
|
||||||
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 2)
|
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 2)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/turf/open/space/rcd_act(mob/user, obj/item/weapon/rcd/the_rcd, passed_mode)
|
/turf/open/space/rcd_act(mob/user, obj/item/weapon/construction/rcd/the_rcd, passed_mode)
|
||||||
switch(passed_mode)
|
switch(passed_mode)
|
||||||
if(RCD_FLOORWALL)
|
if(RCD_FLOORWALL)
|
||||||
to_chat(user, "<span class='notice'>You build a floor.</span>")
|
to_chat(user, "<span class='notice'>You build a floor.</span>")
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
/datum/export/rcd
|
/datum/export/rcd
|
||||||
cost = 100 // 15 metal -> 75 credits, +25 credits for production
|
cost = 100 // 15 metal -> 75 credits, +25 credits for production
|
||||||
unit_name = "rapid construction device"
|
unit_name = "rapid construction device"
|
||||||
export_types = list(/obj/item/weapon/rcd)
|
export_types = list(/obj/item/weapon/construction/rcd)
|
||||||
|
|
||||||
/datum/export/rcd_ammo
|
/datum/export/rcd_ammo
|
||||||
cost = 15 // 1.5 metal, 1 glass -> 12.5 credits, +2.5 credits
|
cost = 15 // 1.5 metal, 1 glass -> 12.5 credits, +2.5 credits
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
/obj/item/weapon/melee/baton/loaded=1,\
|
/obj/item/weapon/melee/baton/loaded=1,\
|
||||||
/obj/item/clothing/mask/gas/sechailer=1,\
|
/obj/item/clothing/mask/gas/sechailer=1,\
|
||||||
/obj/item/weapon/gun/energy/e_gun=1,\
|
/obj/item/weapon/gun/energy/e_gun=1,\
|
||||||
/obj/item/weapon/rcd/loaded=1)
|
/obj/item/weapon/construction/rcd/loaded=1)
|
||||||
|
|
||||||
/datum/outfit/ert/engineer/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
/datum/outfit/ert/engineer/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
|
||||||
..()
|
..()
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
/obj/item/weapon/melee/baton/loaded=1,\
|
/obj/item/weapon/melee/baton/loaded=1,\
|
||||||
/obj/item/clothing/mask/gas/sechailer/swat=1,\
|
/obj/item/clothing/mask/gas/sechailer/swat=1,\
|
||||||
/obj/item/weapon/gun/energy/pulse/pistol/loyalpin=1,\
|
/obj/item/weapon/gun/energy/pulse/pistol/loyalpin=1,\
|
||||||
/obj/item/weapon/rcd/combat=1)
|
/obj/item/weapon/construction/rcd/combat=1)
|
||||||
|
|
||||||
|
|
||||||
/datum/outfit/centcom_official
|
/datum/outfit/centcom_official
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
obj_integrity = 300
|
obj_integrity = 300
|
||||||
max_integrity = 300
|
max_integrity = 300
|
||||||
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75, fire = 50, acid = 75)
|
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75, fire = 50, acid = 75)
|
||||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals,/obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/pipe_dispenser)
|
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals,/obj/item/device/t_scanner, /obj/item/weapon/construction/rcd, /obj/item/weapon/pipe_dispenser)
|
||||||
siemens_coefficient = 0
|
siemens_coefficient = 0
|
||||||
var/obj/item/clothing/head/helmet/space/hardsuit/helmet
|
var/obj/item/clothing/head/helmet/space/hardsuit/helmet
|
||||||
actions_types = list(/datum/action/item_action/toggle_helmet)
|
actions_types = list(/datum/action/item_action/toggle_helmet)
|
||||||
|
|||||||
@@ -493,7 +493,7 @@
|
|||||||
icon_state = "coatengineer"
|
icon_state = "coatengineer"
|
||||||
item_state = "coatengineer"
|
item_state = "coatengineer"
|
||||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 20, fire = 30, acid = 45)
|
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 20, fire = 30, acid = 45)
|
||||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/pipe_dispenser)
|
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/internals/emergency_oxygen,/obj/item/device/t_scanner, /obj/item/weapon/construction/rcd, /obj/item/weapon/pipe_dispenser)
|
||||||
hoodtype = /obj/item/clothing/head/hooded/winterhood/engineering
|
hoodtype = /obj/item/clothing/head/hooded/winterhood/engineering
|
||||||
|
|
||||||
/obj/item/clothing/head/hooded/winterhood/engineering
|
/obj/item/clothing/head/hooded/winterhood/engineering
|
||||||
|
|||||||
@@ -538,7 +538,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
|||||||
/obj/item/device/radio/headset/syndicate, /obj/item/weapon/grenade/plastic/c4,\
|
/obj/item/device/radio/headset/syndicate, /obj/item/weapon/grenade/plastic/c4,\
|
||||||
/obj/item/device/powersink, /obj/item/weapon/storage/box/syndie_kit,\
|
/obj/item/device/powersink, /obj/item/weapon/storage/box/syndie_kit,\
|
||||||
/obj/item/toy/syndicateballoon, /obj/item/weapon/gun/energy/laser/captain,\
|
/obj/item/toy/syndicateballoon, /obj/item/weapon/gun/energy/laser/captain,\
|
||||||
/obj/item/weapon/hand_tele, /obj/item/weapon/rcd, /obj/item/weapon/tank/jetpack,\
|
/obj/item/weapon/hand_tele, /obj/item/weapon/construction/rcd, /obj/item/weapon/tank/jetpack,\
|
||||||
/obj/item/clothing/under/rank/captain, /obj/item/device/aicard,\
|
/obj/item/clothing/under/rank/captain, /obj/item/device/aicard,\
|
||||||
/obj/item/clothing/shoes/magboots, /obj/item/areaeditor/blueprints, /obj/item/weapon/disk/nuclear,\
|
/obj/item/clothing/shoes/magboots, /obj/item/areaeditor/blueprints, /obj/item/weapon/disk/nuclear,\
|
||||||
/obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank)
|
/obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank)
|
||||||
@@ -673,7 +673,6 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
|||||||
QDEL_IN(O, 300)
|
QDEL_IN(O, 300)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/effect/hallucination/bolts
|
/obj/effect/hallucination/bolts
|
||||||
var/list/doors = list()
|
var/list/doors = list()
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
dir = direct //This camera eye is visible as a drone, and needs to keep the dir updated
|
dir = direct //This camera eye is visible as a drone, and needs to keep the dir updated
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/weapon/rcd/internal //Base console's internal RCD. Roundstart consoles are filled, rebuilt cosoles start empty.
|
/obj/item/weapon/construction/rcd/internal //Base console's internal RCD. Roundstart consoles are filled, rebuilt cosoles start empty.
|
||||||
name = "internal RCD"
|
name = "internal RCD"
|
||||||
max_matter = 600 //Bigger container and faster speeds due to being specialized and stationary.
|
max_matter = 600 //Bigger container and faster speeds due to being specialized and stationary.
|
||||||
no_ammo_message = "<span class='warning'>Internal matter exhausted. Please add additional materials.</span>"
|
no_ammo_message = "<span class='warning'>Internal matter exhausted. Please add additional materials.</span>"
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
name = "base contruction console"
|
name = "base contruction console"
|
||||||
desc = "An industrial computer integrated with a camera-assisted rapid construction drone."
|
desc = "An industrial computer integrated with a camera-assisted rapid construction drone."
|
||||||
networks = list("SS13")
|
networks = list("SS13")
|
||||||
var/obj/item/weapon/rcd/internal/RCD //Internal RCD. The computer passes user commands to this in order to avoid massive copypaste.
|
var/obj/item/weapon/construction/rcd/internal/RCD //Internal RCD. The computer passes user commands to this in order to avoid massive copypaste.
|
||||||
circuit = /obj/item/weapon/circuitboard/computer/base_construction
|
circuit = /obj/item/weapon/circuitboard/computer/base_construction
|
||||||
off_action = new/datum/action/innate/camera_off/base_construction
|
off_action = new/datum/action/innate/camera_off/base_construction
|
||||||
var/datum/action/innate/aux_base/switch_mode/switch_mode_action = new //Action for switching the RCD's build modes
|
var/datum/action/innate/aux_base/switch_mode/switch_mode_action = new //Action for switching the RCD's build modes
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
/obj/machinery/computer/camera_advanced/base_construction/New()
|
/obj/machinery/computer/camera_advanced/base_construction/New()
|
||||||
..()
|
..()
|
||||||
RCD = new /obj/item/weapon/rcd/internal(src)
|
RCD = new /obj/item/weapon/construction/rcd/internal(src)
|
||||||
|
|
||||||
/obj/machinery/computer/camera_advanced/base_construction/Initialize(mapload)
|
/obj/machinery/computer/camera_advanced/base_construction/Initialize(mapload)
|
||||||
..()
|
..()
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
remote_eye = C.remote_control
|
remote_eye = C.remote_control
|
||||||
B = target
|
B = target
|
||||||
if(!B.RCD) //The console must always have an RCD.
|
if(!B.RCD) //The console must always have an RCD.
|
||||||
B.RCD = new /obj/item/weapon/rcd/internal(src) //If the RCD is lost somehow, make a new (empty) one!
|
B.RCD = new /obj/item/weapon/construction/rcd/internal(src) //If the RCD is lost somehow, make a new (empty) one!
|
||||||
|
|
||||||
/datum/action/innate/aux_base/proc/check_spot()
|
/datum/action/innate/aux_base/proc/check_spot()
|
||||||
//Check a loction to see if it is inside the aux base at the station. Camera visbility checks omitted so as to not hinder construction.
|
//Check a loction to see if it is inside the aux base at the station. Camera visbility checks omitted so as to not hinder construction.
|
||||||
|
|||||||
@@ -287,7 +287,7 @@
|
|||||||
basic_modules = list(
|
basic_modules = list(
|
||||||
/obj/item/device/assembly/flash/cyborg,
|
/obj/item/device/assembly/flash/cyborg,
|
||||||
/obj/item/borg/sight/meson,
|
/obj/item/borg/sight/meson,
|
||||||
/obj/item/weapon/rcd/borg,
|
/obj/item/weapon/construction/rcd/borg,
|
||||||
/obj/item/weapon/pipe_dispenser,
|
/obj/item/weapon/pipe_dispenser,
|
||||||
/obj/item/weapon/extinguisher,
|
/obj/item/weapon/extinguisher,
|
||||||
/obj/item/weapon/weldingtool/largetank/cyborg,
|
/obj/item/weapon/weldingtool/largetank/cyborg,
|
||||||
|
|||||||
@@ -649,3 +649,14 @@
|
|||||||
force = 5
|
force = 5
|
||||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||||
update()
|
update()
|
||||||
|
|
||||||
|
|
||||||
|
/obj/machinery/light/floor
|
||||||
|
name = "floor light"
|
||||||
|
icon = 'icons/obj/lighting.dmi'
|
||||||
|
base_state = "floor" // base description and icon_state
|
||||||
|
icon_state = "floor1"
|
||||||
|
brightness = 4
|
||||||
|
layer = 2.5
|
||||||
|
light_type = /obj/item/weapon/light/bulb
|
||||||
|
fitting = "bulb"
|
||||||
|
|||||||
@@ -581,7 +581,7 @@
|
|||||||
id = "rcd"
|
id = "rcd"
|
||||||
build_type = AUTOLATHE
|
build_type = AUTOLATHE
|
||||||
materials = list(MAT_METAL = 30000)
|
materials = list(MAT_METAL = 30000)
|
||||||
build_path = /obj/item/weapon/rcd
|
build_path = /obj/item/weapon/construction/rcd
|
||||||
category = list("hacked", "Construction")
|
category = list("hacked", "Construction")
|
||||||
|
|
||||||
/datum/design/rpd
|
/datum/design/rpd
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
valid_items += rand(1,max(2,35-probWeight))
|
valid_items += rand(1,max(2,35-probWeight))
|
||||||
valid_items += I
|
valid_items += I
|
||||||
|
|
||||||
if(ispath(I,/obj/item/weapon/rcd) || ispath(I,/obj/item/weapon/grenade) || ispath(I,/obj/item/device/aicard) || ispath(I,/obj/item/weapon/storage/backpack/holding) || ispath(I,/obj/item/slime_extract) || ispath(I,/obj/item/device/onetankbomb) || ispath(I,/obj/item/device/transfer_valve))
|
if(ispath(I,/obj/item/weapon/construction/rcd) || ispath(I,/obj/item/weapon/grenade) || ispath(I,/obj/item/device/aicard) || ispath(I,/obj/item/weapon/storage/backpack/holding) || ispath(I,/obj/item/slime_extract) || ispath(I,/obj/item/device/onetankbomb) || ispath(I,/obj/item/device/transfer_valve))
|
||||||
var/obj/item/tempCheck = I
|
var/obj/item/tempCheck = I
|
||||||
if(initial(tempCheck.icon_state) != null)
|
if(initial(tempCheck.icon_state) != null)
|
||||||
critical_items += I
|
critical_items += I
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 15 KiB |
Reference in New Issue
Block a user