diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index 08ed539e9fc3b..2ff89d049646c 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -536,6 +536,7 @@ . = ..() if(.) return + switch(action) if("make", "make_mass") var/mob/user = usr @@ -551,16 +552,6 @@ else make_action(crafting_recipe, user) - if (istype(crafting_recipe, /datum/crafting_recipe/improv_explosive) || istype(crafting_recipe, /datum/crafting_recipe/molotov) || istype(crafting_recipe, /datum/crafting_recipe/chemical_payload) || istype(crafting_recipe, /datum/crafting_recipe/chemical_payload2)) - var/client/client = user.client - if (CONFIG_GET(flag/use_exp_tracking) && client && client.get_exp_living(TRUE) < 8 HOURS) // Player with less than 8 hours playtime is making an IED or molotov cocktail. - if(client.next_ied_grief_warning < world.time) - var/turf/T = get_turf(user) - client.next_ied_grief_warning = world.time + 15 MINUTES // Wait 15 minutes before alerting admins again - message_admins("[span_adminhelp("ANTI-GRIEF:")] New player [ADMIN_LOOKUPFLW(user)] has crafted an IED or Molotov at [ADMIN_VERBOSEJMP(T)].") - client.crafted_ied = TRUE - - busy = FALSE if("toggle_recipes") display_craftable_only = !display_craftable_only diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 64f46caf9a9a0..8e914f757d4c7 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -120,14 +120,6 @@ /obj/item/transfer_valve/attack_hand(mob/user, list/modifiers) . = ..() - var/client/client = user.client - if (CONFIG_GET(flag/use_exp_tracking) && client && client.get_exp_living(TRUE) < 8 HOURS) // Player with less than 8 hours playtime has touched a bomb valve. - if(client.next_valve_grief_warning < world.time) - var/turf/T = get_turf(src) - client.next_valve_grief_warning = world.time + 15 MINUTES // Wait 15 minutes before alerting admins again - message_admins("[span_adminhelp("ANTI-GRIEF:")] New player [ADMIN_LOOKUPFLW(user)] touched \a [src] at [ADMIN_VERBOSEJMP(T)].") - client.touched_transfer_valve = TRUE - if(.) return if(attached_device) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index 1517f0f233eba..af13be0bbbf9b 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -531,14 +531,6 @@ ui = new(user, src, "Canister", name) ui.open() - var/client/client = user.client - if (CONFIG_GET(flag/use_exp_tracking) && client && client.get_exp_living(TRUE) < 8 HOURS) // Player with less than 8 hours playtime is interacting with this canister. - if(client.next_canister_grief_warning < world.time) - var/turf/T = get_turf(src) - client.next_canister_grief_warning = world.time + 15 MINUTES // Wait 15 minutes before alerting admins again - message_admins("[span_adminhelp("ANTI-GRIEF:")] New player [ADMIN_LOOKUPFLW(user)] has touched \a [src] at [ADMIN_VERBOSEJMP(T)].") - client.touched_canister = TRUE - /obj/machinery/portable_atmospherics/canister/ui_static_data(mob/user) return list( "defaultReleasePressure" = round(CAN_DEFAULT_RELEASE_PRESSURE), diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index cebc5b57ecbc2..06d9561744fad 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -253,15 +253,6 @@ ui = new(user, src, "ChemDispenser", name) ui.open() - var/client/client = user.client - if (CONFIG_GET(flag/use_exp_tracking) && client && client.get_exp_living(TRUE) < 8 HOURS) // Player with less than 8 hours playtime is using this machine. - if(client.next_chem_grief_warning < world.time) - if(!istype(src, /obj/machinery/chem_dispenser/drinks) && !istype(src, /obj/machinery/chem_dispenser/mutagen) && !istype(src, /obj/machinery/chem_dispenser/mutagensaltpeter) && !istype(src, /obj/machinery/chem_dispenser/abductor)) // These types aren't used for grief - var/turf/T = get_turf(src) - client.next_chem_grief_warning = world.time + 15 MINUTES // Wait 15 minutes before alerting admins again - message_admins("[span_adminhelp("ANTI-GRIEF:")] New player [ADMIN_LOOKUPFLW(user)] used \a [src] at [ADMIN_VERBOSEJMP(T)].") - client.used_chem_dispenser = TRUE - var/is_hallucinating = FALSE if(isliving(user)) var/mob/living/living_user = user diff --git a/code/modules/wiremod/core/integrated_circuit.dm b/code/modules/wiremod/core/integrated_circuit.dm index 7f72cbbd501c7..c295dc8ad7965 100644 --- a/code/modules/wiremod/core/integrated_circuit.dm +++ b/code/modules/wiremod/core/integrated_circuit.dm @@ -450,14 +450,6 @@ GLOBAL_LIST_EMPTY_TYPED(integrated_circuits, /obj/item/integrated_circuit) ui.open() ui.set_autoupdate(FALSE) - var/client/client = user.client - if (CONFIG_GET(flag/use_exp_tracking) && client && client.get_exp_living(TRUE) < 8 HOURS) // Player with less than 8 hours playtime is using this machine. - if(client.next_circuit_grief_warning < world.time) - var/turf/T = get_turf(src) - client.next_circuit_grief_warning = world.time + 15 MINUTES // Wait 15 minutes before alerting admins again - message_admins("[span_adminhelp("ANTI-GRIEF:")] New player [ADMIN_LOOKUPFLW(user)] has touched \a [src] at [ADMIN_VERBOSEJMP(T)].") - client.touched_circuit = TRUE - #define WITHIN_RANGE(id, table) (id >= 1 && id <= length(table)) /obj/item/integrated_circuit/ui_act(action, list/params, datum/tgui/ui) diff --git a/modular_zubbers/code/modules/atmospherics/machinery/portable/canister.dm b/modular_zubbers/code/modules/atmospherics/machinery/portable/canister.dm index d4cf5dc08a1f6..686e6278e6f34 100644 --- a/modular_zubbers/code/modules/atmospherics/machinery/portable/canister.dm +++ b/modular_zubbers/code/modules/atmospherics/machinery/portable/canister.dm @@ -1,3 +1,14 @@ +/obj/machinery/portable_atmospherics/canister/ui_interact(mob/user, datum/tgui/ui) + . = ..() + + var/client/client = user.client + if (CONFIG_GET(flag/use_exp_tracking) && client && client.get_exp_living(TRUE) < 8 HOURS) // Player with less than 8 hours playtime is interacting with this canister. + if(client.next_canister_grief_warning < world.time) + var/turf/T = get_turf(src) + client.next_canister_grief_warning = world.time + 15 MINUTES // Wait 15 minutes before alerting admins again + message_admins("[span_adminhelp("ANTI-GRIEF:")] New player [ADMIN_LOOKUPFLW(user)] has touched \a [src] at [ADMIN_VERBOSEJMP(T)].") + client.touched_canister = TRUE + /obj/machinery/portable_atmospherics/canister/goblin name = "G-081-N canister" gas_type = /datum/gas/goblin diff --git a/modular_zzplurt/code/datums/components/crafting/crafting.dm b/modular_zzplurt/code/datums/components/crafting/crafting.dm new file mode 100644 index 0000000000000..ea99b2e3a3657 --- /dev/null +++ b/modular_zzplurt/code/datums/components/crafting/crafting.dm @@ -0,0 +1,17 @@ +/datum/component/personal_crafting/ui_act(action, params) + . = ..() + if(.) + return + + switch(action) + if("make", "make_mass") + var/datum/crafting_recipe/crafting_recipe = locate(params["recipe"]) in (mode ? GLOB.cooking_recipes : GLOB.crafting_recipes) + + if (istype(crafting_recipe, /datum/crafting_recipe/improv_explosive) || istype(crafting_recipe, /datum/crafting_recipe/molotov) || istype(crafting_recipe, /datum/crafting_recipe/chemical_payload) || istype(crafting_recipe, /datum/crafting_recipe/chemical_payload2)) + var/client/client = usr.client + if (CONFIG_GET(flag/use_exp_tracking) && client && client.get_exp_living(TRUE) < 8 HOURS) // Player with less than 8 hours playtime is making an IED or molotov cocktail. + if(client.next_ied_grief_warning < world.time) + var/turf/T = get_turf(usr) + client.next_ied_grief_warning = world.time + 15 MINUTES // Wait 15 minutes before alerting admins again + message_admins("[span_adminhelp("ANTI-GRIEF:")] New player [ADMIN_LOOKUPFLW(usr)] has crafted an IED or Molotov at [ADMIN_VERBOSEJMP(T)].") + client.crafted_ied = TRUE diff --git a/modular_zzplurt/code/game/objects/items/devices/transfer_valve.dm b/modular_zzplurt/code/game/objects/items/devices/transfer_valve.dm new file mode 100644 index 0000000000000..2bae09b88b051 --- /dev/null +++ b/modular_zzplurt/code/game/objects/items/devices/transfer_valve.dm @@ -0,0 +1,11 @@ +/obj/item/transfer_valve/attack_hand(mob/user, list/modifiers) + . = ..() + + var/client/client = user.client + if (CONFIG_GET(flag/use_exp_tracking) && client && client.get_exp_living(TRUE) < 8 HOURS) // Player with less than 8 hours playtime has touched a bomb valve. + if(client.next_valve_grief_warning < world.time) + var/turf/T = get_turf(src) + client.next_valve_grief_warning = world.time + 15 MINUTES // Wait 15 minutes before alerting admins again + message_admins("[span_adminhelp("ANTI-GRIEF:")] New player [ADMIN_LOOKUPFLW(user)] touched \a [src] at [ADMIN_VERBOSEJMP(T)].") + client.touched_transfer_valve = TRUE + diff --git a/modular_zzplurt/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/modular_zzplurt/code/modules/reagents/chemistry/machinery/chem_dispenser.dm new file mode 100644 index 0000000000000..5b3b50341f596 --- /dev/null +++ b/modular_zzplurt/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -0,0 +1,11 @@ +/obj/machinery/chem_dispenser/ui_interact(mob/user, datum/tgui/ui) + . = ..() + + var/client/client = user.client + if (CONFIG_GET(flag/use_exp_tracking) && client && client.get_exp_living(TRUE) < 8 HOURS) // Player with less than 8 hours playtime is using this machine. + if(client.next_chem_grief_warning < world.time) + if(!istype(src, /obj/machinery/chem_dispenser/drinks) && !istype(src, /obj/machinery/chem_dispenser/mutagen) && !istype(src, /obj/machinery/chem_dispenser/mutagensaltpeter) && !istype(src, /obj/machinery/chem_dispenser/abductor)) // These types aren't used for grief + var/turf/T = get_turf(src) + client.next_chem_grief_warning = world.time + 15 MINUTES // Wait 15 minutes before alerting admins again + message_admins("[span_adminhelp("ANTI-GRIEF:")] New player [ADMIN_LOOKUPFLW(user)] used \a [src] at [ADMIN_VERBOSEJMP(T)].") + client.used_chem_dispenser = TRUE diff --git a/modular_zzplurt/code/modules/wiremod/core/integrated_circuit.dm b/modular_zzplurt/code/modules/wiremod/core/integrated_circuit.dm new file mode 100644 index 0000000000000..9fdefe58240f3 --- /dev/null +++ b/modular_zzplurt/code/modules/wiremod/core/integrated_circuit.dm @@ -0,0 +1,10 @@ +/obj/item/integrated_circuit/ui_interact(mob/user, datum/tgui/ui) + . = ..() + + var/client/client = user.client + if (CONFIG_GET(flag/use_exp_tracking) && client && client.get_exp_living(TRUE) < 8 HOURS) // Player with less than 8 hours playtime is using this machine. + if(client.next_circuit_grief_warning < world.time) + var/turf/T = get_turf(src) + client.next_circuit_grief_warning = world.time + 15 MINUTES // Wait 15 minutes before alerting admins again + message_admins("[span_adminhelp("ANTI-GRIEF:")] New player [ADMIN_LOOKUPFLW(user)] has touched \a [src] at [ADMIN_VERBOSEJMP(T)].") + client.touched_circuit = TRUE diff --git a/tgstation.dme b/tgstation.dme index 66c23bfd1d854..2ecf615b649c3 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -9104,10 +9104,14 @@ #include "modular_zzplurt\code\_globalvars\mobs.dm" #include "modular_zzplurt\code\controllers\configuration\entries\discord.dm" #include "modular_zzplurt\code\controllers\subsystem\discord.dm" +#include "modular_zzplurt\code\datums\components\crafting\crafting.dm" +#include "modular_zzplurt\code\game\objects\items\devices\transfer_valve.dm" #include "modular_zzplurt\code\modules\admin\playtimes.dm" #include "modular_zzplurt\code\modules\client\verbs\looc.dm" #include "modular_zzplurt\code\modules\client\verbs\ooc.dm" #include "modular_zzplurt\code\modules\discord\tgs_commands.dm" #include "modular_zzplurt\code\modules\discord\verbs.dm" #include "modular_zzplurt\code\modules\mob\dead\new_player\new_player.dm" +#include "modular_zzplurt\code\modules\reagents\chemistry\machinery\chem_dispenser.dm" +#include "modular_zzplurt\code\modules\wiremod\core\integrated_circuit.dm" // END_INCLUDE