Skip to content

Commit

Permalink
fix vulture attachment camo
Browse files Browse the repository at this point in the history
  • Loading branch information
Zonespace27 committed Feb 27, 2024
1 parent 045a279 commit 54216e8
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions code/modules/projectiles/gun_attachables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,19 @@ Defined in conflicts.dm of the #defines folder.
QDEL_NULL(scope_element)
return ..()

/obj/item/attachable/vulture_scope/select_gamemode_skin(expected_type, list/override_icon_state, list/override_protection)
. = ..()
var/new_attach_icon
switch(SSmapping.configs[GROUND_MAP].camouflage_type)
if("snow")
attach_icon = new_attach_icon ? new_attach_icon : "s_" + attach_icon
if("desert")
attach_icon = new_attach_icon ? new_attach_icon : "d_" + attach_icon
if("classic")
attach_icon = new_attach_icon ? new_attach_icon : "c_" + attach_icon
if("urban")
attach_icon = new_attach_icon ? new_attach_icon : "u_" + attach_icon

/obj/item/attachable/vulture_scope/tgui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand Down Expand Up @@ -1814,13 +1827,27 @@ Defined in conflicts.dm of the #defines folder.
/obj/item/attachable/stock/vulture
name = "\improper M707 heavy stock"
icon_state = "vulture_stock"
attach_icon = "vulture_stock"
hud_offset_mod = 3

/obj/item/attachable/stock/vulture/Initialize(mapload, ...)
. = ..()
select_gamemode_skin(type)
// Doesn't give any stat additions due to the gun already having really good ones, and this is unremovable from the gun itself

/obj/item/attachable/stock/vulture/select_gamemode_skin(expected_type, list/override_icon_state, list/override_protection)
. = ..()
var/new_attach_icon
switch(SSmapping.configs[GROUND_MAP].camouflage_type)
if("snow")
attach_icon = new_attach_icon ? new_attach_icon : "s_" + attach_icon
if("desert")
attach_icon = new_attach_icon ? new_attach_icon : "d_" + attach_icon
if("classic")
attach_icon = new_attach_icon ? new_attach_icon : "c_" + attach_icon
if("urban")
attach_icon = new_attach_icon ? new_attach_icon : "u_" + attach_icon

/obj/item/attachable/stock/tactical
name = "\improper MK221 tactical stock"
desc = "A metal stock made for the MK221 tactical shotgun."
Expand Down Expand Up @@ -3513,6 +3540,23 @@ Defined in conflicts.dm of the #defines folder.
attach_icon = "vulture_bipod"
heavy_bipod = TRUE

/obj/item/attachable/bipod/vulture/Initialize(mapload, ...)
. = ..()
select_gamemode_skin(type)

/obj/item/attachable/bipod/vulture/select_gamemode_skin(expected_type, list/override_icon_state, list/override_protection)
. = ..()
var/new_attach_icon
switch(SSmapping.configs[GROUND_MAP].camouflage_type)
if("snow")
attach_icon = new_attach_icon ? new_attach_icon : "s_" + attach_icon
if("desert")
attach_icon = new_attach_icon ? new_attach_icon : "d_" + attach_icon
if("classic")
attach_icon = new_attach_icon ? new_attach_icon : "c_" + attach_icon
if("urban")
attach_icon = new_attach_icon ? new_attach_icon : "u_" + attach_icon

/obj/item/attachable/burstfire_assembly
name = "burst fire assembly"
desc = "A small angled piece of fine machinery that increases the burst count on some weapons, and grants the ability to others. \nIncreases weapon scatter."
Expand Down

0 comments on commit 54216e8

Please sign in to comment.