diff --git a/code/WorkInProgress/buildmode.dm b/code/WorkInProgress/buildmode.dm index 8073684f64b..d7150693bfd 100644 --- a/code/WorkInProgress/buildmode.dm +++ b/code/WorkInProgress/buildmode.dm @@ -46,65 +46,67 @@ /obj/effect/bmode/builddir icon_state = "build" screen_loc = "NORTH,WEST" - Click() - switch(dir) - if(NORTH) - dir = EAST - if(EAST) - dir = SOUTH - if(SOUTH) - dir = WEST - if(WEST) - dir = NORTHWEST - if(NORTHWEST) - dir = NORTH - return 1 + +/obj/effect/bmode/builddir/Click() + switch(dir) + if(NORTH) + dir = EAST + if(EAST) + dir = SOUTH + if(SOUTH) + dir = WEST + if(WEST) + dir = NORTHWEST + if(NORTHWEST) + dir = NORTH + return 1 /obj/effect/bmode/buildhelp icon = 'icons/misc/buildmode.dmi' icon_state = "buildhelp" screen_loc = "NORTH,WEST+1" - Click() - switch(master.cl.buildmode) - if(1) - usr << "\blue ***********************************************************" - usr << "\blue Left Mouse Button = Construct / Upgrade" - usr << "\blue Right Mouse Button = Deconstruct / Delete / Downgrade" - usr << "\blue Left Mouse Button + ctrl = R-Window" - usr << "\blue Left Mouse Button + alt = Airlock" - usr << "" - usr << "\blue Use the button in the upper left corner to" - usr << "\blue change the direction of built objects." - usr << "\blue ***********************************************************" - if(2) - usr << "\blue ***********************************************************" - usr << "\blue Right Mouse Button on buildmode button = Set object type" - usr << "\blue Left Mouse Button on turf/obj = Place objects" - usr << "\blue Right Mouse Button = Delete objects" - usr << "" - usr << "\blue Use the button in the upper left corner to" - usr << "\blue change the direction of built objects." - usr << "\blue ***********************************************************" - if(3) - usr << "\blue ***********************************************************" - usr << "\blue Right Mouse Button on buildmode button = Select var(type) & value" - usr << "\blue Left Mouse Button on turf/obj/mob = Set var(type) & value" - usr << "\blue Right Mouse Button on turf/obj/mob = Reset var's value" - usr << "\blue ***********************************************************" - if(4) - usr << "\blue ***********************************************************" - usr << "\blue Left Mouse Button on turf/obj/mob = Throw" - usr << "\blue Right Mouse Button on turf/obj/mob = Select" - usr << "\blue ***********************************************************" - return 1 + +/obj/effect/bmode/buildhelp/Click() + switch(master.cl.buildmode) + if(1) + usr << "\blue ***********************************************************" + usr << "\blue Left Mouse Button = Construct / Upgrade" + usr << "\blue Right Mouse Button = Deconstruct / Delete / Downgrade" + usr << "\blue Left Mouse Button + ctrl = R-Window" + usr << "\blue Left Mouse Button + alt = Airlock" + usr << "" + usr << "\blue Use the button in the upper left corner to" + usr << "\blue change the direction of built objects." + usr << "\blue ***********************************************************" + if(2) + usr << "\blue ***********************************************************" + usr << "\blue Right Mouse Button on buildmode button = Set object type" + usr << "\blue Left Mouse Button on turf/obj = Place objects" + usr << "\blue Right Mouse Button = Delete objects" + usr << "" + usr << "\blue Use the button in the upper left corner to" + usr << "\blue change the direction of built objects." + usr << "\blue ***********************************************************" + if(3) + usr << "\blue ***********************************************************" + usr << "\blue Right Mouse Button on buildmode button = Select var(type) & value" + usr << "\blue Left Mouse Button on turf/obj/mob = Set var(type) & value" + usr << "\blue Right Mouse Button on turf/obj/mob = Reset var's value" + usr << "\blue ***********************************************************" + if(4) + usr << "\blue ***********************************************************" + usr << "\blue Left Mouse Button on turf/obj/mob = Throw" + usr << "\blue Right Mouse Button on turf/obj/mob = Select" + usr << "\blue ***********************************************************" + return 1 /obj/effect/bmode/buildquit icon_state = "buildquit" screen_loc = "NORTH,WEST+3" - Click() - togglebuildmode(master.cl.mob) - return 1 +/obj/effect/bmode/buildquit/Click() + togglebuildmode(master.cl.mob) + return 1 /obj/effect/bmode/buildholder density = 0 @@ -123,56 +125,56 @@ var/valueholder = "derp" var/objholder = /obj/structure/closet - Click(location, control, params) - var/list/pa = params2list(params) +/obj/effect/bmode/buildmode/Click(location, control, params) + var/list/pa = params2list(params) - if(pa.Find("left")) - switch(master.cl.buildmode) - if(1) - master.cl.buildmode = 2 - src.icon_state = "buildmode2" - if(2) - master.cl.buildmode = 3 - src.icon_state = "buildmode3" - if(3) - master.cl.buildmode = 4 - src.icon_state = "buildmode4" - if(4) - master.cl.buildmode = 1 - src.icon_state = "buildmode1" + if(pa.Find("left")) + switch(master.cl.buildmode) + if(1) + master.cl.buildmode = 2 + src.icon_state = "buildmode2" + if(2) + master.cl.buildmode = 3 + src.icon_state = "buildmode3" + if(3) + master.cl.buildmode = 4 + src.icon_state = "buildmode4" + if(4) + master.cl.buildmode = 1 + src.icon_state = "buildmode1" - else if(pa.Find("right")) - switch(master.cl.buildmode) - if(1) - return 1 - if(2) - objholder = text2path(input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet")) - if(!ispath(objholder)) + else if(pa.Find("right")) + switch(master.cl.buildmode) + if(1) + return 1 + if(2) + objholder = text2path(input(usr,"Enter typepath:" ,"Typepath","/obj/structure/closet")) + if(!ispath(objholder)) + objholder = /obj/structure/closet + alert("That path is not allowed.") + else + if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0)) objholder = /obj/structure/closet - alert("That path is not allowed.") - else - if(ispath(objholder,/mob) && !check_rights(R_DEBUG,0)) - objholder = /obj/structure/closet - if(3) - var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine") + if(3) + var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine") - master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name") - if(master.buildmode.varholder in locked && !check_rights(R_DEBUG,0)) - return 1 - var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference") - if(!thetype) return 1 - switch(thetype) - if("text") - master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", "value") as text - if("number") - master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num - if("mob-reference") - master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as mob in mob_list - if("obj-reference") - master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world - if("turf-reference") - master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world - return 1 + master.buildmode.varholder = input(usr,"Enter variable name:" ,"Name", "name") + if(master.buildmode.varholder in locked && !check_rights(R_DEBUG,0)) + return 1 + var/thetype = input(usr,"Select variable type:" ,"Type") in list("text","number","mob-reference","obj-reference","turf-reference") + if(!thetype) return 1 + switch(thetype) + if("text") + master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", "value") as text + if("number") + master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value", 123) as num + if("mob-reference") + master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as mob in mob_list + if("obj-reference") + master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as obj in world + if("turf-reference") + master.buildmode.valueholder = input(usr,"Enter variable value:" ,"Value") as turf in world + return 1 /proc/build_click(var/mob/user, buildmode, params, var/obj/object) diff --git a/code/game/turfs/simulated/dirtystation.dm b/code/game/turfs/simulated/dirtystation.dm index a9c7e18f082..c47f0c55da5 100644 --- a/code/game/turfs/simulated/dirtystation.dm +++ b/code/game/turfs/simulated/dirtystation.dm @@ -6,24 +6,27 @@ /obj/effect/decal/cleanable/blood/old name = "dried blood" desc = "Looks like it's been here a while. Eew." - New() - ..() - icon_state += "-old" + +/obj/effect/decal/cleanable/blood/old/New() + ..() + icon_state += "-old" /obj/effect/decal/cleanable/blood/gibs/old name = "old rotting gibs" desc = "Oh god, why didn't anyone clean this up? It smells terrible." - New() - ..() - icon_state += "-old" - dir = pick(1,2,4,8) + +/obj/effect/decal/cleanable/blood/gibs/old/New() + ..() + icon_state += "-old" + dir = pick(1,2,4,8) /obj/effect/decal/cleanable/vomit/old name = "crusty dried vomit" desc = "You try not to look at the chunks, and fail." - New() - ..() - icon_state += "-old" + +/obj/effect/decal/cleanable/vomit/old/New() + ..() + icon_state += "-old" /obj/effect/decal/cleanable/robot_debris/old name = "dusty robot debris" diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm index 97c433114f5..bde21ba4e57 100644 --- a/code/game/turfs/simulated/floor_types.dm +++ b/code/game/turfs/simulated/floor_types.dm @@ -5,9 +5,9 @@ nitrogen = 0.01 temperature = TCMB - New() - ..() - name = "floor" +/turf/simulated/floor/airless/New() + ..() + name = "floor" /turf/simulated/floor/light name = "Light floor" @@ -15,14 +15,14 @@ icon_state = "light_on" floor_tile = new/obj/item/stack/tile/light - New() - floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well. - var/n = name //just in case commands rename it in the ..() call - ..() - spawn(4) - if(src) - update_icon() - name = n +/turf/simulated/floor/light/New() + floor_tile.New() //I guess New() isn't run on objects spawned without the definition of a turf to house them, ah well. + var/n = name //just in case commands rename it in the ..() call + ..() + spawn(4) + if(src) + update_icon() + name = n @@ -68,17 +68,16 @@ icon_state = "cult" -/turf/simulated/floor/engine/n20 - New() - ..() - var/datum/gas_mixture/adding = new - var/datum/gas/sleeping_agent/trace_gas = new +/turf/simulated/floor/engine/n20/New() + ..() + var/datum/gas_mixture/adding = new + var/datum/gas/sleeping_agent/trace_gas = new - trace_gas.moles = 6000 - adding.trace_gases += trace_gas - adding.temperature = T20C + trace_gas.moles = 6000 + adding.trace_gases += trace_gas + adding.temperature = T20C - assume_air(adding) + assume_air(adding) /turf/simulated/floor/engine/vacuum name = "vacuum floor" @@ -100,9 +99,9 @@ nitrogen = 0.01 temperature = TCMB - New() - ..() - name = "plating" +/turf/simulated/floor/plating/airless/New() + ..() + name = "plating" /turf/simulated/floor/bluegrid icon = 'icons/turf/floors.dmi' @@ -163,35 +162,35 @@ icon_state = "grass1" floor_tile = new/obj/item/stack/tile/grass - New() - floor_tile.New() //I guess New() isn't ran on objects spawned without the definition of a turf to house them, ah well. - icon_state = "grass[pick("1","2","3","4")]" - ..() - spawn(4) - if(src) - update_icon() - for(var/direction in cardinal) - if(istype(get_step(src,direction),/turf/simulated/floor)) - var/turf/simulated/floor/FF = get_step(src,direction) - FF.update_icon() //so siding get updated properly +/turf/simulated/floor/grass/New() + floor_tile.New() //I guess New() isn't ran on objects spawned without the definition of a turf to house them, ah well. + icon_state = "grass[pick("1","2","3","4")]" + ..() + spawn(4) + if(src) + update_icon() + for(var/direction in cardinal) + if(istype(get_step(src,direction),/turf/simulated/floor)) + var/turf/simulated/floor/FF = get_step(src,direction) + FF.update_icon() //so siding get updated properly /turf/simulated/floor/carpet name = "Carpet" icon_state = "carpet" floor_tile = new/obj/item/stack/tile/carpet - New() - floor_tile.New() //I guess New() isn't ran on objects spawned without the definition of a turf to house them, ah well. - if(!icon_state) - icon_state = "carpet" - ..() - spawn(4) - if(src) - update_icon() - for(var/direction in list(1,2,4,8,5,6,9,10)) - if(istype(get_step(src,direction),/turf/simulated/floor)) - var/turf/simulated/floor/FF = get_step(src,direction) - FF.update_icon() //so siding get updated properly +/turf/simulated/floor/carpet/New() + floor_tile.New() //I guess New() isn't ran on objects spawned without the definition of a turf to house them, ah well. + if(!icon_state) + icon_state = "carpet" + ..() + spawn(4) + if(src) + update_icon() + for(var/direction in list(1,2,4,8,5,6,9,10)) + if(istype(get_step(src,direction),/turf/simulated/floor)) + var/turf/simulated/floor/FF = get_step(src,direction) + FF.update_icon() //so siding get updated properly @@ -206,4 +205,4 @@ icon_state = "snow" /turf/simulated/floor/plating/snow/ex_act(severity) - return \ No newline at end of file + return