From 0e222e838ff3b279b616ae7982a73901465a3554 Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Tue, 27 Dec 2011 19:53:02 -0500 Subject: [PATCH 1/5] replaced "toggle pregame music" with button in pregame screen that saves between games --- code/game/verbs/sound.dm | 6 +++--- code/modules/mob/new_player/new_player.dm | 20 ++++++++++++++++++-- code/modules/mob/new_player/preferences.dm | 2 ++ code/modules/mob/new_player/savefile.dm | 2 ++ 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/code/game/verbs/sound.dm b/code/game/verbs/sound.dm index c2ae2911c6f..3dfca9c3926 100644 --- a/code/game/verbs/sound.dm +++ b/code/game/verbs/sound.dm @@ -15,8 +15,7 @@ M << "You will now [M.client.midis? "start":"stop"] receiving any sounds uploaded by admins[M.client.midis? "":", and any current midis playing have been disabled"]." return - - +/* why is something that only is usable in the lobby a mob verb? /mob/verb/toggletitlemusic() set category = "Special Verbs" set name = "Toggle Pregame Music" @@ -28,4 +27,5 @@ if(M.client) M << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // stop the jamsz - return \ No newline at end of file + return +*/ diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 0b53cb3e76b..3c76a1a74db 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -21,8 +21,6 @@ mind.key = key mind.current = src - spawn() Playmusic() // git some tunes up in heeyaa~ - var/starting_loc = pick(newplayer_start) if(!starting_loc) starting_loc = locate(1,1,1) loc = starting_loc @@ -47,6 +45,9 @@ preferences.lastchangelog = lastchangelog preferences.savefile_save(src, 1) + if(preferences.pregame_music) + spawn() Playmusic() // git some tunes up in heeyaa~ + new_player_panel() //PDA Resource Initialisation =======================================================> /* @@ -125,6 +126,8 @@ output += "
Observe
" + output += "
Lobby Music
" + src << browse(output,"window=playersetup;size=250x233;can_close=0") return @@ -143,6 +146,9 @@ src << sound(ticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS + proc/Stopmusic() + src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // stop the jamsz + Stat() ..() @@ -208,6 +214,16 @@ del(src) return 1 + if(href_list["pregame_music"]) + preferences.pregame_music = !preferences.pregame_music + if(preferences.pregame_music) + Playmusic() + else + Stopmusic() + // only save this 1 pref, so current slot doesn't get saved w/o user's knowledge + var/savefile/F = new(preferences.savefile_path(src)) + F["pregame_music"] << preferences.pregame_music + if(href_list["late_join"]) LateChoices() diff --git a/code/modules/mob/new_player/preferences.dm b/code/modules/mob/new_player/preferences.dm index 6d909395bda..049866093b7 100644 --- a/code/modules/mob/new_player/preferences.dm +++ b/code/modules/mob/new_player/preferences.dm @@ -52,6 +52,8 @@ datum/preferences be_special = 0 //Play admin midis midis = 1 + //Play pregame music + pregame_music = 1 //Saved changlog filesize to detect if there was a change lastchangelog = 0 diff --git a/code/modules/mob/new_player/savefile.dm b/code/modules/mob/new_player/savefile.dm index 72b7b2a6868..17f6d826cb2 100644 --- a/code/modules/mob/new_player/savefile.dm +++ b/code/modules/mob/new_player/savefile.dm @@ -134,6 +134,7 @@ datum/preferences/proc/savefile_save(mob/user, slot) F["be_special"] << src.be_special F["UI"] << src.UI F["midis"] << src.midis + F["pregame_music"] << src.pregame_music F["ooccolor"] << src.ooccolor F["lastchangelog"] << src.lastchangelog @@ -193,6 +194,7 @@ datum/preferences/proc/savefile_load(mob/user, slot) F["underwear"] >> src.underwear F["name_is_always_random"] >> src.be_random_name F["midis"] >> src.midis + F["pregame_music"] >> src.pregame_music F["ooccolor"] >> src.ooccolor F["lastchangelog"] >> src.lastchangelog F["UI"] >> src.UI From 5cce8c0a89ee145144ac752c13e10031cd9a02cf Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Tue, 27 Dec 2011 21:34:00 -0500 Subject: [PATCH 2/5] fixed cib's map change, you can't use the editor's object stepping, it breaks ss13! --- maps/tgstation.2.0.8.dmm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/maps/tgstation.2.0.8.dmm b/maps/tgstation.2.0.8.dmm index 4a4c4e2e6f5..7d8e7b72d79 100644 --- a/maps/tgstation.2.0.8.dmm +++ b/maps/tgstation.2.0.8.dmm @@ -4961,7 +4961,7 @@ "bRu" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; pixel_y = 0; tag = "Streight"},/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) "bRv" = (/obj/machinery/atmospherics/portables_connector{dir = 2; name = "Gas Input"},/obj/machinery/light{dir = 1},/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) "bRw" = (/obj/structure/reagent_dispensers/fueltank,/turf/simulated/floor{icon_state = "floorgrime"},/area/maintenance/incinerator) -"bRx" = (/obj/structure/table,/obj/item/device/radio/intercom{pixel_x = -25},/obj/item/weapon/virusdish/random{pixel_x = -6; pixel_y = 5},/obj/item/weapon/virusdish/random{step_x = 3; step_y = 2},/obj/item/weapon/virusdish/random,/turf/simulated/floor{icon_state = "white"},/area/medical/virology) +"bRx" = (/obj/structure/table,/obj/item/device/radio/intercom{pixel_x = -25},/obj/item/weapon/virusdish/random{pixel_x = -6; pixel_y = 5},/obj/item/weapon/virusdish/random{pixel_x = 3; pixel_y = 2; step_x = 0; step_y = 0},/obj/item/weapon/virusdish/random,/turf/simulated/floor{icon_state = "white"},/area/medical/virology) "bRy" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor{icon_state = "white"},/area/medical/virology) "bRz" = (/obj/machinery/disposal,/obj/structure/disposalpipe/trunk{dir = 4},/turf/simulated/floor{icon_state = "white"},/area/medical/virology) "bRA" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/structure/disposalpipe/segment{dir = 2; icon_state = "pipe-c"},/turf/simulated/floor/plating,/area/medical/virology) @@ -5537,7 +5537,7 @@ "ccy" = (/obj/effect/landmark/start,/turf/unsimulated/floor,/area/start) "ccz" = (/turf/unsimulated/wall{icon = 'icons/misc/fullscreen.dmi'; icon_state = "title"; name = "Space Station 13"},/area/start) "ccA" = (/turf/space,/turf/simulated/shuttle/wall{dir = 8; icon_state = "diagonalWall3"},/area/syndicate_mothership) -"ccB" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/syndicate_mothership) +"ccB" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/syndicate_mothership) "ccC" = (/turf/simulated/shuttle/wall{icon_state = "wall3"},/area/syndicate_mothership) "ccD" = (/turf/space,/turf/simulated/shuttle/wall{dir = 8; icon_state = "diagonalWall3"},/area/shuttle/syndicate_elite/mothership) "ccE" = (/obj/structure/shuttle/engine/propulsion{tag = "icon-propulsion_r (NORTH)"; icon_state = "propulsion_r"; dir = 1},/turf/space,/area/shuttle/syndicate_elite/mothership) @@ -5609,8 +5609,8 @@ "cdS" = (/obj/structure/table,/turf/unsimulated/floor{icon = 'shuttle.dmi'; icon_state = "floor4"},/area/syndicate_station/start) "cdT" = (/turf/unsimulated/wall,/area/centcom) "cdU" = (/obj/effect/landmark{name = "Nuclear-Closet"},/turf/unsimulated/floor{icon = 'shuttle.dmi'; icon_state = "floor4"},/area/syndicate_station/start) -"cdV" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "External Airlock"},/area) -"cdW" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom) +"cdV" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "External Airlock"},/area) +"cdW" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom) "cdX" = (/turf/unsimulated/floor{tag = "icon-warnplate (WEST)"; icon_state = "warnplate"; dir = 8},/area/centcom) "cdY" = (/turf/unsimulated/floor{name = "plating"},/area/centcom) "cdZ" = (/obj/structure/stool/chair{dir = 4},/turf/unsimulated/floor{icon = 'shuttle.dmi'; icon_state = "floor4"},/area/syndicate_station/start) @@ -5672,7 +5672,7 @@ "cfd" = (/turf/unsimulated/floor{tag = "icon-warnplate (WEST)"; icon_state = "warnplate"; dir = 8},/area/centcom/suppy) "cfe" = (/turf/unsimulated/floor{name = "plating"},/area/centcom/suppy) "cff" = (/turf/unsimulated/floor{tag = "icon-warnplate (EAST)"; icon_state = "warnplate"; dir = 4},/area/centcom/suppy) -"cfg" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom/suppy) +"cfg" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom/suppy) "cfh" = (/obj/machinery/sleeper{icon_state = "sleeper_0-r"; orient = "RIGHT"},/turf/unsimulated/floor{icon = 'shuttle.dmi'; icon_state = "floor3"},/area/syndicate_station/start) "cfi" = (/obj/effect/landmark{name = "Syndicate-Spawn"},/turf/unsimulated/floor{icon = 'shuttle.dmi'; icon_state = "floor3"},/area/syndicate_station/start) "cfj" = (/turf/unsimulated/floor{icon = 'shuttle.dmi'; icon_state = "floor3"},/area/syndicate_station/start) @@ -5689,7 +5689,7 @@ "cfu" = (/obj/structure/table,/obj/machinery/juicer{pixel_y = 6},/turf/unsimulated/floor{tag = "icon-redyellowfull"; icon_state = "redyellowfull"},/area/centcom/living) "cfv" = (/obj/machinery/door/airlock/external,/turf/unsimulated/floor{name = "plating"},/area/centcom/living) "cfw" = (/turf/unsimulated/floor{name = "plating"},/area/centcom/living) -"cfx" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom/living) +"cfx" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom/living) "cfy" = (/turf/simulated/shuttle/wall{tag = "icon-swall_s6"; icon_state = "swall_s6"; dir = 2},/area/supply/dock) "cfz" = (/turf/simulated/shuttle/wall{tag = "icon-swall12"; icon_state = "swall12"; dir = 2},/area/supply/dock) "cfA" = (/turf/simulated/shuttle/wall{tag = "icon-swall_s10"; icon_state = "swall_s10"; dir = 2},/area/supply/dock) @@ -6061,7 +6061,7 @@ "cmC" = (/turf/simulated/shuttle/floor,/area/shuttle/escape/centcom) "cmD" = (/obj/structure/stool/chair{dir = 4},/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/escape/centcom) "cmE" = (/obj/machinery/computer/security,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/escape/centcom) -"cmF" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom/ferry) +"cmF" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/area/centcom/ferry) "cmG" = (/turf/unsimulated/floor{tag = "icon-warnplate (WEST)"; icon_state = "warnplate"; dir = 8},/area/centcom/ferry) "cmH" = (/turf/unsimulated/floor{name = "plating"},/area/centcom/ferry) "cmI" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/turf/unsimulated/floor{name = "plating"},/area/centcom/ferry) @@ -6071,7 +6071,7 @@ "cmM" = (/obj/structure/stool/chair{dir = 8},/turf/unsimulated/floor{icon_state = "green"; dir = 4},/area/centcom/control) "cmN" = (/obj/machinery/computer/crew,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/escape/centcom) "cmO" = (/obj/machinery/computer/communications,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/shuttle/escape/centcom) -"cmP" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/turf/simulated/shuttle/wall{dir = 1; icon_state = "diagonalWall3"},/area/centcom/ferry) +"cmP" = (/turf/unsimulated/wall{desc = "Why it no open!"; icon = 'icons/obj/doors/rapid_pdoor.dmi'; icon_state = "pdoor1"; name = "Shuttle Bay Blast Door"},/turf/simulated/shuttle/wall{dir = 1; icon_state = "diagonalWall3"},/area/centcom/ferry) "cmQ" = (/turf/simulated/shuttle/wall{tag = "icon-swall_s6"; icon_state = "swall_s6"; dir = 2},/area/shuttle/transport1/centcom) "cmR" = (/turf/simulated/shuttle/wall{tag = "icon-swall12"; icon_state = "swall12"; dir = 2},/area/shuttle/transport1/centcom) "cmS" = (/turf/simulated/shuttle/wall{tag = "icon-swall_s10"; icon_state = "swall_s10"; dir = 2},/area/shuttle/transport1/centcom) From f378644bb0a228e02b379320b579c9cb2f9a583c Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Tue, 27 Dec 2011 22:13:18 -0500 Subject: [PATCH 3/5] constructable/destroyable lights! --- code/game/objects/stacks/metal.dm | 3 ++ code/modules/power/lighting.dm | 90 +++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) diff --git a/code/game/objects/stacks/metal.dm b/code/game/objects/stacks/metal.dm index ad936cf5660..9e2c0ff6c79 100644 --- a/code/game/objects/stacks/metal.dm +++ b/code/game/objects/stacks/metal.dm @@ -76,6 +76,9 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, one_per_turf = 1), \ null, \ new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \ + new/datum/stack_recipe("tube light frame", /obj/structure/light_frame), \ + new/datum/stack_recipe("small light frame", /obj/structure/light_frame/small), \ + new/datum/stack_recipe("table lamp frame", /obj/structure/light_frame/lamp), \ new/datum/stack_recipe("grenade casing", /obj/item/weapon/chem_grenade), \ null, \ new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20), \ diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index c31eb236599..00664be667d 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -196,6 +196,25 @@ user << "This type of light requires a [fitting]." return + // attempt to take light apart + else if(istype(W, /obj/item/weapon/wirecutters)) + if(status == LIGHT_EMPTY) + playsound(src.loc, 'Wirecutter.ogg', 100, 1) + var/turf/T = get_turf(user) + user.visible_message("[user] cuts the light's wiring.", "You start to cut the light's wiring.") + sleep(40) + if(get_turf(user) == T) + usr << "\blue You cut the light's wiring." + var/obj/structure/light_frame/F = new(loc) + F.anchored = 1 + F.name = "Secured Light Fixture Frame" + F.dir = dir + F.light_type = type + F.icon_state = icon_state + del(src) + else + user << "\blue You need to remove the [fitting] first!" + // attempt to break the light //If xenos decide they want to smash a light bulb with a toolbox, who am I to stop them? /N @@ -561,3 +580,74 @@ new /obj/item/weapon/light/tube(src) new /obj/item/weapon/light/tube(src) new /obj/item/weapon/light/tube(src) + +/obj/structure/light_frame + name = "Light Fixture Frame" + icon = 'lighting.dmi' + icon_state = "tube-empty" + desc = "A lighting fixture frame." + anchored = 0 + layer = 5 + var/light_type = /obj/machinery/light + var/wired = 0 + m_amt = 1000 + +/obj/structure/light_frame/small + light_type = /obj/machinery/light/small + icon_state = "bulb-empty" + +/obj/structure/light_frame/lamp + light_type = /obj/machinery/light/lamp + icon_state = "lamp-empty" + +/obj/structure/light_frame/attackby(obj/item/W, mob/user) + if(istype(W, /obj/item/weapon/wrench) && !anchored) + playsound(src.loc, 'Ratchet.ogg', 100, 1) + var/turf/T = get_turf(user) + user.visible_message("[user] secures the light fixture.", "You start to secure the light fixture.") + sleep(40) + if(get_turf(user) == T) + usr << "\blue You secure the light fixture." + anchored = 1 + name = "Secured Light Fixture Frame" + else if(istype(W, /obj/item/weapon/wrench) && anchored) + playsound(src.loc, 'Ratchet.ogg', 100, 1) + var/turf/T = get_turf(user) + user.visible_message("[user] unsecures the light fixture.", "You start to unsecure the light fixture.") + sleep(40) + if(get_turf(user) == T) + usr << "\blue You unsecure the light fixture." + anchored = 0 + name = "Light Fixture Frame" + else if(istype(W, /obj/item/weapon/cable_coil) && anchored) + var/turf/T = get_turf(user) + user.visible_message("[user] wires the light fixture.", "You start to wire the light fixture.") + sleep(40) + if(get_turf(user) == T) + var/obj/item/weapon/cable_coil/C = W + C.use(1) + usr << "\blue You wire the light fixture." + var/obj/machinery/light/L = new light_type(loc) + L.dir = dir + L.status = LIGHT_EMPTY + L.update() + del(src) + else if(istype(W, /obj/item/weapon/screwdriver) && !anchored) + playsound(src.loc, 'Screwdriver.ogg', 100, 1) + usr << "\blue You take apart the light fixture." + new /obj/item/stack/sheet/metal(loc) + del(src) + else + ..() + +/obj/structure/light_frame/verb/rotate() + set name = "Rotate Light" + set category = "Object" + set src in oview(1) + + if (src.anchored) + usr << "It is fastened to the wall; therefore, you can't rotate it!" + return 0 + + src.dir = turn(src.dir, 90) + return From 99c1df3ff4d06d6aacf2a45a986d3b639aa2ebdb Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Wed, 28 Dec 2011 01:18:16 -0500 Subject: [PATCH 4/5] only force AI if malf mode --- code/game/jobs/job_controller.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index b9cc67ce45a..8c0e405f0ca 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -103,6 +103,10 @@ var/global/datum/controller/occupations/job_master proc/FillAIPosition() + // this now only forces AI if malf mode + if(ticker.mode.name != "AI malfunction") + return + var/ai_selected = 0 var/datum/job/job = GetJob("AI") if(!job) return 0 @@ -167,7 +171,7 @@ var/global/datum/controller/occupations/job_master FillHeadPosition() Debug("DO, Head Check end") - //Check for an AI + //Check for an AI, now purely just for malf mode Debug("DO, Running AI Check") FillAIPosition() Debug("DO, AI Check end") From f1fcbf3445f3e48ef57cb5abdcca6a2ee9efa35f Mon Sep 17 00:00:00 2001 From: Tastyfish Date: Wed, 28 Dec 2011 03:22:59 -0500 Subject: [PATCH 5/5] can set the paint scheme of doors! --- .../machinery/doors/airlock_electronics.dm | 26 +++++++++++++++ code/game/objects/door_assembly.dm | 32 ++++++++++++++----- 2 files changed, 50 insertions(+), 8 deletions(-) diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index 11a65dc47dd..08ce5b2a9c6 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -12,6 +12,8 @@ list/conf_access = null last_configurator = null locked = 1 + style_name = "General" + style = /obj/structure/door_assembly/door_assembly_0 attack_self(mob/user as mob) if (!ishuman(user)) @@ -32,6 +34,8 @@ else t1 += "Block
" + t1 += "Style: [style_name]

