[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>
@@ -37,6 +37,8 @@
|
||||
var/settable_temperature_median = 30 + T0C
|
||||
///Range of temperatures above and below the median that we can set our target temperature (increase by upgrading the capacitors)
|
||||
var/settable_temperature_range = 30
|
||||
///Should we add an overlay for open spaceheaters
|
||||
var/display_panel = TRUE
|
||||
|
||||
/obj/machinery/space_heater/get_cell()
|
||||
return cell
|
||||
@@ -69,7 +71,7 @@
|
||||
|
||||
/obj/machinery/space_heater/update_overlays()
|
||||
. = ..()
|
||||
if(panel_open)
|
||||
if(panel_open && display_panel)
|
||||
. += "[base_icon_state]-open"
|
||||
|
||||
/obj/machinery/space_heater/process(delta_time)
|
||||
@@ -261,6 +263,7 @@
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
///How powerful the heating is, upgrades with parts. (ala chem_heater.dm's method, basically the same level of heating, but this is restricted)
|
||||
var/chem_heating_power = 1
|
||||
display_panel = FALSE
|
||||
|
||||
/obj/machinery/space_heater/improvised_chem_heater/Destroy()
|
||||
. = ..()
|
||||
|
||||
@@ -691,6 +691,7 @@
|
||||
desc = "Eight wrappers of fun! Ages 8 and up. Not suitable for children."
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "spbox"
|
||||
illustration = ""
|
||||
|
||||
/obj/item/storage/box/snappops/ComponentInitialize()
|
||||
. = ..()
|
||||
|
||||
@@ -193,6 +193,8 @@
|
||||
var/spawn_coupon = TRUE
|
||||
/// For VV'ing, set this to true if you want to force the coupon to give an omen
|
||||
var/rigged_omen = FALSE
|
||||
///Do we not have our own handling for cig overlays?
|
||||
var/display_cigs = TRUE
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack_self(mob/user)
|
||||
if(contents.len != 0 || !spawn_coupon)
|
||||
@@ -238,7 +240,6 @@
|
||||
/obj/item/storage/fancy/cigarettes/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = "[base_icon_state][contents.len ? null : "_empty"]"
|
||||
return
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/update_overlays()
|
||||
. = ..()
|
||||
@@ -246,21 +247,24 @@
|
||||
return
|
||||
|
||||
. += "[icon_state]_open"
|
||||
|
||||
if(!display_cigs)
|
||||
return
|
||||
|
||||
var/cig_position = 1
|
||||
for(var/C in contents)
|
||||
var/mutable_appearance/inserted_overlay = mutable_appearance(icon)
|
||||
var/use_icon_state = ""
|
||||
|
||||
if(istype(C, /obj/item/lighter/greyscale))
|
||||
inserted_overlay.icon_state = "lighter_in"
|
||||
use_icon_state = "lighter_in"
|
||||
else if(istype(C, /obj/item/lighter))
|
||||
inserted_overlay.icon_state = "zippo_in"
|
||||
use_icon_state = "zippo_in"
|
||||
else if(candy)
|
||||
inserted_overlay.icon_state = "candy"
|
||||
use_icon_state = "candy"
|
||||
else
|
||||
inserted_overlay.icon_state = "cigarette"
|
||||
use_icon_state = "cigarette"
|
||||
|
||||
inserted_overlay.icon_state = "[inserted_overlay.icon_state]_[cig_position]"
|
||||
. += inserted_overlay
|
||||
. += "[use_icon_state]_[cig_position]"
|
||||
cig_position++
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/target, mob/living/carbon/user)
|
||||
@@ -414,6 +418,7 @@
|
||||
contents_tag = "premium cigar"
|
||||
spawn_type = /obj/item/clothing/mask/cigarette/cigar
|
||||
spawn_coupon = FALSE
|
||||
display_cigs = FALSE
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/ComponentInitialize()
|
||||
. = ..()
|
||||
@@ -423,7 +428,8 @@
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/update_icon_state()
|
||||
. = ..()
|
||||
icon_state = "[base_icon_state][is_open ? "_open" : null]"
|
||||
//reset any changes the parent call may have made
|
||||
icon_state = base_icon_state
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/update_overlays()
|
||||
. = ..()
|
||||
@@ -431,8 +437,7 @@
|
||||
return
|
||||
var/cigar_position = 1 //generate sprites for cigars in the box
|
||||
for(var/obj/item/clothing/mask/cigarette/cigar/smokes in contents)
|
||||
var/mutable_appearance/cigar_overlay = mutable_appearance(icon, "[smokes.icon_off]_[cigar_position]")
|
||||
. += cigar_overlay
|
||||
. += "[smokes.icon_off]_[cigar_position]"
|
||||
cigar_position++
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/cigars/cohiba
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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."
|
||||
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 43 KiB |