Skip to content

Commit

Permalink
Xenobiology QoL/fixup pass (#1638)
Browse files Browse the repository at this point in the history
* Slime Rancher fixups

* lol

* weh

* Only show status overlay on shift-click

* alt -> ctrl

* proper power usage defines

* Make it easier to see output

* Upgrade roundstart power cells of xenobio APCs; add more lights to Delta xenobio

* Ensure all xenobio APCs start fully charged

* Mutation syringes are now smol.

* Fix mapping helpers

* Fix Meta APC wiring
  • Loading branch information
Absolucy authored Apr 18, 2024
1 parent 5b2bde3 commit 19d3df1
Show file tree
Hide file tree
Showing 21 changed files with 444 additions and 163 deletions.
3 changes: 2 additions & 1 deletion _maps/map_files/BoxStation/BoxStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -9908,8 +9908,9 @@
"doR" = (
/obj/machinery/power/apc/auto_name/directional/south,
/obj/structure/cable,
/obj/effect/mapping_helpers/apc/cell_5k,
/obj/machinery/plumbing/ooze_compressor,
/obj/effect/mapping_helpers/apc/cell_10k,
/obj/effect/mapping_helpers/apc/full_charge,
/turf/open/floor/iron/white,
/area/station/science/xenobiology)
"doW" = (
Expand Down
15 changes: 11 additions & 4 deletions _maps/map_files/Deltastation/DeltaStation2.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -42678,6 +42678,8 @@
/obj/effect/turf_decal/siding/purple{
dir = 9
},
/obj/effect/mapping_helpers/apc/cell_10k,
/obj/effect/mapping_helpers/apc/full_charge,
/turf/open/floor/iron,
/area/station/science/xenobiology)
"kpy" = (
Expand Down Expand Up @@ -89711,6 +89713,11 @@
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/iron,
/area/station/engineering/atmos)
"vUy" = (
/obj/machinery/duct,
/obj/machinery/light/floor/has_bulb,
/turf/open/floor/engine,
/area/station/science/xenobiology)
"vUz" = (
/obj/structure/disposalpipe/segment,
/turf/open/floor/iron/white,
Expand Down Expand Up @@ -121069,7 +121076,7 @@ feF
gcr
pTC
iLv
gvX
vUy
duq
fMl
fMl
Expand All @@ -121079,7 +121086,7 @@ taA
fMl
fMl
xsN
gvX
vUy
iLv
mAt
aAx
Expand Down Expand Up @@ -122868,7 +122875,7 @@ woj
rrU
pTC
iLv
gvX
vUy
pQz
fMl
fMl
Expand All @@ -122878,7 +122885,7 @@ taA
fMl
fMl
esm
gvX
vUy
iLv
mAt
cZl
Expand Down
2 changes: 2 additions & 0 deletions _maps/map_files/IceBoxStation/IceBoxStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1194,6 +1194,8 @@
},
/obj/machinery/power/apc/auto_name/directional/south,
/obj/structure/cable,
/obj/effect/mapping_helpers/apc/cell_10k,
/obj/effect/mapping_helpers/apc/full_charge,
/turf/open/floor/iron/white,
/area/station/science/xenobiology)
"aut" = (
Expand Down
8 changes: 6 additions & 2 deletions _maps/map_files/MetaStation/MetaStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -13278,6 +13278,8 @@
/obj/effect/turf_decal/tile/purple/half/contrasted{
dir = 8
},
/obj/effect/mapping_helpers/apc/cell_10k,
/obj/effect/mapping_helpers/apc/full_charge,
/turf/open/floor/iron/white,
/area/station/science/cytology)
"eYw" = (
Expand Down Expand Up @@ -32577,8 +32579,6 @@
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/obj/machinery/duct,
/obj/machinery/power/apc/auto_name/directional/west,
/obj/structure/cable,
/turf/open/floor/stone,
/area/station/science/xenobiology)
"lJh" = (
Expand Down Expand Up @@ -49930,6 +49930,10 @@
/obj/effect/turf_decal/stripes/line{
dir = 9
},
/obj/effect/mapping_helpers/apc/cell_10k,
/obj/machinery/power/apc/auto_name/directional/north,
/obj/effect/mapping_helpers/apc/full_charge,
/obj/structure/cable,
/turf/open/floor/stone,
/area/station/science/xenobiology)
"rMz" = (
Expand Down
42 changes: 22 additions & 20 deletions _maps/map_files/tramstation/tramstation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -19077,16 +19077,6 @@
},
/turf/open/floor/plating,
/area/station/engineering/atmos/pumproom)
"eXC" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/obj/structure/cable,
/obj/structure/disposalpipe/segment{
dir = 10
},
/turf/open/floor/catwalk_floor,
/area/station/maintenance/starboard/central)
"eYi" = (
/obj/machinery/camera/directional/east,
/mob/living/basic/chicken/brown,
Expand Down Expand Up @@ -44319,6 +44309,16 @@
/obj/structure/cable,
/turf/open/floor/carpet,
/area/station/command/heads_quarters/hos)
"nme" = (
/obj/effect/turf_decal/trimline/purple/filled/line{
dir = 1
},
/obj/machinery/power/apc/auto_name/directional/north,
/obj/structure/cable,
/obj/effect/mapping_helpers/apc/cell_10k,
/obj/effect/mapping_helpers/apc/full_charge,
/turf/open/floor/stone,
/area/station/science/xenobiology)
"nmf" = (
/obj/structure/table/wood,
/obj/machinery/computer/security/wooden_tv,
Expand Down Expand Up @@ -54568,14 +54568,6 @@
/obj/structure/cable,
/turf/open/space/basic,
/area/space/nearstation)
"qCW" = (
/obj/effect/turf_decal/trimline/purple/filled/line{
dir = 1
},
/obj/machinery/power/apc/auto_name/directional/north,
/obj/structure/cable,
/turf/open/floor/stone,
/area/station/science/xenobiology)
"qCX" = (
/obj/effect/turf_decal/stripes/line{
dir = 9
Expand Down Expand Up @@ -67180,6 +67172,16 @@
/obj/machinery/door/firedoor,
/turf/open/floor/iron,
/area/station/cargo/drone_bay)
"uAW" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/obj/structure/cable,
/obj/structure/disposalpipe/segment{
dir = 10
},
/turf/open/floor/catwalk_floor,
/area/station/maintenance/starboard/central)
"uAZ" = (
/obj/effect/turf_decal/trimline/white/warning{
dir = 8
Expand Down Expand Up @@ -124267,7 +124269,7 @@ xPQ
vud
tml
qVr
qCW
nme
pbt
xcM
dtN
Expand Down Expand Up @@ -126550,7 +126552,7 @@ hFC
bwz
xks
qxm
eXC
uAW
lLW
iix
tuN
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/maths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

#define IS_FINITE__UNSAFE(a) (a-a == a-a)
#define IS_FINITE(a) (isnum(a) && IS_FINITE__UNSAFE(a))

#define IS_SAFE_NUM(a) (isnum(a) && !IS_INF__UNSAFE(a) && IS_FINITE__UNSAFE(a))

// ------------------------------------
// Aight dont remove the rest

Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/storage/bags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@
/obj/item/reagent_containers/syringe,
/obj/item/slime_extract,
/obj/item/swab,
/obj/item/stack/biomass // monke: make science bags able to hold biomass cubes
))

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@
colour = "grey"

