Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes for Slime Grinder and Slime Market Pad #4743

Merged
merged 3 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
. += mutable_appearance(icon, "slime_grinder_overlay", layer + 0.1, src)

/obj/machinery/plumbing/slime_grinder/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
. = ..()
if(isslime(AM))
if(!poster_boy)
poster_boy = AM
Expand All @@ -102,3 +101,5 @@
soon_to_be_crushed |= AM
AM.forceMove(src)
update_appearance()
return // Stops slime from actually hitting the machine
return ..() // If it is anything else handle being hit normally.
13 changes: 8 additions & 5 deletions monkestation/code/modules/slimecore/machines/slime_market.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
base_icon_state = "market_pad"
density = TRUE
use_power = IDLE_POWER_USE
interaction_flags_machine = INTERACT_MACHINE_OPEN|INTERACT_MACHINE_ALLOW_SILICON|INTERACT_MACHINE_OFFLINE|INTERACT_MACHINE_OPEN_SILICON|INTERACT_MACHINE_SET_MACHINE|INTERACT_MACHINE_WIRES_IF_OPEN
idle_power_usage = BASE_MACHINE_IDLE_CONSUMPTION
active_power_usage = BASE_MACHINE_ACTIVE_CONSUMPTION
circuit = /obj/item/circuitboard/machine/slime_market_pad
Expand Down Expand Up @@ -42,15 +43,16 @@
break

/obj/machinery/slime_market_pad/attackby(obj/item/item, mob/living/user, params)
. = ..()
if(. || !can_interact(user))
return
if(HAS_TRAIT(user, TRAIT_CANT_ATTACK) || !can_interact(user))
return ..() // Little wasteful to call HAS_TRAIT twice here and parent but the parent will apply damage if we call it
if(default_deconstruction_screwdriver(user, icon_state, icon_state, item))
user.visible_message(span_notice("\The [user] [panel_open ? "opens" : "closes"] the hatch on \the [src]."), span_notice("You [panel_open ? "open" : "close"] the hatch on \the [src]."))
user.visible_message(span_notice("\The [user] [panel_open ? "opens" : "closes"] the hatch on \the [src]."))
update_appearance()
return TRUE
if(default_unfasten_wrench(user, item) || default_deconstruction_crowbar(item))
return TRUE
if(machine_stat & (NOPOWER|BROKEN))
return ..()
if(QDELETED(console))
to_chat(user, span_warning("[src] does not have a console linked to it!"))
return
Expand All @@ -74,7 +76,8 @@
sold_extracts++
if(sold_extracts > 0)
user.balloon_alert_to_viewers("sold [sold_extracts] extracts")
return
return TRUE
return ..()

/obj/machinery/slime_market_pad/proc/sell_extract(obj/item/slime_extract/extract)
SSresearch.xenobio_points += round(SSresearch.slime_core_prices[extract.type])
Expand Down
Loading