[MIRROR] Fixes a good few improper overlay icon_states, fuck gun code edition (#6774)

* Fixes a good few improper overlay icon_states, fuck gun code edition

* Update rifle.dm

* Update laser.dm

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-07-08 02:11:58 +01:00
committed by GitHub
parent bf6e845b30
commit af778bae0a
21 changed files with 49 additions and 29 deletions
@@ -396,6 +396,7 @@
ammo_type = list(/obj/item/ammo_casing/energy/shrink)
inhand_icon_state = "shrink_ray"
icon_state = "shrink_ray"
automatic_charge_overlays = FALSE
fire_delay = 30
selfcharge = 1//shot costs 200 energy, has a max capacity of 1000 for 5 shots. self charge returns 25 energy every couple ticks, so about 1 shot charged every 12~ seconds
trigger_guard = TRIGGER_GUARD_ALLOW_ALL// variable-size trigger, get it? (abductors need this to be set so the gun is usable for them)
@@ -66,7 +66,8 @@
var/pos = 2+spellnum*31
our_rune.button.screen_loc = "6:[pos],4:-2"
our_rune.button.moved = "6:[pos],4:-2"
add_overlay("glow_[icon_state]_[theme]")
if(icon_state)
add_overlay("glow_[icon_state]_[theme]")
/mob/living/simple_animal/hostile/construct/Destroy()
QDEL_NULL(our_rune)
+2 -2
View File
@@ -50,7 +50,7 @@
///Compatible magazines with the gun
var/mag_type = /obj/item/ammo_box/magazine/m10mm //Removes the need for max_ammo and caliber info
///Whether the sprite has a visible magazine or not
var/mag_display = FALSE
var/mag_display = TRUE
///Whether the sprite has a visible ammo display or not
var/mag_display_ammo = FALSE
///Whether the sprite has a visible indicator for being empty or not.
@@ -181,7 +181,7 @@
. += "[icon_state]_toy"
if(!magazine || internal_magazine)
if(!magazine || internal_magazine || !mag_display)
return
if(special_mags)
@@ -397,7 +397,6 @@
w_class = WEIGHT_CLASS_BULKY
inhand_icon_state = "arg"
mag_type = /obj/item/ammo_box/magazine/recharge
mag_display_ammo = TRUE
fire_delay = 2
can_suppress = FALSE
burst_size = 0
@@ -91,6 +91,8 @@
name = "flat gun"
desc = "A 2 dimensional gun.. what?"
icon_state = "flatgun"
mag_display = FALSE
show_bolt_icon = FALSE
/obj/item/gun/ballistic/automatic/pistol/stickman/pickup(mob/living/user)
SHOULD_CALL_PARENT(FALSE)
@@ -17,10 +17,6 @@
bolt_drop_sound = 'sound/weapons/gun/rifle/bolt_in.ogg'
tac_reloads = FALSE
/obj/item/gun/ballistic/rifle/update_overlays()
. = ..()
. += "[icon_state]_bolt[bolt_locked ? "_locked" : ""]"
/obj/item/gun/ballistic/rifle/rack(mob/user = null)
if (bolt_locked == FALSE)
to_chat(user, span_notice("You open the bolt of \the [src]."))
@@ -190,6 +186,7 @@
item_flags = NEEDS_PERMIT | DROPDEL | ABSTRACT | NOBLUDGEON
flags_1 = NONE
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
show_bolt_icon = FALSE //It's a magic hand, not a rifle
realistic = FALSE
mag_type = /obj/item/ammo_box/magazine/internal/arcane_barrage
+5 -2
View File
@@ -14,6 +14,8 @@
var/charge_sections = 4
ammo_x_offset = 2
var/shaded_charge = FALSE //if this gun uses a stateful charge bar for more detail
var/single_shot_type_overlay = TRUE //If this gun has a "this is loaded with X" overlay alongside chargebars and such
var/display_empty = TRUE //Should we give an overlay to empty guns?
var/selfcharge = 0
var/charge_timer = 0
var/charge_delay = 8
@@ -197,11 +199,12 @@
var/overlay_icon_state = "[icon_state]_charge"
if(modifystate)
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
if(single_shot_type_overlay)
. += "[icon_state]_[shot.select_name]"
overlay_icon_state += "_[shot.select_name]"
. += "[icon_state]_[shot.select_name]"
var/ratio = get_charge_ratio()
if(ratio == 0)
if(ratio == 0 && display_empty)
. += "[icon_state]_empty"
return
if(shaded_charge)
@@ -25,6 +25,7 @@
gunlight_state = "mini-light"
flight_x_offset = 19
flight_y_offset = 13
single_shot_type_overlay = FALSE
/obj/item/gun/energy/e_gun/mini/Initialize()
set_gun_light(new /obj/item/flashlight/seclite(src))
@@ -50,6 +51,8 @@
desc = "A modified version of the basic phaser gun, this one fires less concentrated energy bolts designed for target practice."
ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/laser/practice)
icon_state = "decloner"
//You have no icons for energy types, you're a decloner
modifystate = FALSE
/obj/item/gun/energy/e_gun/hos
name = "\improper X-01 MultiPhase Energy Gun"
@@ -82,6 +82,7 @@
shaded_charge = 0
pin = /obj/item/firing_pin/implant/mindshield
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter/disabler, /obj/item/ammo_casing/energy/electrode)
automatic_charge_overlays = FALSE
cell_type = /obj/item/stock_parts/cell //SKYRAT EDIT ADDITION - GUNSGALORE
///Laser Cannon
@@ -4,6 +4,7 @@
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "taser"
inhand_icon_state = "armcannonstun4"
display_empty = FALSE
force = 5
selfcharge = 1
can_flashlight = FALSE
@@ -24,3 +25,7 @@
/obj/item/gun/energy/laser/mounted/dropped()
..()
/obj/item/gun/energy/laser/mounted/augment
icon = 'icons/obj/surgery.dmi'
icon_state = "arm_laser"
@@ -62,6 +62,7 @@
cell_type = /obj/item/stock_parts/cell/potato
clumsy_check = 0 //Admin spawn only, might as well let clowns use it.
selfcharge = 1
automatic_charge_overlays = FALSE
/obj/item/gun/energy/meteorgun/pen
name = "meteor pen"
@@ -73,6 +74,7 @@
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
w_class = WEIGHT_CLASS_TINY
automatic_charge_overlays = FALSE
/obj/item/gun/energy/mindflayer
name = "\improper Mind Flayer"
@@ -202,6 +204,7 @@
inhand_icon_state = null
icon_state = "wormhole_projector"
base_icon_state = "wormhole_projector"
automatic_charge_overlays = FALSE
var/obj/effect/portal/p_blue
var/obj/effect/portal/p_orange
var/atmos_link = FALSE
@@ -366,6 +369,7 @@
ammo_type = list(/obj/item/ammo_casing/energy/gravity/repulse, /obj/item/ammo_casing/energy/gravity/attract, /obj/item/ammo_casing/energy/gravity/chaos)
inhand_icon_state = "gravity_gun"
icon_state = "gravity_gun"
automatic_charge_overlays = FALSE
var/power = 4
var/firing_core = FALSE
+1
View File
@@ -235,6 +235,7 @@
circuit = /obj/item/circuitboard/computer/bsa_control
icon = 'icons/obj/machines/particle_accelerator.dmi'
icon_state = "control_boxp"
icon_keyboard = ""
var/obj/machinery/bsa/full/cannon
var/notice
+1 -7
View File
@@ -203,17 +203,11 @@
name = "arm-mounted laser implant"
desc = "A variant of the arm cannon implant that fires lethal laser beams. The cannon emerges from the subject's arm and remains inside when not in use."
icon_state = "arm_laser"
items_to_create = list(/obj/item/gun/energy/laser/mounted)
items_to_create = list(/obj/item/gun/energy/laser/mounted/augment)
/obj/item/organ/cyberimp/arm/gun/laser/l
zone = BODY_ZONE_L_ARM
/obj/item/organ/cyberimp/arm/gun/laser/Initialize()
. = ..()
var/obj/item/organ/cyberimp/arm/gun/laser/laserphasergun = locate(/obj/item/gun/energy/laser/mounted) in contents
laserphasergun.icon = icon //No invisible laser guns kthx
laserphasergun.icon_state = icon_state
/obj/item/organ/cyberimp/arm/gun/taser
name = "arm-mounted taser implant"
desc = "A variant of the arm cannon implant that fires electrodes and disabler shots. The cannon emerges from the subject's arm and remains inside when not in use."