Skip to content

Commit

Permalink
Merge branch 'garrow-fixes-2' of https://github.com/DexterDude/PvE-CM…
Browse files Browse the repository at this point in the history
…SS13 into garrow-fixes-2
  • Loading branch information
DexterDude committed Jul 28, 2024
2 parents 1e7009c + 17821cb commit f085353
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 16 deletions.
11 changes: 0 additions & 11 deletions code/controllers/subsystem/techtree.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,6 @@ SUBSYSTEM_DEF(techtree)
var/datum/space_level/zpos = SSmapping.add_new_zlevel(tree.name, list(ZTRAIT_TECHTREE))
tree.zlevel = zpos

var/zlevel = zpos.z_value
var/turf/z_min = locate(1, 1, zlevel)
var/turf/z_max = locate(world.maxx, world.maxy, zlevel)



for(var/t in block(z_min, z_max))
var/turf/Tu = t
Tu.ChangeTurf(/turf/closed/void, list(/turf/closed/void))
new /area/techtree(Tu)

for(var/tier in tree.tree_tiers)
tree.unlocked_techs += tier
tree.all_techs += tier
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/structures/fence.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
desc = "A large metal mesh strewn between two poles. Intended as a cheap way to separate areas, while allowing one to see through it."
icon = 'icons/obj/structures/props/fence.dmi'
icon_state = "fence0"
throwpass = TRUE
density = TRUE
anchored = TRUE
layer = WINDOW_LAYER
Expand Down
6 changes: 6 additions & 0 deletions code/modules/admin/banjob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ WARNING!*/
else
jobs += "<td width='20%'><a href='?src=\ref[src];[HrefToken(forceGlobal = TRUE)];jobban3=Emergency Response Team;jobban4=\ref[M]'>Emergency Response Team</a></td>"

//Freed Mobs
if(jobban_isbanned(M, "Freed Mob", P) || isbanned_dept)
jobs += "<td width='20%'><a href='?src=\ref[src];[HrefToken(forceGlobal = TRUE)];jobban3=Freed Mob;jobban4=\ref[M]'><font color=red>Freed Mob</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];[HrefToken(forceGlobal = TRUE)];jobban3=Freed Mob;jobban4=\ref[M]'>Freed Mob</a></td>"

//Survivor
if(jobban_isbanned(M, "Survivor", P) || isbanned_dept)
jobs += "<td width='20%'><a href='?src=\ref[src];[HrefToken(forceGlobal = TRUE)];jobban3=Survivor;jobban4=\ref[M]'><font color=red>Survivor</font></a></td>"
Expand Down
18 changes: 13 additions & 5 deletions code/modules/cm_tech/techtree.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,24 @@
if(longest_tier < tier_length)
longest_tier = tier_length

// Clear out the area
for(var/t in block(locate(1, 1, zlevel.z_value), locate(longest_tier * 2 + 1, length(all_techs) * 3 + 1, zlevel.z_value)))
// Clear out and create the area
// (The `+ 2` on both of these is 1 for a buffer tile, and 1 for the outer `/turf/closed/void`.)
var/area_max_x = longest_tier * 2 + 2
var/area_max_y = length(all_techs) * 3 + 2
for(var/t in block(locate(1, 1, zlevel.z_value), locate(area_max_x, area_max_y, zlevel.z_value)))
var/turf/pos = t
for(var/A in pos)
qdel(A)

pos.ChangeTurf(/turf/open/blank)
pos.color = "#000000"

if(pos.x == area_max_x || pos.y == area_max_y)
// The turfs around the edge are closed.
pos.ChangeTurf(/turf/closed/void)
else
pos.ChangeTurf(/turf/open/blank)
pos.color = "#000000"
new /area/techtree(pos)

// Create the tech nodes
var/y_offset = 1
for(var/tier in all_techs)
var/tier_length = length(all_techs[tier])
Expand Down
8 changes: 8 additions & 0 deletions code/modules/mob/dead/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
to_chat(src, SPAN_WARNING("The game hasn't started yet!"))
return

if(jobban_isbanned(src, "Freed Mob"))
to_chat(src, SPAN_WARNING("You are banned from being able to join as a freed mob."))
return

var/list/mobs_by_role = list() // the list the mobs are assigned to first, for sorting purposes
for(var/mob/freed_mob as anything in GLOB.freed_mob_list)
var/role_name = freed_mob.get_role_name()
Expand All @@ -1059,6 +1063,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!istype(freed_mob) || !(freed_mob in GLOB.freed_mob_list))
return

if(jobban_isbanned(src, "Freed Mob"))
to_chat(src, SPAN_WARNING("You are banned from being able to join as a freed mob."))
return

if(QDELETED(freed_mob) || freed_mob.client)
GLOB.freed_mob_list -= freed_mob
to_chat(src, SPAN_WARNING("Something went wrong."))
Expand Down
5 changes: 5 additions & 0 deletions html/changelogs/archive/2024-07.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@
Doubleumc:
- bugfix: sounds & motion detectors should be more reliable
- rscdel: Removed automatic end of round vote and reboot
2024-07-25:
Doubleumc:
- code_imp: Made the Tech Tree subsystem initialise faster.
Zonespace27:
- admin: Added freed mob bans to the jobban panel.

0 comments on commit f085353

Please sign in to comment.