Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
TaculoTaculo committed Nov 17, 2023
2 parents 65eaa3a + a0c4f43 commit a28d2e9
Show file tree
Hide file tree
Showing 89 changed files with 130,907 additions and 20,554 deletions.
Binary file modified ModularTegustation/Teguicons/32x48.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/48x48.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/96x48.dmi
Binary file not shown.
Binary file added ModularTegustation/Teguicons/lc13_structures.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/lc13icons.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/refiner.dmi
Binary file not shown.
Binary file modified ModularTegustation/Teguicons/workshop.dmi
Binary file not shown.
5 changes: 5 additions & 0 deletions ModularTegustation/lc13_effects.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//Cosmetic Effects
/obj/effect/wall_vent
name = "wall vent"
icon = 'ModularTegustation/Teguicons/lc13_structures.dmi'
icon_state = "wall_vent"
56 changes: 0 additions & 56 deletions ModularTegustation/lc13_machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,59 +129,3 @@
if(C.linked_console)
LAZYADD(abnormalities, "[C.AbnormalityInfo()]: [C.relative_location]")
sortList(abnormalities)

//Spreading Structures Code
//Stolen and edited from alien weed code. I wanted a spreading structure that doesnt have the atmospheric element attached to its root.
/obj/structure/spreading
name = "spreading structure"
desc = "This thing seems to spread when supplied with a outside signal."
max_integrity = 15
anchored = TRUE
density = FALSE
layer = TURF_LAYER
plane = FLOOR_PLANE
var/conflict_damage = 10
var/last_expand = 0 //last world.time this weed expanded
var/expand_cooldown = 1.5 SECONDS
var/can_expand = TRUE
var/static/list/blacklisted_turfs

/obj/structure/spreading/Initialize()
. = ..()

if(!blacklisted_turfs)
blacklisted_turfs = typecacheof(list(
/turf/open/space,
/turf/open/chasm,
/turf/open/lava,
/turf/open/openspace))

/obj/structure/spreading/proc/expand(bypasscooldown = FALSE)
if(!can_expand)
return

if(!bypasscooldown)
last_expand = world.time + expand_cooldown

var/turf/U = get_turf(src)
if(is_type_in_typecache(U, blacklisted_turfs))
qdel(src)
return FALSE

var/list/spread_turfs = U.GetAtmosAdjacentTurfs()
shuffle_inplace(spread_turfs)
for(var/turf/T in spread_turfs)
if(locate(/obj/structure/spreading) in T)
var/obj/structure/spreading/S = locate(/obj/structure/spreading) in T
if(S.type != type) //if it is not another of the same spreading structure.
S.take_damage(conflict_damage, BRUTE, "melee", 1)
break
last_expand += (0.6 SECONDS) //if you encounter another of the same then the delay increases
continue

if(is_type_in_typecache(T, blacklisted_turfs))
continue

new type(T)
break
return TRUE
93 changes: 93 additions & 0 deletions ModularTegustation/lc13_spawners.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/* LoR13 Lootspawners
Dependant on the spawners lootdrop.dm and any file the contents may belong in. */
/obj/effect/spawner/lootdrop/chaotic_random
name = "chaotic random"
lootcount = 3
lootdoubles = TRUE
/* Uses pickweight chances. Higher is more likely. May change this later on
because due to the nature of pickweight. If you had one item that had 1000 chance
and one item with 100 chance you would have a 1/11 chance of getting the rarer item.
if you had 3 of the 1000 chance items that would then become a 1/31 chance since the
total is the max amount of chances... */
loot = list(
//Medical
/obj/item/stack/medical/aloe = 1,
/obj/item/stack/medical/suture/emergency = 1,
/obj/item/stack/medical/suture = 1,
//Money
/obj/item/storage/wallet/random = 1,
/obj/item/stack/spacecash/c1 = 1,
//Misc
/obj/item/organ/liver/fly = 1,
/obj/item/storage/book = 1,
/obj/item/lipstick/random = 1,
/obj/item/kitchen/knife/shiv = 1,
/obj/item/toy/plush/lizardplushie = 1,
/obj/item/toy/plush/blank = 1,
/obj/item/bedsheet/dorms = 1,
//Food
/obj/item/food/deadmouse = 1,
/obj/item/food/egg = 1,
/obj/item/food/boiledegg = 1,
/obj/item/food/honeybar = 1,
/obj/item/food/soup/stew = 1,
/obj/item/food/chewable/gumball = 1,
/obj/item/food/branrequests = 1,
/obj/item/food/tinychocolate = 1,
/obj/item/food/canned/peaches = 1,
/obj/item/food/canned/beans = 1,
/obj/item/storage/cans/sixsoda = 1,
/obj/item/storage/cans/sixbeer = 1,
/obj/item/food/candy = 1,
)

