fixes mod devices permanently fucking up (#64237)

if you couldnt equip a device, it would drop it on the ground and fuck up being a nodrop item, fixes that
fixes the modsuit outfits not having internal slots set
adds feedback to not being able to turn on a module due to suit not being active
This commit is contained in:
Fikou
2022-01-21 02:47:24 -08:00
committed by GitHub
parent 2c8499b461
commit 0ba4436dd9
12 changed files with 23 additions and 3 deletions
+7
View File
@@ -587,6 +587,13 @@
old_module.on_deactivation()
if(wearer)
old_module.on_unequip()
var/datum/action/item_action/mod/pinned_module/action = old_module.pinned_to[wearer]
if(action)
action.Remove(wearer)
if(ai)
var/datum/action/item_action/mod/pinned_module/action = old_module.pinned_to[ai]
if(action)
action.Remove(ai)
old_module.pinned_to.Cut()
old_module.on_uninstall()
old_module.mod = null
+4 -1
View File
@@ -91,6 +91,8 @@
/// Called when the module is selected from the TGUI, radial or the action button
/obj/item/mod/module/proc/on_select()
if(!mod.active || mod.activating || module_type == MODULE_PASSIVE)
if(mod.wearer)
balloon_alert(mod.wearer, "not active!")
return
if(module_type != MODULE_USABLE)
if(active)
@@ -125,6 +127,7 @@
RegisterSignal(mod.wearer, COMSIG_ATOM_EXITED, .proc/on_exit)
else
balloon_alert(mod.wearer, "can't extend [device]!")
mod.wearer.transferItemToLoc(device, src, force = TRUE)
return
else
var/used_button = mod.wearer.client?.prefs.read_preference(/datum/preference/choiced/mod_select) || MIDDLE_CLICK
@@ -142,7 +145,7 @@
if(module_type == MODULE_ACTIVE)
mod.selected_module = null
if(device)
mod.wearer.transferItemToLoc(device, src, TRUE)
mod.wearer.transferItemToLoc(device, src, force = TRUE)
balloon_alert(mod.wearer, "[device] retracted")
UnregisterSignal(mod.wearer, COMSIG_ATOM_EXITED)
else
+2 -2
View File
@@ -100,8 +100,8 @@
grabbed_item.pickup(mod.wearer)
mod.wearer.put_in_hands(grabbed_item)
return
var/pixel_x_change
var/pixel_y_change
var/pixel_x_change = 0
var/pixel_y_change = 0
var/direction = get_dir(grabbed_atom, next_turf)
if(direction & NORTH)
pixel_y_change = world.icon_size/2
@@ -173,7 +173,11 @@
/obj/item/mod/module/jetpack/advanced
name = "MOD advanced ion jetpack module"
desc = "An improvement on the previous model of electric thrusters. This one achieves higher speeds through \
mounting of more jets and a red paint applied on it."
icon_state = "jetpack_advanced"
overlay_state_inactive = "module_jetpackadv"
overlay_state_active = "module_jetpackadv_on"
full_speed = TRUE
///Eating Apparatus - Lets the user eat/drink with the suit on.