mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 06:58:30 +01:00
Fixes slot issue
Fixes runtime with cryopods
This commit is contained in:
@@ -455,6 +455,10 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
|
||||
if(!NS || NS != old_soft)
|
||||
return FALSE //what??
|
||||
|
||||
if(!NS.can_uninstall)
|
||||
notify("The software \"[NS]\" refuses to be uninstalled.",TRUE)
|
||||
return FALSE
|
||||
|
||||
nifsofts[old_soft.list_pos] = null
|
||||
power_usage -= old_soft.p_drain
|
||||
|
||||
@@ -627,6 +631,18 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable
|
||||
bioadap = TRUE
|
||||
gib_nodrop = TRUE
|
||||
|
||||
/obj/item/device/nif/glitch
|
||||
name = "weird NIF"
|
||||
desc = "A NIF of a very dubious origin. It seems to be more durable than normal one... But are you sure about this?"
|
||||
durability = 300
|
||||
bioadap = TRUE
|
||||
starting_software = list(
|
||||
/datum/nifsoft/commlink,
|
||||
/datum/nifsoft/soulcatcher,
|
||||
/datum/nifsoft/ar_civ,
|
||||
/datum/nifsoft/malware
|
||||
)
|
||||
|
||||
////////////////////////////////
|
||||
// Special Promethean """surgery"""
|
||||
/obj/item/device/nif/attack(mob/living/M, mob/living/user, var/target_zone)
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
var/vision_flags_mob = 0
|
||||
var/darkness_view = 0
|
||||
|
||||
var/can_uninstall = TRUE
|
||||
|
||||
var/list/planes_enabled = null // List of vision planes this nifsoft enables when active
|
||||
|
||||
var/vision_exclusive = FALSE //Whether or not this NIFSoft provides exclusive vision modifier
|
||||
@@ -67,6 +69,8 @@
|
||||
|
||||
//Called when the software is removed from the NIF
|
||||
/datum/nifsoft/proc/uninstall()
|
||||
if(!can_uninstall)
|
||||
return nif.uninstall(src)
|
||||
if(nif)
|
||||
if(active)
|
||||
deactivate()
|
||||
|
||||
@@ -173,3 +173,29 @@
|
||||
var/mob/living/carbon/human/H = human
|
||||
H.hide_alt_appearance("animals", justme)
|
||||
alt_farmanimals -= nif.human
|
||||
|
||||
/datum/nifsoft/malware
|
||||
name = "Cool Kidz Toolbar"
|
||||
desc = "Best toolbar in business since 2098."
|
||||
list_pos = NIF_MALWARE
|
||||
cost = 1987
|
||||
wear = 0
|
||||
illegal = TRUE
|
||||
vended = FALSE
|
||||
tick_flags = NIF_ALWAYSTICK
|
||||
var/last_ads
|
||||
can_uninstall = FALSE
|
||||
|
||||
/datum/nifsoft/malware/activate()
|
||||
if((. = ..()))
|
||||
to_chat(nif.human,"<span class='danger'>Runtime error in 15_misc.dm, line 189.</span>")
|
||||
|
||||
/datum/nifsoft/malware/install()
|
||||
if((. = ..()))
|
||||
last_ads = world.time
|
||||
|
||||
/datum/nifsoft/malware/life()
|
||||
if((. = ..()))
|
||||
if(nif.human.client && world.time - last_ads > rand(10 MINUTES, 15 MINUTES) && prob(1))
|
||||
last_ads = world.time
|
||||
nif.human.client.create_fake_ad_popup_multiple(/obj/screen/popup/default, 5)
|
||||
Reference in New Issue
Block a user