The Eggcellent Update Part 2 (#30837)

* I'm unreasonably excited about this change

* Woopsy

* That was not on copy paste and 30 characters

Co-authored-by: Rubylips <Questionfrog@gmail.com>
This commit is contained in:
GreatBigFailure
2021-09-30 00:42:55 -04:00
committed by GitHub
parent 2d2320d3e6
commit df7ffcc397
16 changed files with 59 additions and 60 deletions

View File

@@ -1147,6 +1147,7 @@ var/default_colour_matrix = list(1,0,0,0,\
#define WIREJACK 512 //can we wirejack it? if flagged, machine calls wirejack()
#define SHUTTLEWRENCH 1024 //if this flag exists, the computer can be wrenched on shuttle floors
#define SECUREDPANEL 2048 //it won't let you open the deconstruction panel if you don't have the linked account number. Originally used for custom vending machines
#define MULTIOUTPUT 4096 //Let's you set the output location with a multitool
#define MAX_N_OF_ITEMS 999 // Used for certain storage machinery, BYOND infinite loop detector doesn't look things over 1000.

View File

@@ -14,7 +14,7 @@
allowed_materials = 0 //A 0 or FALSE Allows all materials.
light_color = LIGHT_COLOR_RED
machine_flags = SCREWTOGGLE | CROWDESTROY | WRENCHMOVE | FIXED2WORK //| EMAGGABLE
machine_flags = SCREWTOGGLE | CROWDESTROY | WRENCHMOVE | FIXED2WORK | MULTIOUTPUT //| EMAGGABLE
research_flags = NANOTOUCH | TAKESMATIN | HASOUTPUT | IGNORE_CHEMS | HASMAT_OVER | LOCKBOXES | FAB_RECYCLER
one_part_set_only = 0
@@ -98,4 +98,3 @@
RefreshParts()

View File

@@ -27,7 +27,7 @@
MAT_GLASS
)
machine_flags = SCREWTOGGLE | CROWDESTROY | EMAGGABLE | WRENCHMOVE | FIXED2WORK
machine_flags = SCREWTOGGLE | CROWDESTROY | EMAGGABLE | WRENCHMOVE | FIXED2WORK | MULTIOUTPUT
research_flags = NANOTOUCH | TAKESMATIN | HASOUTPUT | IGNORE_CHEMS | HASMAT_OVER | FAB_RECYCLER

View File

@@ -27,9 +27,7 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj
var/current_heat_capacity = 50
var/running_bob_animation = 0 // This is used to prevent threads from building up if update_icons is called multiple times
var/output_dir //Which direction to try to place our patients onto, should they eject naturally.
machine_flags = SCREWTOGGLE | CROWDESTROY
machine_flags = SCREWTOGGLE | CROWDESTROY | MULTIOUTPUT
light_color = LIGHT_COLOR_HALOGEN
light_range_on = 1
@@ -334,11 +332,6 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj
user.visible_message("[user] adds \a [G] to \the [src]!", "You add \a [G] to \the [src]!")
investigation_log(I_CHEMS, "was loaded with \a [G] by [key_name(user)], containing [G.reagents.get_reagent_ids(1)]")
update_icon()
if(G.is_multitool(user) && Adjacent(user))
output_dir = get_dir(src, user)
to_chat(user, "<span class='notice'>[bicon(src)]Output location set.</span>")
return
if(G.is_wrench(user))//FUCK YOU PARENT, YOU AREN'T MY REAL DAD
return
if(G.is_screwdriver(user))

View File

@@ -136,6 +136,7 @@ Class Procs:
var/custom_aghost_alerts=0
var/panel_open = 0
var/state = 0 //0 is unanchored, 1 is anchored and unwelded, 2 is anchored and welded for most things
var/output_dir = 0 //Direction used to output to (for things like fabs), set to 0 for loc.
var/obj/item/weapon/cell/connected_cell = null //The battery connected to this machine
var/battery_dependent = 0 //Requires a battery to run
@@ -626,10 +627,15 @@ Class Procs:
else
return -1
if(O.is_multitool(user) && machine_flags & MULTITOOL_MENU)
if(O.is_multitool(user))
if(!panel_open && machine_flags & MULTIOUTPUT)
setOutputLocation(user)
return 1
if(machine_flags & MULTITOOL_MENU)
update_multitool_menu(user)
return 1
if(!anchored && machine_flags & FIXED2WORK)
return to_chat(user, "<span class='warning'>\The [src] must be anchored first!</span>")
@@ -774,3 +780,17 @@ Class Procs:
/obj/machinery/proc/is_operational()
return !(stat & (NOPOWER|BROKEN|MAINT))
/obj/machinery/proc/setOutputLocation(user)
var/result = input("Set your location as output?") in list("Yes","No","Machine Location")
switch(result)
if("Yes")
if(!Adjacent(user))
to_chat(user, "<span class='warning'>Cannot set this as the output location; You're not adjacent to it!</span>")
return 1
output_dir = get_dir(src, user)
to_chat(user, "<span class='notice'>Output set.</span>")
if("Machine Location")
output_dir = 0
to_chat(user, "<span class='notice'>Output set.</span>")

View File

@@ -5,7 +5,7 @@
icon_state = "medalprinter"
icon_state_open = "medalprinter_t"
nano_file = "medalprinter.tmpl"
machine_flags = SCREWTOGGLE | CROWDESTROY | WRENCHMOVE | FIXED2WORK | EMAGGABLE
machine_flags = SCREWTOGGLE | CROWDESTROY | WRENCHMOVE | FIXED2WORK | EMAGGABLE | MULTIOUTPUT
research_flags = NANOTOUCH | TAKESMATIN | HASOUTPUT | IGNORE_CHEMS | HASMAT_OVER | ACCESS_EMAG
req_access = list(access_hop)

View File

@@ -7,7 +7,7 @@
use_power = 1
idle_power_usage = 10
active_power_usage = 500
machine_flags = SCREWTOGGLE | CROWDESTROY | WRENCHMOVE | EJECTNOTDEL
machine_flags = SCREWTOGGLE | CROWDESTROY | WRENCHMOVE | EJECTNOTDEL | MULTIOUTPUT
flags = OPENCONTAINER | NOREACT
pass_flags = PASSTABLE
var/input_path = /obj/item/weapon/reagent_containers/food/snacks/egg
@@ -15,6 +15,7 @@
var/speed_bonus = 0
var/circuitpath = /obj/item/weapon/circuitboard/egg_incubator
var/active_state = "incubator_old_on"
output_dir = 0
/obj/machinery/egg_incubator/New()
. = ..()
@@ -48,10 +49,10 @@
/obj/machinery/egg_incubator/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(..())
return 1
if(istype(O,input_path))
if(contents.len >= limit)
to_chat(user, "\The [src] has no more space!")
return 1
if (istype(O,input_path))
if(animal_count[/mob/living/simple_animal/chicken] >= ANIMAL_CHILD_CAP)
to_chat(user, "<span class='warning'>You get the feeling there are enough of those already.</span>")
return 1
@@ -123,10 +124,16 @@
/obj/machinery/egg_incubator/proc/eject(var/obj/E)
if(E.loc != src)
return //You can't eject it if it's not here.
E.forceMove(get_turf(src))
E.forceMove(get_step(get_turf(src), output_dir))
src.updateUsrDialog()
visible_message("<span class='info'>\The [E] is released from \the [src].</span>")
/obj/machinery/egg_incubator/conveyor_act(var/atom/movable/AM, var/obj/machinery/conveyor/CB)
if(istype(AM, input_path))
if(contents.len >= limit || animal_count[/mob/living/simple_animal/chicken] >= ANIMAL_CHILD_CAP)
return
AM.forceMove(src)
/obj/machinery/egg_incubator/box_cloner
name = "box flesh cloner"
desc = "The spasmodically squirming, braying, and snorting half-corpses were heaped each upon the other, until at least I was rid of them. The station had become a landfill of snout and hoof, gristle and bone - a mountainous, twitching mass of misshapen flesh, fusing itself together in the darkness."
@@ -150,3 +157,5 @@
/obj/machinery/egg_incubator/box_cloner/getProgress(var/obj/item/weapon/reagent_containers/food/snacks/meat/box/B)
if(istype(B))
return B.amount_cloned

View File

@@ -28,10 +28,9 @@
id_tag = "clone_pod"
var/upgraded = 0 //if fully upgraded with T4 components, it will drastically improve and allow for some stuff
var/obj/machinery/computer/cloning/cloning_computer = null
var/output_dir //Which direction to try to place our patients onto, should they eject naturally.
machine_flags = EMAGGABLE | SCREWTOGGLE | CROWDESTROY | MULTITOOL_MENU
machine_flags = EMAGGABLE | SCREWTOGGLE | CROWDESTROY | MULTITOOL_MENU | MULTIOUTPUT
light_color = LIGHT_COLOR_CYAN
use_auto_lights = 1
@@ -579,15 +578,6 @@
return loc
return T
/obj/machinery/cloning/clonepod/Topic(href,href_list)
if(..())
return
if(href_list["set_output_dir"])
if(!Adjacent(usr))
to_chat(usr, "<span class='warning'>Cannot set output location: Out of range.</span>")
return 1
output_dir = get_dir(src, usr)
to_chat(usr, "<span class='notice'>[bicon(src)]Output location set.</span>")
/*
* Diskette Box

View File

@@ -6,7 +6,7 @@
density = 1
anchored = 1
var/input_dir = 1
var/output_dir = 2
output_dir = 2
/obj/machinery/patient_processor/proc/notify_ghost(var/mob/M)
if(!M.client)

View File

@@ -259,8 +259,8 @@
var/atom/movable/mover //Virtual atom used to check passing ability on the out turf.
output_dir = WEST
var/input_dir = EAST
var/output_dir = WEST
var/filter_dir = SOUTH
var/max_items_moved = 100

View File

@@ -17,7 +17,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
build_time = IMPRINTER_BUILD_TIME
build_number = 1
research_flags = HASOUTPUT | TAKESMATIN | CONSOLECONTROL | LOCKBOXES
research_flags = HASOUTPUT | TAKESMATIN | CONSOLECONTROL | LOCKBOXES | MULTIOUTPUT
// Don't log reagent transfers. They're just spammy.
log_reagents = 0

View File

@@ -35,7 +35,7 @@
var/min_cap_T = 0.1 //The minimum cap used to how much time coeff can be improved
var/fabricator_cooldown = 2 //In deciseconds, the delay between each item starting to be built
machine_flags = SCREWTOGGLE | CROWDESTROY | WRENCHMOVE | FIXED2WORK | EMAGGABLE
machine_flags = SCREWTOGGLE | CROWDESTROY | WRENCHMOVE | FIXED2WORK | EMAGGABLE | MULTIOUTPUT
research_flags = TAKESMATIN | HASOUTPUT | HASMAT_OVER | NANOTOUCH
/obj/machinery/r_n_d/fabricator/New()

View File

@@ -13,7 +13,7 @@
icon_state = "genfab"
max_material_storage = GEN_FAB_BASESTORAGE
nano_file = "genfab.tmpl"
var/list/design_types = GENFAB | IMPRINTER | PROTOLATHE | AUTOLATHE | MECHFAB | PODFAB
var/list/design_types = GENFAB | IMPRINTER | PROTOLATHE | AUTOLATHE | MECHFAB | PODFAB | MULTIOUTPUT
var/removable_designs = 1
var/plastic_added = 1 //if plastic costs are added for designs - the autolathe doesn't have this

View File

@@ -20,7 +20,7 @@ it creates. All the menus and other manipulation commands are in the R&D console
light_color = LIGHT_COLOR_CYAN
research_flags = CONSOLECONTROL | HASOUTPUT | TAKESMATIN | HASMAT_OVER | LOCKBOXES
research_flags = CONSOLECONTROL | HASOUTPUT | TAKESMATIN | HASMAT_OVER | LOCKBOXES | MULTIOUTPUT
part_sets = list(
"Stock Parts" = list(),

View File

@@ -14,7 +14,6 @@ var/global/list/rnd_machines = list()
var/disabled = 0
var/shocked = 0
var/obj/machinery/computer/rdconsole/linked_console
var/output_dir = 0 // Direction used to output to (for things like fabs), set to 0 for loc.
var/stopped = 0
var/base_state = ""
var/build_time = 0
@@ -138,6 +137,10 @@ var/global/list/rnd_machines = list()
return TRUE
return FALSE
/obj/machinery/r_n_d/setOutputLocation(user)
if(research_flags &HASOUTPUT)
..()
/obj/machinery/r_n_d/attackby(var/obj/item/O as obj, var/mob/user as mob)
if (shocked)
shock(user,50, O.siemens_coefficient)
@@ -153,22 +156,6 @@ var/global/list/rnd_machines = list()
return 1
if (disabled)
return 1
if (istype(O, /obj/item/device/multitool))
if(!panel_open && research_flags &HASOUTPUT)
var/result = input("Set your location as output?") in list("Yes","No","Machine Location")
switch(result)
if("Yes")
if(!Adjacent(user))
to_chat(user, "<span class='warning'>Cannot set this as the output location; You're not adjacent to it!</span>")
return 1
output_dir = get_dir(src, user)
to_chat(user, "<span class='notice'>Output set.</span>")
if("Machine Location")
output_dir = 0
to_chat(user, "<span class='notice'>Output set.</span>")
return 1
return
if (!linked_console && !(istype(src, /obj/machinery/r_n_d/fabricator))) //fabricators get a free pass because they aren't tied to a console
to_chat(user, "\The [src] must be linked to an R&D console first!")
return 1

View File

@@ -10,7 +10,7 @@
build_number = PODFAB
build_time = 1
nano_file = "podfab.tmpl"
research_flags = NANOTOUCH | HASOUTPUT | HASMAT_OVER | TAKESMATIN | ACCESS_EMAG | LOCKBOXES
research_flags = NANOTOUCH | HASOUTPUT | HASMAT_OVER | TAKESMATIN | ACCESS_EMAG | LOCKBOXES | MULTIOUTPUT
part_sets = list( //set names must be unique
"Pod_Frame" = list(