Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions code/datums/shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,105 @@
M.Knockdown(3)
to_chat(M, "<span class='warning'>\The [src] has ejected you!</span>")

/datum/shuttle/proc/update_appearance(obj/item/O, mob/user)
if(!O || !user)
return
var/obj/item/device/shuttle_holopainter/sam = O
if(!istype(sam))
return
if(sam.emagged)
for(var/turf/simulated/wall/shuttle/W in linked_area)
W.walltype = "swall"
W.relativewall()
W.color = "#ff00dd"
for(var/obj/structure/shuttle/diag_wall/WD in linked_area)
WD.icon_state = "diagonalWallS"
WD.color = "#ff00dd"
for(var/turf/simulated/floor/shuttle/F in linked_area)
F.icon_state = "clown"
return
if(sam.target == "Walls")
var/used_walltype
switch(sam.preset)
if("White Smoothed")
used_walltype = "swall"
if("Black Smoothed")
used_walltype = "bswall"
if("White Unsmoothed")
used_walltype = "wall1"
if("Black Unsmoothed")
used_walltype = "wall3"
if("Syndicate")
used_walltype = "satwall"
if("Layered")
used_walltype = "vwall"
else
used_walltype = "swall"
for(var/turf/simulated/wall/shuttle/W in linked_area)
W.walltype = used_walltype
W.relativewall()
if(sam.sel_color)
W.color = sam.sel_color
for(var/obj/structure/shuttle/diag_wall/WD in linked_area)
if(sam.sel_color)
if(istype(WD,/obj/structure/shuttle/diag_wall/smooth))
WD.icon_state = "diagonalWallS"
else
WD.icon_state = "diagonalWall"
WD.color = sam.sel_color
else
switch(sam.preset)
if("White Smoothed")
used_walltype = "diagonalWallS"
if("Black Smoothed")
used_walltype = "diagonalWall3S"
if("White Unsmoothed")
used_walltype = "diagonalWall"
if("Black Unsmoothed")
used_walltype = "diagonalWall3"
if("Syndicate")
used_walltype = "diagonalWall3"
if("Layered")
used_walltype = "vwall"
else
used_walltype = "diagonalWallS"
WD.icon_state = used_walltype
else if(sam.target == "Floors")
var/used_floortype
switch(sam.preset)
if("White")
used_floortype = "floor3"
if("Blue")
used_floortype = "floor"
if("Yellow")
used_floortype = "floor2"
if("Red")
used_floortype = "floor4"
if("Purple")
used_floortype = "floor5"
if("Plated")
used_floortype = "vfloor"
if("Cult")
used_floortype = "cult"
else
used_floortype = "floor_recolor"

for(var/turf/simulated/floor/shuttle/F in linked_area)
F.icon_state = used_floortype
if(sam.sel_color)
F.color = sam.sel_color
else
for(var/turf/simulated/floor/shuttle/F in linked_area)
F.icon_state = initial(F.icon_state)
F.color = initial(F.color)
for(var/turf/simulated/wall/shuttle/W in linked_area)
W.walltype = initial(W.walltype)
W.update_icon()
W.color = initial(W.color)
for(var/obj/structure/shuttle/diag_wall/WD in linked_area)
WD.icon_state = initial(WD.icon_state)
WD.color = initial(WD.color)

//Planetary landing zone datum
/datum/landing_zone
var/list/turf/turf_list = list()
Expand Down
24 changes: 20 additions & 4 deletions code/game/machinery/airlock_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@
var/datum/radio_frequency/radio_connection

var/on = 1
var/master_active = 1 // Tracks the state of the linked master device

ghost_read = 0 // Deactivate ghost touching.
ghost_write = 0
Expand Down Expand Up @@ -358,8 +359,12 @@

/obj/machinery/access_button/update_icon()
if(on)
icon_state = "access_button_standby"
update_moody_light('icons/lighting/moody_lights.dmi', "overlay_button_standby")
if(master_active)
icon_state = "access_button_standby"
update_moody_light('icons/lighting/moody_lights.dmi', "overlay_button_standby")
else
icon_state = "access_button_off"
kill_moody_light()
else
icon_state = "access_button_off"
kill_moody_light()
Expand All @@ -371,18 +376,20 @@
if(!allowed(user))
to_chat(user, "<span class='warning'>Access Denied.</span>")
playsound(src, 'sound/machines/buzz-two.ogg', 20, 0, -1)
return

else if(radio_connection)
if(radio_connection)
var/datum/signal/signal = new /datum/signal
signal.transmission_method = 1 //radio signal
signal.data["tag"] = master_tag
signal.data["command"] = command

radio_connection.post_signal(src, signal, range = AIRLOCK_CONTROL_RANGE, filter = customfilter)

flick("access_button_cycle", src)
update_moody_light('icons/lighting/moody_lights.dmi', "overlay_button_cycle")
spawn(10)
update_moody_light('icons/lighting/moody_lights.dmi', "overlay_button_standby")
update_icon()



Expand All @@ -408,6 +415,15 @@
return
set_frequency(frequency)

/obj/machinery/access_button/receive_signal(datum/signal/signal)
if(!signal || signal.encryption)
return
if(signal.data["tag"] != master_tag)
return
// Update our state based on the master device's status
if("active" in signal.data)
master_active = signal.data["active"]
update_icon()

/obj/machinery/access_button/New()
..()
Expand Down
6 changes: 6 additions & 0 deletions code/game/machinery/computer/shuttle_computers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@
if(istype(O, /obj/item/weapon/card/shuttle_pass))
use_pass(O, user)

if(istype(O,/obj/item/device/shuttle_holopainter))
if(do_after(user, src, 1 SECONDS, needhand = TRUE))
shuttle.update_appearance(O, user)
if(O.emagged)
playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
visible_message("<span class='notice'>\The [O] honks pensively.</span>", user)
..()

/obj/machinery/computer/shuttle_control/attack_hand(mob/user as mob)
Expand Down
Loading
Loading