Finishing Up NIFs

Squashed commit:

[4b18ca1] Finishing up NIFs

[e4adb4a] Tons more NIF work

All the implants are done!
This commit is contained in:
Arokha Sieyes
2017-06-06 19:34:41 -04:00
parent 34f60eb07b
commit 08e7703e4f
31 changed files with 1003 additions and 149 deletions
+40 -44
View File
@@ -5,16 +5,15 @@
desc = "Provides a general identification and health status overlay on your vision with no frills."
list_pos = NIF_CIVILIAN_AR
cost = 500
initial = TRUE
a_drain = 0.05
activate()
if(..())
if((. = ..()))
nif.deactivate_these(NIF_MEDICAL_AR,NIF_SECURITY_AR,NIF_ENGINE_AR,NIF_SCIENCE_AR,NIF_OMNI_AR)
nif.set_flag(NIF_V_AR_CIVILIAN,NIF_FLAGS_VISION)
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_V_AR_CIVILIAN,NIF_FLAGS_VISION)
/datum/nifsoft/ar_med
@@ -22,17 +21,16 @@
desc = "Like the civilian model, but provides medical records access and virus database lookup."
list_pos = NIF_MEDICAL_AR
cost = 750
initial = TRUE
req_one_access = list(access_medical)
access = access_medical
a_drain = 0.05
activate()
if(..())
if((. = ..()))
nif.deactivate_these(NIF_CIVILIAN_AR,NIF_SECURITY_AR,NIF_ENGINE_AR,NIF_SCIENCE_AR,NIF_OMNI_AR)
nif.set_flag(NIF_V_AR_MEDICAL,NIF_FLAGS_VISION)
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_V_AR_MEDICAL,NIF_FLAGS_VISION)
/datum/nifsoft/ar_sec
@@ -40,17 +38,16 @@
desc = "Like the civilian model, but provides access to arrest status and security records."
list_pos = NIF_SECURITY_AR
cost = 750
initial = TRUE
req_one_access = list(access_security)
access = access_security
a_drain = 0.05
activate()
if(..())
if((. = ..()))
nif.deactivate_these(NIF_CIVILIAN_AR,NIF_MEDICAL_AR,NIF_ENGINE_AR,NIF_SCIENCE_AR,NIF_OMNI_AR)
nif.set_flag(NIF_V_AR_SECURITY,NIF_FLAGS_VISION)
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_V_AR_SECURITY,NIF_FLAGS_VISION)
/datum/nifsoft/ar_eng
@@ -58,17 +55,16 @@
desc = "Like the civilian model, but provides station alert notices."
list_pos = NIF_ENGINE_AR
cost = 750
initial = TRUE
req_one_access = list(access_engine)
access = access_engine
a_drain = 0.05
activate()
if(..())
if((. = ..()))
nif.deactivate_these(NIF_CIVILIAN_AR,NIF_MEDICAL_AR,NIF_SECURITY_AR,NIF_SCIENCE_AR,NIF_OMNI_AR)
nif.set_flag(NIF_V_AR_ENGINE,NIF_FLAGS_VISION)
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_V_AR_ENGINE,NIF_FLAGS_VISION)
/datum/nifsoft/ar_science
@@ -76,17 +72,16 @@
desc = "Like the civilian model, but provides ... well, nothing. For now."
list_pos = NIF_SCIENCE_AR
cost = 750
initial = TRUE
req_one_access = list(access_research)
access = access_research
a_drain = 0.05
activate()
if(..())
if((. = ..()))
nif.deactivate_these(NIF_CIVILIAN_AR,NIF_MEDICAL_AR,NIF_SECURITY_AR,NIF_ENGINE_AR,NIF_OMNI_AR)
nif.set_flag(NIF_V_AR_SCIENCE,NIF_FLAGS_VISION)
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_V_AR_SCIENCE,NIF_FLAGS_VISION)
/datum/nifsoft/ar_omni
@@ -94,17 +89,16 @@
desc = "Like the civilian model, but provides most of the features of the medical and security overlays as well."
list_pos = NIF_OMNI_AR
cost = 750
initial = TRUE
req_one_access = list(access_captain)
access = access_captain
a_drain = 0.05
activate()
if(..())
if((. = ..()))
nif.deactivate_these(NIF_CIVILIAN_AR,NIF_MEDICAL_AR,NIF_SECURITY_AR,NIF_ENGINE_AR,NIF_SCIENCE_AR)
nif.set_flag(NIF_V_AR_OMNI,NIF_FLAGS_VISION)
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_V_AR_OMNI,NIF_FLAGS_VISION)
//////////////
@@ -117,11 +111,11 @@
a_drain = 0.025
activate()
if(..())
if((. = ..()))
nif.set_flag(NIF_V_CORRECTIVE,NIF_FLAGS_VISION)
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_V_CORRECTIVE,NIF_FLAGS_VISION)
/datum/nifsoft/uvblocker
@@ -132,11 +126,11 @@
a_drain = 0.2
activate()
if(..())
if((. = ..()))
nif.set_flag(NIF_V_UVFILTER,NIF_FLAGS_VISION)
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_V_UVFILTER,NIF_FLAGS_VISION)
/datum/nifsoft/flashprot
@@ -144,15 +138,15 @@
desc = "Enables a high-speed shielding response to intense light, such as flashes, to block them."
list_pos = NIF_FLASHPROT
cost = 600
req_one_access = list(access_security)
access = access_security
a_drain = 0.05
activate()
if(..())
if((. = ..()))
nif.set_flag(NIF_V_FLASHPROT,NIF_FLAGS_VISION)
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_V_FLASHPROT,NIF_FLAGS_VISION)
////////////////
@@ -163,19 +157,20 @@
list_pos = NIF_MESONS
cost = 1000
a_drain = 0.1
access = access_engine
tick_flags = NIF_ACTIVETICK
activate()
if(..())
if((. = ..()))
nif.deactivate_these(NIF_MATERIAL,NIF_THERMALS,NIF_NIGHTVIS)
nif.set_flag(NIF_V_MESONS,NIF_FLAGS_VISION)
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_V_MESONS,NIF_FLAGS_VISION)
life()
if(..())
if((. = ..()))
var/mob/living/carbon/human/H = nif.human
H.client.screen |= global_hud.meson
H.sight |= SEE_TURFS
@@ -186,19 +181,20 @@
list_pos = NIF_MATERIAL
cost = 1000
a_drain = 0.1
access = access_research
tick_flags = NIF_ACTIVETICK
activate()
if(..())
if((. = ..()))
nif.deactivate_these(NIF_MESONS,NIF_THERMALS,NIF_NIGHTVIS)
nif.set_flag(NIF_V_MATERIAL,NIF_FLAGS_VISION)
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_V_MATERIAL,NIF_FLAGS_VISION)
life()
if(..())
if((. = ..()))
nif.human.sight |= SEE_OBJS
/datum/nifsoft/thermals
@@ -206,21 +202,21 @@
desc = "Similar to the worn Thermal Goggles, these allow you to see heat-emitting creatures through walls."
list_pos = NIF_THERMALS
cost = 1000
req_one_access = list(access_security)
a_drain = 0.1
access = access_captain
tick_flags = NIF_ACTIVETICK
activate()
if(..())
if((. = ..()))
nif.deactivate_these(NIF_MESONS,NIF_MATERIAL,NIF_NIGHTVIS)
nif.set_flag(NIF_V_THERMALS,NIF_FLAGS_VISION)
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_V_THERMALS,NIF_FLAGS_VISION)
life()
if(..())
if((. = ..()))
var/mob/living/carbon/human/H = nif.human
H.sight |= SEE_MOBS
H.client.screen |= global_hud.thermal
@@ -231,21 +227,21 @@
desc = "Similar to the worn Night Vision Goggles, these allow you to see in complete darkness."
list_pos = NIF_NIGHTVIS
cost = 1000
req_one_access = list(access_security)
a_drain = 0.1
access = access_security
tick_flags = NIF_ACTIVETICK
activate()
if(..())
if((. = ..()))
nif.deactivate_these(NIF_MESONS,NIF_MATERIAL,NIF_THERMALS)
nif.set_flag(NIF_V_NIGHTVIS,NIF_FLAGS_VISION)
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_V_NIGHTVIS,NIF_FLAGS_VISION)
life()
if(..())
if((. = ..()))
var/mob/living/carbon/human/H = nif.human
H.see_in_dark += 7
H.client.screen |= global_hud.nvg
+46 -17
View File
@@ -1,14 +1,41 @@
/*
#define NIF_SPAREBREATH 17
*/
// #define NIF_CREWMONITOR 14
/datum/nifsoft/crewmonitor
name = "Crew Monitor"
desc = "A link to the local crew monitor sensors. Useful for finding people in trouble."
list_pos = NIF_CREWMONITOR
access = access_medical
cost = 1250
p_drain = 0.025
var/datum/nano_module/crew_monitor/arscreen
New()
..()
arscreen = new(nif)
Destroy()
qdel(arscreen)
..()
activate()
if((. = ..()))
arscreen.ui_interact(nif.human,"main",null,1,nif_state)
return TRUE
deactivate()
if((. = ..()))
return TRUE
stat_text()
return "Show Monitor"
/datum/nifsoft/medichines_org
name = "Medichines (Org)"
name = "Medichines"
desc = "An internal swarm of nanites to make sure you stay in good shape and to promote healing, or to preserve you if you are critically injured."
list_pos = NIF_ORGANIC_HEAL
cost = 2500
p_drain = 0.05
a_drain = 0.1 //This is messed with manually below.
wear = 2
activates = FALSE //It is automatic in emergencies, not manually controllable.
tick_flags = NIF_ALWAYSTICK
applies_to = NIF_ORGANIC
@@ -16,19 +43,19 @@
//These self-activate on their own, these aren't user-settable to on/off.
activate()
if(..())
if((. = ..()))
nif.set_flag(NIF_H_ORGREPAIR,NIF_FLAGS_HEALTH)
mode = 1
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_H_ORGREPAIR,NIF_FLAGS_HEALTH)
a_drain = initial(a_drain)
mode = initial(mode)
nif.human.in_stasis = 0
nif.human.Stasis(0)
life()
if(..())
if((. = ..()))
var/mob/living/carbon/human/H = nif.human
var/HP_percent = H.health/H.getMaxHealth()
@@ -67,21 +94,22 @@
//Patient critical - emergency stasis
if(mode >= 3)
if(HP_percent <= 0)
H.in_stasis = 3
H.Stasis(3)
if(HP_percent > 0.2)
H.in_stasis = 0
H.Stasis(0)
nif.notify("Ending emergency stasis.",TRUE)
mode = 2
return TRUE
/datum/nifsoft/medichines_syn
name = "Medichines (Syn)"
name = "Medichines"
desc = "A swarm of mechanical repair nanites, able to repair relatively minor damage to synthetic bodies. Large repairs must still be performed manually."
list_pos = NIF_SYNTH_HEAL
cost = 2500
p_drain = 0.05
a_drain = 0.00 //This is manually drained below.
wear = 2
activates = FALSE //It is automatic in emergencies, not manually controllable.
tick_flags = NIF_ALWAYSTICK
applies_to = NIF_SYNTHETIC
@@ -89,17 +117,17 @@
//These self-activate on their own, these aren't user-settable to on/off.
activate()
if(..())
if((. = ..()))
nif.set_flag(NIF_H_SYNTHREPAIR,NIF_FLAGS_HEALTH)
mode = 1
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_H_SYNTHREPAIR,NIF_FLAGS_HEALTH)
mode = 0
life()
if(..())
if((. = ..()))
//We're good!
if(!nif.human.bad_external_organs.len)
if(mode || active)
@@ -135,6 +163,7 @@
cost = 650
p_drain = 0.05
a_drain = 0.1
wear = 2
tick_flags = NIF_ALWAYSTICK
applies_to = NIF_ORGANIC
var/filled = 100 //Tracks the internal tank 'refilling', which still uses power
@@ -143,17 +172,17 @@
if(!(filled > 50))
nif.notify("Respirocytes not saturated!",TRUE)
return FALSE
if(..())
if((. = ..()))
nif.set_flag(NIF_H_SPAREBREATH,NIF_FLAGS_HEALTH)
nif.notify("Now taking air from reserves.")
deactivate()
if(..())
if((. = ..()))
nif.clear_flag(NIF_H_SPAREBREATH,NIF_FLAGS_HEALTH)
nif.notify("Now taking air from environment and refilling reserves.")
life()
if(..())
if((. = ..()))
if(active) //Supplying air, not recharging it
switch(filled) //Text warnings
if(75)
+138 -5
View File
@@ -1,7 +1,140 @@
/*
#define NIF_BRUTEARMOR 18
#define NIF_BURNARMOR 19
#define NIF_PAINKILLERS 20
#define NIF_HARDCLAWS 21
#define NIF_HIDDENLASER 22
*/
*/
/datum/nifsoft/brute_armor
name = "Bullhide Mod"
desc = "A difficult-to-produce thickening of the dermis and skeletal structure, allowing a user to absorb more external trauma from physical sources."
list_pos = NIF_BRUTEARMOR
cost = 3200
p_drain = 0.05
illegal = TRUE
wear = 3
access = 999 //Prevents anyone from buying it without an emag.
activates = FALSE //It's armor.
install()
if((. = ..()))
nif.set_flag(NIF_C_BRUTEARMOR,NIF_FLAGS_COMBAT)
uninstall()
. = ..()
nif.clear_flag(NIF_C_BRUTEARMOR,NIF_FLAGS_COMBAT)
/datum/nifsoft/burn_armor
name = "Dragon's Skin"
desc = "A thin layer of material under the skin provides heat disappation for burns, reducing the trauma from lasers and fire. Not effective against ongoing environmental heat."
list_pos = NIF_BURNARMOR
cost = 3200
p_drain = 0.05
illegal = TRUE
wear = 3
access = 999 //Prevents anyone from buying it without an emag.
activates = FALSE //It's armor.
install()
if((. = ..()))
nif.set_flag(NIF_C_BURNARMOR,NIF_FLAGS_COMBAT)
uninstall()
. = ..()
nif.clear_flag(NIF_C_BURNARMOR,NIF_FLAGS_COMBAT)
/datum/nifsoft/painkillers
name = "Nova Shock"
desc = "A constant stream of high-grade painkillers numb the user's body to all pain. Generally results in extreme addiction or overdose."
list_pos = NIF_PAINKILLERS
cost = 2600
a_drain = 1 //Gotta produce them drugs, yo.
illegal = TRUE
wear = 2
access = 999 //Prevents anyone from buying it without an emag.
tick_flags = NIF_ACTIVETICK
activate()
if((. = ..()))
nif.set_flag(NIF_C_PAINKILLERS,NIF_FLAGS_COMBAT)
deactivate()
if((. = ..()))
nif.clear_flag(NIF_C_PAINKILLERS,NIF_FLAGS_COMBAT)
life()
if((. = ..()))
var/mob/living/carbon/human/H = nif.human
H.bloodstr.add_reagent("numbenzyme",0.5)
/datum/nifsoft/hardclaws
name = "Bloodletters"
desc = "Generates monofilament wires from one's fingertips, allowing one to slash through almost any armor with relative ease. The monofilaments need to be replaced constantly, though, which does use power."
list_pos = NIF_HARDCLAWS
cost = 2200
a_drain = 0.5
illegal = TRUE
wear = 4
access = 999 //Prevents anyone from buying it without an emag.
activate()
if((. = ..()))
nif.set_flag(NIF_C_HARDCLAWS,NIF_FLAGS_COMBAT)
deactivate()
if((. = ..()))
nif.clear_flag(NIF_C_HARDCLAWS,NIF_FLAGS_COMBAT)
// The unarmed attack to go with the hardclaws
var/global/datum/unarmed_attack/hardclaws/unarmed_hardclaws = new()
/datum/unarmed_attack/hardclaws
attack_verb = list("claws")
attack_noun = list("talons")
damage = 15
attack_sound = "punch"
miss_sound = 'sound/weapons/punchmiss.ogg'
sharp = 1
edge = 1
sparring_variant_type = /datum/unarmed_attack/hardclaws
/datum/nifsoft/hidelaser
name = "Dazzle"
desc = "Fabricates a 2-shot holdout laser inside your body, which can be deployed (somewhat painfully) on demand. Only enough materials to generate one."
list_pos = NIF_HIDDENLASER
cost = 2200
//a_drain = 50 //Done manually below.
illegal = TRUE
wear = 6
access = 999 //Prevents anyone from buying it without an emag.
var/used = FALSE
activate()
if((. = ..()))
nif.set_flag(NIF_C_HIDELASER,NIF_FLAGS_COMBAT)
if(used)
nif.notify("You do not have a hidden weapon to deploy anymore!",TRUE)
deactivate()
return FALSE
if(!nif.use_charge(50))
nif.notify("Insufficient energy to deploy weapon!",TRUE)
deactivate()
return FALSE
var/mob/living/carbon/human/H = nif.human
H.adjustHalLoss(30)
var/obj/item/weapon/gun/energy/gun/martin/dazzle/dgun = new(get_turf(H))
H.put_in_hands(dgun)
nif.notify("Weapon deployed!",TRUE)
used = TRUE
spawn(0)
uninstall()
deactivate()
if((. = ..()))
nif.clear_flag(NIF_C_HIDELASER,NIF_FLAGS_COMBAT)
//The gun to go with this implant
/obj/item/weapon/gun/energy/gun/martin/dazzle
name = "Microlaser"
desc = "A tiny nanofabricated laser."
icon = 'icons/obj/gun_vr.dmi'
icon_state = "PDW"
item_state = "gun"
@@ -0,0 +1,132 @@
///////////
// Commlink - Has a bunch of extra stuff due to communicator defines.
/datum/nifsoft/commlink
name = "Commlink"
desc = "An internal communicator for keeping in touch with people."
list_pos = NIF_COMMLINK
cost = 500
wear = 0
p_drain = 0.01
install()
if((. = ..()))
nif.comm = new(nif,src)
activate()
if((. = ..()))
nif.set_flag(NIF_O_COMMLINK,NIF_FLAGS_OTHER)
nif.comm.initialize_exonet(nif.human)
nif.comm.ui_interact(nif.human,key_state = commlink_state)
spawn(0)
deactivate()
deactivate()
if((. = ..()))
nif.clear_flag(NIF_O_COMMLINK,NIF_FLAGS_OTHER)
stat_text()
return "Show Commlink"
/datum/nifsoft/commlink/Topic(href, href_list)
if(href_list["open"])
activate()
/obj/item/device/communicator/commlink
name = "commlink"
desc = "An internal communicator, basically."
occupation = "\[Commlink\]"
var/obj/item/device/nif/nif
var/datum/nifsoft/commlink/nifsoft
New(var/newloc,var/soft)
..()
nif = newloc
nifsoft = soft
register_device(nif.human)
qdel(camera) //Not supported on internal one.
Destroy()
if(nif)
nif.comm = null
nif = null
..()
//So that only the owner's chat is relayed to others.
/obj/item/device/communicator/commlink/hear_talk(mob/living/M, text, verb, datum/language/speaking)
if(M != nif.human) return
for(var/obj/item/device/communicator/comm in communicating)
var/turf/T = get_turf(comm)
if(!T) return
var/icon_object = src
var/list/mobs_to_relay
if(istype(comm,/obj/item/device/communicator/commlink))
var/obj/item/device/communicator/commlink/CL = comm
mobs_to_relay = list(CL.nif.human)
icon_object = CL.nif.big_icon
else
var/list/in_range = get_mobs_and_objs_in_view_fast(T,world.view,0)
mobs_to_relay = in_range["mobs"]
for(var/mob/mob in mobs_to_relay)
//Can whoever is hearing us understand?
if(!mob.say_understands(M, speaking))
if(speaking)
text = speaking.scramble(text)
else
text = stars(text)
var/name_used = M.GetVoice()
var/rendered = null
if(speaking) //Language being used
rendered = "<span class='game say'>\icon[icon_object] <span class='name'>[name_used]</span> [speaking.format_message(text, verb)]</span>"
else
rendered = "<span class='game say'>\icon[icon_object] <span class='name'>[name_used]</span> [verb], <span class='message'>\"[text]\"</span></span>"
mob.show_message(rendered, 2)
//Not supported by the internal one
/obj/item/device/communicator/commlink/show_message(msg, type, alt, alt_type)
return
//The silent treatment
/obj/item/device/communicator/commlink/request(var/atom/candidate)
if(candidate in voice_requests)
return
var/who = null
if(isobserver(candidate))
who = candidate.name
else if(istype(candidate, /obj/item/device/communicator))
var/obj/item/device/communicator/comm = candidate
who = comm.owner
comm.voice_invites |= src
if(!who)
return
voice_requests |= candidate
if(ringer && nif.human)
nif.notify("New commlink call from [who]. (<a href='?src=\ref[nifsoft];open=1'>Open</a>)")
//Similar reason
/obj/item/device/communicator/commlink/request_im(var/atom/candidate, var/origin_address, var/text)
var/who = null
if(isobserver(candidate))
var/mob/observer/dead/ghost = candidate
who = ghost
im_list += list(list("address" = origin_address, "to_address" = exonet.address, "im" = text))
else if(istype(candidate, /obj/item/device/communicator))
var/obj/item/device/communicator/comm = candidate
who = comm.owner
comm.im_contacts |= src
im_list += list(list("address" = origin_address, "to_address" = exonet.address, "im" = text))
else return
im_contacts |= candidate
if(!who)
return
if(ringer && nif.human)
nif.notify("Commlink message from [who]: \"[text]\" (<a href='?src=\ref[nifsoft];open=1'>Open</a>)")
+182 -9
View File
@@ -1,9 +1,182 @@
/*
#define NIF_COMMLINK 23
#define NIF_SUITSENSORS 24
#define NIF_APCCHARGE 25
#define NIF_PRESSURE 26
#define NIF_HEATSINK 27
#define NIF_UVFILTER 28
#define NIF_FLASHPROT 29
*/
/datum/nifsoft/apc_recharge
name = "APC Connector"
desc = "A small attachment that allows synthmorphs to recharge themselves from APCs."
list_pos = NIF_APCCHARGE
cost = 1250
wear = 2
applies_to = NIF_SYNTHETIC
tick_flags = NIF_ACTIVETICK
var/obj/machinery/power/apc/apc
activate()
if((. = ..()))
var/mob/living/carbon/human/H = nif.human
nif.set_flag(NIF_O_APCCHARGE,NIF_FLAGS_OTHER)
apc = locate(/obj/machinery/power/apc) in get_step(H,H.dir)
if(!apc)
apc = locate(/obj/machinery/power/apc) in get_step(H,0)
if(!apc)
nif.notify("You must be facing an APC to connect to.",TRUE)
spawn(0)
deactivate()
return FALSE
H.visible_message("<span class='warning'>Thin snakelike tendrils grow from [H] and connect to \the [apc].</span>","<span class='notice'>Thin snakelike tendrils grow from you and connect to \the [apc].</span>")
deactivate()
if((. = ..()))
nif.clear_flag(NIF_O_APCCHARGE,NIF_FLAGS_OTHER)
apc = null
life()
if((. = ..()))
var/mob/living/carbon/human/H = nif.human
if(apc && (get_dist(H,apc) <= 1) && H.nutrition < 450)
H.nutrition = min(H.nutrition+10, 450)
apc.drain_power(7000/450*10) //This is from the large rechargers. No idea what the math is.
return TRUE
else
nif.notify("APC charging has ended.")
H.visible_message("<span class='warning'>[H]'s snakelike tendrils whip back into their body from \the [apc].</span>","<span class='notice'>The APC connector tendrils return to your body.</span>")
deactivate()
return FALSE
/datum/nifsoft/pressure
name = "Pressure Seals"
desc = "Creates pressure seals around important synthetic components to protect them from vacuum. Almost impossible on organics."
list_pos = NIF_PRESSURE
cost = 1750
a_drain = 0.5
wear = 3
applies_to = NIF_SYNTHETIC
activate()
if((. = ..()))
nif.set_flag(NIF_O_PRESSURESEAL,NIF_FLAGS_OTHER)
deactivate()
if((. = ..()))
nif.clear_flag(NIF_O_PRESSURESEAL,NIF_FLAGS_OTHER)
/datum/nifsoft/heatsinks
name = "Heat Sinks"
desc = "Advanced heat sinks for internal heat storage of heat on a synth until able to vent it in atmosphere."
list_pos = NIF_HEATSINK
cost = 1450
a_drain = 0.25
wear = 3
var/used = 0
tick_flags = NIF_ALWAYSTICK
applies_to = NIF_SYNTHETIC
activate()
if((. = ..()))
if(used >= 50)
nif.notify("Heat sinks not safe to operate again yet!",TRUE)
spawn(0)
deactivate()
return FALSE
nif.set_flag(NIF_O_HEATSINKS,NIF_FLAGS_OTHER)
deactivate()
if((. = ..()))
nif.clear_flag(NIF_O_HEATSINKS,NIF_FLAGS_OTHER)
life()
if((. = ..()))
//Not being used, all clean.
if(!active && !used)
return TRUE
//Being used, and running out.
else if(active && ++used == 100)
nif.notify("Heat sinks overloaded! Shutting down!",TRUE)
deactivate()
//Being cleaned, and finishing empty.
else if(!active && --used == 0)
nif.notify("Heat sinks re-chilled.")
/datum/nifsoft/compliance
name = "Compliance Module"
desc = "A system that allows one to apply 'laws' to sapient life. Extremely illegal, of course."
list_pos = NIF_COMPLIANCE
cost = 8200
wear = 4
illegal = TRUE
vended = FALSE
access = 999 //Prevents anyone from buying it without an emag.
var/laws = "Be nice to people!"
New(var/newloc,var/newlaws)
laws = newlaws //Sanitize before this (the disk does)
..(newloc)
activate()
if((. = ..()))
to_chat(nif.human,"<span class='danger'>You are compelled to follow these rules: </span>\n<span class='notify'>[laws]</span>")
install()
if((. = ..()))
to_chat(nif.human,"<span class='danger'>You feel suddenly compelled to follow these rules: </span>\n<span class='notify'>[laws]</span>")
uninstall()
nif.notify("ERROR! Unable to comply!",TRUE)
return FALSE //NOPE.
stat_text()
return "Show Laws"
/datum/nifsoft/sizechange
name = "Mass Alteration"
desc = "A system that allows one to change their size, through drastic mass rearrangement. Causes significant wear when installed."
list_pos = NIF_SIZECHANGE
cost = 750
wear = 6
activate()
if((. = ..()))
var/choice = alert(nif.human,"Change which way?","Mass Alteration","Size Up","Cancel", "Size Down")
if(choice == "Cancel")
spawn(0) deactivate()
return FALSE
if(!nif.use_charge(100))
nif.notify("Insufficient energy to resize!",TRUE)
spawn(0) deactivate()
return FALSE
if(choice == "Size Up")
switch(nif.human.size_multiplier)
if(RESIZE_BIG to RESIZE_HUGE)
nif.human.resize(RESIZE_HUGE)
if(RESIZE_NORMAL to RESIZE_BIG)
nif.human.resize(RESIZE_BIG)
if(RESIZE_SMALL to RESIZE_NORMAL)
nif.human.resize(RESIZE_NORMAL)
if((0 - INFINITY) to RESIZE_TINY)
nif.human.resize(RESIZE_SMALL)
else if(choice == "Size Down")
switch(nif.human.size_multiplier)
if(RESIZE_HUGE to INFINITY)
nif.human.resize(RESIZE_BIG)
if(RESIZE_BIG to RESIZE_HUGE)
nif.human.resize(RESIZE_NORMAL)
if(RESIZE_NORMAL to RESIZE_BIG)
nif.human.resize(RESIZE_SMALL)
if((0 - INFINITY) to RESIZE_NORMAL)
nif.human.resize(RESIZE_TINY)
nif.human.visible_message("<span class='warning'>Swirling grey mist envelops [nif.human] as they change size!</span>","<span class='notice'>Swirling streams of nanites wrap around you as you change size!</span>")
nif.human.update_icons()
spawn(0)
deactivate()
deactivate()
if((. = ..()))
return TRUE
stat_text()
return "Change Size"