mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-12 16:44:43 +01:00
Removes left inhand files, automatically mirrors inhands
This commit is contained in:
@@ -3,20 +3,13 @@
|
||||
for(var/A in typesof(/obj/item))
|
||||
var/obj/item/O = new A( locate(1,1,1) )
|
||||
if(!O) continue
|
||||
var/icon/IL = new(O.lefthand_file)
|
||||
var/list/Lstates = IL.IconStates()
|
||||
var/icon/IR = new(O.righthand_file)
|
||||
var/list/Rstates = IR.IconStates()
|
||||
var/icon/J = new(O.icon)
|
||||
var/list/istates = J.IconStates()
|
||||
if(!Lstates.Find(O.icon_state) && !Lstates.Find(O.item_state))
|
||||
if(O.icon_state)
|
||||
text += "[O.type] WANTS IN LEFT HAND CALLED\n\"[O.icon_state]\".\n"
|
||||
if(!Rstates.Find(O.icon_state) && !Rstates.Find(O.item_state))
|
||||
if(O.icon_state)
|
||||
text += "[O.type] WANTS IN RIGHT HAND CALLED\n\"[O.icon_state]\".\n"
|
||||
|
||||
|
||||
if(O.icon_state)
|
||||
if(!istates.Find(O.icon_state))
|
||||
text += "[O.type] MISSING NORMAL ICON CALLED\n\"[O.icon_state]\" IN \"[O.icon]\"\n"
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
var/visor_flags = 0 // flags that are added/removed when an item is adjusted up/down
|
||||
var/visor_flags_inv = 0 // same as visor_flags, but for flags_inv
|
||||
var/visor_flags_cover = 0 // same as above, but for flags_cover
|
||||
lefthand_file = 'icons/mob/inhands/clothing_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/clothing_righthand.dmi'
|
||||
var/alt_desc = null
|
||||
var/toggle_message = null
|
||||
|
||||
@@ -75,11 +75,12 @@
|
||||
if(!t_state)
|
||||
t_state = I.icon_state
|
||||
|
||||
var/icon_file = I.lefthand_file
|
||||
if(get_held_index_of_item(I) % 2 == 0)
|
||||
icon_file = I.righthand_file
|
||||
var/image/standing = I.build_worn_icon(state = t_state, default_layer = HANDS_LAYER, default_icon_file = I.righthand_file, isinhands = TRUE)
|
||||
|
||||
if(get_held_index_of_item(I) % 2 == 1)
|
||||
var/reflect = matrix(-1, 0, 0, 0, 1, 0)
|
||||
standing.transform = reflect
|
||||
|
||||
var/image/standing = I.build_worn_icon(state = t_state, default_layer = HANDS_LAYER, default_icon_file = icon_file, isinhands = TRUE)
|
||||
hands += standing
|
||||
|
||||
overlays_standing[HANDS_LAYER] = hands
|
||||
|
||||
@@ -51,10 +51,13 @@
|
||||
if(!l_state)
|
||||
l_state = l_hand.icon_state
|
||||
|
||||
var/image/l_hand_image = l_hand.build_worn_icon(state = l_state, default_layer = DRONE_HANDS_LAYER, default_icon_file = l_hand.lefthand_file, isinhands = TRUE)
|
||||
var/image/l_hand_image = l_hand.build_worn_icon(state = l_state, default_layer = DRONE_HANDS_LAYER, default_icon_file = l_hand.righthand_file, isinhands = TRUE)
|
||||
if(y_shift)
|
||||
l_hand_image.pixel_y += y_shift
|
||||
|
||||
var/reflect = matrix(-1, 0, 0, 0, 1, 0)
|
||||
l_hand_image.transform = reflect
|
||||
|
||||
hands_overlays += l_hand_image
|
||||
|
||||
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
||||
|
||||
@@ -293,8 +293,10 @@ var/global/list/parasites = list() //all currently existing/living guardians
|
||||
if(!l_state)
|
||||
l_state = l_hand.icon_state
|
||||
|
||||
var/image/l_hand_image = l_hand.build_worn_icon(state = l_state, default_layer = GUARDIAN_HANDS_LAYER, default_icon_file = l_hand.lefthand_file, isinhands = TRUE)
|
||||
var/image/l_hand_image = l_hand.build_worn_icon(state = l_state, default_layer = GUARDIAN_HANDS_LAYER, default_icon_file = l_hand.righthand_file, isinhands = TRUE)
|
||||
|
||||
var/reflect = matrix(-1, 0, 0, 0, 1, 0)
|
||||
l_hand_image.transform = reflect
|
||||
hands_overlays += l_hand_image
|
||||
|
||||
if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD)
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
var/current_skin = null //the skin choice if we had a reskin
|
||||
var/list/options = list()
|
||||
|
||||
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
|
||||
|
||||
var/obj/item/device/firing_pin/pin = /obj/item/device/firing_pin //standard firing pin for most guns
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "pen"
|
||||
item_state = "pen"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses magic instead
|
||||
pin = /obj/item/device/firing_pin/magic
|
||||
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
|
||||
/obj/item/weapon/gun/magic/afterattack(atom/target, mob/living/user, flag)
|
||||
|
||||
Reference in New Issue
Block a user