" + t1 += conf_access == null ? "All
" : "All
" @@ -80,6 +84,28 @@ if (href_list["access"]) toggle_access(href_list["access"]) + if (href_list["style"]) + style_name = input("Select the door's paint scheme.", "Door Style", style_name) in \ + list("General", "Command", "Security", "Engineering", "Medical", "Maintenance", "Airlock", "Freezer") + + switch(style_name) + if("General") + style = /obj/structure/door_assembly/door_assembly_0 + if("Command") + style = /obj/structure/door_assembly/door_assembly_com + if("Security") + style = /obj/structure/door_assembly/door_assembly_sec + if("Engineering") + style = /obj/structure/door_assembly/door_assembly_eng + if("Medical") + style = /obj/structure/door_assembly/door_assembly_med + if("Maintenance") + style = /obj/structure/door_assembly/door_assembly_mai + if("Airlock") + style = /obj/structure/door_assembly/door_assembly_ext + if("Freezer") + style = /obj/structure/door_assembly/door_assembly_fre + attack_self(usr) proc diff --git a/code/game/objects/door_assembly.dm b/code/game/objects/door_assembly.dm index 8d8d9979187..f9e605d55a2 100644 --- a/code/game/objects/door_assembly.dm +++ b/code/game/objects/door_assembly.dm @@ -87,6 +87,7 @@ obj/structure/door_assembly door_assembly_mai name = "Maintenance Airlock Assembly" icon_state = "door_as_mai1" + glass_type = null airlock_type = /obj/machinery/door/airlock/maintenance anchored = 1 density = 1 @@ -96,6 +97,7 @@ obj/structure/door_assembly door_assembly_ext name = "External Airlock Assembly" icon_state = "door_as_ext1" + glass_type = null airlock_type = /obj/machinery/door/airlock/external anchored = 1 density = 1 @@ -105,6 +107,7 @@ obj/structure/door_assembly door_assembly_fre name = "Freezer Airlock Assembly" icon_state = "door_as_fre1" + glass_type = null airlock_type = /obj/machinery/door/airlock/freezer anchored = 1 density = 1 @@ -114,6 +117,7 @@ obj/structure/door_assembly door_assembly_mhatch name = "Airtight Maintenance Hatch Assembly" icon_state = "door_as_mhatch1" + glass_type = null airlock_type = /obj/machinery/door/airlock/maintenance_hatch anchored = 1 density = 1 @@ -192,13 +196,26 @@ obj/structure/door_assembly sleep(40) if(get_turf(user) == T) user << "\blue You installed the airlock electronics!" - src.state = 2 - src.name = "Near finished Airlock Assembly" - src.electronics = W + + var/obj/item/weapon/airlock_electronics/E = W + var/obj/structure/door_assembly/D = new E.style(loc) + D.state = 2 + D.glass = glass + if(glass) + // just in case user is setting a glass door to a type that doesn't have a glass version + if(ispath(D.glass_type)) + D.icon_state = "[D.glass_base_icon_state]2" + else + D.icon_state = "[D.base_icon_state]2" + // type doesn't support glass, drop it + D.glass = 0 + new/obj/item/stack/sheet/rglass(get_turf(src)) + D.name = "Near finished Airlock Assembly" + E.loc = D + D.electronics = W + del(src) else W.loc = src.loc - - //del(W) else if(istype(W, /obj/item/weapon/crowbar) && state == 2 ) playsound(src.loc, 'Crowbar.ogg', 100, 1) var/turf/T = get_turf(user) @@ -215,7 +232,7 @@ obj/structure/door_assembly ae = electronics electronics = null ae.loc = src.loc - else if(istype(W, /obj/item/stack/sheet/rglass) && glass == 0) + else if(istype(W, /obj/item/stack/sheet/rglass) && glass == 0 && ispath(glass_type)) playsound(src.loc, 'Crowbar.ogg', 100, 1) user.visible_message("[user] adds reinforced glass windows to the airlock assembly.", "You start to install reinforced glass windows into the airlock assembly.") var/obj/item/stack/sheet/rglass/G = W @@ -224,8 +241,7 @@ obj/structure/door_assembly G.use(1) src.glass = 1 src.name = "Near finished Window Airlock Assembly" - src.airlock_type = /obj/machinery/door/airlock/glass - src.base_icon_state = "door_as_g" //this will be applied to the icon_state with the correct state number at the proc's end. + src.airlock_type = glass_type else if(istype(W, /obj/item/weapon/screwdriver) && state == 2 ) playsound(src.loc, 'Screwdriver.ogg', 100, 1) var/turf/T = get_turf(user)