Skip to content

Commit

Permalink
Merge remote-tracking branch 'cmss13-devs/master' into royalmarines
Browse files Browse the repository at this point in the history
# Conflicts:
#	code/modules/projectiles/gun_attachables.dm
  • Loading branch information
spartanbobby committed Sep 1, 2023
2 parents 9bbe6fd + e738b90 commit 26b0ea8
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 26 deletions.
14 changes: 10 additions & 4 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -237,16 +237,22 @@ cases. Override_icon_state should be a list.*/
new_icon_state = override_icon_state[SSmapping.configs[GROUND_MAP].map_name]
if(override_protection && override_protection.len)
new_protection = override_protection[SSmapping.configs[GROUND_MAP].map_name]
switch(SSmapping.configs[GROUND_MAP].map_name) // maploader TODO: json
if(MAP_ICE_COLONY, MAP_ICE_COLONY_V3, MAP_CORSAT, MAP_SOROKYNE_STRATA)
switch(SSmapping.configs[GROUND_MAP].camouflage_type)
if("snow")
icon_state = new_icon_state ? new_icon_state : "s_" + icon_state
item_state = new_item_state ? new_item_state : "s_" + item_state
if(MAP_WHISKEY_OUTPOST, MAP_DESERT_DAM, MAP_BIG_RED, MAP_KUTJEVO)
if("desert")
icon_state = new_icon_state ? new_icon_state : "d_" + icon_state
item_state = new_item_state ? new_item_state : "d_" + item_state
if(MAP_PRISON_STATION, MAP_PRISON_STATION_V3, MAP_LV522_CHANCES_CLAIM)
if("classic")
icon_state = new_icon_state ? new_icon_state : "c_" + icon_state
item_state = new_item_state ? new_item_state : "c_" + item_state
if("jungle")
icon_state = new_icon_state ? new_icon_state : "j_" + icon_state
item_state = new_item_state ? new_item_state : "j_" + item_state
if("urban")
icon_state = new_icon_state ? new_icon_state : "u_" + icon_state
item_state = new_item_state ? new_item_state : "u_" + item_state
if(new_protection)
min_cold_protection_temperature = new_protection
else return
Expand Down
13 changes: 8 additions & 5 deletions code/modules/mob/new_player/sprite_accessories/undershirt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@ GLOBAL_LIST_INIT_TYPED(undershirt_f, /datum/sprite_accessory/undershirt, setup_u
/datum/sprite_accessory/undershirt/proc/get_image(mob_gender)
var/selected_icon_state = icon_state
if(camo_conforming)
switch(SSmapping.configs[GROUND_MAP].map_name) // maploader TODO: json
if(MAP_PRISON_STATION, MAP_PRISON_STATION_V3, MAP_LV522_CHANCES_CLAIM)
switch(SSmapping.configs[GROUND_MAP].camouflage_type)
if("classic")
selected_icon_state = "c_" + selected_icon_state
if(MAP_LV_624, MAP_RUNTIME, MAP_NEW_VARADERO)
if("jungle")
selected_icon_state = "j_" + selected_icon_state
if(MAP_WHISKEY_OUTPOST, MAP_DESERT_DAM, MAP_BIG_RED, MAP_KUTJEVO)
if("desert")
selected_icon_state = "d_" + selected_icon_state
if(MAP_CORSAT, MAP_SOROKYNE_STRATA, MAP_ICE_COLONY, MAP_ICE_COLONY_V3)
if("snow")
selected_icon_state = "s_" + selected_icon_state
if("urban")
selected_icon_state = "u_" + selected_icon_state

if(gender == PLURAL)
selected_icon_state += mob_gender == MALE ? "_m" : "_f"
return image(icon, selected_icon_state)
Expand Down
12 changes: 7 additions & 5 deletions code/modules/mob/new_player/sprite_accessories/underwear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,17 @@ GLOBAL_LIST_INIT_TYPED(underwear_f, /datum/sprite_accessory/underwear, setup_und
/datum/sprite_accessory/underwear/proc/get_image(mob_gender)
var/selected_icon_state = icon_state
if(camo_conforming)
switch(SSmapping.configs[GROUND_MAP].map_name) // maploader TODO: json
if(MAP_PRISON_STATION, MAP_PRISON_STATION_V3, MAP_LV522_CHANCES_CLAIM)
switch(SSmapping.configs[GROUND_MAP].camouflage_type)
if("classic")
selected_icon_state = "c_" + selected_icon_state
if(MAP_LV_624, MAP_RUNTIME, MAP_NEW_VARADERO)
if("jungle")
selected_icon_state = "j_" + selected_icon_state
if(MAP_WHISKEY_OUTPOST, MAP_DESERT_DAM, MAP_BIG_RED, MAP_KUTJEVO)
if("desert")
selected_icon_state = "d_" + selected_icon_state
if(MAP_CORSAT, MAP_SOROKYNE_STRATA, MAP_ICE_COLONY, MAP_ICE_COLONY_V3)
if("snow")
selected_icon_state = "s_" + selected_icon_state
if("urban")
selected_icon_state = "u_" + selected_icon_state
if(gender == PLURAL)
selected_icon_state += mob_gender == MALE ? "_m" : "_f"
return image(icon, selected_icon_state)
Expand Down
36 changes: 24 additions & 12 deletions code/modules/projectiles/gun_attachables.dm
Original file line number Diff line number Diff line change
Expand Up @@ -874,13 +874,17 @@ Defined in conflicts.dm of the #defines folder.
/obj/item/attachable/magnetic_harness/lever_sling/select_gamemode_skin(expected_type, list/override_icon_state, list/override_protection)
. = ..()
var/new_attach_icon
switch(SSmapping.configs[GROUND_MAP].map_name) // maploader TODO: json
if(MAP_ICE_COLONY, MAP_ICE_COLONY_V3, MAP_CORSAT, MAP_SOROKYNE_STRATA)
switch(SSmapping.configs[GROUND_MAP].camouflage_type)
if("snow")
attach_icon = new_attach_icon ? new_attach_icon : "s_" + attach_icon
if(MAP_WHISKEY_OUTPOST, MAP_DESERT_DAM, MAP_BIG_RED, MAP_KUTJEVO)
if("desert")
attach_icon = new_attach_icon ? new_attach_icon : "d_" + attach_icon
if(MAP_PRISON_STATION, MAP_PRISON_STATION_V3, MAP_LV522_CHANCES_CLAIM)
if("classic")
attach_icon = new_attach_icon ? new_attach_icon : "c_" + attach_icon
if("jungle")
attach_icon = new_attach_icon ? new_attach_icon : "j_" + attach_icon
if("urban")
attach_icon = new_attach_icon ? new_attach_icon : "u_" + attach_icon

/obj/item/attachable/scope
name = "S8 4x telescopic scope"
Expand Down Expand Up @@ -1710,13 +1714,17 @@ Defined in conflicts.dm of the #defines folder.
/obj/item/attachable/m4ra_barrel/select_gamemode_skin(expected_type, list/override_icon_state, list/override_protection)
. = ..()
var/new_attach_icon
switch(SSmapping.configs[GROUND_MAP].map_name) // maploader TODO: json
if(MAP_ICE_COLONY, MAP_ICE_COLONY_V3, MAP_CORSAT, MAP_SOROKYNE_STRATA)
switch(SSmapping.configs[GROUND_MAP].camouflage_type)
if("snow")
attach_icon = new_attach_icon ? new_attach_icon : "s_" + attach_icon
if(MAP_WHISKEY_OUTPOST, MAP_DESERT_DAM, MAP_BIG_RED, MAP_KUTJEVO)
if("desert")
attach_icon = new_attach_icon ? new_attach_icon : "d_" + attach_icon
if(MAP_PRISON_STATION, MAP_PRISON_STATION_V3, MAP_LV522_CHANCES_CLAIM)
if("classic")
attach_icon = new_attach_icon ? new_attach_icon : "c_" + attach_icon
if("jungle")
attach_icon = new_attach_icon ? new_attach_icon : "j_" + attach_icon
if("urban")
attach_icon = new_attach_icon ? new_attach_icon : "u_" + attach_icon

/obj/item/attachable/m4ra_barrel_custom
name = "custom M4RA barrel"
Expand All @@ -1736,13 +1744,17 @@ Defined in conflicts.dm of the #defines folder.
/obj/item/attachable/m4ra_barrel_custom/select_gamemode_skin(expected_type, list/override_icon_state, list/override_protection)
. = ..()
var/new_attach_icon
switch(SSmapping.configs[GROUND_MAP].map_name) // maploader TODO: json
if(MAP_ICE_COLONY, MAP_ICE_COLONY_V3, MAP_CORSAT, MAP_SOROKYNE_STRATA)
switch(SSmapping.configs[GROUND_MAP].camouflage_type)
if("snow")
attach_icon = new_attach_icon ? new_attach_icon : "s_" + attach_icon
if(MAP_WHISKEY_OUTPOST, MAP_DESERT_DAM, MAP_BIG_RED, MAP_KUTJEVO)
if("desert")
attach_icon = new_attach_icon ? new_attach_icon : "d_" + attach_icon
if(MAP_PRISON_STATION, MAP_PRISON_STATION_V3, MAP_LV522_CHANCES_CLAIM)
if("classic")
attach_icon = new_attach_icon ? new_attach_icon : "c_" + attach_icon
if("jungle")
attach_icon = new_attach_icon ? new_attach_icon : "j_" + attach_icon
if("urban")
attach_icon = new_attach_icon ? new_attach_icon : "u_" + attach_icon

/obj/item/attachable/upp_rpg_breech
name = "HJRA-12 Breech"
Expand Down
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-4295.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "BeagleGaming1"
delete-after: True
changes:
- code_imp: "changed camouflage from map definitions to JSON"

0 comments on commit 26b0ea8

Please sign in to comment.