Updates energy gun overlays and inhands (#47913)

This commit is contained in:
ShizCalev
2019-11-25 11:22:58 -05:00
committed by skoglol
parent 43ef5fb4b6
commit a16b967582
7 changed files with 10 additions and 7 deletions

View File

@@ -71,7 +71,7 @@
cell.give(100)
if(!chambered) //if empty chamber we try to charge a new shot
recharge_newshot(TRUE)
update_icon()
update_icon(FALSE, TRUE)
/obj/item/gun/energy/attack_self(mob/living/user as mob)
if(ammo_type.len > 1)
@@ -130,7 +130,7 @@
update_icon(TRUE)
return
/obj/item/gun/energy/update_icon(force_update)
/obj/item/gun/energy/update_icon(force_update, force_itemstate_update)
if(QDELETED(src))
return
..()
@@ -167,6 +167,10 @@
if(itemState)
itemState += "[ratio]"
item_state = itemState
if(force_itemstate_update && ismob(loc)) //used if the weapon is selfcharging, otherwise the icons won't update till the item is either fired or reequipped.
var/mob/M = loc
if(M.is_holding(src))
M.update_inv_hands()
/obj/item/gun/energy/suicide_act(mob/living/user)
if (istype(user) && can_shoot() && can_trigger_gun(user) && user.get_bodypart(BODY_ZONE_HEAD))

View File

@@ -32,7 +32,7 @@
/obj/item/gun/energy/laser/captain
name = "antique laser gun"
icon_state = "caplaser"
item_state = "caplaser"
item_state = null
desc = "This is an antique laser gun. All craftsmanship is of the highest quality. It is decorated with assistant leather and chrome. The object menaces with spikes of energy. On the item is an image of Space Station 13. The station is exploding."
force = 10
ammo_x_offset = 3

View File

@@ -3,12 +3,12 @@
desc = "A man-portable anti-armor weapon designed to disable mechanical threats at range."
icon_state = "ionrifle"
item_state = null //so the human update icon uses the icon_state instead.
shaded_charge = TRUE
can_flashlight = TRUE
w_class = WEIGHT_CLASS_HUGE
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BACK
ammo_type = list(/obj/item/ammo_casing/energy/ion)
ammo_x_offset = 3
flight_x_offset = 17
flight_y_offset = 9
@@ -22,7 +22,6 @@
w_class = WEIGHT_CLASS_NORMAL
slot_flags = ITEM_SLOT_BELT
pin = null
ammo_x_offset = 2
flight_x_offset = 18
flight_y_offset = 11