Merge branch 'master' of https://github.com/PolarisSS13/Polaris into sync

# Conflicts:
#	.travis.yml
#	vorestation.dme
This commit is contained in:
Arokha Sieyes
2016-06-13 13:12:40 -04:00
88 changed files with 3597 additions and 3273 deletions

View File

@@ -126,6 +126,7 @@
spawn(30)
icon_state = "scanner_0old"
qdel(occupant)
occupant = null //If qdel's being slow or acting up, let's make sure we can't make more cores from this one.
inuse = 0
eject_contents()
update_light_color()

View File

@@ -99,6 +99,7 @@
/obj/machinery/xenobio/proc/finished_task()
active = 0
in_use = 0
if(failed_task)
failed_task = 0
visible_message("\icon[src] [src] pings unhappily, flashing a red warning light.")
@@ -332,7 +333,7 @@
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
ui = new(user, src, ui_key, "xenobio_editor.tmpl", "Biological Genetic Bombarder UI", 470, 450)
ui = new(user, src, ui_key, "xenobio_editor.tmpl", "biological genetic bombarder UI", 470, 450)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
@@ -375,21 +376,21 @@
/obj/machinery/xenobio/editor/proc/move_into_editor(var/mob/user,var/mob/living/victim)
if(src.occupant)
user << "<span class='danger'>The biological genetic bombarder is full, empty it first!</span>"
user << "<span class='danger'>The [src] is full, empty it first!</span>"
return
if(in_use)
user << "<span class='danger'>The biological genetic bombarder is locked and running, wait for it to finish.</span>"
user << "<span class='danger'>The [src] is locked and running, wait for it to finish.</span>"
return
if(!(istype(victim, /mob/living/simple_animal/xeno/slime)) )
user << "<span class='danger'>This is not a suitable subject for the biological genetic bombarder!</span>"
user << "<span class='danger'>This is not a suitable subject for the [src]!</span>"
return
user.visible_message("<span class='danger'>[user] starts to put [victim] into the biological genetic bombarder!</span>")
user.visible_message("<span class='danger'>[user] starts to put [victim] into the [src]!</span>")
src.add_fingerprint(user)
if(do_after(user, 30) && victim.Adjacent(src) && user.Adjacent(src) && victim.Adjacent(user) && !occupant)
user.visible_message("<span class='danger'>[user] stuffs [victim] into the biological genetic bombarder!</span>")
user.visible_message("<span class='danger'>[user] stuffs [victim] into the [src]!</span>")
if(victim.client)
victim.client.perspective = EYE_PERSPECTIVE
victim.client.eye = src

View File

@@ -67,19 +67,20 @@
src.occupant = victim
/obj/machinery/xenobio2/manualinjector/proc/eject_contents()
for(var/obj/thing in (contents - component_parts - circuit - beaker))
thing.forceMove(loc)
eject_xeno()
eject_beaker()
return
/obj/machinery/xenobio2/manualinjector/proc/eject_xeno()
if(occupant)
occupant.forceMove(loc)
occupant = null
return
/obj/machinery/xenobio2/manualinjector/proc/eject_beaker()
if(beaker)
var/obj/item/weapon/reagent_containers/glass/beaker/B = beaker
B.loc = loc
beaker = null
return
/obj/machinery/xenobio2/manualinjector/proc/inject_reagents()
if(!occupant)

View File

@@ -99,7 +99,7 @@
injector.inject_reagents()
active = 0
if(href_list["eject_occupant"])
injector.eject_contents()
injector.eject_xeno()
if(href_list["eject_beaker"])
injector.eject_beaker()

View File

@@ -73,12 +73,14 @@
icon_state = "restruct_1"
spawn(30)
var/mob/living/simple_animal/xeno/slime/S = new(src)
S.traitdat = core.traits
S.traitdat = new() //New instance, so that if the core is deleted, the slime retains a trait datum.
S.nameVar = core.nameVar
S.name = "[S.nameVar] baby slime"
core.traits.copy_traits(S.traitdat)
S.ProcessTraits()
qdel(core)
spawn(30)
qdel(core)
core = null //If qdel's being a bit slow or acting up, let's just make sure we can't clone the core.
inuse = 0
eject_slime()
icon_state = "restruct_0"

