Merge pull request #41997 from coiax/removes-container-type

Refactors `container_type` into `reagents.flags`
This commit is contained in:
Jordie
2018-12-23 16:45:10 +11:00
committed by GitHub
54 changed files with 109 additions and 168 deletions

View File

@@ -1,7 +1,6 @@
/obj/machinery/rnd/production
name = "technology fabricator"
desc = "Makes researched and prototype items with materials and energy."
container_type = OPENCONTAINER
layer = BELOW_OBJ_LAYER
var/consoleless_interface = FALSE //Whether it can be used without a console.
var/efficiency_coeff = 1 //Materials needed / coeff = actual.
@@ -21,7 +20,7 @@
/obj/machinery/rnd/production/Initialize(mapload)
. = ..()
create_reagents(0)
create_reagents(0, OPENCONTAINER)
matching_designs = list()
cached_designs = list()
stored_research = new

View File

@@ -2,7 +2,6 @@
name = "circuit imprinter"
desc = "Manufactures circuit boards for the construction of machines."
icon_state = "circuit_imprinter"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/circuit_imprinter
categories = list(
"AI Modules",

View File

@@ -2,7 +2,6 @@
name = "department circuit imprinter"
desc = "A special circuit imprinter with a built in interface meant for departmental usage, with built in ExoSync receivers allowing it to print designs researched that match its ROM-encoded department type."
icon_state = "circuit_imprinter"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/circuit_imprinter/department
requires_console = FALSE
consoleless_interface = TRUE
@@ -11,4 +10,4 @@
name = "department circuit imprinter (Science)"
circuit = /obj/item/circuitboard/machine/circuit_imprinter/department/science
allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SCIENCE
department_tag = "Science"
department_tag = "Science"

View File

@@ -2,7 +2,6 @@
name = "department protolathe"
desc = "A special protolathe with a built in interface meant for departmental usage, with built in ExoSync receivers allowing it to print designs researched that match its ROM-encoded department type."
icon_state = "protolathe"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/protolathe/department
requires_console = FALSE
consoleless_interface = TRUE
@@ -41,4 +40,4 @@
name = "department protolathe (Security)"
allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SECURITY
department_tag = "Security"
circuit = /obj/item/circuitboard/machine/protolathe/department/security
circuit = /obj/item/circuitboard/machine/protolathe/department/security

View File

@@ -2,7 +2,6 @@
name = "department techfab"
desc = "An advanced fabricator designed to print out the latest prototypes and circuits researched from Science. Contains hardware to sync to research networks. This one is department-locked and only possesses a limited set of decryption keys."
icon_state = "protolathe"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/techfab/department
/obj/machinery/rnd/production/techfab/department/engineering
@@ -39,4 +38,4 @@
name = "department techfab (Security)"
allowed_department_flags = DEPARTMENTAL_FLAG_ALL|DEPARTMENTAL_FLAG_SECURITY
department_tag = "Security"
circuit = /obj/item/circuitboard/machine/techfab/department/security
circuit = /obj/item/circuitboard/machine/techfab/department/security

View File

@@ -2,7 +2,6 @@
name = "protolathe"
desc = "Converts raw materials into useful objects."
icon_state = "protolathe"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/protolathe
categories = list(
"Power Designs",
@@ -23,4 +22,4 @@
/obj/machinery/rnd/production/protolathe/disconnect_console()
linked_console.linked_lathe = null
..()
..()

View File

@@ -2,7 +2,6 @@
name = "technology fabricator"
desc = "Produces researched prototypes with raw materials and energy."
icon_state = "protolathe"
container_type = OPENCONTAINER
circuit = /obj/item/circuitboard/machine/techfab
categories = list(
"Power Designs",
@@ -33,4 +32,4 @@
production_animation = "protolathe_n"
requires_console = FALSE
consoleless_interface = TRUE
allowed_buildtypes = PROTOLATHE | IMPRINTER
allowed_buildtypes = PROTOLATHE | IMPRINTER

View File

@@ -90,12 +90,11 @@ To add a crossbreed:
icon = 'icons/obj/slimecrossing.dmi'
icon_state = "base"
var/del_on_empty = TRUE
container_type = INJECTABLE | DRAWABLE
var/list/list_reagents
/obj/item/slimecrossbeaker/Initialize()
. = ..()
create_reagents(50)
create_reagents(50, INJECTABLE | DRAWABLE)
if(list_reagents)
for(var/reagent in list_reagents)
reagents.add_reagent(reagent, list_reagents[reagent])
@@ -130,10 +129,13 @@ To add a crossbreed:
list_reagents = list("omnizine" = 15)
/obj/item/slimecrossbeaker/autoinjector //As with the above, but automatically injects whomever it is used on with contents.
container_type = DRAWABLE //Cannot be refilled, since it's basically an autoinjector!
var/ignore_flags = FALSE
var/self_use_only = FALSE
/obj/item/slimecrossbeaker/autoinjector/Initialize()
. = ..()
reagents.flags = DRAWABLE // Cannot be refilled, since it's basically an autoinjector!
/obj/item/slimecrossbeaker/autoinjector/attack(mob/living/M, mob/user)
if(!reagents.total_volume)
to_chat(user, "<span class='warning'>[src] is empty!</span>")
@@ -169,12 +171,15 @@ To add a crossbreed:
list_reagents = list("slimejelly" = 50)
/obj/item/slimecrossbeaker/autoinjector/peaceandlove
container_type = null //It won't be *that* easy to get your hands on pax.
name = "peaceful distillation"
desc = "A light pink gooey sphere. Simply touching it makes you a little dizzy."
color = "#DDAAAA"
list_reagents = list("synthpax" = 10, "space_drugs" = 15) //Peace, dudes
/obj/item/slimecrossbeaker/autoinjector/peaceandlove/Initialize()
. = ..()
reagents.flags = NONE // It won't be *that* easy to get your hands on pax.
/obj/item/slimecrossbeaker/autoinjector/slimestimulant
name = "invigorating gel"
desc = "A bubbling purple mixture, designed to heal and boost movement."

View File

@@ -7,12 +7,11 @@ Burning extracts:
name = "burning extract"
desc = "It's boiling over with barely-contained energy."
effect = "burning"
container_type = INJECTABLE | DRAWABLE
icon_state = "burning"
/obj/item/slimecross/burning/Initialize()
. = ..()
create_reagents(10)
create_reagents(10, INJECTABLE | DRAWABLE)
/obj/item/slimecross/burning/attack_self(mob/user)
if(!reagents.has_reagent("plasma",10))

View File

@@ -8,12 +8,11 @@ Charged extracts:
name = "charged extract"
desc = "It sparks with electric power."
effect = "charged"
container_type = INJECTABLE | DRAWABLE
icon_state = "charged"
/obj/item/slimecross/charged/Initialize()
. = ..()
create_reagents(10)
create_reagents(10, INJECTABLE | DRAWABLE)
/obj/item/slimecross/charged/attack_self(mob/user)
if(!reagents.has_reagent("plasma",10))

View File

@@ -7,11 +7,11 @@ Chilling extracts:
name = "chilling extract"
desc = "It's cold to the touch, as if frozen solid."
effect = "chilling"
container_type = INJECTABLE | DRAWABLE
icon_state = "chilling"
/obj/item/slimecross/chilling/Initialize()
. = ..()
create_reagents(10)
create_reagents(10, INJECTABLE | DRAWABLE)
/obj/item/slimecross/chilling/attack_self(mob/user)
if(!reagents.has_reagent("plasma",10))

View File

@@ -5,7 +5,6 @@ Industrial extracts:
/obj/item/slimecross/industrial
name = "industrial extract"
desc = "A gel-like, sturdy extract, fond of plasma and industry."
container_type = INJECTABLE | DRAWABLE
effect = "industrial"
icon_state = "industrial_still"
var/plasmarequired = 2 //Units of plasma required to be consumed to produce item.
@@ -22,7 +21,7 @@ Industrial extracts:
/obj/item/slimecross/industrial/Initialize()
. = ..()
create_reagents(100)
create_reagents(100, INJECTABLE | DRAWABLE)
START_PROCESSING(SSobj,src)
/obj/item/slimecross/industrial/Destroy()

View File

@@ -10,7 +10,6 @@
throwforce = 0
throw_speed = 3
throw_range = 6
container_type = INJECTABLE | DRAWABLE
grind_results = list()
var/Uses = 1 // uses before it goes inert
var/qdel_timer = null // deletion timer, for delayed reactions
@@ -39,7 +38,7 @@
/obj/item/slime_extract/Initialize()
. = ..()
create_reagents(100)
create_reagents(100, INJECTABLE | DRAWABLE)
/obj/item/slime_extract/on_grind()
if(Uses)