Fixes window panes, suppressors, exoplanet runtimes. (#18195)

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2024-01-13 22:41:18 +00:00
committed by GitHub
co-authored by Matt Atlas
parent 2d39b48cc7
commit cf298ddad8
8 changed files with 100 additions and 25 deletions
+4 -4
View File
@@ -371,12 +371,12 @@
/obj/structure/platform
name = "platform"
desc = "An archaic method of preventing travel along the X and Y axes if you are on a lower point on the Z-axis."
density = TRUE
anchored = TRUE
atom_flags = ATOM_FLAG_CHECKS_BORDER
climbable = TRUE
icon = 'icons/obj/structure/platforms.dmi'
icon_state = "platform"
density = TRUE
anchored = TRUE
atom_flags = ATOM_FLAG_CHECKS_BORDER|ATOM_FLAG_ALWAYS_ALLOW_PICKUP
climbable = TRUE
color = COLOR_TILED
/obj/structure/platform/dark
+10 -2
View File
@@ -37,8 +37,16 @@
var/flora_diversity = 0
var/has_trees = FALSE
var/list/small_flora_types = list()
var/list/big_flora_types = list()
/// For generating seeds to put in big_flora_seeds.
var/list/small_flora_types
/// For generating seeds to put in small_flora_seeds.
var/list/big_flora_types
/// This is a list of seed OBJECTS. Not types.
var/list/small_flora_seeds = list()
/// This is a list of seed OBJECTS. Not types.
var/list/big_flora_seeds = list()
var/repopulating = 0
var/repopulate_types = list() // animals which have died that may come back
@@ -2,6 +2,18 @@
if(flora_diversity == 0)
return
/// Generate custom seeds for lore planets.
if(islist(small_flora_types) && length(small_flora_types))
for(var/seed_type in small_flora_types)
var/datum/seed/S = new seed_type()
small_flora_types += S
if(islist(big_flora_types) && length(big_flora_types))
for(var/seed_type in big_flora_types)
var/datum/seed/S = new seed_type()
big_flora_types += S
/// Now, generate random seeds for normal planets.
for(var/i = 1 to flora_diversity)
var/datum/seed/S = new()
if(atmosphere?.gas)
@@ -16,7 +28,8 @@
color = get_random_colour(0,75,190)
S.set_trait(TRAIT_PLANT_COLOUR,color)
adapt_seed(S)
small_flora_types += S
small_flora_seeds += S
if(has_trees)
var/tree_diversity = max(1, flora_diversity/2)
for(var/i = 1 to tree_diversity)
@@ -33,21 +46,21 @@
S.set_trait(TRAIT_LEAVES_COLOUR,color)
S.chems[/singleton/reagent/woodpulp] = list(1)
adapt_seed(S)
big_flora_types += S
big_flora_seeds += S
/obj/effect/landmark/exoplanet_spawn/plant
name = "spawn exoplanet plant"
/obj/effect/landmark/exoplanet_spawn/plant/do_spawn(var/obj/effect/overmap/visitable/sector/exoplanet/planet)
if(length(planet.small_flora_types))
var/seed_path = pick(planet.small_flora_types)
new /obj/machinery/portable_atmospherics/hydroponics/soil/invisible(get_turf(src), new seed_path(), TRUE)
if(length(planet.small_flora_seeds))
var/seed_path = pick(planet.small_flora_seeds)
new /obj/machinery/portable_atmospherics/hydroponics/soil/invisible(get_turf(src), seed_path, TRUE)
/obj/effect/landmark/exoplanet_spawn/large_plant
name = "spawn exoplanet large plant"
/obj/effect/landmark/exoplanet_spawn/large_plant/do_spawn(var/obj/effect/overmap/visitable/sector/exoplanet/planet)
if(length(planet.big_flora_types))
var/seed_path = pick(planet.big_flora_types)
new /obj/machinery/portable_atmospherics/hydroponics/soil/invisible(get_turf(src), new seed_path(), TRUE)
if(length(planet.big_flora_seeds))
var/seed_path = pick(planet.big_flora_seeds)
new /obj/machinery/portable_atmospherics/hydroponics/soil/invisible(get_turf(src), seed_path, TRUE)
+11 -7
View File
@@ -936,14 +936,14 @@
balloon_alert(user, "\the [I.name] doesn't fit")
return ..()
if(user.l_hand != bayonet && user.r_hand != bayonet)
balloon_alert(user, "not in hand")
return
if(bayonet)
balloon_alert(user, "\the [src] already has a bayonet")
return TRUE
if(user.l_hand != I && user.r_hand != I)
balloon_alert(user, "not in hand")
return
user.drop_from_inventory(I,src)
bayonet = I
balloon_alert(user, "[I.name] attached")
@@ -958,15 +958,19 @@
if(!can_ammo_display)
balloon_alert(user, "\the [I.name] doesn't fit")
return TRUE
if(user.l_hand != ammo_display && user.r_hand != ammo_display)
balloon_alert(user, "not in hand")
return
if(ammo_display)
balloon_alert(user, "\the [src] already has an ammo display")
return TRUE
if(user.l_hand != I && user.r_hand != I)
balloon_alert(user, "not in hand")
return
if(displays_maptext)
balloon_alert(user, "\the [src] is already displaying its ammo count")
return TRUE
user.drop_from_inventory(I, src)
ammo_display = I
displays_maptext = TRUE
+6 -3
View File
@@ -237,12 +237,15 @@
if(!can_suppress)
balloon_alert(user, "\the [S.name] doesn't fit")
return
if(user.l_hand != suppressor && user.r_hand != suppressor)
balloon_alert(user, "not in hand")
return
if(suppressed)
balloon_alert(user, "already has a suppressor")
return
if(user.l_hand != S && user.r_hand != S)
balloon_alert(user, "not in hand")
return
user.drop_from_inventory(suppressor, src)
balloon_alert(user, "[S.name] attached")
install_suppressor(S)