mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 20:23:26 +00:00
Merge pull request #394 from CHOMPStation2/Razgriz1032-patch-73
Remove 'savetofile' from NIF and transcore
This commit is contained in:
@@ -137,7 +137,7 @@ SUBSYSTEM_DEF(transcore)
|
|||||||
MR.one_time = one_time
|
MR.one_time = one_time
|
||||||
|
|
||||||
//Pass a 0 to not change NIF status (because the elseif is checking for null)
|
//Pass a 0 to not change NIF status (because the elseif is checking for null)
|
||||||
if(nif && nif.savetofile) //This is to allow Transcore to skip over saving NIFs that have already been saved.
|
if(nif)
|
||||||
MR.nif_path = nif.type
|
MR.nif_path = nif.type
|
||||||
MR.nif_durability = nif.durability
|
MR.nif_durability = nif.durability
|
||||||
var/list/nifsofts = list()
|
var/list/nifsofts = list()
|
||||||
@@ -147,7 +147,6 @@ SUBSYSTEM_DEF(transcore)
|
|||||||
nifsofts += nifsoft.type
|
nifsofts += nifsoft.type
|
||||||
MR.nif_software = nifsofts
|
MR.nif_software = nifsofts
|
||||||
MR.nif_savedata = nif.save_data.Copy()
|
MR.nif_savedata = nif.save_data.Copy()
|
||||||
nif.savetofile = FALSE
|
|
||||||
else if(isnull(nif)) //Didn't pass anything, so no NIF
|
else if(isnull(nif)) //Didn't pass anything, so no NIF
|
||||||
MR.nif_path = null
|
MR.nif_path = null
|
||||||
MR.nif_durability = null
|
MR.nif_durability = null
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
|
|||||||
|
|
||||||
var/durability = 100 // Durability remaining
|
var/durability = 100 // Durability remaining
|
||||||
var/bioadap = FALSE // If it'll work in fancy species
|
var/bioadap = FALSE // If it'll work in fancy species
|
||||||
var/savetofile = TRUE /*Start True so that Transcore saves any NIF that's newly installed with the correct scans or implant.
|
|
||||||
DO NOT CHANGE durability WITHOUT SETTING THIS TO TRUE. */
|
|
||||||
|
|
||||||
var/tmp/power_usage = 0 // Nifsoft adds to this
|
var/tmp/power_usage = 0 // Nifsoft adds to this
|
||||||
var/tmp/mob/living/carbon/human/human // Our owner!
|
var/tmp/mob/living/carbon/human/human // Our owner!
|
||||||
@@ -98,7 +96,6 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
|
|||||||
//If given wear (like when spawned) then done
|
//If given wear (like when spawned) then done
|
||||||
if(wear)
|
if(wear)
|
||||||
durability = wear
|
durability = wear
|
||||||
savetofile = TRUE
|
|
||||||
wear(0) //Just make it update.
|
wear(0) //Just make it update.
|
||||||
|
|
||||||
//Draw me yo.
|
//Draw me yo.
|
||||||
@@ -191,7 +188,6 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
|
|||||||
/obj/item/device/nif/proc/wear(var/wear = 0)
|
/obj/item/device/nif/proc/wear(var/wear = 0)
|
||||||
wear *= (rand(85,115) / 100) //Apparently rand() only takes integers.
|
wear *= (rand(85,115) / 100) //Apparently rand() only takes integers.
|
||||||
durability -= wear
|
durability -= wear
|
||||||
savetofile = TRUE
|
|
||||||
|
|
||||||
if(durability <= 0)
|
if(durability <= 0)
|
||||||
stat = NIF_TEMPFAIL
|
stat = NIF_TEMPFAIL
|
||||||
@@ -230,7 +226,6 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
|
|||||||
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||||
open = FALSE
|
open = FALSE
|
||||||
durability = initial(durability)
|
durability = initial(durability)
|
||||||
savetofile = TRUE
|
|
||||||
stat = NIF_PREINSTALL
|
stat = NIF_PREINSTALL
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user