mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 18:46:24 +01:00
Merge pull request #11268 from PsiOmegaDelta/151010-LessHolographicHoloComputer
Fixes #11263.
This commit is contained in:
@@ -657,6 +657,7 @@
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\air_management.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\camera_monitor.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\computer.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\holodeckcontrol.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\research.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\supply.dm"
|
||||
#include "code\game\objects\items\weapons\circuitboards\computer\telecomms.dm"
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
var/light_range_on = 3
|
||||
var/light_power_on = 1
|
||||
|
||||
/obj/machinery/computer/Destroy()
|
||||
qdel(circuit)
|
||||
circuit = null
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/initialize()
|
||||
power_change()
|
||||
|
||||
@@ -70,7 +75,6 @@
|
||||
for(var/x in verbs)
|
||||
verbs -= x
|
||||
set_broken()
|
||||
density = 0
|
||||
|
||||
/obj/machinery/computer/update_icon()
|
||||
..()
|
||||
@@ -124,22 +128,15 @@
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
user << "<span class='notice'>The broken glass falls out.</span>"
|
||||
new /obj/item/weapon/material/shard( src.loc )
|
||||
A.state = 3
|
||||
A.icon_state = "3"
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
user << "<span class='notice'>You disconnect the monitor.</span>"
|
||||
A.state = 4
|
||||
A.icon_state = "4"
|
||||
M.deconstruct(src)
|
||||
qdel(src)
|
||||
else
|
||||
src.attack_hand(user)
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
..()
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
#ifndef T_BOARD
|
||||
#error T_BOARD macro is not defined but we need it!
|
||||
#endif
|
||||
|
||||
/obj/item/weapon/circuitboard/holodeckcontrol
|
||||
name = T_BOARD("holodeck control console")
|
||||
build_path = /obj/machinery/computer/HolodeckControl
|
||||
origin_tech = "programming=2;bluespace=2"
|
||||
var/last_to_emag
|
||||
var/linkedholodeck_area
|
||||
var/list/supported_programs
|
||||
var/list/restricted_programs
|
||||
|
||||
/obj/item/weapon/circuitboard/holodeckcontrol/construct(var/obj/machinery/computer/HolodeckControl/HC)
|
||||
if (..(HC))
|
||||
HC.supported_programs = supported_programs.Copy()
|
||||
HC.restricted_programs = restricted_programs.Copy()
|
||||
if(linkedholodeck_area)
|
||||
HC.linkedholodeck = locate(linkedholodeck_area)
|
||||
if(last_to_emag)
|
||||
HC.last_to_emag = last_to_emag
|
||||
HC.emagged = 1
|
||||
HC.safety_disabled = 1
|
||||
|
||||
/obj/item/weapon/circuitboard/holodeckcontrol/deconstruct(var/obj/machinery/computer/HolodeckControl/HC)
|
||||
if (..(HC))
|
||||
linkedholodeck_area = HC.linkedholodeck_area
|
||||
supported_programs = HC.supported_programs.Copy()
|
||||
restricted_programs = HC.restricted_programs.Copy()
|
||||
last_to_emag = HC.last_to_emag
|
||||
HC.emergencyShutdown()
|
||||
@@ -5,10 +5,13 @@
|
||||
|
||||
use_power = 1
|
||||
active_power_usage = 8000 //8kW for the scenery + 500W per holoitem
|
||||
|
||||
circuit = /obj/item/weapon/circuitboard/holodeckcontrol
|
||||
|
||||
var/item_power_usage = 500
|
||||
|
||||
var/area/linkedholodeck = null
|
||||
var/area/target = null
|
||||
var/linkedholodeck_area
|
||||
var/active = 0
|
||||
var/list/holographic_objs = list()
|
||||
var/list/holographic_mobs = list()
|
||||
@@ -17,34 +20,39 @@
|
||||
var/mob/last_to_emag = null
|
||||
var/last_change = 0
|
||||
var/last_gravity_change = 0
|
||||
var/list/supported_programs = list( \
|
||||
"Empty Court" = "emptycourt", \
|
||||
"Basketball Court" = "basketball", \
|
||||
"Thunderdome Court" = "thunderdomecourt", \
|
||||
"Boxing Ring"="boxingcourt", \
|
||||
"Beach" = "beach", \
|
||||
"Desert" = "desert", \
|
||||
"Space" = "space", \
|
||||
"Picnic Area" = "picnicarea", \
|
||||
"Snow Field" = "snowfield", \
|
||||
"Theatre" = "theatre", \
|
||||
"Meeting Hall" = "meetinghall", \
|
||||
"Courtroom" = "courtroom" \
|
||||
)
|
||||
var/list/restricted_programs = list("Atmospheric Burn Simulation" = "burntest", "Wildlife Simulation" = "wildlifecarp")
|
||||
var/list/supported_programs
|
||||
var/list/restricted_programs
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/New()
|
||||
..()
|
||||
linkedholodeck = locate(linkedholodeck_area)
|
||||
supported_programs = list()
|
||||
restricted_programs = list()
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/attack_hand(var/mob/user as mob)
|
||||
|
||||
if(..())
|
||||
return
|
||||
return 1
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
|
||||
dat += "<B>Holodeck Control System</B><BR>"
|
||||
dat += "<HR>Current Loaded Programs:<BR>"
|
||||
|
||||
if(!linkedholodeck)
|
||||
dat += "</span class='danger'>Warning: Unable to locate holodeck.<br></span>"
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
if(!supported_programs.len)
|
||||
dat += "</span class='danger'>Warning: No supported holo-programs loaded.<br></span>"
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
for(var/prog in supported_programs)
|
||||
dat += "<A href='?src=\ref[src];program=[supported_programs[prog]]'>([prog])</A><BR>"
|
||||
|
||||
@@ -82,10 +90,8 @@
|
||||
|
||||
user << browse(dat, "window=computer;size=400x500")
|
||||
onclose(user, "computer")
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/Topic(href, href_list)
|
||||
if(..())
|
||||
return 1
|
||||
@@ -131,8 +137,9 @@
|
||||
user << "<span class='notice'>You vastly increase projector power and override the safety and security protocols.</span>"
|
||||
user << "Warning. Automatic shutoff and derezing protocols have been corrupted. Please call Nanotrasen maintenance and do not use the simulator."
|
||||
log_game("[key_name(usr)] emagged the Holodeck Control Computer")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
src.updateUsrDialog()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/proc/update_projections()
|
||||
if (safety_disabled)
|
||||
@@ -149,10 +156,6 @@
|
||||
if (last_to_emag)
|
||||
C.friends = list(last_to_emag)
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/New()
|
||||
..()
|
||||
linkedholodeck = locate(/area/holodeck/alphadeck)
|
||||
|
||||
//This could all be done better, but it works for now.
|
||||
/obj/machinery/computer/HolodeckControl/Destroy()
|
||||
emergencyShutdown()
|
||||
@@ -345,3 +348,28 @@
|
||||
|
||||
active = 0
|
||||
use_power = 1
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/Exodus
|
||||
linkedholodeck_area = /area/holodeck/alphadeck
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/Exodus/New()
|
||||
..()
|
||||
supported_programs = list(
|
||||
"Empty Court" = "emptycourt",
|
||||
"Basketball Court" = "basketball",
|
||||
"Thunderdome Court" = "thunderdomecourt",
|
||||
"Boxing Ring" = "boxingcourt",
|
||||
"Beach" = "beach",
|
||||
"Desert" = "desert",
|
||||
"Space" = "space",
|
||||
"Picnic Area" = "picnicarea",
|
||||
"Snow Field" = "snowfield",
|
||||
"Theatre" = "theatre",
|
||||
"Meeting Hall" = "meetinghall",
|
||||
"Courtroom" = "courtroom"
|
||||
)
|
||||
|
||||
restricted_programs = list(
|
||||
"Atmospheric Burn Simulation" = "burntest",
|
||||
"Wildlife Simulation" = "wildlifecarp"
|
||||
)
|
||||
|
||||
+1
-1
@@ -1360,7 +1360,7 @@
|
||||
"aAh" = (/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor/wood,/area/crew_quarters/sleep/bedrooms)
|
||||
"aAi" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor/plating,/area/maintenance/dormitory)
|
||||
"aAj" = (/obj/machinery/alarm{dir = 8; icon_state = "alarm0"; pixel_x = 24},/obj/machinery/atmospherics/binary/pump/on{dir = 1; target_pressure = 200},/turf/simulated/floor/plating,/area/maintenance/evahallway)
|
||||
"aAk" = (/obj/machinery/computer/HolodeckControl,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/turf/simulated/floor,/area/crew_quarters/fitness)
|
||||
"aAk" = (/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/machinery/computer/HolodeckControl/Exodus,/turf/simulated/floor,/area/crew_quarters/fitness)
|
||||
"aAl" = (/obj/machinery/light,/obj/item/device/radio/intercom{name = "Station Intercom (General)"; pixel_y = -27},/turf/simulated/floor{icon_state = "neutral"},/area/crew_quarters/sleep)
|
||||
"aAm" = (/turf/simulated/floor{icon_state = "neutral"},/area/crew_quarters/sleep)
|
||||
"aAn" = (/turf/simulated/floor{icon_state = "neutral"; dir = 6},/area/crew_quarters/sleep)
|
||||
|
||||
Reference in New Issue
Block a user