/datum/status_effect/stabilized/grey/tick()
for(var/mob/living/basic/slime/S in range(1, get_turf(owner)))
SEND_SIGNAL(S, COMSIG_FRIENDSHIP_CHANGE, owner, 1)
for(var/mob/living/basic/slime/new_friend in range(3, get_turf(owner)))
SEND_SIGNAL(new_friend, COMSIG_FRIENDSHIP_CHANGE, owner, 1)
return ..()

/datum/status_effect/stabilized/orange
Expand Down
51 changes: 40 additions & 11 deletions monkestation/code/modules/slimecore/items/mutation_syringe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,41 @@
icon = 'monkestation/code/modules/slimecore/icons/slimes.dmi'
icon_state = "mutation_syringe"

///the path we infuse
w_class = WEIGHT_CLASS_SMALL

/// Type path of the slime trait to infuse.
var/datum/slime_trait/infusing_trait_path
/// have we been used?
var/used = FALSE
/// Amount of uses remaining.
var/uses = 1

/obj/item/slime_mutation_syringe/examine(mob/user)
. = ..()
if(uses)
. += span_notice("It has <b>[uses]</b> uses left.")
else
. += span_warning("It has been completely used up.")

/obj/item/slime_mutation_syringe/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(!infusing_trait_path || used)
if(!ispath(infusing_trait_path))
return
if(!uses)
user.balloon_alert(user, "used up")
to_chat(user, span_warning("[src] has been completely used up!"))
return
if(!istype(target, /mob/living/basic/slime))
return

var/mob/living/basic/slime/slime = target
if(slime.add_trait(infusing_trait_path))
used = TRUE
icon_state = "mutation_syringe-empty"
uses--
update_icon_state()
user.balloon_alert_to_viewers("injected mutator")
to_chat(user, span_notice("You inject [target] with [src]."))

/obj/item/slime_mutation_syringe/update_icon_state()
. = ..()
icon_state = uses ? initial(icon_state) : "[initial(icon_state)]-empty"

