Merge pull request #9535 from Ghommie/Ghommie-cit247
Fixing sniper rifles scope datum action oddity.
This commit is contained in:
@@ -407,12 +407,12 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
if(item_action_slot_check(slot, user)) //some items only give their actions buttons when in a specific slot.
|
||||
if(item_action_slot_check(slot, user, A)) //some items only give their actions buttons when in a specific slot.
|
||||
A.Grant(user)
|
||||
item_flags |= IN_INVENTORY
|
||||
|
||||
//sometimes we only want to grant the item's action if it's equipped in a specific slot.
|
||||
/obj/item/proc/item_action_slot_check(slot, mob/user)
|
||||
/obj/item/proc/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == SLOT_IN_BACKPACK || slot == SLOT_LEGCUFFED) //these aren't true slots, so avoid granting actions there
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
PA = new(src)
|
||||
user.put_in_hands(PA)
|
||||
|
||||
/obj/item/chrono_eraser/item_action_slot_check(slot, mob/user)
|
||||
/obj/item/chrono_eraser/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == SLOT_BACK)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
remove_paddles(user)
|
||||
update_icon()
|
||||
|
||||
/obj/item/defibrillator/item_action_slot_check(slot, mob/user)
|
||||
/obj/item/defibrillator/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == user.getBackSlot())
|
||||
return 1
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
|
||||
/obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user)
|
||||
/obj/item/defibrillator/compact/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == user.getBeltSlot())
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@ effective or pretty fucking useless.
|
||||
Deactivate()
|
||||
return
|
||||
|
||||
/obj/item/shadowcloak/item_action_slot_check(slot, mob/user)
|
||||
/obj/item/shadowcloak/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == SLOT_BELT)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/obj/item/watertank/ui_action_click(mob/user)
|
||||
toggle_mister(user)
|
||||
|
||||
/obj/item/watertank/item_action_slot_check(slot, mob/user)
|
||||
/obj/item/watertank/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == user.getBackSlot())
|
||||
return 1
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
/obj/item/reagent_containers/chemtank/ui_action_click()
|
||||
toggle_injection()
|
||||
|
||||
/obj/item/reagent_containers/chemtank/item_action_slot_check(slot, mob/user)
|
||||
/obj/item/reagent_containers/chemtank/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == SLOT_BACK)
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user