Merge branch 'master' into FERMICHEMCurTweaks

This commit is contained in:
Thalpy
2019-10-08 13:10:35 +01:00
committed by GitHub
260 changed files with 4779 additions and 1570 deletions
@@ -144,6 +144,13 @@
else
O.forceMove(src)
return TRUE
///Really simple proc, just moves the object "O" into the hands of mob "M" if able, done so I could modify the proc a little for the organ fridge
/obj/machinery/smartfridge/proc/dispense(obj/item/O, var/mob/M)
if(!M.put_in_hands(O))
O.forceMove(drop_location())
adjust_item_drop_location(O)
/obj/machinery/smartfridge/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
@@ -197,9 +204,7 @@
if(desired == 1 && Adjacent(usr) && !issilicon(usr))
for(var/obj/item/O in src)
if(O.name == params["name"])
if(!usr.put_in_hands(O))
O.forceMove(drop_location())
adjust_item_drop_location(O)
dispense(O, usr)
break
if (visible_contents)
update_icon()
@@ -209,8 +214,7 @@
if(desired <= 0)
break
if(O.name == params["name"])
O.forceMove(drop_location())
adjust_item_drop_location(O)
dispense(O, usr)
desired--
if (visible_contents)
update_icon()
@@ -378,6 +382,44 @@
/obj/machinery/smartfridge/extract/preloaded
initial_contents = list(/obj/item/slime_scanner = 2)
// ------------------------- You think you're better than Chem, huh?
// Organ Surgery Smartfridge
// ------------------------- Just wait till Tamiorgans
/obj/machinery/smartfridge/organ
name = "smart organ storage"
desc = "A refrigerated storage unit for organ storage."
max_n_of_items = 20 //vastly lower to prevent processing too long
var/repair_rate = 0
/obj/machinery/smartfridge/organ/accept_check(obj/item/O)
if(istype(O, /obj/item/organ))
return TRUE
return FALSE
/obj/machinery/smartfridge/organ/load(obj/item/O)
. = ..()
if(!.) //if the item loads, clear can_decompose
return
var/obj/item/organ/organ = O
organ.organ_flags |= ORGAN_FROZEN
/obj/machinery/smartfridge/organ/RefreshParts()
for(var/obj/item/stock_parts/matter_bin/B in component_parts)
max_n_of_items = 20 * B.rating
repair_rate = max(0, STANDARD_ORGAN_HEALING * (B.rating - 1))
/obj/machinery/smartfridge/organ/process()
for(var/organ in contents)
var/obj/item/organ/O = organ
if(!istype(O))
return
O.applyOrganDamage(-repair_rate)
/obj/machinery/smartfridge/organ/Exited(obj/item/organ/AM, atom/newLoc)
. = ..()
if(istype(AM))
AM.organ_flags &= ~ORGAN_FROZEN
// -----------------------------
// Chemistry Medical Smartfridge
// -----------------------------
@@ -397,13 +397,16 @@
FermiChem = TRUE//If the chemical uses the Fermichem reaction mechanics
FermiExplode = FALSE //If the chemical explodes in a special way
PurityMin = 0 //The minimum purity something has to be above, otherwise it explodes.
clear_conversion = REACTION_CLEAR_INVERSE
/*
/datum/chemical_reaction/neurotoxin/FermiFinish(datum/reagents/holder, var/atom/my_atom)
var/datum/reagent/consumable/ethanol/neurotoxin/Nt = locate(/datum/reagent/consumable/ethanol/neurotoxin) in my_atom.reagents.reagent_list
var/cached_volume = Nt.volume
if(Nt.purity < 0.5)
holder.remove_reagent(src.id, cached_volume)
holder.add_reagent("neuroweak", cached_volume)
*/
/datum/chemical_reaction/neurotoxin/FermiExplode(datum/reagents, var/atom/my_atom, volume, temp, pH)//reduced size
volume = volume/10