mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Xenobio2 Tweaks
Adds nameVar to products, sets it to products/xenos when they are created from the proper machinery. Adds the manual injector to the machinery that can take beakers, preventing them from spilling onto the machine when inserted. Tweaks the NanoUI to properly display percent mutated, adds a proper check to see if it is not a xeno occupant.
This commit is contained in:
@@ -67,6 +67,7 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/smartfridge/secure/extract/New()
|
||||
..()
|
||||
for(var/i=1 to 5)
|
||||
var/obj/item/xenoproduct/slime/core/C = new(src)
|
||||
C.traits = new()
|
||||
|
||||
@@ -41,7 +41,8 @@
|
||||
/obj/machinery/smartfridge/,
|
||||
/obj/machinery/biogenerator,
|
||||
/obj/structure/frame,
|
||||
/obj/machinery/radiocarbon_spectrometer
|
||||
/obj/machinery/radiocarbon_spectrometer,
|
||||
/obj/machinery/xenobio2/manualinjector
|
||||
)
|
||||
|
||||
/obj/item/weapon/reagent_containers/glass/New()
|
||||
|
||||
@@ -112,6 +112,8 @@
|
||||
var/obj/item/xenoproduct/slime/core/C = new(src)
|
||||
C.traits = occupant.traitdat
|
||||
|
||||
C.nameVar = occupant.nameVar
|
||||
|
||||
C.create_reagents(C.traits.traits[TRAIT_XENO_CHEMVOL])
|
||||
for(var/reagent in occupant.traitdat.chems)
|
||||
C.reagents.add_reagent(reagent, occupant.traitdat.chems[reagent])
|
||||
|
||||
@@ -60,9 +60,10 @@
|
||||
data["occupied"] = 1
|
||||
if(isxeno(injector.occupant))
|
||||
var/mob/living/simple_animal/xeno/X = injector.occupant
|
||||
data["instability"] = (X.mut_level / X.mut_max) * 100
|
||||
data["compatible"] = 1
|
||||
data["instability"] = 100 * (X.mut_level / X.mut_max)
|
||||
else
|
||||
data["instability"] = null
|
||||
data["compatible"] = null
|
||||
|
||||
if(injector.beaker)
|
||||
data["reagentAmount"] = injector.beaker.reagents.total_volume
|
||||
|
||||
@@ -74,6 +74,8 @@
|
||||
spawn(30)
|
||||
var/mob/living/simple_animal/xeno/slime/S = new(src)
|
||||
S.traitdat = core.traits
|
||||
S.nameVar = core.nameVar
|
||||
S.name = "[S.nameVar] baby slime"
|
||||
S.ProcessTraits()
|
||||
qdel(core)
|
||||
spawn(30)
|
||||
|
||||
@@ -51,8 +51,6 @@ Procs for targeting
|
||||
if(!stasis)
|
||||
if(!reagents)
|
||||
return
|
||||
if(reagents.total_volume <= 0)
|
||||
return
|
||||
|
||||
//Let's handle some chemical smoke, for scientific smoke bomb purposes.
|
||||
for(var/obj/effect/effect/smoke/chem/smoke in view(1, src))
|
||||
|
||||
@@ -9,4 +9,5 @@ Xenobiological product lives here as a basic type.
|
||||
var/datum/xeno/traits/traits
|
||||
var/source = "Unknown"
|
||||
var/product = "mess"
|
||||
var/nameVar = "blah"
|
||||
|
||||
@@ -11,7 +11,7 @@ Used In File(s): \code\modules\xenobio2\machines\injector_computer.dm
|
||||
{{:data.reagentAmount}}u / {{:data.reagentMax}}u
|
||||
{{:helper.displayBar(data.reagentAmount, data.reagentMax, data.reagentMin, 'good', null, 'displayBarBeaker')}}
|
||||
{{else}}
|
||||
<span class='bad'><b>ERRR%</b></span>
|
||||
<span class='bad'><b>ERR</b></span>
|
||||
{{:helper.displayBar(data.reagentAmount, data.reagentMax, data.reagentMin, 'good', null, 'displayBarBeaker')}}
|
||||
{{/if}}
|
||||
</div>
|
||||
@@ -23,7 +23,7 @@ Used In File(s): \code\modules\xenobio2\machines\injector_computer.dm
|
||||
Instability:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{if data.instability}}
|
||||
{{if data.compatible}}
|
||||
{{:data.instability}}%
|
||||
{{else}}
|
||||
<span class='bad'><b>ERRR%</b></span> Please contact your local technician for assistance.
|
||||
|
||||
Reference in New Issue
Block a user