Skip to content

Commit

Permalink
Winner Winner Chicken Dinner
Browse files Browse the repository at this point in the history
  • Loading branch information
i1yadobr committed Sep 20, 2024
1 parent 9449147 commit ed48617
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@
item_state_slots[slot_r_hand_str] = wielded_item_state
improper_held_icon = TRUE
else
item_state_slots[slot_l_hand_str] = item_state
item_state_slots[slot_r_hand_str] = item_state
item_state_slots[slot_l_hand_str] = initial(item_state)
item_state_slots[slot_r_hand_str] = initial(item_state)
improper_held_icon = FALSE
update_held_icon()

Expand Down
28 changes: 16 additions & 12 deletions code/modules/projectiles/guns/energy/accelerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
name = "accelerator shotgun"
desc = "A NanoTrasen UPA \"Shepherd\". It synthesizes unstable particles and accelerates them, effectively shooting \"temporary\" bullets without using any ammunition besides electric power."
icon_state = "phazer"
item_state = "phazer"
modifystate = "phazer"
improper_held_icon = TRUE
wielded_item_state = "phazer-wielded"
wielded_item_state = TRUE
icon_rounder = 25
screen_shake = 1
slot_flags = SLOT_BACK
Expand Down Expand Up @@ -45,31 +44,36 @@
if(power_supply && power_supply.charge >= charge_cost)
ratio = max(round(CELL_PERCENT(power_supply), icon_rounder), icon_rounder)

item_state = "[modifystate][ratio]"
if(wielded_item_state)
wielded_item_state = "[modifystate][ratio]-wielded"
else
wielded_item_state = null

..()
icon_state = "[modifystate][ratio]"
ClearOverlays()
AddOverlays(image(icon, "[initial(icon_state)]_over[pumped]"))
AddOverlays(image(icon, "[modifystate]_over[pumped]"))

var/mob/living/M = loc
if(istype(M))
if(wielded_item_state && M.can_wield_item(src) && is_held_twohanded(M))
item_state_slots[slot_l_hand_str] = "[modifystate][ratio]-wielded"
item_state_slots[slot_r_hand_str] = "[modifystate][ratio]-wielded"
improper_held_icon = TRUE
else
item_state_slots[slot_l_hand_str] = "[modifystate][ratio]"
item_state_slots[slot_r_hand_str] = "[modifystate][ratio]"
improper_held_icon = FALSE
update_held_icon()

/obj/item/gun/energy/accelerator/pistol
name = "accelerator pistol"
desc = "An experimental NanoTrasen UPA \"Wingman\", based on the famous VP78. While being almost just as powerful as its larger counterpart, it is as small as a regular pistol."
icon_state = "phazer_pistol"
item_state = "phazer_pistol"
modifystate = "phazer_pistol"
improper_held_icon = FALSE
wielded_item_state = FALSE
icon_rounder = 20
w_class = ITEM_SIZE_NORMAL
slot_flags = SLOT_BELT|SLOT_HOLSTER
one_hand_penalty = 0
max_shots = 8
fire_delay = 5.5
projectile_type = /obj/item/projectile/bullet/pellet/accelerated/lesser
wielded_item_state = null
force = 8.5
mod_weight = 0.7
mod_reach = 0.5
Expand Down

0 comments on commit ed48617

Please sign in to comment.