//Pseudo Group Spawners
/obj/effect/spawner/scatter/shrimp
name = "shrimp squad spawn"
max_spawns = 5
loot_table = list(/mob/living/simple_animal/hostile/shrimp = 1,
/mob/living/simple_animal/hostile/shrimp_soldier = 1)

// Dependant on step_triggers.dm
/obj/effect/step_trigger/place_atom
mobs_only = TRUE
//If we only trigger on creatures that have a C.key
var/ckey_only = FALSE
/* In the map editor just copy paste the type path of the thing.
If you edit the atom_path variable in the map editor then
If anything happens to that mob code you will need to change it
in the map editor.*/
var/atom_path
var/atom_rename
var/spawn_flavor_text
var/happens_once = TRUE
//Cords are offset from current position.
var/spawn_dist_x = 0
var/spawn_dist_y = 0

/obj/effect/step_trigger/place_atom/Trigger(atom/movable/A)
//This code might be a bit sloppy. -IP
if(ismob(A))
var/mob/M = A
if(ckey_only && !M.client)
return

//Remotely finds the turf where we spawn the thing.
var/checkturf = get_turf(locate(x + spawn_dist_x, y + spawn_dist_y, z))
if(checkturf)
CreateThing(checkturf)
if(happens_once)
qdel(src)

/obj/effect/step_trigger/place_atom/proc/CreateThing(turf/T)
if(atom_path)
var/atom/movable/M = new atom_path(T)
//The thing has somehow failed to spawn.
if(!M)
return
//TECHNICALLY you could spawn a single turf with this? -IP
if(atom_rename && !iseffect(M))
M.name = atom_rename
if(spawn_flavor_text)
M.visible_message("<span class='danger'>[M] [spawn_flavor_text].</span>")
return M
73 changes: 73 additions & 0 deletions ModularTegustation/lc13_structures.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/* Spreading Structures Code
Stolen and edited from alien weed code. I wanted a spreading
structure that doesnt have the atmospheric element attached to its root. */
/obj/structure/spreading
name = "spreading structure"
desc = "This thing seems to spread when supplied with a outside signal."
max_integrity = 15
anchored = TRUE
density = FALSE
layer = TURF_LAYER
plane = FLOOR_PLANE
var/conflict_damage = 10
var/last_expand = 0 //last world.time this weed expanded
var/expand_cooldown = 1.5 SECONDS
var/can_expand = TRUE
var/static/list/blacklisted_turfs

/obj/structure/spreading/Initialize()
. = ..()

if(!blacklisted_turfs)
blacklisted_turfs = typecacheof(list(
/turf/open/space,
/turf/open/chasm,
/turf/open/lava,
/turf/open/openspace))

/obj/structure/spreading/proc/expand(bypasscooldown = FALSE)
if(!can_expand)
return

if(!bypasscooldown)
last_expand = world.time + expand_cooldown

var/turf/U = get_turf(src)
if(is_type_in_typecache(U, blacklisted_turfs))
qdel(src)
return FALSE

var/list/spread_turfs = U.GetAtmosAdjacentTurfs()
shuffle_inplace(spread_turfs)
for(var/turf/T in spread_turfs)
if(locate(/obj/structure/spreading) in T)
var/obj/structure/spreading/S = locate(/obj/structure/spreading) in T
if(S.type != type) //if it is not another of the same spreading structure.
S.take_damage(conflict_damage, BRUTE, "melee", 1)
break
last_expand += (0.6 SECONDS) //if you encounter another of the same then the delay increases
continue

if(is_type_in_typecache(T, blacklisted_turfs))
continue

new type(T)
break
return TRUE

//Cosmetic Structures
/obj/structure/cavein_floor
name = "blocked off floor entrance"
desc = "An entrance to some underground facility that has been caved in."
icon = 'ModularTegustation/Teguicons/lc13_structures.dmi'
icon_state = "cavein_floor"
anchored = TRUE

/obj/structure/cavein_door
name = "blocked off facility entrance"
desc = "A entrance to somewhere that has been blocked off with rubble."
icon = 'ModularTegustation/Teguicons/32x48.dmi'
icon_state = "cavein_door"
pixel_y = -8
base_pixel_y = -8
anchored = TRUE
2 changes: 1 addition & 1 deletion ModularTegustation/tegu_clothes_code/tegu_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
desc = "It's a green jumpsuit with some gold markings denoting the rank of \"Rear Admiral\"."
icon = 'icons/obj/clothing/under/centcom.dmi'
worn_icon = 'icons/mob/clothing/under/centcom.dmi'
icon_state = "centcom"
icon_state = "officer"
inhand_icon_state = "dg_suit"

/obj/item/clothing/suit/armor/vest/officer
Expand Down
135 changes: 135 additions & 0 deletions ModularTegustation/tegu_items/associations/cityspawners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,138 @@
/obj/effect/landmark/distortion
name = "distortion landmark"
icon_state = "x"

