mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Allows pathogenic incubator to remain on when it doesn't have a dish loaded, fixes lack of UI response, fixes overwriting blood viruses (#13040)
* Allowed use of controls, made incubator add viruses to blood instead of overwriting blood * Allowed use of controls, made incubator add viruses to blood instead of overwriting blood * third time's the commit that breaks everything in a way that isn't instantly detected and is thus PRable * r u n t i m e s * b r a c k e t s
This commit is contained in:
@@ -95,8 +95,6 @@
|
|||||||
if(beaker)
|
if(beaker)
|
||||||
beaker.forceMove(src.loc)
|
beaker.forceMove(src.loc)
|
||||||
beaker = null
|
beaker = null
|
||||||
if(!dish)
|
|
||||||
return
|
|
||||||
if (href_list["power"])
|
if (href_list["power"])
|
||||||
on = !on
|
on = !on
|
||||||
if(on)
|
if(on)
|
||||||
@@ -129,8 +127,7 @@
|
|||||||
var/datum/disease2/disease/D = dish.virus2.getcopy()
|
var/datum/disease2/disease/D = dish.virus2.getcopy()
|
||||||
D.log += "<br />[timestamp()] Injected into blood via [src] by [key_name(usr)]"
|
D.log += "<br />[timestamp()] Injected into blood via [src] by [key_name(usr)]"
|
||||||
var/list/virus = list("[dish.virus2.uniqueID]" = D)
|
var/list/virus = list("[dish.virus2.uniqueID]" = D)
|
||||||
B.data["virus2"] = virus
|
B.data["virus2"] += virus
|
||||||
|
|
||||||
say("Injection complete.")
|
say("Injection complete.")
|
||||||
src.add_fingerprint(usr)
|
src.add_fingerprint(usr)
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
@@ -173,20 +170,21 @@
|
|||||||
onclose(user, "dish_incubator")
|
onclose(user, "dish_incubator")
|
||||||
|
|
||||||
/obj/machinery/disease2/incubator/process()
|
/obj/machinery/disease2/incubator/process()
|
||||||
if(dish && on && dish.virus2)
|
if(on)
|
||||||
use_power(50,EQUIP)
|
use_power(50,EQUIP)
|
||||||
if(!powered(EQUIP))
|
if(!powered(EQUIP))
|
||||||
on = 0
|
on = 0
|
||||||
icon_state = "incubator"
|
icon_state = "incubator"
|
||||||
if(foodsupply)
|
if (dish && dish.virus2)
|
||||||
foodsupply -= 1
|
|
||||||
dish.growth = min(growthrate + dish.growth, INCUBATOR_MAX_SIZE)
|
|
||||||
if(dish.growth >= INCUBATOR_MAX_SIZE)
|
if(dish.growth >= INCUBATOR_MAX_SIZE)
|
||||||
if(icon_state != "incubator_fed")
|
if(icon_state != "incubator_fed")
|
||||||
icon_state = "incubator_fed"
|
icon_state = "incubator_fed"
|
||||||
if(last_notice + FED_PING_DELAY < world.time)
|
if(last_notice + FED_PING_DELAY < world.time)
|
||||||
last_notice = world.time
|
last_notice = world.time
|
||||||
alert_noise("ping")
|
alert_noise("ping")
|
||||||
|
if(foodsupply)
|
||||||
|
foodsupply -= 1
|
||||||
|
dish.growth = min(growthrate + dish.growth, INCUBATOR_MAX_SIZE)
|
||||||
if(radiation)
|
if(radiation)
|
||||||
if(radiation > 50 & prob(mutatechance))
|
if(radiation > 50 & prob(mutatechance))
|
||||||
dish.virus2.log += "<br />[timestamp()] MAJORMUTATE (incubator rads)"
|
dish.virus2.log += "<br />[timestamp()] MAJORMUTATE (incubator rads)"
|
||||||
@@ -204,8 +202,7 @@
|
|||||||
dish.virus2.infectionchance -= 1
|
dish.virus2.infectionchance -= 1
|
||||||
if(toxins > 50)
|
if(toxins > 50)
|
||||||
dish.virus2 = null
|
dish.virus2 = null
|
||||||
else if(!dish)
|
else
|
||||||
on = 0
|
|
||||||
icon_state = "incubator"
|
icon_state = "incubator"
|
||||||
|
|
||||||
if(beaker)
|
if(beaker)
|
||||||
|
|||||||
Reference in New Issue
Block a user