From 139624aa25b793e1a60b8e866798120c828dbe7e Mon Sep 17 00:00:00 2001 From: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> Date: Sun, 8 Oct 2023 23:32:50 +0200 Subject: [PATCH] Flags fix and minor refactor (#17543) * Atomization * afsd --------- Co-authored-by: FluffyGhost --- code/game/objects/structures/flags_banners.dm | 790 +++++++++--------- .../FluffyGhost-flags_refactor_fix.yml | 43 + 2 files changed, 458 insertions(+), 375 deletions(-) create mode 100644 html/changelogs/FluffyGhost-flags_refactor_fix.yml diff --git a/code/game/objects/structures/flags_banners.dm b/code/game/objects/structures/flags_banners.dm index 36e96c511b2..83d14ad0a64 100644 --- a/code/game/objects/structures/flags_banners.dm +++ b/code/game/objects/structures/flags_banners.dm @@ -9,7 +9,10 @@ icon = 'icons/obj/structure/flags.dmi' icon_state = "flag_boxed" var/flag_path - var/flag_size = FALSE // true if big flag + + ///Boolean, set to `TRUE` if a flag is large (2x1) + var/flag_size = FALSE + var/obj/structure/sign/flag/flag_structure var/stand_icon = "banner_stand" @@ -19,9 +22,15 @@ desc = "Nothing to see here." icon = 'icons/obj/structure/flags.dmi' icon_state = "flag" - var/obj/structure/sign/flag/linked_flag //For double flags + + ///If a big flag, the other half of the flag is referenced here + var/obj/structure/sign/flag/linked_flag + var/obj/item/flag/flag_item //For returning your flag - var/ripped = FALSE //If we've been torn down + + ///Boolean, if we've been torn down + var/ripped = FALSE + var/ripped_outline_state = "flag_ripped" var/flag_path var/flag_size @@ -32,14 +41,16 @@ var/unmovable = FALSE var/stand_icon = "banner_stand" -/obj/structure/sign/flag/New(loc, var/newdir, var/linked_flag_path, var/deploy, var/icon_file, var/item_flag_path) +/obj/structure/sign/flag/Initialize(mapload, var/newdir, var/linked_flag_path, var/deploy, var/icon_file, var/item_flag_path) . = ..() dir = newdir + if(!flag_path) if(item_flag_path) // redundancy flag_path = item_flag_path else flag_path = icon_state + if(deploy) switch(dir) if(NORTH) @@ -50,6 +61,7 @@ pixel_x = 32 if(WEST) pixel_x = -32 + if(linked_flag_path) icon_state = "[linked_flag_path]_r" ripped_outline_state = "flag_ripped_r" @@ -58,34 +70,10 @@ flag_icon.Blend(shading_icon, ICON_MULTIPLY) icon = flag_icon return + + //Handles the creation of the large flags and single flags if(flag_size) - icon_state = "[flag_path]_l" // Just adding to the flag spaghetti. - ripped_outline_state = "flag_ripped_l" - flag_icon = new(icon, icon_state, dir) - shading_icon = new('icons/obj/structure/flags.dmi', "flag_l", dir) - flag_icon.Blend(shading_icon, ICON_MULTIPLY) - var/obj/structure/sign/flag/F2 = new(loc, dir, linked_flag_path = flag_path, icon_file = icon) - icon = flag_icon - linked_flag = F2 - switch(F2.dir) - if(NORTH) - F2.pixel_x = 32 - F2.pixel_y = 32 - if(SOUTH) - F2.pixel_x = 32 - F2.pixel_y = -32 - if(EAST) - F2.pixel_y = -32 - F2.pixel_x = 32 - if(WEST) - F2.pixel_y = 32 - F2.pixel_x = -32 - F2.linked_flag = src - F2.name = name - F2.desc = desc - F2.desc_info = desc_info - F2.desc_extended = desc_extended - F2.flag_item = flag_item + create_other_half(loc, dir, flag_path, icon, pixel_x, pixel_y) else icon_state = "[flag_path]" flag_icon = new(icon, icon_state) @@ -104,6 +92,58 @@ verbs += /obj/structure/sign/flag/proc/toggle icon = flag_icon +/** + * If the flag is a big flag, handles the creation and alignment of the other half of it + * + * * loc - The location where to create the flag (before transformation) + * * dir - The direction of the flag + * * flag_path - The `icon_state` that the other half will have (flag_path + "_l") + * * icon - The icon + * * offset_x - Pixel shift that was applied to the first half of the flag, if any + * * offset_y - Pixel shift that was applied to the first half of the flag, if any + */ +/obj/structure/sign/flag/proc/create_other_half(loc, dir, flag_path, icon, offset_x, offset_y) + SHOULD_NOT_SLEEP(TRUE) + + icon_state = "[flag_path]_l" // Just adding to the flag spaghetti. + ripped_outline_state = "flag_ripped_l" + flag_icon = new(icon, icon_state, dir) + shading_icon = new('icons/obj/structure/flags.dmi', "flag_l", dir) + flag_icon.Blend(shading_icon, ICON_MULTIPLY) + var/obj/structure/sign/flag/F2 = new(loc, dir, linked_flag_path = flag_path, icon_file = icon) + icon = flag_icon + linked_flag = F2 + + //Apply the pixel shifting based on the direction to the new other half of the flag + switch(F2.dir) + if(NORTH) + F2.pixel_x = 32 + if(SOUTH) + F2.pixel_x = 32 + if(EAST) + F2.pixel_y = -32 + if(WEST) + F2.pixel_y = 32 + + //Apply the offsets we received + F2.pixel_x += offset_x + F2.pixel_y += offset_y + + //Finish configuring the second half of the instance + F2.linked_flag = src + F2.name = name + F2.desc = desc + F2.desc_info = desc_info + F2.desc_extended = desc_extended + F2.flag_item = flag_item + + //Requeue the area for smoothing, just in case + SSicon_smooth.add_to_queue(src) + SSicon_smooth.add_to_queue_neighbors(src) + +/obj/structure/sign/flag/New(loc, var/newdir, var/linked_flag_path, var/deploy, var/icon_file, var/item_flag_path) + . = ..() + /obj/item/flag/attack_self(mob/user) if(flag_size) return @@ -311,17 +351,17 @@ flag_size = TRUE flag_item = /obj/item/flag/sol/l -/obj/structure/sign/flag/sol/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/sol/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/sol/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/sol/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/sol/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/sol/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/sol/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/sol/large/west/Initialize(mapload) + . = ..(mapload, WEST) /obj/item/flag/sol/old/l name = "large old Sol Alliance flag" @@ -334,17 +374,17 @@ flag_size = TRUE flag_item = /obj/item/flag/sol/old/l -/obj/structure/sign/flag/sol/old/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/sol/old/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/sol/old/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/sol/old/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/sol/old/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/sol/old/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/sol/old/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/sol/old/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Dominia @@ -372,17 +412,17 @@ flag_size = TRUE flag_item = /obj/item/flag/dominia/l -/obj/structure/sign/flag/dominia/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/dominia/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/dominia/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/dominia/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/dominia/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/dominia/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/dominia/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/dominia/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Elyra @@ -410,17 +450,17 @@ flag_size = TRUE flag_item = /obj/item/flag/elyra/l -/obj/structure/sign/flag/elyra/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/elyra/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/elyra/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/elyra/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/elyra/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/elyra/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/elyra/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/elyra/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Hegemony @@ -448,17 +488,17 @@ flag_size = TRUE flag_item = /obj/item/flag/hegemony/l -/obj/structure/sign/flag/hegemony/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/hegemony/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/hegemony/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/hegemony/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/hegemony/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/hegemony/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/hegemony/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/hegemony/large/west/Initialize(mapload) + . = ..(mapload, WEST) /obj/item/flag/ouerea name = "\improper Ouerea flag" @@ -484,17 +524,17 @@ flag_size = TRUE flag_item = /obj/item/flag/ouerea/l -/obj/structure/sign/flag/ouerea/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/ouerea/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/ouerea/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/ouerea/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/ouerea/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/ouerea/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/ouerea/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/ouerea/large/west/Initialize(mapload) + . = ..(mapload, WEST) /obj/item/flag/ouerea/old name = "old Ouerea flag" @@ -520,17 +560,17 @@ flag_size = TRUE flag_item = /obj/item/flag/ouerea/old/l -/obj/structure/sign/flag/ouerea/old/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/ouerea/old/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/ouerea/old/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/ouerea/old/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/ouerea/old/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/ouerea/old/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/ouerea/old/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/ouerea/old/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Nralakk @@ -558,17 +598,17 @@ flag_size = TRUE flag_item = /obj/item/flag/nralakk/l -/obj/structure/sign/flag/nralakk/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/nralakk/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/nralakk/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/nralakk/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/nralakk/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/nralakk/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/nralakk/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/nralakk/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Traverse @@ -596,17 +636,17 @@ flag_size = TRUE flag_item = /obj/item/flag/traverse/l -/obj/structure/sign/flag/traverse/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/traverse/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/traverse/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/traverse/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/traverse/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/traverse/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/traverse/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/traverse/large/west/Initialize(mapload) + . = ..(mapload, WEST) // CT-EUM @@ -652,17 +692,17 @@ flag_size = TRUE flag_item = /obj/item/flag/nanotrasen/l -/obj/structure/sign/flag/nanotrasen/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/nanotrasen/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/nanotrasen/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/nanotrasen/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/nanotrasen/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/nanotrasen/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/nanotrasen/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/nanotrasen/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Eridani @@ -693,17 +733,17 @@ flag_size = TRUE flag_item = /obj/item/flag/eridani/l -/obj/structure/sign/flag/eridani/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/eridani/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/eridani/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/eridani/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/eridani/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/eridani/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/eridani/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/eridani/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Coalition @@ -734,17 +774,17 @@ flag_size = TRUE flag_item = /obj/item/flag/coalition/l -/obj/structure/sign/flag/coalition/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/coalition/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/coalition/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/coalition/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/coalition/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/coalition/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/coalition/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/coalition/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Varuca/Sedantis @@ -775,17 +815,17 @@ flag_size = TRUE flag_item = /obj/item/flag/sedantis/l -/obj/structure/sign/flag/sedantis/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/sedantis/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/sedantis/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/sedantis/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/sedantis/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/sedantis/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/sedantis/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/sedantis/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Red Coalition @@ -819,17 +859,17 @@ flag_size = TRUE flag_item = /obj/item/flag/red_coalition/l -/obj/structure/sign/flag/red_coalition/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/red_coalition/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/red_coalition/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/red_coalition/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/red_coalition/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/red_coalition/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/red_coalition/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/red_coalition/large/west/Initialize(mapload) + . = ..(mapload, WEST) // DPRA @@ -868,17 +908,17 @@ flag_size = TRUE flag_item = /obj/item/flag/dpra/l -/obj/structure/sign/flag/dpra/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/dpra/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/dpra/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/dpra/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/dpra/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/dpra/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/dpra/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/dpra/large/west/Initialize(mapload) + . = ..(mapload, WEST) // PRA @@ -919,17 +959,17 @@ flag_size = TRUE flag_item = /obj/item/flag/pra/l -/obj/structure/sign/flag/pra/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/pra/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/pra/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/pra/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/pra/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/pra/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/pra/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/pra/large/west/Initialize(mapload) + . = ..(mapload, WEST) // NKA @@ -970,17 +1010,17 @@ flag_size = TRUE flag_item = /obj/item/flag/nka/l -/obj/structure/sign/flag/nka/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/nka/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/nka/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/nka/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/nka/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/nka/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/nka/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/nka/large/west/Initialize(mapload) + . = ..(mapload, WEST) // FTC @@ -1025,17 +1065,17 @@ flag_size = TRUE flag_item = /obj/item/flag/ftc/l -/obj/structure/sign/flag/ftc/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/ftc/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/ftc/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/ftc/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/ftc/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/ftc/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/ftc/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/ftc/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Hephaestus @@ -1066,17 +1106,17 @@ flag_size = TRUE flag_item = /obj/item/flag/heph/l -/obj/structure/sign/flag/heph/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/heph/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/heph/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/heph/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/heph/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/heph/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/heph/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/heph/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Zeng-Hu @@ -1107,17 +1147,17 @@ flag_size = TRUE flag_item = /obj/item/flag/zenghu/l -/obj/structure/sign/flag/zenghu/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/zenghu/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/zenghu/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/zenghu/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/zenghu/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/zenghu/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/zenghu/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/zenghu/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Zavodskoi @@ -1148,17 +1188,17 @@ flag_size = TRUE flag_item = /obj/item/flag/zavodskoi/l -/obj/structure/sign/flag/zavodskoi/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/zavodskoi/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/zavodskoi/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/zavodskoi/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/zavodskoi/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/zavodskoi/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/zavodskoi/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/zavodskoi/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Idris @@ -1189,17 +1229,17 @@ flag_size = TRUE flag_item = /obj/item/flag/idris/l -/obj/structure/sign/flag/idris/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/idris/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/idris/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/idris/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/idris/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/idris/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/idris/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/idris/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Trinary @@ -1232,17 +1272,17 @@ flag_size = TRUE flag_item = /obj/item/flag/trinaryperfection/l -/obj/structure/sign/flag/trinaryperfection/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/trinaryperfection/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/trinaryperfection/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/trinaryperfection/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/trinaryperfection/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/trinaryperfection/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/trinaryperfection/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/trinaryperfection/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Dominian Standards @@ -1378,17 +1418,17 @@ flag_size = TRUE flag_item = /obj/item/flag/biesel/l -/obj/structure/sign/flag/biesel/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/biesel/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/biesel/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/biesel/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/biesel/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/biesel/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/biesel/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/biesel/large/west/Initialize(mapload) + . = ..(mapload, WEST) /obj/item/flag/biesel/old name = "old Autonomous Solarian Republic of Biesel flag" @@ -1499,17 +1539,17 @@ flag_size = TRUE flag_item = /obj/item/flag/scc/l -/obj/structure/sign/flag/scc/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/scc/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/scc/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/scc/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/scc/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/scc/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/scc/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/scc/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Fisanduh @@ -1544,17 +1584,17 @@ flag_size = TRUE flag_item = /obj/item/flag/fisanduh/l -/obj/structure/sign/flag/fisanduh/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/fisanduh/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/fisanduh/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/fisanduh/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/fisanduh/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/fisanduh/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/fisanduh/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/fisanduh/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Gadpathur @@ -1593,17 +1633,17 @@ flag_size = TRUE flag_item = /obj/item/flag/gadpathur/l -/obj/structure/sign/flag/gadpathur/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/gadpathur/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/gadpathur/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/gadpathur/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/gadpathur/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/gadpathur/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/gadpathur/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/gadpathur/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Vysoka @@ -1638,17 +1678,17 @@ flag_size = TRUE flag_item = /obj/item/flag/vysoka/l -/obj/structure/sign/flag/vysoka/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/vysoka/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/vysoka/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/vysoka/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/vysoka/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/vysoka/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/vysoka/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/vysoka/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Konyang @@ -1683,17 +1723,17 @@ flag_size = TRUE flag_item = /obj/item/flag/konyang/l -/obj/structure/sign/flag/konyang/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/konyang/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/konyang/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/konyang/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/konyang/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/konyang/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/konyang/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/konyang/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Izharshan @@ -1799,17 +1839,17 @@ flag_size = TRUE flag_item = /obj/item/flag/pmcg/l -/obj/structure/sign/flag/pmcg/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/pmcg/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/pmcg/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/pmcg/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/pmcg/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/pmcg/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/pmcg/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/pmcg/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Himeo @@ -1840,17 +1880,17 @@ flag_size = TRUE flag_item = /obj/item/flag/himeo/l -/obj/structure/sign/flag/himeo/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/himeo/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/himeo/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/himeo/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/himeo/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/himeo/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/himeo/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/himeo/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Assunzione @@ -1881,17 +1921,17 @@ flag_size = TRUE flag_item = /obj/item/flag/assunzione/l -/obj/structure/sign/flag/assunzione/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/assunzione/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/assunzione/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/assunzione/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/assunzione/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/assunzione/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/himeo/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/himeo/large/west/Initialize(mapload) + . = ..(mapload, WEST) // New Gibson @@ -1936,17 +1976,17 @@ flag_size = TRUE flag_item = /obj/item/flag/portantillia/l -/obj/structure/sign/flag/portantillia/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/portantillia/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/portantillia/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/portantillia/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/portantillia/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/portantillia/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/portantillia/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/portantillia/large/west/Initialize(mapload) + . = ..(mapload, WEST) // San Colette @@ -1977,17 +2017,17 @@ flag_size = TRUE flag_item = /obj/item/flag/sancolette/l -/obj/structure/sign/flag/sancolette/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/sancolette/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/sancolette/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/sancolette/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/sancolette/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/sancolette/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/sancolette/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/sancolette/large/west/Initialize(mapload) + . = ..(mapload, WEST) /obj/item/flag/sancolette/old name = "old Sovereign Solarian Republic of San Colette flag" @@ -2016,17 +2056,17 @@ flag_size = TRUE flag_item = /obj/item/flag/sancolette/old/l -/obj/structure/sign/flag/sancolette/old/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/sancolette/old/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/sancolette/old/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/sancolette/old/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/sancolette/old/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/sancolette/old/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/sancolette/old/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/sancolette/old/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Mictlan @@ -2057,17 +2097,17 @@ flag_size = TRUE flag_item = /obj/item/flag/mictlan/l -/obj/structure/sign/flag/mictlan/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/mictlan/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/mictlan/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/mictlan/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/mictlan/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/mictlan/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/mictlan/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/mictlan/large/west/Initialize(mapload) + . = ..(mapload, WEST) // New Hai Phong @@ -2099,17 +2139,17 @@ flag_size = TRUE flag_item = /obj/item/flag/nhp/l -/obj/structure/sign/flag/nhp/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/nhp/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/nhp/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/nhp/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/nhp/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/nhp/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/nhp/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/nhp/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Silversun @@ -2140,17 +2180,17 @@ flag_size = TRUE flag_item = /obj/item/flag/silversun/l -/obj/structure/sign/flag/silversun/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/silversun/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/silversun/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/silversun/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/silversun/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/silversun/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/silversun/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/silversun/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Hive Zo'ra @@ -2181,17 +2221,17 @@ flag_size = TRUE flag_item = /obj/item/flag/zora/l -/obj/structure/sign/flag/zora/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/zora/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/zora/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/zora/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/zora/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/zora/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/zora/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/zora/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Hive K'lax @@ -2222,17 +2262,17 @@ flag_size = TRUE flag_item = /obj/item/flag/klax/l -/obj/structure/sign/flag/klax/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/klax/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/klax/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/klax/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/klax/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/klax/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/klax/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/klax/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Hive C'thur @@ -2263,17 +2303,17 @@ flag_size = TRUE flag_item = /obj/item/flag/cthur/l -/obj/structure/sign/flag/cthur/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/cthur/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/cthur/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/cthur/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/cthur/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/cthur/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/cthur/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/cthur/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Orion Express @@ -2304,17 +2344,17 @@ flag_size = TRUE flag_item = /obj/item/flag/orion_express/l -/obj/structure/sign/flag/orion_express/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/orion_express/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/orion_express/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/orion_express/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/orion_express/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/orion_express/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/orion_express/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/orion_express/large/west/Initialize(mapload) + . = ..(mapload, WEST) // Imperial Frontier @@ -2347,17 +2387,17 @@ flag_size = TRUE flag_item = /obj/item/flag/imperial_frontier/l -/obj/structure/sign/flag/imperial_frontier/large/north/New() - ..(loc, NORTH) +/obj/structure/sign/flag/imperial_frontier/large/north/Initialize(mapload) + . = ..(mapload, NORTH) -/obj/structure/sign/flag/imperial_frontier/large/south/New() - ..(loc, SOUTH) +/obj/structure/sign/flag/imperial_frontier/large/south/Initialize(mapload) + . = ..(mapload, SOUTH) -/obj/structure/sign/flag/imperial_frontier/large/east/New() - ..(loc, EAST) +/obj/structure/sign/flag/imperial_frontier/large/east/Initialize(mapload) + . = ..(mapload, EAST) -/obj/structure/sign/flag/imperial_frontier/large/west/New() - ..(loc, WEST) +/obj/structure/sign/flag/imperial_frontier/large/west/Initialize(mapload) + . = ..(mapload, WEST) //tajaran gods diff --git a/html/changelogs/FluffyGhost-flags_refactor_fix.yml b/html/changelogs/FluffyGhost-flags_refactor_fix.yml new file mode 100644 index 00000000000..958f5e7ffe2 --- /dev/null +++ b/html/changelogs/FluffyGhost-flags_refactor_fix.yml @@ -0,0 +1,43 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: FluffyGhost + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Large flags now align correctly." + - bugfix: "Flags now play nice(r) with the icon smoothing, removing themselves from the queue on deletion." + - refactor: "Refactored flags to initialize using Initialize() instead of New(), some dmdocs, minor changes to it."