mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-17 21:53:05 +00:00
Adds a mind backup nifsoft and fixes one-time scans not saving nifs.
-Adds a nifsoft that can be used for manual mind backups on the go sleevemate style. -Fixes one-time backups not saving nifs (sleevemate and this thing) -Apparently the backup proc only saved nifs on the second sync.
This commit is contained in:
@@ -16,30 +16,31 @@
|
|||||||
#define NIF_UVFILTER 12
|
#define NIF_UVFILTER 12
|
||||||
#define NIF_FLASHPROT 13
|
#define NIF_FLASHPROT 13
|
||||||
//Health-related
|
//Health-related
|
||||||
#define NIF_CREWMONITOR 14
|
#define NIF_BACKUP 14
|
||||||
#define NIF_ORGANIC_HEAL 15
|
#define NIF_CREWMONITOR 15
|
||||||
#define NIF_SYNTH_HEAL 16
|
#define NIF_ORGANIC_HEAL 16
|
||||||
#define NIF_AUTOSTASIS 17 //These two are just part of
|
#define NIF_SYNTH_HEAL 17
|
||||||
#define NIF_MED_ALARM 18 //medichines right now
|
#define NIF_AUTOSTASIS 18 //These two are just part of
|
||||||
#define NIF_TOXHEAL 19 //And this, for organics
|
#define NIF_MED_ALARM 19 //medichines right now
|
||||||
#define NIF_SPAREBREATH 20
|
#define NIF_TOXHEAL 20 //And this, for organics
|
||||||
|
#define NIF_SPAREBREATH 21
|
||||||
//Combat Related
|
//Combat Related
|
||||||
#define NIF_BRUTEARMOR 21
|
#define NIF_BRUTEARMOR 22
|
||||||
#define NIF_BURNARMOR 22
|
#define NIF_BURNARMOR 23
|
||||||
#define NIF_PAINKILLERS 23
|
#define NIF_PAINKILLERS 24
|
||||||
#define NIF_HARDCLAWS 24
|
#define NIF_HARDCLAWS 25
|
||||||
#define NIF_HIDDENLASER 25
|
#define NIF_HIDDENLASER 26
|
||||||
//Other
|
//Other
|
||||||
#define NIF_COMMLINK 26
|
#define NIF_COMMLINK 27
|
||||||
#define NIF_APCCHARGE 27
|
#define NIF_APCCHARGE 28
|
||||||
#define NIF_PRESSURE 28
|
#define NIF_PRESSURE 29
|
||||||
#define NIF_HEATSINK 29
|
#define NIF_HEATSINK 30
|
||||||
#define NIF_COMPLIANCE 30
|
#define NIF_COMPLIANCE 31
|
||||||
#define NIF_SIZECHANGE 31
|
#define NIF_SIZECHANGE 32
|
||||||
#define NIF_SOULCATCHER 32
|
#define NIF_SOULCATCHER 33
|
||||||
|
|
||||||
// Must be equal to the highest number above
|
// Must be equal to the highest number above
|
||||||
#define TOTAL_NIF_SOFTWARE 32
|
#define TOTAL_NIF_SOFTWARE 33
|
||||||
|
|
||||||
//////////////////////
|
//////////////////////
|
||||||
// NIF flag list hints
|
// NIF flag list hints
|
||||||
|
|||||||
@@ -81,6 +81,21 @@ SUBSYSTEM_DEF(transcore)
|
|||||||
else
|
else
|
||||||
MR = new(mind, mind.current, add_to_db = TRUE, one_time = one_time)
|
MR = new(mind, mind.current, add_to_db = TRUE, one_time = one_time)
|
||||||
|
|
||||||
|
//Pass a 0 to not change NIF status (because the elseif is checking for null)
|
||||||
|
if(nif)
|
||||||
|
MR.nif_path = nif.type
|
||||||
|
MR.nif_durability = nif.durability
|
||||||
|
var/list/nifsofts = list()
|
||||||
|
for(var/N in nif.nifsofts)
|
||||||
|
if(N)
|
||||||
|
var/datum/nifsoft/nifsoft = N
|
||||||
|
nifsofts += nifsoft.type
|
||||||
|
MR.nif_software = nifsofts
|
||||||
|
else if(isnull(nif)) //Didn't pass anything, so no NIF
|
||||||
|
MR.nif_path = null
|
||||||
|
MR.nif_durability = null
|
||||||
|
MR.nif_software = null
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
// Send a past-due notification to the medical radio channel.
|
// Send a past-due notification to the medical radio channel.
|
||||||
|
|||||||
@@ -210,3 +210,25 @@
|
|||||||
breath.adjust_gas("oxygen", 300)
|
breath.adjust_gas("oxygen", 300)
|
||||||
breath.temperature = T20C
|
breath.temperature = T20C
|
||||||
return breath
|
return breath
|
||||||
|
|
||||||
|
/datum/nifsoft/mindbackup
|
||||||
|
name = "Mind Backup"
|
||||||
|
desc = "Backup your mind on the go. Stores a one-time sync of your current mindstate upon activation"
|
||||||
|
list_pos = NIF_BACKUP
|
||||||
|
cost = 250
|
||||||
|
|
||||||
|
activate()
|
||||||
|
if((. = ..()))
|
||||||
|
var/mob/living/carbon/human/H = nif.human
|
||||||
|
SStranscore.m_backup(H.mind,H.nif,one_time = TRUE)
|
||||||
|
nif.notify("Mind backed up!")
|
||||||
|
nif.use_charge(0.1)
|
||||||
|
deactivate()
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
deactivate()
|
||||||
|
if((. = ..()))
|
||||||
|
return TRUE
|
||||||
|
|
||||||
|
stat_text()
|
||||||
|
return "Store Backup"
|
||||||
Reference in New Issue
Block a user