mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Advanced NIF Repair Tool
Creatable at the protolathe. Requires the same tech levels as the NIF, but no exotic materials. It's a device that accepts nanopaste, and programs the nanite swarms into NIF repair swarms, which are a liquid reagent ingame. It has a 60u storage capacity, and needs to be emptied into any container. From there, it can be injected via syringe, made into pills, or drank (though the latter two reduce effectiveness by 50%). Each unit nanopaste makes 15u repair nanites, so a full repair from 0% to 100% of a normal NIF requires 7 nanopaste converted to reagents (100u).
This commit is contained in:
64
code/game/objects/items/devices/advnifrepair.dm
Normal file
64
code/game/objects/items/devices/advnifrepair.dm
Normal file
@@ -0,0 +1,64 @@
|
||||
//Programs nanopaste into NIF repair nanites
|
||||
/obj/item/device/nifrepairer
|
||||
name = "advanced NIF repair tool"
|
||||
desc = "A tool that accepts nanopaste and converts the nanites into NIF repair nanites for injection/ingestion. Insert paste, deposit into container."
|
||||
icon = 'icons/obj/device_alt.dmi'
|
||||
icon_state = "hydro"
|
||||
item_state = "gun"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 3
|
||||
w_class = ITEMSIZE_SMALL
|
||||
throw_speed = 5
|
||||
throw_range = 10
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 4000, "glass" = 6000)
|
||||
origin_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5, TECH_MATERIAL = 5, TECH_ENGINEERING = 5, TECH_DATA = 5)
|
||||
var/datum/reagents/supply
|
||||
var/efficiency = 15 //How many units reagent per 1 unit nanopaste
|
||||
|
||||
|
||||
/obj/item/device/nifrepairer/New()
|
||||
..()
|
||||
|
||||
supply = new(max = 60, A = src)
|
||||
|
||||
/obj/item/device/nifrepairer/attackby(obj/W, mob/user)
|
||||
if(istype(W,/obj/item/stack/nanopaste))
|
||||
var/obj/item/stack/nanopaste/np = W
|
||||
if(np.use(1) && supply.get_free_space() >= efficiency)
|
||||
to_chat(user,"<span class='notice'>You convert some nanopaste into programmed nanites inside \the [src].</span>")
|
||||
supply.add_reagent(id = "nifrepairnanites", amount = efficiency)
|
||||
update_icon()
|
||||
else if(supply.get_free_space() < efficiency)
|
||||
to_chat(user,"<span class='warning'>\The [src] is too full. Empty it into a container first.</span>")
|
||||
return
|
||||
|
||||
/obj/item/device/nifrepairer/update_icon()
|
||||
if(supply.total_volume)
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
/obj/item/device/nifrepairer/afterattack(var/atom/target, var/mob/user, var/proximity)
|
||||
if(!target.is_open_container() || !target.reagents)
|
||||
return 0
|
||||
|
||||
if(!supply || !supply.total_volume)
|
||||
to_chat(user,"<span class='warning'>[src] is empty. Feed it nanopaste.</span>")
|
||||
return 1
|
||||
|
||||
if(!target.reagents.get_free_space())
|
||||
user << "<span class='warning'>[target] is already full.</span>"
|
||||
return 1
|
||||
|
||||
var/trans = supply.trans_to(target, 15)
|
||||
to_chat(user,"<span class='notice'>You transfer [trans] units of the programmed nanites to [target].</span>")
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/item/device/nifrepairer/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
if(supply.total_volume)
|
||||
to_chat(user,"<span class='notice'>\The [src] contains [supply.total_volume] units of programmed nanites, ready for dispensing.</span>")
|
||||
else
|
||||
to_chat(user,"<span class='notice'>\The [src] is empty and ready to accept nanopaste.</span>")
|
||||
@@ -26,3 +26,21 @@
|
||||
required_reagents = list("blood" = 5)
|
||||
result_amount = 30
|
||||
required = /obj/item/slime_extract/sapphire
|
||||
|
||||
/datum/reagent/nif_repair_nanites
|
||||
name = "Programmed Nanomachines"
|
||||
id = "nifrepairnanites"
|
||||
description = "A thick grey slurry of NIF repair nanomachines."
|
||||
taste_description = "metallic"
|
||||
reagent_state = LIQUID
|
||||
color = "#333333"
|
||||
scannable = 1
|
||||
|
||||
/datum/reagent/nif_repair_nanites/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.nif)
|
||||
var/obj/item/device/nif/nif = H.nif //L o c a l
|
||||
if(nif.stat == NIF_TEMPFAIL)
|
||||
nif.stat = NIF_INSTALLING
|
||||
nif.durability = min(nif.durability + removed, initial(nif.durability))
|
||||
|
||||
@@ -108,6 +108,14 @@
|
||||
build_path = /obj/item/device/nif
|
||||
sort_string = "HABBC"
|
||||
|
||||
/datum/design/item/nifrepairtool
|
||||
name = "adv. NIF repair tool"
|
||||
id = "anrt"
|
||||
req_tech = list(TECH_MAGNET = 5, TECH_BLUESPACE = 5, TECH_MATERIAL = 5, TECH_ENGINEERING = 5, TECH_DATA = 5)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 8000)
|
||||
build_path = /obj/item/device/nifrepairer
|
||||
sort_string = "HABBD"
|
||||
|
||||
// Resleeving Circuitboards
|
||||
|
||||
/datum/design/circuit/transhuman_clonepod
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
@@ -883,6 +883,7 @@
|
||||
#include "code\game\objects\items\toys.dm"
|
||||
#include "code\game\objects\items\trash.dm"
|
||||
#include "code\game\objects\items\trash_vr.dm"
|
||||
#include "code\game\objects\items\devices\advnifrepair.dm"
|
||||
#include "code\game\objects\items\devices\ai_detector.dm"
|
||||
#include "code\game\objects\items\devices\aicard.dm"
|
||||
#include "code\game\objects\items\devices\binoculars.dm"
|
||||
|
||||
Reference in New Issue
Block a user