diff --git a/modular_skyrat/modules/armaments/code/armament_component.dm b/modular_skyrat/modules/armaments/code/armament_component.dm
index 2d6a3397a9c..f76db922d87 100644
--- a/modular_skyrat/modules/armaments/code/armament_component.dm
+++ b/modular_skyrat/modules/armaments/code/armament_component.dm
@@ -240,8 +240,8 @@
//if they're strange and have a hacky ID card as an animal
else if(isanimal(user))
- var/mob/living/basic/animal = user
- if(check_access_obj(animal.access_card))
+ var/mob/living/simple_animal/animal = user
+ if(check_access_obj(animal.get_idcard()))
return TRUE
/datum/component/armament/proc/check_access_obj(obj/item/id)
diff --git a/modular_skyrat/modules/ashwalkers/code/effects/ash_rituals.dm b/modular_skyrat/modules/ashwalkers/code/effects/ash_rituals.dm
index 8f2c4adf889..ddc3e457ed8 100644
--- a/modular_skyrat/modules/ashwalkers/code/effects/ash_rituals.dm
+++ b/modular_skyrat/modules/ashwalkers/code/effects/ash_rituals.dm
@@ -364,7 +364,7 @@
if(find_animal.sentience_type != SENTIENCE_ORGANIC)
return FALSE
- find_animal.faction = list(FACTION_ASHWALKER)
+ find_animal.set_faction(list(FACTION_ASHWALKER))
if(ishostile(find_animal))
var/mob/living/simple_animal/hostile/hostile_animal = find_animal
@@ -387,7 +387,7 @@
if(find_animal.sentience_type != SENTIENCE_ORGANIC)
return FALSE
- find_animal.faction = list(FACTION_ASHWALKER)
+ find_animal.set_faction(list(FACTION_ASHWALKER))
find_animal.revive(HEAL_ALL)
return TRUE
diff --git a/modular_skyrat/modules/customization/modules/clothing/~donator/donator_clothing.dm b/modular_skyrat/modules/customization/modules/clothing/~donator/donator_clothing.dm
index 412e1d0bc72..3d5130df91e 100644
--- a/modular_skyrat/modules/customization/modules/clothing/~donator/donator_clothing.dm
+++ b/modular_skyrat/modules/customization/modules/clothing/~donator/donator_clothing.dm
@@ -125,7 +125,7 @@
/obj/item/canvas/drawingtablet/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/dtselectcolor))
- currentcolor = tgui_color_picker(usr, "", "Choose Color", currentcolor) // BUBBERSTATION EDIT: TGUI COLOR PICKER
+ currentcolor = tgui_color_picker(user, "", "Choose Color", currentcolor)
else if(istype(action, /datum/action/item_action/dtcolormenu))
var/list/selects = colors.Copy()
selects["Save"] = "Save"
@@ -147,13 +147,19 @@
else
currentcolor = colors[selection]
else if(istype(action, /datum/action/item_action/dtcleargrid))
- var/yesnomaybe = tgui_alert("Are you sure you wanna clear the canvas?", "", list("Yes", "No", "Maybe"))
+ var/yesnomaybe = tgui_alert(user, "Are you sure you wanna clear the canvas?", "", list("Yes", "No", "Maybe"))
if(QDELETED(src) || !user.can_perform_action(src))
return
switch(yesnomaybe)
if("Yes")
-/* reset_grid() Broken
- */ SStgui.update_uis(src)
+ workspace = new(width,
+ height,
+ color_mode = SPRITE_EDITOR_COLOR_MODE_RGB,
+ config_flags = NONE,
+ tool_flags = SPRITE_EDITOR_TOOL_PENCIL | SPRITE_EDITOR_TOOL_BUCKET,
+ initial_layer_color = "[canvas_color]ff" // To avoid needing to handle strings of mixed lengths, sprite editor workspaces always use the alpha channel
+ )
+ SStgui.update_uis(src)
if("No")
return
if("Maybe")
diff --git a/modular_skyrat/modules/customization/modules/hydroponics/grown/kiri.dm b/modular_skyrat/modules/customization/modules/hydroponics/grown/kiri.dm
index a48f45e59a8..9df847cd817 100644
--- a/modular_skyrat/modules/customization/modules/hydroponics/grown/kiri.dm
+++ b/modular_skyrat/modules/customization/modules/hydroponics/grown/kiri.dm
@@ -22,13 +22,11 @@
icon = 'modular_skyrat/master_files/icons/obj/hydroponics/harvest.dmi'
icon_state = "kiri"
foodtypes = FRUIT | SUGAR
- grind_results = list(/datum/reagent/consumable/kiri_jelly = 0.1)
distill_reagent = /datum/reagent/consumable/ethanol/shakiri
tastes = list("ultra-sweet jelly" = 1)
/obj/item/food/grown/kiri/grind_results()
return list(/datum/reagent/consumable/kiri_jelly = 0.1)
-
/obj/item/food/grown/kiri/make_bakeable()
AddComponent(/datum/component/bakeable, /obj/item/food/baked_kiri, rand(15 SECONDS, 25 SECONDS), TRUE, TRUE)
diff --git a/modular_skyrat/modules/customization/modules/hydroponics/grown/muli.dm b/modular_skyrat/modules/customization/modules/hydroponics/grown/muli.dm
index fde0ed5ab8f..1481e6dab9f 100644
--- a/modular_skyrat/modules/customization/modules/hydroponics/grown/muli.dm
+++ b/modular_skyrat/modules/customization/modules/hydroponics/grown/muli.dm
@@ -25,8 +25,7 @@
tastes = list("mint and savory sweetness" = 1)
/obj/item/food/grown/muli/grind_results()
- retrun list(/datum/reagent/consumable/muli_juice = 0.1)
-
+ return list(/datum/reagent/consumable/muli_juice = 0.1)
/obj/item/food/grown/muli/make_bakeable()
AddComponent(/datum/component/bakeable, /obj/item/food/baked_muli, rand(15 SECONDS, 25 SECONDS), TRUE, TRUE)
diff --git a/modular_skyrat/modules/customization/modules/hydroponics/grown/piru.dm b/modular_skyrat/modules/customization/modules/hydroponics/grown/piru.dm
index 3f6f382c0ae..8fd20e6d0c3 100644
--- a/modular_skyrat/modules/customization/modules/hydroponics/grown/piru.dm
+++ b/modular_skyrat/modules/customization/modules/hydroponics/grown/piru.dm
@@ -23,7 +23,6 @@
icon = 'modular_skyrat/master_files/icons/obj/hydroponics/harvest.dmi'
icon_state = "piru"
foodtypes = VEGETABLES
- grind_results = list(/datum/reagent/consumable/piru_flour = 0)
tastes = list("chalky dryness" = 1)
/obj/item/food/grown/piru/grind_results()
diff --git a/modular_skyrat/modules/decay_subsystem/code/nests.dm b/modular_skyrat/modules/decay_subsystem/code/nests.dm
index 5e13bb506bd..25fafcdbe85 100644
--- a/modular_skyrat/modules/decay_subsystem/code/nests.dm
+++ b/modular_skyrat/modules/decay_subsystem/code/nests.dm
@@ -102,7 +102,7 @@
var/mob/living/spawned_mob = new chosen_mob_type(loc)
spawned_mob.flags_1 |= (flags_1 & ADMIN_SPAWNED_1)
- spawned_mob.has_faction = faction
+ spawned_mob.set_faction(faction)
spawned_mob.ghost_controllable = ghost_controllable
RegisterSignal(spawned_mob, COMSIG_LIVING_DEATH, PROC_REF(mob_death))
diff --git a/modular_skyrat/modules/examinemore/code/examine_more.dm b/modular_skyrat/modules/examinemore/code/examine_more.dm
index 5a915974aa0..b9117b26ea0 100644
--- a/modular_skyrat/modules/examinemore/code/examine_more.dm
+++ b/modular_skyrat/modules/examinemore/code/examine_more.dm
@@ -67,7 +67,7 @@ would only be recognisable with someone that had the syndicate trait.
if(EXAMINE_CHECK_SYNDICATE_TOY)
if(user.mind)
var/datum/mind/M = user.mind
- if((ROLE_TRAITOR in M.get_special_roles()) || (ROLE_SYNDICATE in user.faction))
+ if((ROLE_TRAITOR in M.get_special_roles()) || (user.has_faction(ROLE_SYNDICATE)))
composed_message = "You note the following because of your [special_desc_affiliation ? special_desc_affiliation : "Syndicate Affiliation"]:
"
composed_message += special_desc
. += composed_message
diff --git a/modular_skyrat/modules/food_replicator/code/medical.dm b/modular_skyrat/modules/food_replicator/code/medical.dm
index ca2e61c2817..8098f1dc4ea 100644
--- a/modular_skyrat/modules/food_replicator/code/medical.dm
+++ b/modular_skyrat/modules/food_replicator/code/medical.dm
@@ -26,9 +26,11 @@
sanitization = 0.5
flesh_regeneration = 1.75
stop_bleeding = 0.25
- grind_results = list(/datum/reagent/medicine/coagulant = 2)
merge_type = /obj/item/stack/medical/mesh/bloody
+/obj/item/stack/medical/mesh/bloody/grind_results()
+ return list(/datum/reagent/medicine/coagulant = 2)
+
/obj/item/stack/medical/mesh/bloody/update_icon_state()
if(is_open)
return ..()
diff --git a/modular_skyrat/modules/gladiator/code/game/objects/items/gladiator_items.dm b/modular_skyrat/modules/gladiator/code/game/objects/items/gladiator_items.dm
index d294c0cb1bc..48ad9fe31e5 100644
--- a/modular_skyrat/modules/gladiator/code/game/objects/items/gladiator_items.dm
+++ b/modular_skyrat/modules/gladiator/code/game/objects/items/gladiator_items.dm
@@ -170,7 +170,7 @@
/obj/item/claymore/dragonslayer/attack(mob/living/target, mob/living/carbon/human/user)
var/is_nemesis_faction = FALSE
- for(var/found_faction in target.faction)
+ for(var/found_faction in target.get_faction())
if(found_faction in nemesis_factions)
is_nemesis_faction = TRUE
force += faction_bonus_force
diff --git a/modular_skyrat/modules/goofsec/code/terragov.dm b/modular_skyrat/modules/goofsec/code/terragov.dm
index fff8e187be4..79ccfd077bf 100644
--- a/modular_skyrat/modules/goofsec/code/terragov.dm
+++ b/modular_skyrat/modules/goofsec/code/terragov.dm
@@ -829,7 +829,7 @@ GLOBAL_LIST_INIT(call911_do_and_do_not, list(
message_admins("[ADMIN_LOOKUPFLW(user)] has beamed out [living_user.pulling] alongside them.")
var/turf/pulling_turf = get_turf(living_user.pulling)
playsound(pulling_turf, 'sound/effects/magic/Repulse.ogg', 100, 1)
- var/datum/effect_system/basic/spak_spread/quantum/sparks = new
+ var/datum/effect_system/basic/spark_spread/quantum/sparks = new
do_sparks(10, 1, pulling_turf)
qdel(living_user.pulling)
var/turf/user_turf = get_turf(living_user)
diff --git a/modular_skyrat/modules/magfed_turret/code/turret_framework.dm b/modular_skyrat/modules/magfed_turret/code/turret_framework.dm
index 3e16edc5e2d..36ffebf33e1 100644
--- a/modular_skyrat/modules/magfed_turret/code/turret_framework.dm
+++ b/modular_skyrat/modules/magfed_turret/code/turret_framework.dm
@@ -92,9 +92,8 @@
return yoink
/obj/item/storage/toolbox/emergency/turret/mag_fed/set_faction(obj/machinery/porta_turret/syndicate/toolbox/mag_fed/turret, mob/user)
- if(!(user.faction in turret.faction))
- turret.faction += user.faction
- turret.allies += REF(user)
+ if(!turret.faction_check_atom(user))
+ APPLY_FACTION_AND_ALLIES_FROM(turret, user)
/obj/item/storage/toolbox/emergency/turret/mag_fed/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
if(!is_type_in_list(tool, list(/obj/item/wrench, /obj/item/screwdriver, /obj/item/multitool, /obj/item/toy/crayon/spraycan)))
@@ -140,7 +139,7 @@
playsound(src, 'sound/items/tools/drill_use.ogg', 80, TRUE, -1)
deploy_turret(user, loc)
return ITEM_INTERACT_SUCCESS
- ..()
+ return ..()
/obj/item/storage/toolbox/emergency/turret/mag_fed/attack_self(mob/user, modifiers)
if(!easy_deploy)
@@ -433,7 +432,7 @@
. = ..()
. -= span_notice("You can repair it by left-clicking with a combat wrench.")
. -= span_notice("You can fold it by right-clicking with a combat wrench.")
- if((user.faction in faction) || (REF(user) in allies))
+ if(FAST_FACTION_CHECK(faction, user.get_faction(), null, null, FALSE) || has_ally(user))
. += span_notice("You can unlock it by left-clicking with an id card.")
. += span_notice("You can repair it by left-clicking with a wrench.")
. += span_notice("You can fold it by right-clicking with a wrench.")
@@ -668,25 +667,19 @@
/obj/machinery/porta_turret/syndicate/toolbox/mag_fed/in_faction(mob/target)
if(!faction_targeting)
- if(REF(target) in allies)
- return TRUE
- else
- return FALSE
+ return has_ally(target)
+
+ return FAST_FACTION_CHECK(faction, target.get_faction(), allies, target.allies, FALSE)
- for(var/faction1 in faction)
- if((faction1 in target.faction) || (REF(target) in allies)) // For an Ally System
- return TRUE
- return FALSE
/// toggles between whether things are inside the ally system
/obj/machinery/porta_turret/syndicate/toolbox/mag_fed/proc/toggle_ally(mob/living/target) //leave these since it's kinda important to know which is being done.
- if(REF(target) in allies)
- allies -= REF(target)
+ if(remove_ally(target))
balloon_alert_to_viewers("ally removed!")
return
else
- allies += REF(target)
- balloon_alert_to_viewers("ally designated!")
+ if(add_ally(target))
+ balloon_alert_to_viewers("ally designated!")
return
/obj/machinery/porta_turret/syndicate/toolbox/mag_fed/target(atom/movable/target)
@@ -737,7 +730,6 @@
things_in_my_lawn -= whipper_snapper
if(target(whipper_snapper))
return TRUE
- return FALSE
/// Shoots at one specific target. Only happens if target is overridden. modularized for burst?
/obj/machinery/porta_turret/syndicate/toolbox/mag_fed/proc/trytoshootfucker(datum/weakref/target_weakref)
@@ -745,11 +737,10 @@
if(isnull(overridden_target))
target_override = null
burst_target = null
- return FALSE
+ return
while(overridden_target)
if(target(overridden_target)) //ok. It's trying to shoot a weakref. Thats the issue.
return TRUE
- return FALSE
/obj/machinery/porta_turret/syndicate/toolbox/mag_fed/shootAt(atom/movable/target)
if(!chambered) //Ok, We need to START the cycle
@@ -785,10 +776,9 @@
/// Handles the firing process. Will need edited for special ammo types like 980.
/obj/machinery/porta_turret/syndicate/toolbox/mag_fed/proc/handle_firing(obj/item/ammo_casing/casing, atom/movable/target)
- var/ignored_factions = list()
var/obj/projectile/our_projectile = casing.loaded_projectile
if(ignore_faction)
- our_projectile.ignored_factions = (faction + allies)
+ APPLY_FACTION_AND_ALLIES_FROM(our_projectile, src)
our_projectile.damage *= turret_damage_multiplier
our_projectile.stamina *= turret_damage_multiplier
@@ -812,7 +802,7 @@
fire_sound = 'modular_skyrat/modules/modular_weapons/sounds/pistol_light.ogg'
else if(istype(soundmaker, /obj/item/ammo_casing/c585trappiste))
fire_sound = 'modular_skyrat/modules/modular_weapons/sounds/pistol_heavy.ogg'
- else if(istype(soundmaker, /obj/item/ammo_casing/c46x30mm))
+ else if(istype(soundmaker, /obj/item/ammo_casing/c40sol))
fire_sound = 'modular_skyrat/modules/modular_weapons/sounds/rifle_heavy.ogg'
else if(istype(soundmaker, /obj/item/ammo_casing/strilka310))
fire_sound = 'modular_skyrat/modules/modular_weapons/sounds/battle_rifle.ogg'
@@ -823,7 +813,7 @@
////// Operation Handling //////
-/obj/machinery/porta_turret/syndicate/toolbox/mag_fed/attackby(obj/item/attacking_item, mob/living/user, params) // This hasn't been changed upstream yet.
+/obj/machinery/porta_turret/syndicate/toolbox/mag_fed/attackby(obj/item/attacking_item, mob/user, list/modifiers, list/attack_modifiers) // This hasn't been changed upstream yet.
var/obj/item/storage/toolbox/emergency/turret/mag_fed/auto_loader = mag_box?.resolve()
if(isnull(auto_loader))
mag_box = null
@@ -877,7 +867,7 @@
if(!claptrap_moment)
balloon_alert(user, "repaired!")
-/obj/machinery/porta_turret/syndicate/toolbox/mag_fed/attackby_secondary(obj/item/attacking_item, mob/living/user, params) //IM TIRED OF MISMATCHED VAR NAMES. IT'S ATTACK_ITEM ON MAIN, WHY WEAPON HERE?
+/obj/machinery/porta_turret/syndicate/toolbox/mag_fed/attackby_secondary(obj/item/attacking_item, mob/user, list/modifiers, list/attack_modifiers) //IM TIRED OF MISMATCHED VAR NAMES. IT'S ATTACK_ITEM ON MAIN, WHY WEAPON HERE?
. = ..()
if(. == SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN)
return
diff --git a/modular_skyrat/modules/medical/code/wounds/synth/robotic_burns.dm b/modular_skyrat/modules/medical/code/wounds/synth/robotic_burns.dm
index 8e9df426241..4faca29ec8f 100644
--- a/modular_skyrat/modules/medical/code/wounds/synth/robotic_burns.dm
+++ b/modular_skyrat/modules/medical/code/wounds/synth/robotic_burns.dm
@@ -11,13 +11,12 @@
/datum/wound/burn/robotic/overheat
treat_text = "Introduction of a cold environment or lowering of body temperature."
-
+ treat_text_short = "Cool the patient down with low temperature chemicals or put them under a shower."
simple_desc = "Metals are overheated, increasing damage taken significantly and raising body temperature!"
simple_treat_text = "Ideally cryogenics, but any source of low body temperature can work. Spraying with spray bottles/extinguishers/showers \
will quickly cool the limb, but cause damage. Hercuri is especially effective in quick cooling. \
Clothing reduces the water/hercuri that makes it to the metal, and gauze binds it and reduces the damage taken."
homemade_treat_text = "You can also splash any liquid on it for a rather inefficient and damaging coolant!"
- treat_text_short = "Lower body temperature."
default_scar_file = METAL_SCAR_FILE
@@ -163,7 +162,7 @@
/datum/wound/burn/robotic/get_limb_examine_description()
return span_warning("The metal on this limb is glowing radiantly.")
-/datum/wound/burn/robotic/overheat/handle_process(seconds_per_tick, times_fired)
+/datum/wound/burn/robotic/overheat/handle_process(seconds_per_tick)
if (isnull(victim))
var/turf/our_turf = get_turf(limb)
if (!isnull(our_turf))
@@ -214,15 +213,15 @@
* Equalizes temp to the reagent temp, but also causes thermal shock. Basically, does damage based on the temp differential.
* Clothes reduce the effects massively. Hercuri reduces the thermal shock and gets a special temp buff.
*/
-/datum/wound/burn/robotic/overheat/proc/victim_exposed_to_reagents(datum/signal_source, list/reagents, datum/reagents/source, methods, show_message)
+/datum/wound/burn/robotic/overheat/proc/victim_exposed_to_reagents(datum/signal_source, list/reagents, datum/reagents/source, methods, volume_modifier, show_message)
SIGNAL_HANDLER
var/reagent_coeff = base_reagent_temp_coefficient
- if (!get_location_accessible(victim, limb.body_zone))
+ if(!victim.is_location_accessible(limb.body_zone))
if (ishuman(victim))
- // hi! its niko! small rant
+ // hi! it's niko! small rant
// this proc has no goddamn reason to be on human, it could so easily just have used a proc on carbon that would get the required bodyparts to check
- // but no. it had to hardcode the list in the proc itself so its impossible to modularly fix this
+ // but no. it had to hardcode the list in the proc itself so it's impossible to modularly fix this
// so instead we just say fuck it and hope to god only human subtypes get this wound
// tldr; ryll why
var/mob/living/carbon/human/human_victim = victim
@@ -237,7 +236,7 @@
return
if (istype(source.my_atom, /obj/machinery/shower))
- expose_temperature(source.chem_temp, (15 * reagent_coeff), TRUE)
+ expose_temperature(source.chem_temp, (15 * volume_modifier * reagent_coeff), TRUE)
return
var/total_reagent_amount = 0
@@ -252,7 +251,7 @@
var/local_chem_temp = max(source.chem_temp - chem_temp_increment, 0)
- expose_temperature(local_chem_temp, (reagent_coeff * total_reagent_amount), TRUE, heat_shock_damage_mult = thermal_shock_mult)
+ expose_temperature(local_chem_temp, (reagent_coeff * volume_modifier * total_reagent_amount), TRUE, heat_shock_damage_mult = thermal_shock_mult)
/// Adjusts chassis_temperature by the delta between temperature and itself, multiplied by coeff.
/// If heat_shock is TRUE, limb will receive brute damage based on the delta.
@@ -281,7 +280,7 @@
if (victim)
var/gauze_or_not = (!isnull(gauze) ? ", but [gauze] helps to keep it together" : "")
- var/clothing_text = (!get_location_accessible(victim, limb.body_zone) ? ", [victim.p_their()] clothing absorbing some of the liquid" : "")
+ var/clothing_text = (!victim.is_location_accessible(limb.body_zone) ? ", [victim.p_their()] clothing absorbing some of the liquid" : "")
victim.visible_message(span_warning("[victim]'s [limb.plaintext_zone] strains from the thermal shock[clothing_text][gauze_or_not]!"))
playsound(victim, 'sound/items/tools/welder.ogg', 25)
@@ -320,8 +319,8 @@
var/heat_fahrenheit = round(heating_threshold * 1.8-459.67, 0.1)
return "Its current temperature is [span_blue("[current_temp_celcius ] °C ([current_temp_fahrenheit] °F)")], \
- and needs to cool to [span_nicegreen("[cool_celcius] °C ([cool_fahrenheit] °F)")][(heating_threshold && heating_threshold != INFINITY) ? ", but \
- will worsen if heated to [span_purple("[heat_celcius] °C ([heat_fahrenheit] °F)")]" : ""]."
+ and needs to cool to [span_nicegreen("[cool_celcius] °C ([cool_fahrenheit] °F)")], but \
+ will worsen if heated to [span_purple("[heat_celcius] °C ([heat_fahrenheit] °F)")]."
/datum/wound/burn/robotic/overheat/get_scanner_description(mob/user)
. = ..()
diff --git a/modular_skyrat/modules/primitive_cooking_additions/code/big_mortar.dm b/modular_skyrat/modules/primitive_cooking_additions/code/big_mortar.dm
index bcf7f0740ac..0d2a161fbc8 100644
--- a/modular_skyrat/modules/primitive_cooking_additions/code/big_mortar.dm
+++ b/modular_skyrat/modules/primitive_cooking_additions/code/big_mortar.dm
@@ -62,89 +62,126 @@
balloon_alert_to_viewers(anchored ? "secured" : "unsecured")
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
-/obj/structure/large_mortar/attackby(obj/item/attacking_item, mob/living/carbon/human/user)
- if(istype(attacking_item, /obj/item/storage/bag))
+/obj/structure/large_mortar/attackby(obj/item/attacking_item, mob/user, list/modifiers, list/attack_modifiers)
+ if(attacking_item.is_refillable())
+ return
+
+/obj/structure/large_mortar/item_interaction(mob/living/user, obj/item/tool, list/modifiers, is_right_clicking)
+ . = ..()
+
+ if(. || user.combat_mode || tool.is_refillable())
+ return .
+
+ if(istype(tool, /obj/item/storage/bag))
if(length(contents) >= maximum_contained_items)
- balloon_alert(user, "already full")
- return TRUE
+ balloon_alert(user, "already full!")
+ return ITEM_INTERACT_BLOCKING
- if(!length(attacking_item.contents))
+ if(!length(tool.contents))
balloon_alert(user, "nothing to transfer!")
- return TRUE
+ return ITEM_INTERACT_BLOCKING
- for(var/obj/item/target_item in attacking_item.contents)
+ for(var/obj/item/target_item in tool.contents)
if(length(contents) >= maximum_contained_items)
break
- if(target_item.juice_typepath || target_item.grind_results)
+ if(target_item.juice_typepath() || target_item.grind_results())
target_item.forceMove(src)
if (length(contents) >= maximum_contained_items)
- balloon_alert(user, "filled!")
+ balloon_alert(user, "filled")
+
else
balloon_alert(user, "transferred")
- return TRUE
- if(istype(attacking_item, /obj/item/pestle))
+ return ITEM_INTERACT_SUCCESS
+
+ if(istype(tool, /obj/item/pestle))
if(!anchored)
- balloon_alert(user, "secure to ground first")
- return
+ balloon_alert(user, "not secured!")
+ return ITEM_INTERACT_BLOCKING
- if(!length(contents))
- balloon_alert(user, "nothing to grind")
- return
-
- if(user.get_stamina_loss() > LARGE_MORTAR_STAMINA_MINIMUM)
- balloon_alert(user, "too tired")
- return
+ if(!length(contents) && reagents.total_volume == 0)
+ balloon_alert(user, "mortar empty!")
+ return ITEM_INTERACT_BLOCKING
var/list/choose_options = list(
"Grind" = image(icon = 'icons/hud/radial.dmi', icon_state = "radial_grind"),
- "Juice" = image(icon = 'icons/hud/radial.dmi', icon_state = "radial_juice")
+ "Juice" = image(icon = 'icons/hud/radial.dmi', icon_state = "radial_juice"),
+ "Mix" = image(icon = 'icons/hud/radial.dmi', icon_state = "radial_mix"),
)
var/picked_option = show_radial_menu(user, src, choose_options, radius = 38, require_near = TRUE)
- if(!length(contents) || !in_range(src, user) || !user.is_holding(attacking_item) && !picked_option)
- return
+ if(user.get_stamina_loss() > LARGE_MORTAR_STAMINA_MINIMUM)
+ balloon_alert(user, "too tired!")
+ return ITEM_INTERACT_BLOCKING
- balloon_alert_to_viewers("grinding...")
- var/skill_modifier = user.mind.get_skill_modifier(/datum/skill/primitive, SKILL_SPEED_MODIFIER)
+ if(!in_range(src, user) || !user.is_holding(tool) || !picked_option)
+ return ITEM_INTERACT_BLOCKING
+
+ var/act_verb = LOWER_TEXT(picked_option)
+ var/act_verb_ing
+ if(act_verb == "juice")
+ act_verb_ing = "juicing"
+
+ else
+ act_verb_ing = "[act_verb]ing"
+
+ var/has_resource
+ if(picked_option == "Mix")
+ has_resource = reagents.total_volume > 0
+
+ else
+ has_resource = length(contents) > 0
+
+ if(!has_resource)
+ balloon_alert(user, "nothing to [act_verb]!")
+ return ITEM_INTERACT_BLOCKING
+
+ balloon_alert_to_viewers("[act_verb_ing]...")
+ var/skill_modifier = user.mind?.get_skill_modifier(/datum/skill/primitive, SKILL_SPEED_MODIFIER)
if(!do_after(user, 5 SECONDS * skill_modifier, target = src))
- balloon_alert_to_viewers("stopped grinding")
- return
+ balloon_alert_to_viewers("stopped [act_verb_ing]")
+ return ITEM_INTERACT_BLOCKING
- var/stamina_use = LARGE_MORTAR_STAMINA_USE
- if(prob(user.mind.get_skill_modifier(/datum/skill/primitive, SKILL_PROBS_MODIFIER)))
- stamina_use *= 0.5 //so it uses half the amount of stamina (35 instead of 70)
-
- user.adjust_stamina_loss(stamina_use) //This is a bit more tiring than a normal sized mortar and pestle
- user.mind.adjust_experience(/datum/skill/primitive, 5)
+ user.adjust_stamina_loss(LARGE_MORTAR_STAMINA_USE) //This is a bit more tiring than a normal sized mortar and pestle
switch(picked_option)
if("Juice")
for(var/obj/item/target_item as anything in contents)
- if(target_item.juice_typepath)
+ if (reagents.total_volume >= reagents.maximum_volume)
+ balloon_alert(user, "overflowing!")
+ break
+
+ if(target_item.juice_typepath())
juice_target_item(target_item, user)
+
else
grind_target_item(target_item, user)
if("Grind")
for(var/obj/item/target_item as anything in contents)
- if(target_item.grind_results)
+ if (reagents.total_volume >= reagents.maximum_volume)
+ balloon_alert(user, "overflowing!")
+ break
+
+ if(target_item.grind_results())
grind_target_item(target_item, user)
+
else
juice_target_item(target_item, user)
- return
- if(!attacking_item.grind_results && !attacking_item.juice_typepath)
- balloon_alert(user, "can't grind this")
- return ..()
+ return ITEM_INTERACT_SUCCESS
+
+ if(!tool.grind_results() && !tool.juice_typepath())
+ balloon_alert(user, "can't grind this!")
+ return ITEM_INTERACT_BLOCKING
if(length(contents) >= maximum_contained_items)
- balloon_alert(user, "already full")
- return
+ balloon_alert(user, "already full!")
+ return ITEM_INTERACT_BLOCKING
- attacking_item.forceMove(src)
- return ..()
+ tool.forceMove(src)
+ return ITEM_INTERACT_SUCCESS
///Juices the passed target item, and transfers any contained chems to the mortar as well
/obj/structure/large_mortar/proc/juice_target_item(obj/item/to_be_juiced, mob/living/carbon/human/user)
diff --git a/modular_skyrat/modules/stone/code/stone.dm b/modular_skyrat/modules/stone/code/stone.dm
index 9143305a094..9e2bbe88730 100644
--- a/modular_skyrat/modules/stone/code/stone.dm
+++ b/modular_skyrat/modules/stone/code/stone.dm
@@ -10,13 +10,15 @@
throwforce = 15
resistance_flags = FIRE_PROOF
merge_type = /obj/item/stack/sheet/mineral/stone
- grind_results = null
material_type = /datum/material/stone
matter_amount = 0
source = null
walltype = /turf/closed/wall/mineral/stone
stairs_type = /obj/structure/stairs/stone
+/obj/item/stack/sheet/mineral/stone()
+ return null
+
GLOBAL_LIST_INIT(stone_recipes, list ( \
new/datum/stack_recipe("stone brick wall", /turf/closed/wall/mineral/stone, 5, crafting_flags = CRAFT_CHECK_DENSITY | CRAFT_ONE_PER_TURF | CRAFT_ON_SOLID_GROUND | CRAFT_TRANSFERS_REAGENTS, category = CAT_STRUCTURE), \
new/datum/stack_recipe("stone brick tile", /obj/item/stack/tile/mineral/stone, 1, 4, 20, category = CAT_TILES),
diff --git a/modular_skyrat/modules/window_airbags/code/window_airbag.dm b/modular_skyrat/modules/window_airbags/code/window_airbag.dm
index 6475cf42ab1..ec82c777a68 100644
--- a/modular_skyrat/modules/window_airbags/code/window_airbag.dm
+++ b/modular_skyrat/modules/window_airbags/code/window_airbag.dm
@@ -2,7 +2,7 @@
/obj/structure/window/reinforced/fulltile/Initialize(mapload, direct)
. = ..()
- qdel(GetComponent(/datum/component/simple_rotation))
+ RemoveElement(/datum/element/simple_rotation)
AddElement(/datum/element/airbag)
/**
diff --git a/modular_skyrat/modules/wrestlingring/code/wrestlingring.dm b/modular_skyrat/modules/wrestlingring/code/wrestlingring.dm
index aee2187ecd1..a144afb0fa5 100644
--- a/modular_skyrat/modules/wrestlingring/code/wrestlingring.dm
+++ b/modular_skyrat/modules/wrestlingring/code/wrestlingring.dm
@@ -81,7 +81,7 @@
ini_dir = dir
AddElement(/datum/element/climbable, climb_time = 20, climb_stun = 0)
- AddComponent(/datum/component/simple_rotation, ROTATION_NEEDS_ROOM)
+ AddElement(/datum/element/simple_rotation, ROTATION_NEEDS_ROOM)
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_enter),
diff --git a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/amauri.dm b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/amauri.dm
index ef30511b3a6..71afcd979fc 100644
--- a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/amauri.dm
+++ b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/amauri.dm
@@ -24,5 +24,7 @@
filling_color = "#FF4500"
bite_consumption_mod = 0.5
foodtypes = FRUIT
- juice_typepath = /datum/reagent/toxin
tastes = list("poison" = 1)
+
+/obj/item/food/grown/amauri/juice_typepath()
+ return /datum/reagent/toxin
diff --git a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/gelthi.dm b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/gelthi.dm
index 9cc68c28d80..bab8b326f19 100644
--- a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/gelthi.dm
+++ b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/gelthi.dm
@@ -24,5 +24,7 @@
filling_color = "#FF4500"
bite_consumption_mod = 0.5
foodtypes = FRUIT
- juice_typepath = /datum/reagent/consumable/sugar
tastes = list("overpowering sweetness" = 1)
+
+/obj/item/food/grown/gelthi/juice_typepath()
+ return /datum/reagent/consumable/sugar
diff --git a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/jurlmah.dm b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/jurlmah.dm
index 4d78b0b65c5..7f9ea75d2bb 100644
--- a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/jurlmah.dm
+++ b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/jurlmah.dm
@@ -24,5 +24,7 @@
filling_color = "#FF4500"
bite_consumption_mod = 0.5
foodtypes = FRUIT
- juice_typepath = /datum/reagent/medicine/cryoxadone
tastes = list("snow" = 1)
+
+/obj/item/food/grown/jurlmah/juice_typepath()
+ return /datum/reagent/medicine/cryoxadone
diff --git a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/nofruit.dm b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/nofruit.dm
index 996a2ba1011..5d7d7ee2682 100644
--- a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/nofruit.dm
+++ b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/nofruit.dm
@@ -24,5 +24,7 @@
filling_color = "#FF4500"
bite_consumption_mod = 0.5
foodtypes = FRUIT
- juice_typepath = /datum/reagent/consumable/nothing
tastes = list("nothing" = 1)
+
+/obj/item/food/grown/nofruit/juice_typepath()
+ return /datum/reagent/consumable/nothing
diff --git a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/shand.dm b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/shand.dm
index f3e4f9b04df..bf125213b22 100644
--- a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/shand.dm
+++ b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/shand.dm
@@ -24,5 +24,7 @@
filling_color = "#FF4500"
bite_consumption_mod = 0.5
foodtypes = FRUIT
- juice_typepath = /datum/reagent/bromine
tastes = list("chemicals" = 1)
+
+/obj/item/food/grown/shand/juice_typepath()
+ return /datum/reagent/bromine
diff --git a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/surik.dm b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/surik.dm
index e5b86555fd3..56e6f8f1c07 100644
--- a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/surik.dm
+++ b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/surik.dm
@@ -24,5 +24,7 @@
filling_color = "#FF4500"
bite_consumption_mod = 0.5
foodtypes = FRUIT
- juice_typepath = /datum/reagent/brimdust
tastes = list("crystals" = 1)
+
+/obj/item/food/grown/surik/juice_typepath()
+ return /datum/reagent/brimdust
diff --git a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/telriis.dm b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/telriis.dm
index e1d1101441f..9c58835c45b 100644
--- a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/telriis.dm
+++ b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/telriis.dm
@@ -25,5 +25,7 @@
filling_color = "#FF4500"
bite_consumption_mod = 0.5
foodtypes = FRUIT
- juice_typepath = /datum/reagent/consumable/coconut_milk
tastes = list("milk" = 1)
+
+/obj/item/food/grown/telriis/juice_typepath()
+ return /datum/reagent/consumable/coconut_milk
diff --git a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/thaadra.dm b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/thaadra.dm
index 5bbb997f3f8..45a59145eff 100644
--- a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/thaadra.dm
+++ b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/thaadra.dm
@@ -24,5 +24,7 @@
filling_color = "#FF4500"
bite_consumption_mod = 0.5
foodtypes = FRUIT
- juice_typepath = /datum/reagent/silver
tastes = list("silver" = 1)
+
+/obj/item/food/grown/thaadra/juice_typepath()
+ return /datum/reagent/silver
diff --git a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/vale.dm b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/vale.dm
index 2d10dcf6c74..bc2e6d3a7cc 100644
--- a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/vale.dm
+++ b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/vale.dm
@@ -24,5 +24,7 @@
filling_color = "#FF4500"
bite_consumption_mod = 0.5
foodtypes = FRUIT
- juice_typepath = /datum/reagent/toxin/plasma
tastes = list("plasma" = 1)
+
+/obj/item/food/grown/vale/juice_typepath()
+ return /datum/reagent/toxin/plasma
diff --git a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/vaporsac.dm b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/vaporsac.dm
index 41a7138f612..a9fbe183b3f 100644
--- a/modular_skyrat/modules/xenoarch/code/modules/hydroponics/vaporsac.dm
+++ b/modular_skyrat/modules/xenoarch/code/modules/hydroponics/vaporsac.dm
@@ -24,5 +24,7 @@
filling_color = "#FF4500"
bite_consumption_mod = 0.5
foodtypes = FRUIT
- juice_typepath = /datum/reagent/nitrous_oxide
tastes = list("sleep" = 1)
+
+/obj/item/food/grown/vaporsac/juice_typepath()
+ return /datum/reagent/nitrous_oxide
diff --git a/modular_zubbers/code/game/objects/items/cigs_lighters.dm b/modular_zubbers/code/game/objects/items/cigs_lighters.dm
index d6eb1e48f5f..1880f57a098 100644
--- a/modular_zubbers/code/game/objects/items/cigs_lighters.dm
+++ b/modular_zubbers/code/game/objects/items/cigs_lighters.dm
@@ -5,4 +5,10 @@
icon_state = "rzippo"
light_color = "#952CF4"
overlay_state = "royal"
- grind_results = list(/datum/reagent/gold = 1, /datum/reagent/fuel = 5, /datum/reagent/colorful_reagent/powder/purple/crayon = 1.5)
+
+/obj/item/lighter/royal/grind_results()
+ return list(
+ /datum/reagent/gold = 1,
+ /datum/reagent/fuel = 5,
+ /datum/reagent/colorful_reagent/powder/purple/crayon = 1.5,
+ )
diff --git a/modular_zubbers/code/modules/antagonists/bloodsucker/structures/crypt.dm b/modular_zubbers/code/modules/antagonists/bloodsucker/structures/crypt.dm
index e4979c8ee77..39c4a81cf63 100644
--- a/modular_zubbers/code/modules/antagonists/bloodsucker/structures/crypt.dm
+++ b/modular_zubbers/code/modules/antagonists/bloodsucker/structures/crypt.dm
@@ -544,7 +544,7 @@
// Add rotating and armrest
/obj/structure/bloodsucker/bloodthrone/Initialize(mapload)
- AddComponent(/datum/component/simple_rotation)
+ AddElement(/datum/element/simple_rotation)
armrest = GetArmrest()
armrest.layer = ABOVE_MOB_LAYER
return ..()
diff --git a/tgstation.dme b/tgstation.dme
index 85636ac72c8..3e4c3aaefb5 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -9937,7 +9937,6 @@
#include "modular_zubbers\code\modules\tarkon\code\clothing\backpack.dm"
#include "modular_zubbers\code\modules\tarkon\code\misc-fluff\research.dm"
#include "modular_zubbers\code\modules\taur_mechanics\serpentine_taur.dm"
-#include "modular_zubbers\code\modules\tgui_input\color.dm"
#include "modular_zubbers\code\modules\title_screen\code\title_screen_subsystem.dm"
#include "modular_zubbers\code\modules\uplink\one_shot_emag.dm"
#include "modular_zubbers\code\modules\uplink\uplink_devices.dm"