mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
CMO Emergency Disk
Mind storage for evacuation.
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
var/datum/transhuman/infocore/TC //Easy debugging access
|
||||
var/organic_capable = 1
|
||||
var/synthetic_capable = 1
|
||||
var/obj/item/weapon/disk/transcore/disk
|
||||
|
||||
/obj/machinery/computer/transhuman/resleeving/initialize()
|
||||
..()
|
||||
@@ -72,6 +73,11 @@
|
||||
P.connected = src
|
||||
P.name = "[initial(P.name)] #[pods.len]"
|
||||
user << "<span class='notice'>You connect [P] to [src].</span>"
|
||||
else if(istype(W, /obj/item/weapon/disk/transcore))
|
||||
user.unEquip(W)
|
||||
disk = W
|
||||
disk.forceMove(src)
|
||||
user << "<span class='notice'>You insert \the [W] into \the [src].</span>"
|
||||
else
|
||||
..()
|
||||
return
|
||||
@@ -179,6 +185,8 @@
|
||||
data["spodsLen"] = spods.len
|
||||
data["sleeversLen"] = sleevers.len
|
||||
data["temp"] = temp
|
||||
data["coredumped"] = transcore.core_dumped
|
||||
data["emergency"] = disk ? 1 : 0
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
@@ -210,6 +218,16 @@
|
||||
else if (href_list["refresh"])
|
||||
updateUsrDialog()
|
||||
|
||||
else if (href_list["coredump"])
|
||||
if(disk)
|
||||
transcore.core_dump(disk)
|
||||
disk.forceMove(get_turf(src))
|
||||
disk = null
|
||||
|
||||
else if (href_list["ejectdisk"])
|
||||
disk.forceMove(get_turf(src))
|
||||
disk = null
|
||||
|
||||
else if (href_list["create"])
|
||||
if(istype(active_br))
|
||||
//Tried to grow a synth but no synth pods.
|
||||
@@ -328,3 +346,31 @@
|
||||
|
||||
nanomanager.update_uis(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
// In here because only relevant to computer
|
||||
/obj/item/weapon/cmo_disk_holder
|
||||
name = "cmo emergency packet"
|
||||
desc = "A small paper packet with printing on one side. \"Tear open in case of Code Delta or Emergency Evacuation ONLY. Use in any other case is UNLAWFUL.\""
|
||||
icon = 'icons/vore/custom_items_vr.dmi'
|
||||
icon_state = "cmoemergency"
|
||||
item_state = "card-id"
|
||||
|
||||
/obj/item/weapon/cmo_disk_holder/attack_self(var/mob/attacker)
|
||||
playsound(src, 'sound/items/poster_ripped.ogg', 50)
|
||||
attacker << "<span class='warning'>You tear open \the [name].</span>"
|
||||
attacker.unEquip(src)
|
||||
var/obj/item/weapon/disk/transcore/newdisk = new(get_turf(src))
|
||||
attacker.put_in_any_hand_if_possible(newdisk)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/disk/transcore
|
||||
name = "TransCore Dump Disk"
|
||||
desc = "It has a small label. \n\
|
||||
\"1.INSERT DISK INTO RESLEEVING CONSOLE\n\
|
||||
2. BEGIN CORE DUMP PROCEDURE\n\
|
||||
3. ENSURE DISK SAFETY WHEN EJECTED\""
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "harddisk"
|
||||
item_state = "card-id"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/datum/transhuman/mind_record/list/stored = list()
|
||||
|
||||
@@ -12,6 +12,7 @@ var/datum/transhuman/infocore/transcore = new/datum/transhuman/infocore
|
||||
/datum/transhuman/infocore
|
||||
var/overdue_time = 15 MINUTES
|
||||
var/process_time = 1 MINUTE
|
||||
var/core_dumped = 0
|
||||
|
||||
var/datum/transhuman/mind_record/list/backed_up = list()
|
||||
var/datum/transhuman/mind_record/list/has_left = list()
|
||||
@@ -21,6 +22,7 @@ var/datum/transhuman/infocore/transcore = new/datum/transhuman/infocore
|
||||
process()
|
||||
|
||||
/datum/transhuman/infocore/proc/process()
|
||||
if(core_dumped) return
|
||||
for(var/N in backed_up)
|
||||
var/datum/transhuman/mind_record/curr_MR = backed_up[N]
|
||||
if(!curr_MR)
|
||||
@@ -40,7 +42,7 @@ var/datum/transhuman/infocore/transcore = new/datum/transhuman/infocore
|
||||
|
||||
/datum/transhuman/infocore/proc/m_backup(var/datum/mind/mind)
|
||||
ASSERT(mind)
|
||||
if(!mind.name) //Name is critical to everything here
|
||||
if(!mind.name || core_dumped)
|
||||
return 0
|
||||
|
||||
var/datum/transhuman/mind_record/MR
|
||||
@@ -56,7 +58,7 @@ var/datum/transhuman/infocore/transcore = new/datum/transhuman/infocore
|
||||
/datum/transhuman/infocore/proc/notify(var/name)
|
||||
ASSERT(name)
|
||||
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null)
|
||||
a.autosay("[name] is past-due for a mind backup. This will be the only notification.", "Backup Monitor", "Medical")
|
||||
a.autosay("[name] is past-due for a mind backup. This will be the only notification.", "TransCore Oversight", "Medical")
|
||||
qdel(a)
|
||||
|
||||
/datum/transhuman/infocore/proc/add_backup(var/datum/transhuman/mind_record/MR)
|
||||
@@ -76,6 +78,18 @@ var/datum/transhuman/infocore/transcore = new/datum/transhuman/infocore
|
||||
body_scans[BR.mydna.name] = BR
|
||||
log_debug("Added [BR.mydna.name] to transcore body DB.")
|
||||
|
||||
/datum/transhuman/infocore/proc/core_dump(var/obj/item/weapon/disk/transcore/disk)
|
||||
ASSERT(disk)
|
||||
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/heads/captain(null)
|
||||
a.autosay("An emergency core dump has been initiated!", "TransCore Oversight", "Command")
|
||||
a.autosay("An emergency core dump has been initiated!", "TransCore Oversight", "Medical")
|
||||
qdel(a)
|
||||
|
||||
disk.stored += backed_up
|
||||
backed_up.Cut()
|
||||
core_dumped = 1
|
||||
return disk.stored.len
|
||||
|
||||
/////// Mind-backup record ///////
|
||||
/datum/transhuman/mind_record
|
||||
//User visible
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 30 KiB |
@@ -3819,7 +3819,7 @@
|
||||
"bvw" = (/obj/structure/table/reinforced,/turf/simulated/floor/tiled/white,/area/crew_quarters/heads/cmo)
|
||||
"bvx" = (/obj/structure/table/reinforced,/obj/machinery/computer/skills{pixel_y = 4},/turf/simulated/floor/tiled/white,/area/crew_quarters/heads/cmo)
|
||||
"bvy" = (/turf/simulated/floor/tiled/white,/area/crew_quarters/heads/cmo)
|
||||
"bvz" = (/obj/structure/closet/secure_closet/CMO,/obj/effect/floor_decal/corner/paleblue{dir = 6},/obj/item/device/radio/intercom{dir = 4; name = "Station Intercom (General)"; pixel_x = 21},/obj/item/clothing/glasses/sunglasses/omnihud/cmo,/turf/simulated/floor/tiled/white,/area/crew_quarters/heads/cmo)
|
||||
"bvz" = (/obj/structure/closet/secure_closet/CMO,/obj/effect/floor_decal/corner/paleblue{dir = 6},/obj/item/device/radio/intercom{dir = 4; name = "Station Intercom (General)"; pixel_x = 21},/obj/item/clothing/glasses/sunglasses/omnihud/cmo,/obj/item/weapon/cmo_disk_holder,/turf/simulated/floor/tiled/white,/area/crew_quarters/heads/cmo)
|
||||
"bvA" = (/obj/structure/table/steel,/obj/item/weapon/autopsy_scanner,/obj/item/weapon/surgical/scalpel,/obj/machinery/light{dir = 1},/obj/item/weapon/surgical/cautery,/obj/effect/floor_decal/corner/paleblue{dir = 5},/turf/simulated/floor/tiled,/area/medical/morgue)
|
||||
"bvB" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/machinery/door/firedoor/border_only,/turf/simulated/floor/plating,/area/medical/virology)
|
||||
"bvC" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/obj/machinery/door/firedoor/border_only,/obj/structure/disposalpipe/segment,/turf/simulated/floor/plating,/area/medical/virology)
|
||||
|
||||
@@ -1,126 +1,138 @@
|
||||
<b>{{:data.temp}}</b>
|
||||
{{if data.coredumped}}
|
||||
<div class='item'>
|
||||
<span class='bad'>TransCore dump complete. Disk ejected.</span>
|
||||
</div>
|
||||
{{else data.emergency}}
|
||||
<div class='item'>
|
||||
<span class='bad'>!!WARNING!!<br>Dump Disk Inserted! This will transfer all minds to the dump disk, and the TransCore will be made unusable until post-shift maintenance! This should only be used in emergencies!</span><br>
|
||||
</div>
|
||||
{{:helper.link('DUMP CORE', 'radiation', {'coredump' : data.emergency}, null, 'redButton')}}
|
||||
{{:helper.link('Eject Disk', 'eject', {'ejectdisk' : data.emergency})}}
|
||||
{{else}}
|
||||
<b>{{:data.temp}}</b>
|
||||
|
||||
<!-- Menu1: Main Menu -->
|
||||
{{if data.menu == 1}}
|
||||
<h3>Resleeving Control</h3>
|
||||
<div class='item'>
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
{{if data.podsLen > 0}}
|
||||
<span class='good'>{{:data.podsLen}} growing vats found.</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
{{if data.spodsLen > 0}}
|
||||
<span class='good'>{{:data.spodsLen}} SyntFabs found.</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
{{if data.sleeversLen > 0}}
|
||||
<span class='good'>{{:data.sleeversLen}} resleeving pods found.</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{if data.podsLen}}
|
||||
{{for data.pods}}
|
||||
<div class='item'>{{:value.pod}}, biomass: <i>{{:value.biomass}}</i></div>
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
|
||||
{{if data.spodsLen}}
|
||||
{{for data.spods}}
|
||||
<div class='item'>{{:value.spod}}, S/G: <i>{{:value.steel}}/{{:value.glass}}</i></div>
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
|
||||
{{if data.sleeversLen}}
|
||||
{{for data.sleevers}}
|
||||
<div class='item'>{{:value.sleever}}, occupant: <i>{{:value.occupant}}</i></div>
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
|
||||
<!-- Database -->
|
||||
<h3>Database Functions</h3>
|
||||
<div class='item'>
|
||||
{{:helper.link('View Body Records', 'list', {'menu' : 2})}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
{{:helper.link('View Mind Records', 'list', {'menu' : 3})}}
|
||||
</div>
|
||||
|
||||
<!-- Menu2: Body record list -->
|
||||
{{else data.menu == 2}}
|
||||
<h3>Current body records</h3>
|
||||
{{:helper.link('Back', 'arrowreturn-1-w', {'menu' : 1})}}
|
||||
<div class='item'>
|
||||
{{for data.bodyrecords}}
|
||||
{{:helper.link(value.name, 'document', {'view_brec' : value.recref})}}
|
||||
{{/for}}
|
||||
</div>
|
||||
|
||||
<!-- Menu3: Mind record list -->
|
||||
{{else data.menu == 3}}
|
||||
<h3>Current mind records</h3>
|
||||
{{:helper.link('Back', 'arrowreturn-1-w', {'menu' : 1})}}
|
||||
<div class='item'>
|
||||
{{for data.mindrecords}}
|
||||
{{:helper.link(value.name, 'document', {'view_mrec' : value.recref})}}
|
||||
{{/for}}
|
||||
</div>
|
||||
|
||||
<!-- Menu4: Specific body record -->
|
||||
{{else data.menu == 4}}
|
||||
<h3>Selected Body Record</h3>
|
||||
<div class='item'>{{:helper.link('Back', 'arrowreturn-1-w', {'menu' : 2})}}</div>
|
||||
|
||||
{{if data.activeBodyRecord}}
|
||||
<!-- Menu1: Main Menu -->
|
||||
{{if data.menu == 1}}
|
||||
<h3>Resleeving Control</h3>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Name:</div>
|
||||
<div class='itemContent'>{{:data.activeBodyRecord.real_name}}</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Species:</div>
|
||||
<div class='itemContent'>{{:data.activeBodyRecord.speciesname}}</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Bio. Sex:</div>
|
||||
<div class='itemContent'>{{:data.activeBodyRecord.gender}}</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Mind compat.:</div>
|
||||
<div class='itemContent'>{{:data.activeBodyRecord.locked}}</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Synthetic:</div>
|
||||
<div class='itemContent'>{{:data.activeBodyRecord.synthetic}}</div>
|
||||
</div>
|
||||
|
||||
{{:helper.link('Create', 'play', {'create' : data.activeBodyRecord.real_name}, data.activeBodyRecord.cando ? null : 'linkOff')}}
|
||||
|
||||
{{else}}
|
||||
<div class='item bad'>ERROR: Record not found.</div>
|
||||
{{/if}}
|
||||
|
||||
<!-- Menu5: Specific mind record -->
|
||||
{{else data.menu == 5}}
|
||||
<h3>Selected Mind Record</h3>
|
||||
<div class='item'>{{:helper.link('Back', 'arrowreturn-1-w', {'menu' : 3})}}</div>
|
||||
|
||||
{{if data.activeMindRecord}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Name:</div>
|
||||
<div class='itemContent'>{{:data.activeMindRecord.charname}}</div>
|
||||
{{if data.podsLen > 0}}
|
||||
<span class='good'>{{:data.podsLen}} growing vats found.</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Backup status:</div>
|
||||
<div class='itemContent'>{{:data.activeMindRecord.obviously_dead}}</div>
|
||||
</div>
|
||||
{{:helper.link('Sleeve', 'play', {'sleeve' : data.activeMindRecord.charname}, data.activeMindRecord.cando ? null : 'linkOff')}}
|
||||
|
||||
{{else}}
|
||||
<div class='item bad'>ERROR: Record not found.</div>
|
||||
<div class='item'>
|
||||
{{if data.spodsLen > 0}}
|
||||
<span class='good'>{{:data.spodsLen}} SyntFabs found.</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
<div class='item'>
|
||||
{{if data.sleeversLen > 0}}
|
||||
<span class='good'>{{:data.sleeversLen}} resleeving pods found.</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{if data.podsLen}}
|
||||
{{for data.pods}}
|
||||
<div class='item'>{{:value.pod}}, biomass: <i>{{:value.biomass}}</i></div>
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
|
||||
{{if data.spodsLen}}
|
||||
{{for data.spods}}
|
||||
<div class='item'>{{:value.spod}}, S/G: <i>{{:value.steel}}/{{:value.glass}}</i></div>
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
|
||||
{{if data.sleeversLen}}
|
||||
{{for data.sleevers}}
|
||||
<div class='item'>{{:value.sleever}}, occupant: <i>{{:value.occupant}}</i></div>
|
||||
{{/for}}
|
||||
{{/if}}
|
||||
|
||||
<!-- Database -->
|
||||
<h3>Database Functions</h3>
|
||||
<div class='item'>
|
||||
{{:helper.link('View Body Records', 'list', {'menu' : 2})}}
|
||||
</div>
|
||||
<div class='item'>
|
||||
{{:helper.link('View Mind Records', 'list', {'menu' : 3})}}
|
||||
</div>
|
||||
|
||||
<!-- Menu2: Body record list -->
|
||||
{{else data.menu == 2}}
|
||||
<h3>Current body records</h3>
|
||||
{{:helper.link('Back', 'arrowreturn-1-w', {'menu' : 1})}}
|
||||
<div class='item'>
|
||||
{{for data.bodyrecords}}
|
||||
{{:helper.link(value.name, 'document', {'view_brec' : value.recref})}}
|
||||
{{/for}}
|
||||
</div>
|
||||
|
||||
<!-- Menu3: Mind record list -->
|
||||
{{else data.menu == 3}}
|
||||
<h3>Current mind records</h3>
|
||||
{{:helper.link('Back', 'arrowreturn-1-w', {'menu' : 1})}}
|
||||
<div class='item'>
|
||||
{{for data.mindrecords}}
|
||||
{{:helper.link(value.name, 'document', {'view_mrec' : value.recref})}}
|
||||
{{/for}}
|
||||
</div>
|
||||
|
||||
<!-- Menu4: Specific body record -->
|
||||
{{else data.menu == 4}}
|
||||
<h3>Selected Body Record</h3>
|
||||
<div class='item'>{{:helper.link('Back', 'arrowreturn-1-w', {'menu' : 2})}}</div>
|
||||
|
||||
{{if data.activeBodyRecord}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Name:</div>
|
||||
<div class='itemContent'>{{:data.activeBodyRecord.real_name}}</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Species:</div>
|
||||
<div class='itemContent'>{{:data.activeBodyRecord.speciesname}}</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Bio. Sex:</div>
|
||||
<div class='itemContent'>{{:data.activeBodyRecord.gender}}</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Mind compat.:</div>
|
||||
<div class='itemContent'>{{:data.activeBodyRecord.locked}}</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Synthetic:</div>
|
||||
<div class='itemContent'>{{:data.activeBodyRecord.synthetic}}</div>
|
||||
</div>
|
||||
|
||||
{{:helper.link('Create', 'play', {'create' : data.activeBodyRecord.real_name}, data.activeBodyRecord.cando ? null : 'linkOff')}}
|
||||
|
||||
{{else}}
|
||||
<div class='item bad'>ERROR: Record not found.</div>
|
||||
{{/if}}
|
||||
|
||||
<!-- Menu5: Specific mind record -->
|
||||
{{else data.menu == 5}}
|
||||
<h3>Selected Mind Record</h3>
|
||||
<div class='item'>{{:helper.link('Back', 'arrowreturn-1-w', {'menu' : 3})}}</div>
|
||||
|
||||
{{if data.activeMindRecord}}
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Name:</div>
|
||||
<div class='itemContent'>{{:data.activeMindRecord.charname}}</div>
|
||||
</div>
|
||||
<div class='item'>
|
||||
<div class='itemLabel'>Backup status:</div>
|
||||
<div class='itemContent'>{{:data.activeMindRecord.obviously_dead}}</div>
|
||||
</div>
|
||||
{{:helper.link('Sleeve', 'play', {'sleeve' : data.activeMindRecord.charname}, data.activeMindRecord.cando ? null : 'linkOff')}}
|
||||
|
||||
{{else}}
|
||||
<div class='item bad'>ERROR: Record not found.</div>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
Reference in New Issue
Block a user