mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-15 00:54:16 +01:00
further hacktool adjustments
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
var/obj/item/weapon/airlock_electronics/electronics = null
|
||||
var/hasShocked = 0 //Prevents multiple shocks from happening
|
||||
var/secured_wires = 0
|
||||
var/security_level = 1 //VOREStation Addition - acts as a multiplier on the time required to hack an airlock with a hacktool
|
||||
var/datum/wires/airlock/wires = null
|
||||
|
||||
var/open_sound_powered = 'sound/machines/door/covert1o.ogg'
|
||||
@@ -129,6 +130,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/cmd3o.ogg'
|
||||
department_close_powered = 'sound/machines/door/cmd3c.ogg'
|
||||
security_level = 3 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/security
|
||||
name = "Security Airlock"
|
||||
@@ -139,6 +141,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/sec1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/sec1c.ogg'
|
||||
security_level = 2 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/engineering
|
||||
name = "Engineering Airlock"
|
||||
@@ -149,6 +152,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/eng1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/eng1c.ogg'
|
||||
security_level = 1.5 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/engineeringatmos
|
||||
name = "Atmospherics Airlock"
|
||||
@@ -159,6 +163,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/eng1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/eng1c.ogg'
|
||||
security_level = 1.5 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/medical
|
||||
name = "Medical Airlock"
|
||||
@@ -169,6 +174,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/med1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/med1c.ogg'
|
||||
security_level = 1.5 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/maintenance
|
||||
name = "Maintenance Access"
|
||||
@@ -258,6 +264,7 @@
|
||||
opacity = 1
|
||||
open_sound_powered = 'sound/machines/door/cmd3o.ogg'
|
||||
close_sound_powered = 'sound/machines/door/cmd3c.ogg'
|
||||
security_level = 100 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/glass_centcom
|
||||
name = "Airlock"
|
||||
@@ -266,6 +273,7 @@
|
||||
glass = 1
|
||||
open_sound_powered = 'sound/machines/door/cmd3o.ogg'
|
||||
close_sound_powered = 'sound/machines/door/cmd3c.ogg'
|
||||
security_level = 100 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/vault
|
||||
name = "Vault"
|
||||
@@ -277,6 +285,7 @@
|
||||
req_one_access = list(access_heads_vault)
|
||||
open_sound_powered = 'sound/machines/door/vault1o.ogg'
|
||||
close_sound_powered = 'sound/machines/door/vault1c.ogg'
|
||||
security_level = 5 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/vault/bolted
|
||||
icon_state = "door_locked"
|
||||
@@ -324,6 +333,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/cmd1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/cmd1c.ogg'
|
||||
security_level = 3 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/glass_engineering
|
||||
name = "Engineering Airlock"
|
||||
@@ -337,6 +347,7 @@
|
||||
req_one_access = list(access_engine)
|
||||
department_open_powered = 'sound/machines/door/eng1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/eng1c.ogg'
|
||||
security_level = 1.5 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/glass_engineeringatmos
|
||||
name = "Atmospherics Airlock"
|
||||
@@ -352,6 +363,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/eng1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/eng1c.ogg'
|
||||
security_level = 1.5 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/glass_security
|
||||
name = "Security Airlock"
|
||||
@@ -367,6 +379,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/sec1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/sec1c.ogg'
|
||||
security_level = 2 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/glass_medical
|
||||
name = "Medical Airlock"
|
||||
@@ -382,6 +395,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/med1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/med1c.ogg'
|
||||
security_level = 1.5 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/mining
|
||||
name = "Mining Airlock"
|
||||
@@ -402,6 +416,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/eng1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/eng1c.ogg'
|
||||
security_level = 1.5 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/research
|
||||
name = "Research Airlock"
|
||||
@@ -411,6 +426,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/sci1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/sci1c.ogg'
|
||||
security_level = 2 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/glass_research
|
||||
name = "Research Airlock"
|
||||
@@ -426,6 +442,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/sci1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/sci1c.ogg'
|
||||
security_level = 2 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/glass_mining
|
||||
name = "Mining Airlock"
|
||||
@@ -456,6 +473,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/eng1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/eng1c.ogg'
|
||||
security_level = 1.5 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/gold
|
||||
name = "Gold Airlock"
|
||||
@@ -540,6 +558,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/sci1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/sci1c.ogg'
|
||||
security_level = 1.5 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/glass_science
|
||||
name = "Glass Airlocks"
|
||||
@@ -552,6 +571,7 @@
|
||||
close_sound_powered = 'sound/machines/door/hall1c.ogg' // VOREStation Edit: Default door sounds for fancy, department-off.
|
||||
department_open_powered = 'sound/machines/door/sci1o.ogg'
|
||||
department_close_powered = 'sound/machines/door/sci1c.ogg'
|
||||
security_level = 1.5 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/highsecurity
|
||||
name = "Secure Airlock"
|
||||
@@ -562,6 +582,7 @@
|
||||
req_one_access = list(access_heads_vault)
|
||||
open_sound_powered = 'sound/machines/door/secure1o.ogg'
|
||||
close_sound_powered = 'sound/machines/door/secure1c.ogg'
|
||||
security_level = 4 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/voidcraft
|
||||
name = "voidcraft hatch"
|
||||
@@ -609,6 +630,7 @@
|
||||
hackProof = TRUE
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_alien
|
||||
req_one_access = list(access_alien)
|
||||
security_level = 100 //VOREStation Addition
|
||||
|
||||
/obj/machinery/door/airlock/alien/locked
|
||||
icon_state = "door_locked"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
var/is_hacking = 0
|
||||
var/max_known_targets
|
||||
var/hackspeed = 1
|
||||
var/max_level = 4 //what's the max door security_level we can handle?
|
||||
var/full_override = FALSE //can we override door bolts too? defaults to false for event/safety reasons
|
||||
|
||||
var/in_hack_mode = 0
|
||||
@@ -11,6 +12,7 @@
|
||||
|
||||
/obj/item/device/multitool/hacktool/override
|
||||
hackspeed = 0.75
|
||||
max_level = 5
|
||||
full_override = TRUE
|
||||
|
||||
/obj/item/device/multitool/hacktool/New()
|
||||
@@ -69,18 +71,23 @@
|
||||
to_chat(user, "<span class='warning'>You are already hacking!</span>")
|
||||
return 0
|
||||
if(!is_type_in_list(target, supported_types))
|
||||
to_chat(user, "\icon[src][bicon(src)] <span class='warning'>Unable to hack this target!</span>")
|
||||
to_chat(user, "\icon[src][bicon(src)] <span class='warning'>Unable to hack this target, invalid target type.</span>")
|
||||
return 0
|
||||
var/found = known_targets.Find(target)
|
||||
|
||||
var/obj/machinery/door/airlock/D = target
|
||||
if(D.security_level > max_level)
|
||||
to_chat(user, "\icon[src][bicon(src)] <span class='warning'>Target's electronic security is too complex.</span>")
|
||||
return 0
|
||||
|
||||
var/found = known_targets.Find(D)
|
||||
if(found)
|
||||
known_targets.Swap(1, found) // Move the last hacked item first
|
||||
return 1
|
||||
|
||||
to_chat(user, "<span class='notice'>You begin hacking \the [target]...</span>")
|
||||
to_chat(user, "<span class='notice'>You begin hacking \the [D]...</span>")
|
||||
is_hacking = 1
|
||||
// On average hackin takes ~15 seconds. Fairly small random span to avoid people simply aborting and trying again
|
||||
// Reduced hack duration to compensate for the reduced functionality
|
||||
var/hack_result = do_after(user, ((10 SECONDS + rand(0, 10 SECONDS))*hackspeed))
|
||||
// Reduced hack duration to compensate for the reduced functionality, multiplied by door sec level
|
||||
var/hack_result = do_after(user, (((10 SECONDS + rand(0, 10 SECONDS) + rand(0, 10 SECONDS))*hackspeed)*D.security_level))
|
||||
is_hacking = 0
|
||||
|
||||
if(hack_result && in_hack_mode)
|
||||
@@ -90,8 +97,8 @@
|
||||
to_chat(user, "<span class='warning'>Your hacking attempt failed!</span>")
|
||||
return 0
|
||||
|
||||
known_targets.Insert(1, target) // Insert the newly hacked target first,
|
||||
target.register(OBSERVER_EVENT_DESTROY, src, /obj/item/device/multitool/hacktool/proc/on_target_destroy)
|
||||
known_targets.Insert(1, D) // Insert the newly hacked target first,
|
||||
D.register(OBSERVER_EVENT_DESTROY, src, /obj/item/device/multitool/hacktool/proc/on_target_destroy)
|
||||
return 1
|
||||
|
||||
/obj/item/device/multitool/hacktool/proc/sanity_check()
|
||||
|
||||
Reference in New Issue
Block a user