mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-09 00:43:07 +00:00
Moved the spacecraft folder into the unused section, moved syndiebeacon into machinery. Research moved into Modules. Virus2 moved into WIP - is anyone even working on this, it looks almost done? Computer2,optics,pda2,experimental moved unto unused. WIP Chemistry things moved into Chemical Module Cameras.dm moved into weapons GameKit.dm moved into unused BrokenInHands.dm moved into unused Removed Grillify.dm Moved all of the files listed as unused in the mining module to unused Removed several empty folders in modules Moved cloning.dm into machinery Moved NewBan.dm into admin Changed humanoid aliens new_life.dm into life.dm Moved beast mob into unused Moved hivebot into unused Moved carpedexplosion.dm into unused Moved ai_lockdown.dm verb into unused and removed it from the AIs verb list as it didn't actually do anything. Removed mastercontroler2.dm Moved savefile.dm from human to new_player Bugfix People spawning on the starting screen on rev/cult should be fixed. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1964 316c924e-a436-60f5-8080-3fe189b3f50e
177 lines
4.2 KiB
Plaintext
177 lines
4.2 KiB
Plaintext
/obj/machinery/disease2/incubator/
|
|
name = "Pathogenic incubator"
|
|
density = 1
|
|
anchored = 1
|
|
icon = 'virology.dmi'
|
|
icon_state = "incubator"
|
|
var/obj/item/weapon/virusdish/dish
|
|
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
|
var/radiation = 0
|
|
|
|
var/on = 0
|
|
var/power = 0
|
|
|
|
var/foodsupply = 0
|
|
var/toxins = 0
|
|
|
|
ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
del(src)
|
|
return
|
|
if(2.0)
|
|
if (prob(50))
|
|
del(src)
|
|
return
|
|
|
|
blob_act()
|
|
if (prob(25))
|
|
del(src)
|
|
|
|
meteorhit()
|
|
del(src)
|
|
return
|
|
|
|
attackby(var/obj/B as obj, var/mob/user as mob)
|
|
if(istype(B, /obj/item/weapon/reagent_containers/glass) || istype(B,/obj/item/weapon/reagent_containers/syringe))
|
|
|
|
if(src.beaker)
|
|
if(istype(beaker,/obj/item/weapon/reagent_containers/syringe))
|
|
user << "A syringe is already loaded into the machine."
|
|
else
|
|
user << "A beaker is already loaded into the machine."
|
|
return
|
|
|
|
src.beaker = B
|
|
user.drop_item()
|
|
B.loc = src
|
|
if(istype(B,/obj/item/weapon/reagent_containers/syringe))
|
|
user << "You add the syringe to the machine!"
|
|
src.updateUsrDialog()
|
|
else
|
|
user << "You add the beaker to the machine!"
|
|
src.updateUsrDialog()
|
|
else
|
|
if(istype(B,/obj/item/weapon/virusdish))
|
|
if(src.dish)
|
|
user << "A dish is already loaded into the machine."
|
|
return
|
|
|
|
src.dish = B
|
|
user.drop_item()
|
|
B.loc = src
|
|
if(istype(B,/obj/item/weapon/virusdish))
|
|
user << "You add the dish to the machine!"
|
|
src.updateUsrDialog()
|
|
|
|
Topic(href, href_list)
|
|
if(stat & BROKEN) return
|
|
if(usr.stat || usr.restrained()) return
|
|
if(!in_range(src, usr)) return
|
|
|
|
usr.machine = src
|
|
if(!dish) return
|
|
|
|
if (href_list["power"])
|
|
on = !on
|
|
if(on)
|
|
icon_state = "incubator_on"
|
|
else
|
|
icon_state = "incubator"
|
|
if (href_list["ejectchem"])
|
|
if(beaker)
|
|
beaker.loc = src.loc
|
|
beaker = null
|
|
if (href_list["ejectdish"])
|
|
if(dish)
|
|
dish.loc = src.loc
|
|
dish = null
|
|
if (href_list["rad"])
|
|
radiation += 10
|
|
if (href_list["flush"])
|
|
radiation = 0
|
|
toxins = 0
|
|
foodsupply = 0
|
|
|
|
|
|
src.add_fingerprint(usr)
|
|
src.updateUsrDialog()
|
|
|
|
attack_hand(mob/user as mob)
|
|
if(stat & BROKEN)
|
|
return
|
|
user.machine = src
|
|
var/dat = ""
|
|
if(!dish)
|
|
dat = "Please insert dish into the incubator.<BR>"
|
|
dat += "<A href='?src=\ref[src];close=1'>Close</A>"
|
|
var/string = "Off"
|
|
if(on)
|
|
string = "On"
|
|
dat += "Power status : <A href='?src=\ref[src];power=1'>[string]</a>"
|
|
dat += "<BR>"
|
|
dat += "Food supply : [foodsupply]"
|
|
dat += "<BR>"
|
|
dat += "Radiation Levels : [radiation] RADS : <A href='?src=\ref[src];rad=1'>Radiate</a>"
|
|
dat += "<BR>"
|
|
dat += "Toxins : [toxins]"
|
|
dat += "<BR><BR>"
|
|
if(beaker)
|
|
dat += "Eject chemicals : <A href='?src=\ref[src];ejectchem=1'> Eject</a>"
|
|
dat += "<BR>"
|
|
if(dish)
|
|
dat += "Eject Virus dish : <A href='?src=\ref[src];ejectdish=1'> Eject</a>"
|
|
dat += "<BR>"
|
|
dat += "<BR><BR>"
|
|
dat += "<A href='?src=\ref[src];flush=1'>Flush system</a>"
|
|
|
|
|
|
user << browse("<TITLE>Pathogenic incubator</TITLE>incubator menu:<BR><BR>[dat]", "window=incubator;size=575x400")
|
|
onclose(user, "incubator")
|
|
return
|
|
|
|
|
|
|
|
|
|
process()
|
|
|
|
if(dish && on && dish.virus2)
|
|
use_power(50,EQUIP)
|
|
if(!powered(EQUIP))
|
|
on = 0
|
|
icon_state = "incubator"
|
|
if(foodsupply)
|
|
foodsupply -= 1
|
|
dish.growth += 1
|
|
if(dish.growth == 100)
|
|
state("The [src.name] pings")
|
|
if(radiation)
|
|
if(radiation > 50 & prob(5))
|
|
dish.virus2.majormutate()
|
|
if(dish.info)
|
|
dish.info = "OUTDATED : [dish.info]"
|
|
dish.analysed = 0
|
|
state("The [src.name] beeps")
|
|
|
|
else if(prob(5))
|
|
dish.virus2.minormutate()
|
|
radiation -= 1
|
|
if(toxins && prob(5))
|
|
dish.virus2.infectionchance -= 1
|
|
if(toxins > 50)
|
|
dish.virus2 = null
|
|
else if(!dish)
|
|
on = 0
|
|
icon_state = "incubator"
|
|
|
|
|
|
if(beaker)
|
|
if(!beaker.reagents.remove_reagent("virusfood",5))
|
|
foodsupply += 20
|
|
if(!beaker.reagents.remove_reagent("toxins",1))
|
|
toxins += 1
|
|
|
|
proc/state(var/msg)
|
|
for(var/mob/O in hearers(src, null))
|
|
O.show_message("\icon[src] \blue [msg]", 2)
|