/obj/item/slime_mutation_syringe/cleaner
name = "cleaner slime mutation syringe"
Expand Down Expand Up @@ -64,19 +80,32 @@
icon = 'monkestation/code/modules/slimecore/icons/slimes.dmi'
icon_state = "mutation_syringe"

/// have we been used?
var/used = FALSE
/// Amount of uses remaining.
var/uses = 1

/obj/item/slime_mutation_syringe_random/examine(mob/user)
. = ..()
if(uses)
. += span_notice("It has <b>[uses]</b> uses left.")
else
. += span_warning("It has been completely used up.")

/obj/item/slime_mutation_syringe_random/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
. = ..()
if(used)
if(!uses)
user.balloon_alert(user, "used up")
to_chat(user, span_warning("[src] has been completely used up!"))
return
if(!istype(target, /mob/living/basic/slime))
return

var/mob/living/basic/slime/slime = target
slime.start_mutating(TRUE)
used = TRUE
icon_state = "mutation_syringe-empty"
uses--
update_icon_state()
user.balloon_alert_to_viewers("injected mutator")
to_chat(user, span_notice("You inject [target] with [src]."))

/obj/item/slime_mutation_syringe_random/update_icon_state()
. = ..()
icon_state = uses ? initial(icon_state) : "[initial(icon_state)]-empty"
38 changes: 20 additions & 18 deletions monkestation/code/modules/slimecore/machines/biomass_recycler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,38 @@ GLOBAL_LIST_INIT(biomass_unlocks, list())
power_change()
return TOOL_ACT_TOOLTYPE_SUCCESS

/obj/machinery/biomass_recycler/attackby(obj/item/O, mob/user, params)
if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", O))
return

if(default_pry_open(O))
return

if(default_deconstruction_crowbar(O))
/obj/machinery/biomass_recycler/attackby(obj/item/item, mob/user, params)
. = ..()
if(. || default_deconstruction_screwdriver(user, "grinder_open", "grinder", item) || default_pry_open(item) || default_deconstruction_crowbar(item) || machine_stat)
return

if(machine_stat) //NOPOWER etc
if(istype(item, /obj/item/storage/bag/xeno))
var/total_biomass = 0
for(var/obj/item/stack/biomass/biomass in item)
total_biomass += biomass.amount
stored_matter += biomass.amount
qdel(biomass)
if(total_biomass > 0)
to_chat(user, span_notice("You dump [total_biomass] cube\s of biomass from [item] into [src]."))
user.balloon_alert_to_viewers("inserted biomass")
return

if(HAS_TRAIT(O, TRAIT_NODROP))
else if(HAS_TRAIT(item, TRAIT_NODROP))
return

if(istype(O, /obj/item/stack/biomass))
var/obj/item/stack/biomass/biomass = O
else if(istype(item, /obj/item/stack/biomass))
var/obj/item/stack/biomass/biomass = item
to_chat(user, span_notice("You insert [biomass.amount] cube\s of biomass into [src]."))
user.balloon_alert_to_viewers("inserted biomass")
stored_matter += biomass.amount
qdel(biomass)
return

var/can_recycle
for(var/recycable_type in recyclable_types)
if(istype(O, recycable_type))
if(istype(item, recycable_type))
can_recycle = recycable_type
break

if(can_recycle)
recycle(O, user, can_recycle)
recycle(item, user, can_recycle)

/obj/machinery/biomass_recycler/MouseDrop_T(mob/living/target, mob/living/user)
if(!istype(target))
Expand Down Expand Up @@ -125,6 +126,7 @@ GLOBAL_LIST_INIT(biomass_unlocks, list())
var/spawn_type = item_names[pick]
if(stored_matter < printable_types[spawn_type])
to_chat(user, span_warning("[src] does not have enough stored biomass for that! It currently has [stored_matter] out of [printable_types[spawn_type]] unit\s required."))
balloon_alert(user, "not enough biomass")
return

var/spawned = new spawn_type(user.loc)
Expand All @@ -139,7 +141,7 @@ GLOBAL_LIST_INIT(biomass_unlocks, list())
icon = 'monkestation/code/modules/slimecore/icons/stack_objects.dmi'
icon_state = "biomass"
base_icon_state = "biomass"
max_amount = 5
max_amount = 15
singular_name = "biomass cube"
merge_type = /obj/item/stack/biomass
flags_1 = CONDUCT_1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
base_icon_state = "civilian_pad"
density = TRUE
use_power = IDLE_POWER_USE
idle_power_usage = 10
active_power_usage = 2000
idle_power_usage = BASE_MACHINE_IDLE_CONSUMPTION
active_power_usage = BASE_MACHINE_ACTIVE_CONSUMPTION
circuit = /obj/item/circuitboard/machine/slime_extract_requestor
var/obj/machinery/computer/slime_market/console
var/list/current_requests = list()
Expand Down
Loading

0 comments on commit 19d3df1

Please sign in to comment.