//Cratespawners
/obj/effect/landmark/cratespawn
name = "noncorpo cratespawn landmark"
icon = 'ModularTegustation/Teguicons/refiner.dmi'
icon_state = "randomcrate"
var/list/rngcrates = list(
/obj/structure/lootcrate/limbus,
/obj/structure/lootcrate/workshopleaf,
/obj/structure/lootcrate/workshopallas,
/obj/structure/lootcrate/workshoprosespanner,
/obj/structure/lootcrate/backstreets,
/obj/structure/lootcrate/jcorp,
/obj/structure/lootcrate/limbus,
)

/obj/effect/landmark/cratespawn/Initialize()
. = ..()
var/selected_crate = pick(rngcrates)
new selected_crate (get_turf(src))

/obj/effect/landmark/cratespawn/corpo
name = "corporate cratespawn landmark"
rngcrates = list(
/obj/structure/lootcrate/k_corp,
/obj/structure/lootcrate/s_corp,
/obj/structure/lootcrate/r_corp,
/obj/structure/lootcrate/w_corp,)


//City enemy spawners
//Everything below this is shitcode.
//To-Do: Deshit this
GLOBAL_VAR_INIT(city_west_enemies, FALSE)
GLOBAL_VAR_INIT(city_center_enemies, FALSE)
GLOBAL_VAR_INIT(city_east_enemies, FALSE)

/obj/effect/landmark/backstreetspawn
name = "cityspawn landmark"
icon_state = "x"
var/list/enemytypes = list(
"gcorp",
"sweeper",
"bots"
)

/obj/effect/landmark/backstreetspawn/Initialize()
. = ..()
if(!GLOB.city_center_enemies)
GLOB.city_center_enemies = pick(enemytypes)
var/spawning
switch(GLOB.city_center_enemies)
if("gcorp")
spawning = /mob/living/simple_animal/hostile/ordeal/steel_dawn
if(prob(30))
spawning = /mob/living/simple_animal/hostile/ordeal/steel_dawn/steel_noon

if("sweeper")
spawning = /mob/living/simple_animal/hostile/ordeal/indigo_noon
if(prob(30))
spawning = /mob/living/simple_animal/hostile/ordeal/indigo_dawn

if("bots")
spawning = /mob/living/simple_animal/hostile/ordeal/green_bot
if(prob(30))
spawning = /mob/living/simple_animal/hostile/ordeal/green_bot_big
new spawning(get_turf(src))




/obj/effect/landmark/backstreetspawnwest
name = "cityspawn landmark"
icon_state = "x2"
var/list/enemytypes = list(
"gcorp",
"sweeper",
"bots"
)

/obj/effect/landmark/backstreetspawnwest/Initialize()
. = ..()
if(!GLOB.city_west_enemies)
GLOB.city_west_enemies = pick(enemytypes)

var/spawning
switch(GLOB.city_west_enemies)
if("gcorp")
spawning = /mob/living/simple_animal/hostile/ordeal/steel_dawn
if(prob(30))
spawning = /mob/living/simple_animal/hostile/ordeal/steel_dawn/steel_noon

if("sweeper")
spawning = /mob/living/simple_animal/hostile/ordeal/indigo_noon
if(prob(30))
spawning = /mob/living/simple_animal/hostile/ordeal/indigo_dawn

if("bots")
spawning = /mob/living/simple_animal/hostile/ordeal/green_bot
if(prob(30))
spawning = /mob/living/simple_animal/hostile/ordeal/green_bot_big
new spawning(get_turf(src))


/obj/effect/landmark/backstreetspawneast
name = "cityspawn landmark"
icon_state = "x3"
var/list/enemytypes = list(
"gcorp",
"sweeper",
"bots"
)

/obj/effect/landmark/backstreetspawneast/Initialize()
. = ..()
if(!GLOB.city_east_enemies)
GLOB.city_east_enemies = pick(enemytypes)
var/spawning
switch(GLOB.city_east_enemies)
if("gcorp")
spawning = /mob/living/simple_animal/hostile/ordeal/steel_dawn
if(prob(30))
spawning = /mob/living/simple_animal/hostile/ordeal/steel_dawn/steel_noon

if("sweeper")
spawning = /mob/living/simple_animal/hostile/ordeal/indigo_noon
if(prob(30))
spawning = /mob/living/simple_animal/hostile/ordeal/indigo_dawn

if("bots")
spawning = /mob/living/simple_animal/hostile/ordeal/green_bot
if(prob(30))
spawning = /mob/living/simple_animal/hostile/ordeal/green_bot_big
new spawning(get_turf(src))

Loading

0 comments on commit a28d2e9

Please sign in to comment.