Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Flock walls in 3/4 #268

Merged
merged 12 commits into from
May 8, 2022
2 changes: 1 addition & 1 deletion code/datums/flock/flock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@
// see /obj/machinery/light/small/floor and /obj/machinery/light for examples of this
/var/list/flock_conversion_paths = list(
/obj/grille/steel = /obj/grille/flock,
/obj/window = /obj/window/feather,
/obj/window = /obj/window/auto/feather,
/obj/machinery/door/airlock = /obj/machinery/door/feather,
/obj/machinery/door = null,
/obj/stool = /obj/stool/chair/comfy/flock,
Expand Down
4 changes: 4 additions & 0 deletions code/mob/living/critter/flock/flockdrone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,10 @@
var/obj/window/feather/window = target
if (window.health < window.health_max)
found_target = TRUE
if (/obj/window/auto/feather)
var/obj/window/auto/feather/window = target
if (window.health < window.health_max)
found_target = TRUE
if (/obj/grille/flock)
var/obj/grille/flock/barricade = target
if (barricade.health < barricade.health_max)
Expand Down
5 changes: 4 additions & 1 deletion code/mob/living/critter/flockcritter_parent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@
if (/obj/window/feather)
var/obj/window/feather/window = target
window.repair()
if (/obj/window/auto/feather)
var/obj/window/auto/feather/window = target
window.repair()
if (/obj/grille/flock)
var/obj/grille/flock/barricade = target
barricade.repair()
Expand Down Expand Up @@ -552,7 +555,7 @@
qdel(target)
if(istype(target, /obj/grille/flock))
qdel(target)
if(istype(target, /obj/window/feather))
if(istype(target, /obj/window/feather) || istype(target, /obj/window/auto/feather))
var/obj/window/the_window = target
//copied wholesale from the /obj/window deconstruction code
var/obj/item/sheet/A = new /obj/item/sheet(get_turf(the_window))
Expand Down
1 change: 1 addition & 0 deletions code/obj/flock/trader.dm
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@
win_path = "/obj/window/feather"
grille_path = "/obj/grille/flock"
full_win = 1
no_dirs = TRUE

////////////////////
// FLOCKTRADER DOOR
Expand Down
22 changes: 22 additions & 0 deletions code/obj/window.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,28 @@


// Flockdrone BS goes here - cirr
/obj/window/auto/feather
default_material = "gnesisglass"
Comment on lines +1047 to +1048
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was wondering if auto windows somehow inherit from the regular windows, but it seems some stuff is missing like ignoring material appearances?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

window/auto inherits from /obj/window yes, but it overrides a lot of behaviour


/obj/window/auto/feather/New()
connects_to += /turf/simulated/wall/auto/feather
..()
src.AddComponent(/datum/component/flock_protection, FALSE, TRUE, TRUE)

/obj/window/auto/feather/special_desc(dist, mob/user)
if(isflock(user))
return {"<span class='flocksay'><span class='bold'>###=-</span> Ident confirmed, data packet received.
<br><span class='bold'>ID:</span> Fibrewoven Window
<br><span class='bold'>System Integrity:</span> [round((src.health/src.health_max)*100)]%
<br><span class='bold'>###=-</span></span>"}
// todo: damageable walls
else
return null // give the standard description
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some indentation stuff that can be fixed here, and comments removed probably

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

willfix

Copy link
Contributor

@FlameArrow57 FlameArrow57 May 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Err I mean previous layout was fine, except maybe some lines after return could be indented further which I think was fixed, but none of the lines have proper tabbing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh gross, I didn't even notice


/obj/window/auto/feather/proc/repair()
src.health = min(src.health + 10, src.health_max)


/obj/window/feather
icon = 'icons/misc/featherzone.dmi'
icon_state = "window"
Expand Down
22 changes: 13 additions & 9 deletions code/turf/turf_flock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -269,25 +269,29 @@ turf/simulated/floor/feather/proc/bfs(turf/start)//breadth first search, made by
/turf/simulated/wall/auto/feather
name = "weird glowing wall"
desc = "You can feel it thrumming and pulsing."
icon = 'icons/misc/featherzone.dmi'
icon_state = "0"
icon = 'icons/turf/walls_flock.dmi'
icon_state = "flock0"
mod = "flock"
health = 250
var/max_health = 250
flags = USEDELAY
flags = USEDELAY | ALWAYS_SOLID_FLUID | IS_PERSPECTIVE_FLUID
mat_appearances_to_ignore = list("steel", "gnesis")
mat_changename = FALSE
mat_changedesc = FALSE
connects_to = list(/turf/simulated/wall/auto/feather, /obj/machinery/door/feather)

connect_overlay = TRUE
connect_diagonal = TRUE
connects_to = list(/turf/simulated/wall/auto/feather, /obj/machinery/door, /obj/window)
connects_with_overlay = list(/obj/machinery/door, /obj/window)
Comment on lines +283 to +284
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want it connecting to non-Flock stuff? Felt it gave more of a contrast when it didn't and makes a bit more sense that it only connects to its own stuff, but if it looks nicer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I considered having them separate but it looked shit so I changed it. The connectors round it off nicely.

var/broken = FALSE
var/on = FALSE

update_icon()
..()
if (src.broken)
icon_state = icon_state + "b"
else
icon_state = icon_state + (src.on ? "on" : "")
//TODO animate walls and put this back
//if (src.broken)
// icon_state = icon_state + "b"
//else
// icon_state = icon_state + (src.on ? "on" : "")

/turf/simulated/wall/auto/feather/New()
..()
Expand Down
Binary file added icons/turf/walls_flock.dmi
Binary file not shown.