Ports tgstation/tgstation/pull/15673 (#16495)

* Ports tgstation/tgstation/pull/15673

* Add a small delay to icon updating to cover up SSoverlays

* Fix actions on robot modules
This commit is contained in:
ShadowLarkens
2024-10-20 17:12:24 +02:00
committed by GitHub
parent 37891ba647
commit bcc107c7cd
67 changed files with 562 additions and 384 deletions
@@ -319,7 +319,7 @@
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 5, TECH_POWER = 4)
projectile_type = /obj/item/projectile/beam/sniper
slot_flags = SLOT_BACK
action_button_name = "Use Scope"
actions_types = list(/datum/action/item_action/use_scope)
battery_lock = 1
charge_cost = 600
fire_delay = 35
@@ -329,7 +329,7 @@
scoped_accuracy = 50
one_handed_penalty = 60 // The weapon itself is heavy, and the long barrel makes it hard to hold steady with just one hand.
/obj/item/gun/energy/sniperrifle/ui_action_click()
/obj/item/gun/energy/sniperrifle/ui_action_click(mob/user, actiontype)
scope()
/obj/item/gun/energy/sniperrifle/verb/scope()
@@ -424,7 +424,7 @@
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 4, TECH_POWER = 3)
projectile_type = /obj/item/projectile/beam/sniper
slot_flags = SLOT_BACK
action_button_name = "Aim Down Sights"
actions_types = list(/datum/action/item_action/aim_down_sights)
charge_cost = 2400
fire_delay = 20
force = 8
@@ -434,7 +434,7 @@
charge_meter = FALSE
var/scope_multiplier = 1.5
/obj/item/gun/energy/monorifle/ui_action_click()
/obj/item/gun/energy/monorifle/ui_action_click(mob/user, actiontype)
sights()
/obj/item/gun/energy/monorifle/verb/sights()
@@ -27,7 +27,7 @@
light_state = "prot_light"
flight_x_offset = 0
flight_y_offset = 0
action_button_name = "Toggle gun-light"
actions_types = list(/datum/action/item_action/toggle_gunlight)
var/gun_light_icon = TRUE
var/gun_light_on = FALSE
var/brightness_on = 5
+2 -2
View File
@@ -176,7 +176,7 @@
item_state = "lsniper"
item_state_slots = list(slot_r_hand_str = "lsniper", slot_l_hand_str = "lsniper")
wielded_item_state = "lsniper-wielded"
action_button_name = "Use Scope"
actions_types = list(/datum/action/item_action/use_scope)
w_class = ITEMSIZE_LARGE
item_icons = list(slot_l_hand_str = 'icons/mob/items/lefthand_guns.dmi', slot_r_hand_str = 'icons/mob/items/righthand_guns.dmi')
accuracy = -15 //better than most snipers but still has penalty
@@ -194,7 +194,7 @@
list(mode_name="lethal", fire_delay=12, projectile_type=/obj/item/projectile/beam, modifystate="phriflekill", charge_cost = 200),
)
/obj/item/gun/energy/locked/frontier/rifle/ui_action_click()
/obj/item/gun/energy/locked/frontier/rifle/ui_action_click(mob/user, actiontype)
scope()
/obj/item/gun/energy/locked/frontier/rifle/verb/scope()
@@ -173,7 +173,7 @@
power_cost = 100
ammo_material = MAT_PHORON
action_button_name = "Toggle internal generator"
actions_types = list(/datum/action/item_action/toggle_internal_generator)
var/generator_state = GEN_OFF
var/datum/looping_sound/small_motor/soundloop
@@ -204,8 +204,8 @@
QDEL_NULL(soundloop)
. = ..()
/obj/item/gun/magnetic/matfed/phoronbore/ui_action_click()
toggle_generator(usr)
/obj/item/gun/magnetic/matfed/phoronbore/ui_action_click(mob/user, actiontype)
toggle_generator(user)
/obj/item/gun/magnetic/matfed/phoronbore/process()
if(generator_state && !mat_storage)
@@ -141,7 +141,7 @@
action_sound = 'sound/weapons/riflebolt.ogg'
pump_animation = "scoped-boltaction-cycling"
/obj/item/gun/projectile/shotgun/pump/rifle/ui_action_click()
/obj/item/gun/projectile/shotgun/pump/rifle/ui_action_click(mob/user, actiontype)
scope()
/obj/item/gun/projectile/shotgun/pump/rifle/verb/scope()
@@ -37,7 +37,7 @@
projectile_type = /obj/item/projectile/bullet/shotgun
one_handed_penalty = 30 //You madman, one-handing a 12g shotgun.
recoil = 5 //Unfold the damn stock you fool!
action_button_name = "Toggle stock"
actions_types = list(/datum/action/item_action/toggle_stock)
var/stock = FALSE
@@ -69,7 +69,7 @@
H.update_inv_r_hand()
playsound(src, 'sound/weapons/targeton.ogg', 50, 1)
user.update_action_buttons()
user.update_action_buttons_icon()
/obj/item/gun/projectile/shotgun/compact/verb/verb_toggle_stock(mob/user as mob)
set category = "Object"
@@ -94,7 +94,7 @@
else
to_chat(usr, span_notice("You cannot do this in your current state."))
/obj/item/gun/projectile/shotgun/compact/ui_action_click()
/obj/item/gun/projectile/shotgun/compact/ui_action_click(mob/unused_user, actiontype)
var/mob/living/user = loc
if(!isliving(user))
return
@@ -9,7 +9,7 @@
w_class = ITEMSIZE_HUGE // So it can't fit in a backpack.
force = 10
slot_flags = SLOT_BACK
action_button_name = "Use Scope"
actions_types = list(/datum/action/item_action/use_scope)
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
caliber = "14.5mm"
recoil = 5 //extra kickback
@@ -63,7 +63,7 @@
return
..()
/obj/item/gun/projectile/heavysniper/ui_action_click()
/obj/item/gun/projectile/heavysniper/ui_action_click(mob/user, actiontype)
scope()
/obj/item/gun/projectile/heavysniper/verb/scope()
@@ -84,7 +84,7 @@
w_class = ITEMSIZE_HUGE // So it can't fit in a backpack.
force = 10
slot_flags = SLOT_BACK // Needs a sprite.
action_button_name = "Use Scope"
actions_types = list(/datum/action/item_action/use_scope)
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
caliber = "7.62mm"
load_method = MAGAZINE
@@ -102,7 +102,7 @@
else
icon_state = "SVD-empty"
/obj/item/gun/projectile/SVD/ui_action_click()
/obj/item/gun/projectile/SVD/ui_action_click(mob/user, actiontype)
scope()
/obj/item/gun/projectile/SVD/verb/scope()