the little construction pr (#9002)

* the little construction pr

* construction-related bugfixes (teal carpet corners, arcade construction, airlock screwdriver panel)

* Update code/game/objects/items/stacks/tiles/tile_types.dm

Co-authored-by: Atermonera <atermonera@gmail.com>

* mmmm sweet sweet updates

* actually compiles

---------

Co-authored-by: Atermonera <atermonera@gmail.com>
This commit is contained in:
Varlaisvea
2023-03-09 02:55:54 +00:00
committed by GitHub
parent 781166673f
commit 6b909477bc
13 changed files with 141 additions and 17 deletions
+4 -1
View File
@@ -71,9 +71,12 @@
return
if (istype(C, /obj/item/stack/rods))
var/obj/item/stack/rods/R = C
if(R.use(2))
if(R.get_amount() < 2)
to_chat(user, "<span class='notice'>You need at least two rods to form a catwalk here.</span>")
else
to_chat(user, "<span class='notice'>You start connecting \the [R.name] to \the [src.name] ...</span>")
if(do_after(user, 5 SECONDS))
R.use(2) //2023-02-27 bugfix to prevent rods being used without catwalk creation
src.alpha = 0 // Note: I don't know why this is set, Eris did it, just trusting for now. ~Leshana
new /obj/structure/catwalk(src.loc)
qdel(src)
+16 -9
View File
@@ -611,13 +611,15 @@
if(istype(MT.connectable, /obj/machinery/button/windowtint))
var/obj/machinery/button/windowtint/buffered_button = MT.connectable
src.id = buffered_button.id
to_chat(user, "<span class='notice'>\The [src] is linked to \the [buffered_button].</span>")
to_chat(user, "<span class='notice'>\The [src] is linked to \the [buffered_button] with ID '[id]'.</span>")
return TRUE
// Otherwise fall back to asking them
var/t = sanitizeSafe(input(user, "Enter the ID for the window.", src.name, null), MAX_NAME_LEN)
if (!t && user.get_active_hand() != W && in_range(src, user))
// Otherwise fall back to asking them... and remind them what the current ID is.
if(id)
to_chat(user, "The window's current ID is [id].")
var/t = sanitizeSafe(input(user, "Enter the new ID for the window.", src.name, null), MAX_NAME_LEN)
if(t && in_range(src, user))
src.id = t
to_chat(user, "<span class='notice'>The new ID of \the [src] is [id]</span>")
to_chat(user, "<span class='notice'>The new ID of \the [src] is '[id]'.</span>")
return TRUE
. = ..()
@@ -637,6 +639,7 @@
icon_state = "light0"
desc = "A remote control switch for polarized windows."
var/range = 7
circuit = /obj/item/circuitboard/electrochromic
/obj/machinery/button/windowtint/attack_hand(mob/user as mob)
if(..())
@@ -665,17 +668,21 @@
icon_state = "light[active]"
/obj/machinery/button/windowtint/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/multitool))
if(default_deconstruction_screwdriver(user, W))
return
else if(alarm_deconstruction_wirecutters(user, W))
return
else if(istype(W, /obj/item/multitool))
var/obj/item/multitool/MT = W
if(!id)
// If no ID is set yet (newly built button?) let them select an ID for first-time use!
var/t = sanitizeSafe(input(user, "Enter an ID for \the [src].", src.name, null), MAX_NAME_LEN)
if (t && user.get_active_hand() != W && in_range(src, user))
if(t && in_range(src, user))
src.id = t
to_chat(user, "<span class='notice'>The new ID of \the [src] is [id]</span>")
to_chat(user, "<span class='notice'>The new ID of \the [src] is '[id]'. To reset this, rebuild the control.</span>")
if(id)
// It already has an ID (or they just set one), buffer it for copying to windows.
to_chat(user, "<span class='notice'>You store \the [src] in \the [MT]'s buffer!</span>")
to_chat(user, "<span class='notice'>You store \the [src] ID ('[id]') in \the [MT]'s buffer!</span>")
MT.connectable = src
MT.update_icon()
return TRUE