Skip to content

Commit

Permalink
handful of fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
carpotoxin committed Sep 6, 2024
1 parent b05dc49 commit 6adff4c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
5 changes: 4 additions & 1 deletion modular_doppler/colony_fabricator/code/machines/ore_silo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
/// What this packs into
var/packed_type = /obj/item/flatpacked_machine/ore_silo

/obj/machinery/ore_silo/colony_lathe/Initialize(mapload)
. = ..()
AddElement(/datum/element/repackable, packed_type, 10 SECONDS)

/obj/machinery/ore_silo/colony_lathe/silo_log(obj/machinery/machinery_in_question, action, amount, noun, list/mats)
. = ..()
playsound(src, 'sound/machines/beep.ogg', 30, TRUE)
AddElement(/datum/element/repackable, packed_type, 10 SECONDS)

/obj/machinery/ore_silo/colony_lathe/default_deconstruction_crowbar()
return
Expand Down
16 changes: 11 additions & 5 deletions modular_doppler/colony_fabricator/code/repacking_element.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,34 @@
src.disassemble_objects = disassemble_objects

RegisterSignal(target, COMSIG_ATOM_EXAMINE, PROC_REF(examine))
RegisterSignal(target, COMSIG_ATOM_ATTACK_HAND_SECONDARY, PROC_REF(on_right_click))
RegisterSignal(target, COMSIG_CLICK_ALT, PROC_REF(on_alt_click))
RegisterSignal(target, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM, PROC_REF(on_requesting_context_from_item))

/datum/element/repackable/Detach(datum/target)
. = ..()
UnregisterSignal(target, COMSIG_ATOM_EXAMINE)
UnregisterSignal(target, COMSIG_ATOM_ATTACK_HAND_SECONDARY)
UnregisterSignal(target, COMSIG_CLICK_ALT)
UnregisterSignal(target, list(COMSIG_ATOM_ATTACKBY, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM))

/datum/element/repackable/proc/examine(datum/source, mob/user, list/examine_list)
SIGNAL_HANDLER

examine_list += span_notice("It can be <b>repacked</b> with <b>right click</b>.")
examine_list += span_notice("It can be <b>repacked</b> with <b>alt-click</b>.")

/// Checks if the user can actually interact with the structures in question, then invokes the proc to make it repack
/datum/element/repackable/proc/on_right_click(atom/source, mob/user)
/datum/element/repackable/proc/on_alt_click(atom/source, mob/user)
SIGNAL_HANDLER

if(!user.can_perform_action(source, NEED_DEXTERITY))
var/mob/living/living_user = user
if(DOING_INTERACTION_WITH_TARGET(user, source))
return
if(istype(living_user) && living_user.combat_mode)
return
if(!living_user.can_perform_action(source, NEED_DEXTERITY))
return

INVOKE_ASYNC(src, PROC_REF(repack), source, user)
return CLICK_ACTION_SUCCESS

/// Removes the element target and spawns a new one of whatever item_to_pack_into is
/datum/element/repackable/proc/repack(atom/source, mob/user)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
outfit_uniform.sensor_mode = SENSOR_OFF
equipped.update_suit_sensors()

SSquirks.AssignQuirks(equipped, equipped.client, TRUE, TRUE, null, FALSE, equipped)
SSquirks.AssignQuirks(equipped, equipped.client)


/obj/item/clothing/mask/gas/atmos/sapper
Expand Down Expand Up @@ -141,9 +141,9 @@
/datum/id_trim/sapper
assignment = "Sapper"
trim_state = "trim_sapper"
trim_icon = 'modular_doppler/modular_antagonists/sapper_gang/icons/sapper_trim.dmi'
department_color = COLOR_ORANGE
subdepartment_color = COLOR_ORANGE
trim_icon = 'modular_doppler/overwrites/card/card.dmi'
department_color = COLOR_ENGINEERING_ORANGE
subdepartment_color = COLOR_ENGINEERING_ORANGE
sechud_icon_state = SECHUD_SAPPER
access = list(ACCESS_SAPPER_SHIP)
threat_modifier = 2
Expand Down
Binary file added modular_doppler/overwrites/card/card.dmi
Binary file not shown.

0 comments on commit 6adff4c

Please sign in to comment.