View File

@@ -24,7 +24,23 @@ Slime specific procs go here.
traitdat.traits[TRAIT_XENO_CANLEARN] = prob(68)
traitdat.traits[TRAIT_XENO_SPEED] = round(rand(-10,10))
/mob/living/simple_animal/xeno/slime/RandomChemicals()
..()
if(prob(40))
var/hasMutToxin
for(var/R in traitdat.chems)
if(R == "mutationtoxin")
hasMutToxin = 1
var/chemamount
if(hasMutToxin)
var/list/chemchoices = (xenoChemList - traitdat.chems)
var/chemtype = pick(chemchoices)
chemamount = rand(1,5)
traitdat.chems[chemtype] = chemamount
else
chemamount = rand(1,5)
traitdat.chems["mutationtoxin"] = chemamount
/mob/living/simple_animal/xeno/slime/proc/GrowUp()
GenerateAdult()

View File

@@ -4,6 +4,7 @@ Slime definitions, Life and New live here.
/mob/living/simple_animal/xeno/slime //Adult values are found here
nameVar = "grey" //When mutated, nameVar might change.
desc = "A shifting, mass of goo."
faction = "slime"
speak_emote = list("garbles", "chirps", "blurbles")
colored = 1
color = "#CACACA"
@@ -68,6 +69,7 @@ Slime definitions, Life and New live here.
"toxin" = list("toxic" = 0.5),
"carpotoxin" = list("toxic" = 1, "mut" = 1.5),
"phoron" = list("toxic" = 1.5, "mut" = 0.03),
"virusfood" = list("nutr" = 1.5, "mut" = 0.32),
"cyanide" = list("toxic" = 3.5),
"slimejelly" = list("nutr" = 0.5),
"amutationtoxin" = list("toxic" = 0.1, "heal" = 1.5, "mut" = 3),

View File

@@ -8,6 +8,7 @@ Also includes Life and New
/mob/living/simple_animal/xeno
name = "Xeno"
real_name = "Xeno"
faction = "xeno" //Needs to be set.
desc = "Something's broken, yell at someone."
melee_damage_lower = 0
melee_damage_upper = 0
@@ -46,33 +47,32 @@ Also includes Life and New
//Life additions
/mob/living/simple_animal/xeno/Life()
if(src.stat == DEAD)
return 0
if(stasis)
stasis--
if(stasis < 0)
stasis = 0
return 0
..()
handle_reagents()
if((mut_level >= mut_max) && !(mutable & NOMUT))
Mutate()
mut_level -= mut_max
if(!(stat == DEAD))
handle_reagents()
if((mut_level >= mut_max) && !(mutable & NOMUT))
Mutate()
mut_level -= mut_max
ProcessSpeechBuffer()
ProcessSpeechBuffer()
//Have to feed the xenos somehow.
if(nutrition < 0)
nutrition = 0
if((nutrition > 0 ) && traitdat.traits[TRAIT_XENO_EATS])
if(nutrition >= 300)
nutrition -= hunger_factor
else
if(traitdat.traits[TRAIT_XENO_EATS])
health = starve_damage
//Have to feed the xenos somehow.
if(nutrition < 0)
nutrition = 0
if((nutrition > 0 ) && traitdat.traits[TRAIT_XENO_EATS])
if(nutrition >= 300)
nutrition -= hunger_factor
else
if(traitdat.traits[TRAIT_XENO_EATS])
health = starve_damage
return 1 //Everything worked okay.
return 1 //Everything worked okay.
/mob/living/simple_animal/xeno/New()
@@ -94,4 +94,8 @@ Also includes Life and New
if(!health)
stat = DEAD
/mob/living/simple_animal/xeno/Destroy()
traitdat.Destroy() //Let's clean up after ourselves.
traitdat = null
..()

View File

@@ -10,4 +10,9 @@ Xenobiological product lives here as a basic type.
var/source = "Unknown"
var/product = "mess"
var/nameVar = "blah"
/obj/item/xenoproduct/Destroy()
traits.Destroy() //Let's not leave any traits hanging around.
traits = null
..()