diff --git a/code/modules/xenoarcheaology/tools/suspension_generator.dm b/code/modules/xenoarcheaology/tools/suspension_generator.dm
index 902264308af..bb7d714aa0a 100644
--- a/code/modules/xenoarcheaology/tools/suspension_generator.dm
+++ b/code/modules/xenoarcheaology/tools/suspension_generator.dm
@@ -1,61 +1,51 @@
/obj/machinery/suspension_gen
name = "suspension field generator"
- desc = "It has stubby legs bolted up against it's body for stabilising."
+ desc = "It has stubby bolts up against it's treads for stabilising."
icon = 'icons/obj/xenoarchaeology.dmi'
- icon_state = "suspension2"
- density = TRUE
+ icon_state = "suspension"
+ density = 1
req_access = list(access_research)
var/obj/item/weapon/cell/cell
- var/locked = TRUE
+ var/obj/item/weapon/card/id/auth_card
+ var/locked = 1
var/power_use = 5
var/obj/effect/suspension_field/suspension_field
/obj/machinery/suspension_gen/Initialize()
. = ..()
cell = new /obj/item/weapon/cell/high(src)
- power_change()
-
-/obj/machinery/suspension_gen/power_change()
- var/oldstat = stat
- if(cell)
- stat &= ~NOPOWER
- else
- stat |= NOPOWER
- return (stat != oldstat)
/obj/machinery/suspension_gen/process()
if(suspension_field)
- if(cell.use(power_use))
- var/turf/T = get_turf(suspension_field)
- for(var/mob/living/M in T)
- if(cell.use(power_use))
- M.Weaken(3)
- if(prob(5))
- to_chat(M, "[pick("You feel tingly","You feel like floating","It is hard to speak","You can barely move")].")
- else
- deactivate()
+ cell.charge -= power_use
- for(var/obj/item/I in T)
- if(!suspension_field.contents.len)
- suspension_field.icon_state = "energynet"
- suspension_field.add_overlay("shield2")
- I.forceMove(suspension_field)
- else
+ var/turf/T = get_turf(suspension_field)
+ for(var/mob/living/M in T)
+ M.Weaken(3)
+ cell.charge -= power_use
+ if(prob(5))
+ to_chat(M, "[pick("You feel tingly","You feel like floating","It is hard to speak","You can barely move")].")
+
+ for(var/obj/item/I in T)
+ if(!suspension_field.contents.len)
+ suspension_field.icon_state = "energynet"
+ suspension_field.add_overlay("shield2")
+ I.forceMove(suspension_field)
+
+ if(cell.charge <= 0)
deactivate()
/obj/machinery/suspension_gen/attack_hand(var/mob/user)
- if(panel_open)
- if(cell)
- to_chat(user, "You remove [cell].")
- cell.forceMove(loc)
- cell.add_fingerprint(user)
- cell.update_icon()
+ if(!panel_open)
+ tgui_interact(user)
+ else if(cell)
+ cell.loc = loc
+ cell.add_fingerprint(user)
+ cell.update_icon()
- icon_state = "suspension0"
- cell = null
- return
-
- tgui_interact(user)
+ icon_state = "suspension"
+ cell = null
+ to_chat(user, "You remove the power cell")
/obj/machinery/suspension_gen/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
@@ -98,46 +88,59 @@
locked = !locked
return TRUE
-/obj/machinery/suspension_gen/attackby(obj/item/W, mob/user)
+/obj/machinery/suspension_gen/attackby(obj/item/W as obj, mob/user as mob)
if(!locked && !suspension_field && default_deconstruction_screwdriver(user, W))
return
else if(W.is_wrench())
if(!suspension_field)
if(anchored)
- anchored = FALSE
+ anchored = 0
else
- anchored = TRUE
+ anchored = 1
playsound(src, W.usesound, 50, 1)
- to_chat(user, "You wrench the stabilising legs [anchored ? "into place" : "up against the body"].")
+ to_chat(user, "You wrench the stabilising bolts [anchored ? "into place" : "loose"].")
if(anchored)
- desc = "It is resting securely on four stubby legs."
+ desc = "Its tracks are held firmly in place with securing bolts."
+ icon_state = "suspension_wrenched"
else
- desc = "It has stubby legs bolted up against it's body for stabilising."
+ desc = "It has stubby bolts aligned along it's tracks for stabilising."
+ icon_state = "suspension"
+ playsound(loc, 'sound/items/Ratchet.ogg', 40)
+ update_icon()
else
- to_chat(user, "You are unable to unsecure [src] while it is active!")
- else if(istype(W, /obj/item/weapon/cell))
+ to_chat(user, "You are unable to secure [src] while it is active!")
+ else if (istype(W, /obj/item/weapon/cell))
if(panel_open)
if(cell)
to_chat(user, "There is a power cell already installed.")
- return
- if(user.unEquip(W))
- W.forceMove(src)
+ else
+ user.drop_item()
+ W.loc = src
cell = W
- to_chat(user, "You insert [cell].")
- icon_state = "suspension1"
- else if(istype(W, /obj/item/weapon/card/emag))
- return W.resolve_attackby(src, user)
- else
- if(check_access(W))
- locked = !locked
- to_chat(user, "You [locked ? "lock" : "unlock"] [src].")
+ to_chat(user, "You insert the power cell.")
+ icon_state = "suspension"
+ else if(istype(W, /obj/item/weapon/card))
+ var/obj/item/weapon/card/I = W
+ if(!auth_card)
+ if(attempt_unlock(I, user))
+ to_chat(user, "You swipe [I], the console flashes \'Access granted.\'")
+ else
+ to_chat(user, "You swipe [I], console flashes \'Access denied.\'")
else
- to_chat(user, "[src] flashes \'Access denied.\'")
- return
+ to_chat(user, "Remove [auth_card] first.")
+
+/obj/machinery/suspension_gen/proc/attempt_unlock(var/obj/item/weapon/card/C, var/mob/user)
+ if(!panel_open)
+ if(istype(C, /obj/item/weapon/card/emag))
+ C.resolve_attackby(src, user)
+ else if(istype(C, /obj/item/weapon/card/id) && check_access(C))
+ locked = 0
+ if(!locked)
+ return 1
/obj/machinery/suspension_gen/emag_act(var/remaining_charges, var/mob/user)
- if(locked)
- locked = FALSE
+ if(cell.charge > 0 && locked)
+ locked = 0
return 1
//checks for whether the machine can be activated or not should already have occurred by this point
@@ -147,20 +150,22 @@
for(var/mob/living/M in T)
M.Weaken(5)
- M.visible_message("\icon[M][bicon(M)] [M] begins to float in the air!","You feel tingly and light, but it is difficult to move.")
+ M.visible_message("[bicon(M)] [M] begins to float in the air!","You feel tingly and light, but it is difficult to move.")
suspension_field = new(T)
- visible_message("\icon[src][bicon(src)] [src] activates with a low hum.")
- icon_state = "suspension3"
+ visible_message("[bicon(src)] [src] activates with a low hum.")
+ icon_state = "suspension_on"
+ playsound(loc, 'sound/machines/quiet_beep.ogg', 40)
+ update_icon()
- for(var/obj/item/I in T)
+ for(var/obj/item/weapon/I in T)
I.loc = suspension_field
collected++
if(collected)
suspension_field.icon_state = "energynet"
- suspension_field.add_overlay("shield2")
- visible_message("\icon[suspension_field][bicon(suspension_field)] [suspension_field] gently absconds [collected > 1 ? "something" : "several things"].")
+ add_overlay("shield2")
+ visible_message("[bicon(suspension_field)] [suspension_field] gently absconds [collected > 1 ? "something" : "several things"].")
else
if(istype(T,/turf/simulated/mineral) || istype(T,/turf/simulated/wall))
suspension_field.icon_state = "shieldsparkles"
@@ -172,13 +177,15 @@
var/turf/T = get_turf(suspension_field)
for(var/mob/living/M in T)
- to_chat(M, "You no longer feel like floating.")
+ to_chat(M, "You no longer feel like floating.")
M.Weaken(3)
- visible_message("\icon[src][bicon(src)] [src] deactivates with a gentle shudder.")
+ visible_message("[bicon(src)] [src] deactivates with a gentle shudder.")
qdel(suspension_field)
suspension_field = null
- icon_state = "suspension2"
+ icon_state = "suspension_wrenched"
+ playsound(loc, 'sound/machines/quiet_beep.ogg', 40)
+ update_icon()
/obj/machinery/suspension_gen/Destroy()
deactivate()
@@ -190,7 +197,7 @@
set category = "Object"
if(anchored)
- to_chat(usr, "You cannot rotate [src], it has been firmly fixed to the floor.")
+ to_chat(usr, "You cannot rotate [src], it has been firmly fixed to the floor.")
return
set_dir(turn(dir, 90))
@@ -200,15 +207,23 @@
set category = "Object"
if(anchored)
- to_chat(usr, "You cannot rotate [src], it has been firmly fixed to the floor.")
+ to_chat(usr, "You cannot rotate [src], it has been firmly fixed to the floor.")
return
set_dir(turn(dir, 270))
+/obj/machinery/suspension_gen/update_icon()
+ cut_overlays()
+ if(panel_open)
+ add_overlay("suspension_panel")
+ else
+ cut_overlay("suspension_panel")
+ . = ..()
+
/obj/effect/suspension_field
name = "energy field"
icon = 'icons/effects/effects.dmi'
- anchored = TRUE
- density = TRUE
+ anchored = 1
+ density = 1
/obj/effect/suspension_field/Destroy()
for(var/atom/movable/I in src)
diff --git a/code/modules/xenoarcheaology/tools/tools.dm b/code/modules/xenoarcheaology/tools/tools.dm
index 3382c33e0b5..75e42a0b1b0 100644
--- a/code/modules/xenoarcheaology/tools/tools.dm
+++ b/code/modules/xenoarcheaology/tools/tools.dm
@@ -34,8 +34,8 @@
name = "Alden-Saraspova counter"
desc = "Aids in triangulation of exotic particles."
icon = 'icons/obj/xenoarchaeology.dmi'
- icon_state = "flashgun"
- item_state = "lampgreen"
+ icon_state = "xenoarch_scanner"
+ item_state = "analyzer"
origin_tech = list(TECH_BLUESPACE = 3, TECH_MAGNET = 3)
matter = list(MAT_STEEL = 10000,MAT_GLASS = 5000)
w_class = ITEMSIZE_SMALL
@@ -337,7 +337,8 @@
/obj/item/device/xenoarch_multi_tool/attack_self(var/mob/living/user)
depth_scanner.tgui_interact(user)
-/obj/item/device/xenoarch_multi_tool/verb/swap_settings(var/mob/living/user)
+/obj/item/device/xenoarch_multi_tool/verb/swap_settings()
+ var/mob/living/user = usr
set name = "Swap Functionality"
set desc = "Swap between the scanning and measuring functionality.."
mode = !mode
@@ -346,7 +347,8 @@
else
to_chat(user, "The device will now measure depth dug.")
-/obj/item/device/xenoarch_multi_tool/verb/scan_for_anomalies(var/mob/living/user)
+/obj/item/device/xenoarch_multi_tool/verb/scan_for_anomalies()
+ var/mob/living/user = usr
set name = "Scan for Anomalies"
set desc = "Scan for artifacts and anomalies within your vicinity."
anomaly_scanner.interact(user)
diff --git a/code/modules/xenoarcheaology/tools/tools_vr.dm b/code/modules/xenoarcheaology/tools/tools_vr.dm
index 640917f8208..e9802991e43 100644
--- a/code/modules/xenoarcheaology/tools/tools_vr.dm
+++ b/code/modules/xenoarcheaology/tools/tools_vr.dm
@@ -1,3 +1,5 @@
+//Unused file due to icon update upstream.
+
/obj/item/device/depth_scanner //On second thought, the ano_scanner sprite looks better as a depth scanner instead of an anomaly scanner.
icon_state = "ano_scanner"
icon = 'icons/obj/xenoarchaeology_vr.dmi'
diff --git a/icons/obj/abductor.dmi b/icons/obj/abductor.dmi
index 99362c782dc..db935ef7d4a 100644
Binary files a/icons/obj/abductor.dmi and b/icons/obj/abductor.dmi differ
diff --git a/vorestation.dme b/vorestation.dme
index 03487a3cb7f..a2519932937 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -4103,7 +4103,6 @@
#include "code\modules\xenoarcheaology\tools\tools.dm"
#include "code\modules\xenoarcheaology\tools\tools_pickaxe.dm"
#include "code\modules\xenoarcheaology\tools\tools_pickaxe_vr.dm"
-#include "code\modules\xenoarcheaology\tools\tools_vr.dm"
#include "code\modules\xenobio\items\extracts_vr.dm"
#include "code\modules\xenobio\items\slime_objects.dm"
#include "code\modules\xenobio\items\slimepotions.dm"