mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 22:17:32 +01:00
Glass now changes color when built based on the area, map fixes
This commit is contained in:
@@ -1,54 +0,0 @@
|
||||
var/global/wcBrig
|
||||
var/global/wcBar
|
||||
var/global/wcCommon
|
||||
|
||||
//for all window/New and door/window/New
|
||||
/proc/color_windows(area = "common")
|
||||
var/list/common = list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8fcf44", "#ffffff")
|
||||
if(!wcCommon)
|
||||
wcCommon = pick(common)
|
||||
return wcCommon
|
||||
|
||||
//This func called in master-controller, replaces color in some area
|
||||
/proc/color_windows_init()
|
||||
var/list/brig = list("#aa0808", "#7f0606", "#ff0000")
|
||||
var/list/bar = list("#0d8395", "#58b5c3", "#58c366", "#90d79a", "#ffffff")
|
||||
|
||||
wcBrig = pick(brig)
|
||||
wcBar = pick(bar)
|
||||
|
||||
//BRIG
|
||||
var/wsBrigList = list(
|
||||
/area/security/brig,
|
||||
/area/security/detectives_office,
|
||||
/area/security/hos,
|
||||
/area/security/lobby,
|
||||
/area/security/main,
|
||||
/area/security/prison,
|
||||
/area/security/warden,
|
||||
/area/security/range,
|
||||
/area/prison/cell_block/A,
|
||||
/area/prison/cell_block/B,
|
||||
/area/prison/cell_block/C,
|
||||
/area/security/prison/cell_block/A,
|
||||
/area/security/prison/cell_block/B,
|
||||
/area/security/prison/cell_block/C,
|
||||
/area/security/processing,
|
||||
/area/security/armoury,
|
||||
/area/security/securearmoury,
|
||||
/area/security/podbay,
|
||||
/area/security/securehallway,
|
||||
/area/security/medbay
|
||||
)
|
||||
|
||||
for(var/A in wsBrigList)
|
||||
for(var/obj/structure/window/W in locate(A))
|
||||
W.color = wcBrig
|
||||
for(var/obj/machinery/door/window/D in locate(A))
|
||||
D.color = wcBrig
|
||||
|
||||
//BAR
|
||||
for(var/obj/structure/window/W in locate(/area/crew_quarters/bar))
|
||||
W.color = wcBar
|
||||
for(var/obj/machinery/door/window/D in locate(/area/crew_quarters/bar))
|
||||
D.color = wcBar
|
||||
@@ -726,19 +726,23 @@ var/list/ghostteleportlocs = list()
|
||||
icon_state = "dk_yellow"
|
||||
|
||||
/area/prison/solitary
|
||||
name = "Solitary Confinement"
|
||||
name = "\improper Solitary Confinement"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/prison/cell_block
|
||||
name = "\improper Prison Cell Block"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/prison/cell_block/A
|
||||
name = "Prison Cell Block A"
|
||||
name = "\improper Prison Cell Block A"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/prison/cell_block/B
|
||||
name = "Prison Cell Block B"
|
||||
name = "\improper Prison Cell Block B"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/prison/cell_block/C
|
||||
name = "Prison Cell Block C"
|
||||
name = "\improper Prison Cell Block C"
|
||||
icon_state = "brig"
|
||||
|
||||
//STATION13
|
||||
@@ -1036,11 +1040,11 @@ var/list/ghostteleportlocs = list()
|
||||
name = "\improper Magistrate's Office"
|
||||
icon_state = "law"
|
||||
|
||||
area/clownoffice
|
||||
/area/clownoffice
|
||||
name = "\improper Clown's Office"
|
||||
icon_state = "dk_yellow"
|
||||
|
||||
area/mimeoffice
|
||||
/area/mimeoffice
|
||||
name = "\improper Mime's Office"
|
||||
icon_state = "dk_yellow"
|
||||
|
||||
@@ -1408,35 +1412,59 @@ area/mimeoffice
|
||||
/area/security/brig
|
||||
name = "\improper Brig"
|
||||
icon_state = "brig"
|
||||
|
||||
|
||||
/area/security/permabrig
|
||||
name = "\improper Prison Wing"
|
||||
icon_state = "sec_prison"
|
||||
|
||||
/area/security/prison
|
||||
name = "\improper Prison Wing"
|
||||
icon_state = "sec_prison"
|
||||
icon_state = "sec_prison"
|
||||
|
||||
/area/security/prison/cell_block
|
||||
name = "\improper Prison Cell Block"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/security/prison/cell_block/A
|
||||
name = "Prison Cell Block A"
|
||||
name = "\improper Prison Cell Block A"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/security/prison/cell_block/B
|
||||
name = "Prison Cell Block B"
|
||||
name = "\improper Prison Cell Block B"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/security/prison/cell_block/C
|
||||
name = "Prison Cell Block C"
|
||||
name = "\improper Prison Cell Block C"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/security/execution
|
||||
name = "\improper Execution"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/processing
|
||||
name = "\improper Prisoner Processing"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/interrogation
|
||||
name = "\improper Interrogation"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/interrogationobs
|
||||
name = "\improper Interrogation Observation"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/evidence
|
||||
name = "\improper Evidence Room"
|
||||
icon_state = "security"
|
||||
|
||||
/area/security/prisonlockers
|
||||
name = "\improper Prisoner Lockers"
|
||||
icon_state = "sec_prison"
|
||||
|
||||
/area/security/medbay
|
||||
name = "\improper Security Medbay"
|
||||
icon_state = "brig"
|
||||
|
||||
/area/security/processing
|
||||
name = "\improper Prisoner Processing"
|
||||
icon_state = "sec_prison"
|
||||
|
||||
/area/security/warden
|
||||
name = "\improper Security Medbay"
|
||||
icon_state = "Warden"
|
||||
|
||||
/area/security/warden
|
||||
name = "\improper Warden"
|
||||
icon_state = "Warden"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon = 'icons/obj/doors/windoor.dmi'
|
||||
icon_state = "left"
|
||||
var/base_state = "left"
|
||||
var/health = 150.0 //If you change this, consiter changing ../door/window/brigdoor/ health at the bottom of this .dm file
|
||||
var/health = 150.0 //If you change this, consider changing ../door/window/brigdoor/ health at the bottom of this .dm file
|
||||
visible = 0.0
|
||||
use_power = 0
|
||||
flags = ON_BORDER
|
||||
@@ -28,7 +28,7 @@
|
||||
src.icon_state = "[src.icon_state]"
|
||||
src.base_state = src.icon_state
|
||||
|
||||
color = color_windows()
|
||||
color = color_windows(src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/window/Destroy()
|
||||
|
||||
@@ -1,3 +1,39 @@
|
||||
//This proc is called in master-controller, and updates the color of all windows and windoors on the map
|
||||
var/global/wcBar
|
||||
var/global/wcBrig
|
||||
var/global/wcCommon
|
||||
|
||||
/proc/color_windows_init()
|
||||
var/list/bar = list("#0d8395", "#58b5c3", "#58c366", "#90d79a", "#ffffff")
|
||||
var/list/brig = list("#aa0808", "#7f0606", "#ff0000")
|
||||
var/list/common = list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8fcf44", "#ffffff")
|
||||
|
||||
wcBar = pick(bar)
|
||||
wcBrig = pick(brig)
|
||||
wcCommon = pick(common)
|
||||
|
||||
/obj/proc/color_windows(var/obj/W as obj)
|
||||
var/list/wcBarAreas = list(/area/crew_quarters/bar)
|
||||
var/list/wcBrigAreas = list(/area/security,/area/security/main,/area/security/lobby,/area/security/brig,/area/security/permabrig,/area/security/prison,/area/security/prison/cell_block/A,/area/security/prison/cell_block/B,/area/security/prison/cell_block/C,/area/security/execution,/area/security/processing,/area/security/interrogation,/area/security/interrogationobs,/area/security/evidence,/area/security/prisonlockers,/area/security/medbay,/area/security/processing,/area/security/warden,/area/security/armoury,/area/security/securearmoury,/area/security/armoury/gamma,/area/security/securehallway,/area/security/hos,/area/security/podbay,/area/security/detectives_office,/area/security/range,/area/security/nuke_storage,/area/security/checkpoint,/area/security/checkpoint2,/area/security/checkpoint2,/area/security/checkpoint/supply,/area/security/checkpoint/engineering,/area/security/checkpoint/medical,/area/security/checkpoint/science,/area/security/vacantoffice,/area/security/vacantoffice2,/area/prison,/area/prison/arrival_airlock,/area/prison/control,/area/prison/crew_quarters,/area/prison/rec_room,/area/prison/closet,/area/prison/hallway/fore,/area/prison/hallway/aft,/area/prison/hallway/port,/area/prison/hallway/starboard,/area/prison/morgue,/area/prison/medical_research,/area/prison/medical,/area/prison/solar,/area/prison/podbay,/area/prison/solar_control,/area/prison/solitary,/area/prison/cell_block,/area/prison/cell_block/A,/area/prison/cell_block/B,/area/prison/cell_block/C)
|
||||
|
||||
sleep(25) // Sleeping to make sure the glass has initialized on the map
|
||||
|
||||
var/newcolor
|
||||
for(var/A in wcBarAreas)
|
||||
if(W.areaMaster == locate(A))
|
||||
newcolor = wcBar
|
||||
break
|
||||
|
||||
for(var/A in wcBrigAreas)
|
||||
if(W.areaMaster == locate(A))
|
||||
newcolor = wcBrig
|
||||
break
|
||||
|
||||
if(!newcolor)
|
||||
newcolor = wcCommon
|
||||
|
||||
return newcolor
|
||||
|
||||
/obj/structure/window
|
||||
name = "window"
|
||||
desc = "A window."
|
||||
@@ -18,9 +54,8 @@
|
||||
var/sheets = 1 // Number of sheets needed to build this window (determines how much shit is spawned by destroy())
|
||||
// var/silicate = 0 // number of units of silicate
|
||||
// var/icon/silicateIcon = null // the silicated icon
|
||||
|
||||
|
||||
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
//Tasers and the like should not damage windows.
|
||||
if(Proj.damage_type == HALLOSS)
|
||||
return
|
||||
@@ -338,31 +373,14 @@
|
||||
silicateIcon = I
|
||||
*/
|
||||
|
||||
|
||||
/obj/structure/window/New(Loc,re=0)
|
||||
..()
|
||||
|
||||
// if(re) reinf = re
|
||||
|
||||
ini_dir = dir
|
||||
/* if(reinf)
|
||||
icon_state = "rwindow"
|
||||
desc = "A reinforced window."
|
||||
name = "reinforced window"
|
||||
state = 2*anchored
|
||||
health = 40
|
||||
if(opacity)
|
||||
icon_state = "twindow"
|
||||
else
|
||||
icon_state = "window"*/
|
||||
|
||||
color = color_windows()
|
||||
color = color_windows(src)
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
update_nearby_icons()
|
||||
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/window/Destroy()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
@@ -479,6 +497,4 @@
|
||||
desc = "It looks rather strong and frosted over. Looks like it might take a few less hits then a normal reinforced window."
|
||||
icon_state = "fwindow"
|
||||
basestate = "fwindow"
|
||||
health = 30
|
||||
|
||||
|
||||
health = 30
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/datum/event/prison_break/start()
|
||||
for(var/area/A in world)
|
||||
if(istype(A, /area/security/prison) || istype(A, /area/security/brig) || istype(A, /area/prison) || istype(A, /area/security/lobby))
|
||||
if(istype(A, /area/security/prison) || istype(A, /area/security/brig) || istype(A, /area/prison) || istype(A, /area/security/permabrig) || istype(A, /area/security/prisonlockers) || istype(A, /area/security/lobby) || istype(A, /area/security/processing))
|
||||
prisonAreas += A
|
||||
|
||||
if(prisonAreas && prisonAreas.len > 0)
|
||||
|
||||
Reference in New Issue
Block a user