diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 8db1c699968..e7bd3d7d34c 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -12,6 +12,8 @@ var/list/holographic_items = list() var/damaged = 0 var/last_change = 0 + var/list/connected_holopeople = list() + var/maximum_holopeople = 4 light_color = LIGHT_COLOR_CYAN @@ -22,22 +24,32 @@ /obj/machinery/computer/HolodeckControl/attack_paw(var/mob/user as mob) return -///obj/machinery/computer/HolodeckControl/attack_ghost(mob/dead/observer/user) -// if(!ticker || ticker.current_state != GAME_STATE_PLAYING) -// to_chat(user, "You can't do this until the game has started.") -// return -// if(!linkedholodeck) -// return -// var/turf/spawnturf -// var/list/L = get_area_turfs(linkedholodeck.type) -// L = shuffle(L) -// for(var/turf/T in L) -// if(!is_blocked_turf(T)) -// spawnturf = T -// break -// if(spawnturf) -// user.forceMove(spawnturf) -// user.transmogrify(/mob/living/simple_animal/hologram/advanced, TRUE) +/obj/machinery/computer/HolodeckControl/proc/spawn_holoperson(mob/dead/observer/user) + if(stat & (NOPOWER|BROKEN|MAINT)) + return + if(!ticker || ticker.current_state != GAME_STATE_PLAYING) + to_chat(user, "You can't do this until the game has started.") + return + if(!linkedholodeck) + return + if(connected_holopeople.len >= maximum_holopeople) + to_chat(user, "\The [src] cannot sustain any additional advanced holograms. Please try again when there are fewer advanced holograms on the holodeck.") + return + var/turf/spawnturf + var/list/L = get_area_turfs(linkedholodeck.type) + var/turf/T = pick(L) + while(is_blocked_turf(T)) + T = pick(L) + if(spawnturf) + user.forceMove(spawnturf) + var/mob/living/simple_animal/hologram/advanced/H = user.transmogrify(/mob/living/simple_animal/hologram/advanced, TRUE) + connected_holopeople.Add(H) + H.connected_holoconsole = src + var/list/N = hologram_names.Copy() + for(var/mob/M in connected_holopeople) + N.Remove(M.name) + H.name = capitalize(pick(N)) + H.real_name = H.name /obj/machinery/computer/HolodeckControl/attack_hand(var/mob/user as mob) @@ -46,8 +58,10 @@ user.set_machine(src) var/dat - dat += {"Holodeck Control System
-
Current Loaded Programs:
+ dat += {"Holodeck Control System
"} +// if(isobserver(user)) +// dat += {"
\[Become Advanced Hologram\]
"} + dat += {"
Current Loaded Programs:
((Basketball Court))
((Beach))
((Boxing Court))
@@ -101,11 +115,14 @@ return /obj/machinery/computer/HolodeckControl/Topic(href, href_list) + usr.set_machine(src) + + if(href_list["spawn_holoperson"]) + spawn_holoperson(usr) + if(..()) return 1 else - usr.set_machine(src) - if(href_list["emptycourt"]) target = locate(/area/holodeck/source_emptycourt) if(target) @@ -415,6 +432,8 @@ //Get rid of any items for(var/item in holographic_items) derez(item) + for(var/mob/living/simple_animal/hologram/advanced/H in connected_holopeople) + H.dissipate() //Turn it back to the regular non-holographic room target = locate(/area/holodeck/source_plating) if(target) diff --git a/code/modules/mob/living/simple_animal/hologram/hologram.dm b/code/modules/mob/living/simple_animal/hologram/hologram.dm index d16aa23883b..06d6c16f775 100644 --- a/code/modules/mob/living/simple_animal/hologram/hologram.dm +++ b/code/modules/mob/living/simple_animal/hologram/hologram.dm @@ -74,6 +74,7 @@ var/obj/item/w_uniform var/obj/item/wear_suit var/list/obj/abstract/Overlays/obj_overlays[TOTAL_LAYERS] + var/obj/machinery/computer/HolodeckControl/connected_holoconsole /mob/living/simple_animal/hologram/advanced/New() ..() @@ -85,7 +86,9 @@ /mob/living/simple_animal/hologram/advanced/Login() ..() - to_chat(src, "You are a hologram. You can perform a few basic functions, and are unable to leave the holodeck. You know nothing of this station or its crew except what you learn from this point on.") + to_chat(src, "You are a hologram. You can perform a few basic functions, and are unable to leave the holodeck.\ + \nYou know nothing of this station or its crew except what you learn from this point on.\ + \nDo not damage the holodeck. Do not harm crew members without their consent.") if(transmogged_from) to_chat(src, "Use the spell in the top-right corner of the screen to go back to being a ghost.") @@ -93,6 +96,9 @@ head = null w_uniform = null wear_suit = null + if(connected_holoconsole) + connected_holoconsole.connected_holopeople.Remove(src) + connected_holoconsole = null transmogrify() ..() @@ -107,7 +113,7 @@ /mob/living/simple_animal/hologram/advanced/Life() ..() regular_hud_updates() - if(!istype(get_area(src), /area/holodeck)) + if(!istype(get_area(src), /area/holodeck) || (mind && !client)) dissipate() /mob/living/simple_animal/hologram/proc/dissipate() diff --git a/code/names.dm b/code/names.dm index 515f5618ea2..c10f80b0ed4 100644 --- a/code/names.dm +++ b/code/names.dm @@ -18,5 +18,6 @@ var/list/adjectives = file2list("config/names/adjectives.txt") var/list/vox_name_syllables = list("cha","chi","ha","hi","ka","kah","ki","ta","ti","ya","ya","yi") var/list/golem_names = file2list("config/names/golem.txt") var/list/borer_names = file2list("config/names/borer.txt") +var/list/hologram_names = file2list("config/names/hologram.txt") var/list/autoborg_silly_names = file2listExceptComments("config/names/autoborg_silly.txt") diff --git a/config/names/hologram.txt b/config/names/hologram.txt new file mode 100644 index 00000000000..e069fdc910c --- /dev/null +++ b/config/names/hologram.txt @@ -0,0 +1,21 @@ +Rimmer +Benton +Leith +Fontaine +Barclay +Lister +Lewis +Gatebox +Switch +Hal-O'Gram +Neo +Morpheus +Trinity +Cypher +Apoc +Dozer +Tank +Mouse +Architect +Oracle +Smith \ No newline at end of file