Merge pull request #1903 from Datraen/Xenobio2Update6

Xenobio2 Update #6
This commit is contained in:
Yoshax
2016-06-09 15:46:30 +01:00
3 changed files with 14 additions and 12 deletions

View File

@@ -99,6 +99,7 @@
/obj/machinery/xenobio/proc/finished_task() /obj/machinery/xenobio/proc/finished_task()
active = 0 active = 0
in_use = 0
if(failed_task) if(failed_task)
failed_task = 0 failed_task = 0
visible_message("\icon[src] [src] pings unhappily, flashing a red warning light.") 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) ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui) 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.set_initial_data(data)
ui.open() ui.open()
ui.set_auto_update(1) ui.set_auto_update(1)
@@ -375,21 +376,21 @@
/obj/machinery/xenobio/editor/proc/move_into_editor(var/mob/user,var/mob/living/victim) /obj/machinery/xenobio/editor/proc/move_into_editor(var/mob/user,var/mob/living/victim)
if(src.occupant) 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 return
if(in_use) 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 return
if(!(istype(victim, /mob/living/simple_animal/xeno/slime)) ) 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 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) src.add_fingerprint(user)
if(do_after(user, 30) && victim.Adjacent(src) && user.Adjacent(src) && victim.Adjacent(user) && !occupant) 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) if(victim.client)
victim.client.perspective = EYE_PERSPECTIVE victim.client.perspective = EYE_PERSPECTIVE
victim.client.eye = src victim.client.eye = src

View File

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

View File

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