Merge branch 'master' of github.com:Baystation12/Baystation12 into TGUpdates

Conflicts:
	code/game/machinery/doors/airlock.dm
	code/game/machinery/doors/door.dm
	code/game/objects/transfer_valve.dm
	code/game/turf.dm
	code/modules/clothing/gloves.dm
	maps/tgstation.2.0.8.dmm
This commit is contained in:
Erthilo
2012-06-19 22:09:30 +01:00
139 changed files with 16602 additions and 15345 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
/obj/effect/alien/weeds/node/New()
..()
sd_SetLuminosity(NODERANGE)
ul_SetLuminosity(NODERANGE)
return
/obj/effect/alien/weeds/proc/Life()
+1 -1
View File
@@ -63,7 +63,7 @@
New()
..()
sd_SetLuminosity(1)
ul_SetLuminosity(1)
spawn(1200) // 2 minutes
del(src)
+32 -3
View File
@@ -1,7 +1,8 @@
//########################## CONTRABAND ;3333333333333333333 -Agouri ###################################################
#define NUM_OF_POSTER_DESIGNS 17
#define NUM_OF_POSTER_DESIGNS 22
#define BS12_POSTERS_START 18
/obj/item/weapon/contraband
name = "contraband item"
@@ -20,7 +21,11 @@
/obj/item/weapon/contraband/poster/New(turf/loc,var/given_serial=0)
if(given_serial==0)
serial_number = rand(1,NUM_OF_POSTER_DESIGNS)
//add an increased chance for BS12 specific posters to spawn
if(prob(10))
serial_number = rand(BS12_POSTERS_START,NUM_OF_POSTER_DESIGNS)
else
serial_number = rand(1,NUM_OF_POSTER_DESIGNS)
src.resulting_poster = new(serial_number)
else
serial_number = given_serial
@@ -78,10 +83,16 @@ obj/effect/decal/poster/New(var/serial)
src.serial_number = serial
if(serial_number==src.loc){serial_number = rand(1,NUM_OF_POSTER_DESIGNS);} //This is for the mappers that want individual posters without having to use rolled posters.
if(serial_number==src.loc)
//add an increased chance for BS12 specific posters to spawn
if(prob(10))
serial_number = rand(BS12_POSTERS_START,NUM_OF_POSTER_DESIGNS)
else
serial_number = rand(1,NUM_OF_POSTER_DESIGNS)
icon_state = "poster[serial_number]"
//This is for the mappers that want individual posters without having to use rolled posters.
switch(serial_number)
if(1)
name += " - Unlucky Space Explorer"
@@ -134,6 +145,24 @@ obj/effect/decal/poster/New(var/serial)
if(17)
name += " - Dangerous Static"
desc += " This particular one depicts nothing remarkable other than a rather mesmerising pattern of monitor static. There's a tag on the sides of the poster, urging you to \"tear this poster in half to receive your free sample\"."
if(18)
name += " - Pinup Girl Val" //art thou incensed, brethren?
desc += " Luscious Val McNeil, the vertically challenged Legal Extraordinaire, winner of Miss Space two years running and favoured pinup girl of Lawyers Weekly."
if(19)
name += " - Derpman, Enforcer of the State"
desc += " Here to protect and serve... your donuts! A generously proportioned man, he teaches you the value of hiding your snacks."
if(20)
name += " - Tajaran Today, Special #222"
desc += " A controversial front page pinup from NTFashion, banned on numerous stations for it's unreasonably cute depictions."
if(21)
name += " - Respect a Soghun"
desc += " This poster depicts a well dressed looking Soghun receiving a prestigious award. It appears to espouse greater co-operation and harmony between the two races."
if(22)
name += " - Skrell Twilight"
desc += " This poster depicts a mysteriously inscrutable, alien scene. Numerous Skrell can be seen conversing amidst great, crystalline towers rising above crashing waves"
/*if(20)
name += " - the Disabled Triptarch: Ironfoot, Seber and Ore"
desc += " This poster depicts a genetics researcher, a chemist and a medical doctor in various states of miscommunication."*/
else
name = "This shit just bugged. Report it to Agouri - polyxenitopalidou@gmail.com"
desc = "Why are you still here?"
+8 -8
View File
@@ -173,13 +173,13 @@
*/
/obj/item/device/pda/pickup(mob/user)
if (fon)
sd_SetLuminosity(0)
user.total_luminosity += f_lum
ul_SetLuminosity(0)
user.ul_SetLuminosity(user.LuminosityRed + (f_lum - 1), user.LuminosityGreen + (f_lum - 1), user.LuminosityBlue + (f_lum + 1))
/obj/item/device/pda/dropped(mob/user)
if (fon)
user.total_luminosity -= f_lum
sd_SetLuminosity(f_lum)
user.ul_SetLuminosity(user.LuminosityRed - (f_lum - 1), user.LuminosityGreen - (f_lum - 1), user.LuminosityBlue - (f_lum + 1))
ul_SetLuminosity(f_lum - 1, f_lum - 1, f_lum + 1)
/obj/item/device/pda/New()
..()
@@ -468,11 +468,11 @@
fon = (!fon)
if (src in U.contents)
if (fon)
U.total_luminosity += f_lum
U.ul_SetLuminosity(U.LuminosityRed + (f_lum - 1), U.LuminosityGreen + (f_lum - 1), U.LuminosityBlue + (f_lum + 1))
else
U.total_luminosity -= f_lum
U.ul_SetLuminosity(U.LuminosityRed - (f_lum - 1), U.LuminosityGreen - (f_lum - 1), U.LuminosityBlue - (f_lum + 1))
else
sd_SetLuminosity(fon * f_lum)
ul_SetLuminosity(fon * f_lum)
if("Medical Scan")
if(scanmode == 1)
scanmode = 0
@@ -939,7 +939,7 @@
if (src in M.contents)
if(fon)
fon = 0
M.total_luminosity -= f_lum
M.ul_SetLuminosity(M.LuminosityRed + (f_lum - 1), M.LuminosityGreen + (f_lum - 1), M.LuminosityBlue + (f_lum + 1))
if(T)
T.hotspot_expose(700,125)
+3 -3
View File
@@ -612,9 +612,9 @@ Code:
blood[main_blood] = A.blood_DNA[blood]
return 1
var/list/sum_list[4] //Pack it back up!
sum_list[1] = A.fingerprints.Copy()
sum_list[2] = A.suit_fibers.Copy()
sum_list[3] = A.blood_DNA.Copy()
sum_list[1] = A.fingerprints ? A.fingerprints.Copy() : null
sum_list[2] = A.suit_fibers ? A.suit_fibers.Copy() : null
sum_list[3] = A.blood_DNA ? A.blood_DNA.Copy() : null
sum_list[4] = "\The [A] in \the [get_area(A)]"
stored_data["\ref [A]"] = sum_list
return 0
+25 -29
View File
@@ -17,30 +17,30 @@
..()
if (on)
icon_state = icon_on
src.sd_SetLuminosity(brightness_on)
src.ul_SetLuminosity(brightness_on, brightness_on, 0)
else
icon_state = icon_off
src.sd_SetLuminosity(0)
src.ul_SetLuminosity(0)
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
if (on)
icon_state = icon_on
if(src.loc == user)
user.total_luminosity += brightness_on
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + brightness_on, user.LuminosityBlue)
else if (isturf(src.loc))
src.sd_SetLuminosity(brightness_on)
src.ul_SetLuminosity(brightness_on, brightness_on, 0)
else
icon_state = icon_off
if(src.loc == user)
user.total_luminosity -= brightness_on
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - brightness_on, user.LuminosityBlue)
else if (isturf(src.loc))
src.sd_SetLuminosity(0)
src.ul_SetLuminosity(0)
/obj/item/device/flashlight/attack_self(mob/user)
if(!isturf(user.loc))
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
return
// if(!isturf(user.loc))
// user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
// return
on = !on
update_brightness(user)
return
@@ -82,14 +82,14 @@
/obj/item/device/flashlight/pickup(mob/user)
if(on)
user.total_luminosity += brightness_on
src.sd_SetLuminosity(0)
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + brightness_on, user.LuminosityBlue)
src.ul_SetLuminosity(0)
/obj/item/device/flashlight/dropped(mob/user)
if(on)
user.total_luminosity -= brightness_on
src.sd_SetLuminosity(brightness_on)
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - brightness_on, user.LuminosityBlue)
src.ul_SetLuminosity(brightness_on)
/obj/item/device/flashlight/pen
@@ -148,21 +148,19 @@
item_state = "hardhat[on]_[color]"
if(on)
user.total_luminosity += brightness_on
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
else
user.total_luminosity -= brightness_on
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - (brightness_on - 1), user.LuminosityBlue)
/obj/item/clothing/head/helmet/hardhat/pickup(mob/user)
if(on)
user.total_luminosity += brightness_on
user.UpdateLuminosity()
src.sd_SetLuminosity(0)
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
ul_SetLuminosity(0)
/obj/item/clothing/head/helmet/hardhat/dropped(mob/user)
if(on)
user.total_luminosity -= brightness_on
user.UpdateLuminosity()
src.sd_SetLuminosity(brightness_on)
user.ul_SetLuminosity(user.LuminosityRed - brightness_on, user.LuminosityGreen - (brightness_on - 1), user.LuminosityBlue)
ul_SetLuminosity(brightness_on, brightness_on - 1, 0)
//RIG helmet light
/obj/item/clothing/head/helmet/space/rig/attack_self(mob/user)
@@ -174,21 +172,19 @@
item_state = "rig[on]-[color]"
if(on)
user.total_luminosity += brightness_on
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
else
user.total_luminosity -= brightness_on
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
/obj/item/clothing/head/helmet/space/rig/pickup(mob/user)
if(on)
user.total_luminosity += brightness_on
user.UpdateLuminosity()
src.sd_SetLuminosity(0)
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
ul_SetLuminosity(0)
/obj/item/clothing/head/helmet/space/rig/dropped(mob/user)
if(on)
user.total_luminosity -= brightness_on
user.UpdateLuminosity()
src.sd_SetLuminosity(brightness_on)
user.ul_SetLuminosity(user.LuminosityRed + brightness_on, user.LuminosityGreen + (brightness_on - 1), user.LuminosityBlue)
ul_SetLuminosity(brightness_on, brightness_on-1, 0)
// the desk lamps are a bit special
/obj/item/device/flashlight/lamp
+3 -3
View File
@@ -50,7 +50,7 @@
for(var/mob/M in viewers(user))
if(M == user) continue
M << "[user] detaches the power sink from the cable."
sd_SetLuminosity(0)
ul_SetLuminosity(0)
icon_state = "powersink0"
return
@@ -85,7 +85,7 @@
if(M == user) continue
M << "[user] deactivates the power sink!"
mode = 1
sd_SetLuminosity(0)
ul_SetLuminosity(0)
icon_state = "powersink0"
processing_objects.Remove(src)
@@ -94,7 +94,7 @@
var/datum/powernet/PN = attached.get_powernet()
if(PN)
if(!luminosity)
sd_SetLuminosity(12)
ul_SetLuminosity(12)
// found a powernet, so drain up to max power from it
+2 -2
View File
@@ -975,10 +975,10 @@ steam.start() -- spawns the effect
..()
update_nearby_tiles(1)
spawn(1)
sd_NewOpacity(1)
ul_SetOpacity(1)
Del()
sd_NewOpacity(0)
ul_SetOpacity(0)
density = 0
update_nearby_tiles(1)
..()
+82 -13
View File
@@ -30,22 +30,91 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
E.set_up(epicenter)
E.start()
var/list/dTurfs = list() //Holds the turfs in devestation range.
var/list/hTurfs = list() //Holds the turfs in heavy impact range, minus turfs in devestation range.
var/list/lTurfs = list() //Holds the turfs in light impact range, minus turfs in devestation range and heavy impact range.
var/list/fTurfs = list() //Holds turfs to loop through for mobs to flash. (Hehehe, dirty)
var/list/dTurfs = list() //Holds the turfs in devestation range.
var/list/hTurfs = list() //Holds the turfs in heavy impact range, minus turfs in devestation range.
var/list/lTurfs = list() //Holds the turfs in light impact range, minus turfs in devestation range and heavy impact range.
var/list/fTurfs = list() //Holds turfs to loop through for mobs to flash. (Hehehe, dirty)
//cael - replaced range() and circlerange() with FloodFill() to prevent explosions getting through shielding (ultrarealism mode)
//also lag is pre'y bad
/*
if(roundExplosions)
if(/obj/effect/energy_field in range(src, max(devastation_range, heavy_impact_range, light_impact_range)))
fTurfs = ExplosionCircleFloodFill(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
dTurfs = ExplosionCircleFloodFill(epicenter,devastation_range)
hTurfs = ExplosionCircleFloodFill(epicenter,heavy_impact_range) - dTurfs
lTurfs = ExplosionCircleFloodFill(epicenter,light_impact_range) - dTurfs - hTurfs
else
fTurfs = circlerange(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
dTurfs = circlerange(epicenter,devastation_range)
hTurfs = circlerange(epicenter,heavy_impact_range) - dTurfs
lTurfs = circlerange(epicenter,light_impact_range) - dTurfs - hTurfs
//add some stress to nearby shields
for(var/obj/effect/energy_field/E in circlerange(epicenter, devastation_range))
E.Stress(3)
for(var/obj/effect/energy_field/E in circlerange(epicenter, heavy_impact_range))
E.Stress(2)
for(var/obj/effect/energy_field/E in circlerange(epicenter, light_impact_range))
E.Stress(1)
else
if(/obj/effect/energy_field in range(src, max(devastation_range, heavy_impact_range, light_impact_range)))
fTurfs = ExplosionFloodFill(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
dTurfs = ExplosionFloodFill(epicenter,devastation_range)
hTurfs = ExplosionFloodFill(epicenter,heavy_impact_range) - dTurfs
lTurfs = ExplosionFloodFill(epicenter,light_impact_range) - dTurfs - hTurfs
else
fTurfs = range(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
dTurfs = range(epicenter,devastation_range)
hTurfs = range(epicenter,heavy_impact_range) - dTurfs
lTurfs = range(epicenter,light_impact_range) - dTurfs - hTurfs
//add some stress to nearby shields
for(var/obj/effect/energy_field/E in range(epicenter, devastation_range))
E.Stress(3)
for(var/obj/effect/energy_field/E in range(epicenter, heavy_impact_range))
E.Stress(2)
for(var/obj/effect/energy_field/E in range(epicenter, light_impact_range))
E.Stress(1)*/
if(roundExplosions)
fTurfs = circlerange(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
dTurfs = circlerange(epicenter,devastation_range)
hTurfs = circlerange(epicenter,heavy_impact_range) - dTurfs
lTurfs = circlerange(epicenter,light_impact_range) - dTurfs - hTurfs
else
fTurfs = range(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
dTurfs = range(epicenter,devastation_range)
hTurfs = range(epicenter,heavy_impact_range) - dTurfs
lTurfs = range(epicenter,light_impact_range) - dTurfs - hTurfs
if(locate(/obj/effect/energy_field) in range(src, max(devastation_range, heavy_impact_range, light_impact_range)))
fTurfs = circlerangeturfs(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
dTurfs = circlerangeturfs(epicenter,devastation_range)
hTurfs = circlerangeturfs(epicenter,heavy_impact_range) - dTurfs
lTurfs = circlerangeturfs(epicenter,light_impact_range) - dTurfs - hTurfs
else
fTurfs = circlerangeturfs(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
dTurfs = circlerangeturfs(epicenter,devastation_range)
hTurfs = circlerangeturfs(epicenter,heavy_impact_range) - dTurfs
lTurfs = circlerangeturfs(epicenter,light_impact_range) - dTurfs - hTurfs
//add some stress to nearby shields
for(var/obj/effect/energy_field/E in circlerange(epicenter, devastation_range))
E.Stress(3)
for(var/obj/effect/energy_field/E in circlerange(epicenter, heavy_impact_range))
E.Stress(2)
for(var/obj/effect/energy_field/E in circlerange(epicenter, light_impact_range))
E.Stress(1)
else
if(/obj/effect/energy_field in range(src, max(devastation_range, heavy_impact_range, light_impact_range)))
fTurfs = range(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
dTurfs = range(epicenter,devastation_range)
hTurfs = range(epicenter,heavy_impact_range) - dTurfs
lTurfs = range(epicenter,light_impact_range) - dTurfs - hTurfs
else
fTurfs = range(epicenter,max(devastation_range, heavy_impact_range, light_impact_range, flash_range))
dTurfs = range(epicenter,devastation_range)
hTurfs = range(epicenter,heavy_impact_range) - dTurfs
lTurfs = range(epicenter,light_impact_range) - dTurfs - hTurfs
//add some stress to nearby shields
for(var/obj/effect/energy_field/E in range(epicenter, devastation_range))
E.Stress(3)
for(var/obj/effect/energy_field/E in range(epicenter, heavy_impact_range))
E.Stress(2)
for(var/obj/effect/energy_field/E in range(epicenter, light_impact_range))
E.Stress(1)
for(var/turf/T in dTurfs) //Loop through the turfs in devestation range.
spawn() //Try to pop each turf into it's own thread, speed things along.
+1 -1
View File
@@ -41,7 +41,7 @@
icon_state = "glowshroomf"
spawn(2) //allows the luminosity and spread rate to be affected by potency at the moment of creation
sd_SetLuminosity(potency/10)
ul_SetLuminosity(potency/10)
spawn(delay)
if(src)
Spread()
+1 -1
View File
@@ -12,7 +12,7 @@
var/ndir = get_dir(usr,on_wall)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf_loc(usr)
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red APC cannot be placed on this spot."
+289 -96
View File
@@ -1,4 +1,11 @@
/obj/item/blueprints
name = "station blueprints"
desc = "Blueprints of the station. There's stamp \"Classified\" and several coffee stains on it. Looks like you can edit the station's layout with these."
icon = 'items.dmi'
icon_state = "blueprints"
var/list/image/helper_images = list()
var/const/AREA_ERRNONE = 0
var/const/AREA_STATION = 1
var/const/AREA_SPACE = 2
@@ -9,6 +16,7 @@
var/const/BORDER_BETWEEN = 2
var/const/BORDER_2NDTILE = 3
var/const/BORDER_SPACE = 4
var/const/BORDER_AREA = 5
var/const/ROOM_ERR_LOLWAT = 0
var/const/ROOM_ERR_SPACE = -1
@@ -16,7 +24,7 @@
/obj/item/blueprints/attack_self(mob/M as mob)
if (!istype(M,/mob/living/carbon/human))
M << "This is stack of useless pieces of harsh paper." //monkeys cannot into projecting
M << "This is stack of useless pieces of heavy paper." //monkeys cannot into projecting
return
interact()
return
@@ -32,12 +40,24 @@
if (get_area_type()!=AREA_SPACE)
interact()
return
create_area()
spawn()
create_area(usr.client)
if(usr && usr.client)
for(var/image/to_remove in helper_images)
if(to_remove in usr.client.images)
usr.client.images.Remove(to_remove)
del(to_remove)
if ("edit_area")
if (get_area_type()!=AREA_STATION)
interact()
return
edit_area()
spawn()
edit_area(usr.client)
if(usr && usr.client)
for(var/image/to_remove in helper_images)
if(to_remove in usr.client.images)
usr.client.images.Remove(to_remove)
del(to_remove)
/obj/item/blueprints/proc/interact()
var/area/A = get_area()
@@ -48,18 +68,18 @@
switch (get_area_type())
if (AREA_SPACE)
text += {"
<p>According this blueprints you are in <b>open space</b> now.</p>
<p><a href='?src=\ref[src];action=create_area'>Mark this place as new area.</a></p>
<p>According \the [src] you are in <b>open space</b> now.</p>
<p><a href='?src=\ref[src];action=create_area'>Mark this place as a new area.</a></p>
"}
if (AREA_STATION)
text += {"
<p>According this blueprints you are in <b>[A.name]</b> now.</p>
<p>According \the [src] you are in <b>\The [A]</b> now.</p>
<p>You may <a href='?src=\ref[src];action=edit_area'>
move an amendment</a> to the drawing.</p>
move an amendment</a> to the designs.</p>
"}
if (AREA_SPECIAL)
text += {"
<p>This place doesn't noted on this blueprints.</p>
<p>This place isn't noted on \the [src].</p>
"}
else
return
@@ -67,14 +87,10 @@ move an amendment</a> to the drawing.</p>
usr << browse(text, "window=blueprints")
onclose(usr, "blueprints")
/obj/item/blueprints/proc/get_area()
var/turf/T = get_turf_loc(usr)
var/area/A = T.loc
A = A.master
return A
/obj/item/blueprints/proc/get_area_type(var/area/A = get_area())
/obj/item/blueprints/proc/get_area_type(var/turf/T = get_turf(src))
if(!T)
return AREA_SPECIAL
var/area/A = get_area(T)
if (A.name == "Space")
return AREA_SPACE
var/list/SPECIALS = list(
@@ -87,99 +103,237 @@ move an amendment</a> to the drawing.</p>
/area/syndicate_station,
/area/wizard_station,
/area/prison
// /area/derelict //commented out, all hail derelict-rebuilders!
)
for (var/type in SPECIALS)
if ( istype(A,type) )
return AREA_SPECIAL
return AREA_STATION
/obj/item/blueprints/proc/create_area()
/obj/item/blueprints/proc/create_area(var/client/user)
//world << "DEBUG: create_area"
var/res = detect_room(get_turf_loc(usr))
if(!istype(res,/list))
switch(res)
var/list/turf/turfs = detect_room(get_turf(user.mob),user)
if(!istype(turfs))
switch(turfs)
if(ROOM_ERR_SPACE)
usr << "\red New area must be complete airtight!"
usr << "\red The new area must be completly airtight!"
return
if(ROOM_ERR_TOOLARGE)
usr << "\red New area too large!"
usr << "\red The new area is too large!"
return
else
usr << "\red Error! Please notify administration!"
return
var/list/turf/turfs = res
var/str = sanitize(trim(input(usr,"New area title","Blueprints editing")))
if(!str || !length(str)) //cancel
return
if(length(str) > 50)
usr << "\red Text too long."
return
var/area/A = new
A.name = str
A.tag="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing
//var/ma
//ma = A.master ? "[A.master]" : "(null)"
//world << "DEBUG: create_area: <br>A.name=[A.name]<br>A.tag=[A.tag]<br>A.master=[ma]"
A.power_equip = 0
A.power_light = 0
A.power_environ = 0
move_turfs_to_area(turfs, A)
var/choice = alert("Would you like to add this to an adjacent area, or make a brand new one?","Creating new area.","New Area", "Add to Area", "Cancel")
switch(choice)
if("New Area")
var/list/turf/new_turfs = list()
for(var/reference in turfs)
if(turfs[reference] == "Space")
var/turf/simulated/T = locate(reference) in world
if(istype(T))
new_turfs |= T
if(!new_turfs.len)
usr << "No aporpriate tiles found."
return
if(new_turfs.len > 500)
usr << "\red Too big of an area!"
return
var/str = sanitize(trim(input(usr,"New area title","Blueprints editing") as null|text))
if(!str || !length(str)) //cancel
return
if(length(str) > 50)
usr << "\red Text too long."
return
var/area/A = new
A.name = str
A.tag="[A.type]_[md5(str)]" // without this dynamic light system ruin everithing
A.power_equip = 0
A.power_light = 0
A.power_environ = 0
A.contents |= new_turfs
if("Add to Area")
var/list/adjacent_areas = list()
for(var/reference in turfs)
adjacent_areas |= turfs[reference]
//POSSIBLE FUTURE CHANGE
adjacent_areas.Remove("Space") //It's not something you want... or is it? We can try this out later.
var/decision = input("Which adjacent area do you want to combine with?","Blueprints Interface") as null|anything in adjacent_areas
if(decision && decision in adjacent_areas)
var/area/merge_target
for(var/reference in turfs)
if(turfs[reference] == decision)
var/turf/simulated/T = locate(reference)
if(istype(T))
merge_target = get_area(T)
break
if(!merge_target)
usr << "Something's gone badly wrong. Sorry!"
return
var/list/turf/new_turfs = list()
for(var/reference in turfs)
if(turfs[reference] == "Space")
var/turf/simulated/T = locate(reference) in world
if(istype(T))
new_turfs |= T
merge_target.contents |= new_turfs
spawn(2)
merge_target.power_change()
else
return
if("Cancel")
return
spawn(5)
//ma = A.master ? "[A.master]" : "(null)"
//world << "DEBUG: create_area(5): <br>A.name=[A.name]<br>A.tag=[A.tag]<br>A.master=[ma]"
interact()
return
/obj/item/blueprints/proc/move_turfs_to_area(var/list/turf/turfs, var/area/A)
A.contents.Add(turfs)
//oldarea.contents.Remove(usr.loc) // not needed
//T.loc = A //error: cannot change constant value
/obj/item/blueprints/proc/edit_area()
var/area/A = get_area()
/obj/item/blueprints/proc/edit_area(var/client/user)
var/area/A = get_area(src)
//world << "DEBUG: edit_area"
var/prevname = A.name
var/str = sanitize(trim(input(usr,"New area title","Blueprints editing",prevname)))
if(!str || !length(str) || str==prevname) //cancel
return
if(length(str) > 50)
usr << "\red Text too long."
return
set_area_machinery_title(A,str,prevname)
for(var/area/RA in A.related)
RA.name = str
usr << "\blue You set the area '[prevname]' title to '[str]'."
interact()
var/choice = alert("Would you like to rename the area, or merge it with an adjacent one?", "Blueprint Interface", "Rename", "Merge", "Cancel")
switch(choice)
if("Rename")
var/str = sanitize(trim(input(usr,"New area title","Blueprints editing",A.name) as null|text))
if(!str || !length(str) || str==A.name) //cancel
return
if(length(str) > 50)
usr << "\red Text too long."
return
var/old_name = A.name
for(var/area/RA in A.related)
RA.name = str
A.name = str
A.set_area_machinery_title(old_name)
usr << "\blue You retitle the area '[A.name]' to '[str]'."
if("Merge")
usr << "We appologize, but this function is not availible"
/*
var/list/turf/search_remaining_turfs = A.contents.Copy()
var/list/turfs = list()
for(var/turf/simulated/T in search_remaining_turfs)
if(T.density || locate(/obj/machinery/door) in T || locate(/obj/machinery/door) in T)
search_remaining_turfs.Remove(T)
var/limiter = 50
var/iteration = 0
while(search_remaining_turfs.len > (A.contents.len)/10 )
iteration++
if(iteration > limiter)
break
var/turf/simulated/test_turf = pick(search_remaining_turfs)
if(!istype(test_turf))
continue
var/list/turf/temp_turf_list = detect_room(test_turf,user)
if(!istype(temp_turf_list))
switch(temp_turf_list)
if(ROOM_ERR_SPACE)
usr << "\red \The [A] is not completly airtight!"
return
if(ROOM_ERR_TOOLARGE)
usr << "\red \The [A] is too large to expand!"
return
else
usr << "\red Error! Please notify administration!"
return
for(var/reference in temp_turf_list)
var/turf/simulated/T = locate(reference)
if(T)
search_remaining_turfs.Remove(T)
turfs |= temp_turf_list
var/list/adjacent_areas = list()
for(var/reference in turfs)
adjacent_areas |= turfs[reference]
adjacent_areas.Remove("[A]")
var/decision = input("Which adjacent area do you want to merge with?","Blueprints Interface") as null|anything in adjacent_areas
if(decision && decision in adjacent_areas)
var/area/merge_target
for(var/reference in turfs)
if(turfs[reference] == decision)
var/turf/simulated/T = locate(reference)
if(istype(T))
merge_target = get_area(T)
break
if(!merge_target)
usr << "Something's gone badly wrong. Sorry!"
return
search_remaining_turfs = merge_target.contents.Copy()
for(var/turf/simulated/T in search_remaining_turfs)
if(T.density || locate(/obj/machinery/door) in T || locate(/obj/machinery/door) in T)
search_remaining_turfs.Remove(T)
var/turf/simulated/T
iteration = 0
while(search_remaining_turfs.len > (merge_target.contents.len)/10 )
T = pick(search_remaining_turfs)
if(istype(T))
var/list/turf_references = detect_room(T,user)
if(!istype(turf_references))
switch(turf_references)
if(ROOM_ERR_SPACE)
usr << "\red \The [merge_target] is not completly airtight!"
return
if(ROOM_ERR_TOOLARGE)
usr << "\red \The [merge_target] is too large to expand!"
return
else
usr << "\red Error! Please notify administration!"
return
for(var/reference in turf_references)
T = locate(reference)
if(T)
search_remaining_turfs.Remove(T)
iteration++
if(iteration >= limiter)
break
var/area_master = alert("If this is approximately the right shape for the combined area, which should the new area be?", "Blueprint Interface", "\The [A]", "\The [merge_target]", "Looks Wrong/Cancel")
if(area_master == "\The [A]")
A.absorb(merge_target)
else if(area_master == "\The [merge_target]")
merge_target.absorb(A)
else if(area_master == "Looks Wrong/Cancel")
return
else
return*/
if("Cancel")
return
spawn(5)
interact()
return
/obj/item/blueprints/proc/set_area_machinery_title(var/area/A,var/title,var/oldtitle)
if (!oldtitle) // or dd_replacetext goes to infinite loop
return
for(var/area/RA in A.related)
for(var/obj/machinery/alarm/M in RA)
M.name = dd_replacetext(M.name,oldtitle,title)
for(var/obj/machinery/power/apc/M in RA)
M.name = dd_replacetext(M.name,oldtitle,title)
for(var/obj/machinery/atmospherics/unary/vent_scrubber/M in RA)
M.name = dd_replacetext(M.name,oldtitle,title)
for(var/obj/machinery/atmospherics/unary/vent_pump/M in RA)
M.name = dd_replacetext(M.name,oldtitle,title)
for(var/obj/machinery/door/M in RA)
M.name = dd_replacetext(M.name,oldtitle,title)
//TODO: much much more. Unnamed airlocks, cameras, etc.
/obj/item/blueprints/proc/check_tile_is_border(var/turf/T2,var/dir)
if (istype(T2, /turf/space))
return BORDER_SPACE //omg hull breach we all going to die here
if (istype(T2, /turf/simulated/shuttle))
return BORDER_SPACE
if (get_area_type(T2.loc)!=AREA_SPACE)
return BORDER_BETWEEN
if (istype(T2, /turf/simulated/wall))
return BORDER_2NDTILE
if (!istype(T2, /turf/simulated))
@@ -200,41 +354,80 @@ move an amendment</a> to the drawing.</p>
if (locate(/obj/structure/falserwall) in T2)
return BORDER_2NDTILE
if(get_area_type(T2) == AREA_SPECIAL)
return BORDER_BETWEEN
return BORDER_NONE
/obj/item/blueprints/proc/detect_room(var/turf/first)
var/list/turf/found = new
var/list/turf/pending = list(first)
while(pending.len)
if (found.len+pending.len > 300)
/obj/item/blueprints/proc/detect_room(var/turf/first, var/client/user)
var/list/found = list()
var/list/pending = list(first)
var/area/B = get_area(first)
var/list/areas = list(B.name)
do
if (found.len+pending.len > 800)
return ROOM_ERR_TOOLARGE
var/turf/T = pending[1] //why byond havent list::pop()?
pending -= T
var/turf/T = pending[1]
pending.Remove(T)
B = get_area(T)
for (var/dir in cardinal)
var/skip = 0
for (var/obj/structure/window/W in T)
if(dir == W.dir || (W.dir in list(NORTHEAST,SOUTHEAST,NORTHWEST,SOUTHWEST)))
skip = 1; break
if (skip) continue
skip = 1
break
if (skip)
continue
for(var/obj/machinery/door/window/D in T)
if(dir == D.dir)
skip = 1; break
if (skip) continue
skip = 1
break
if (skip)
continue
var/turf/NT = get_step(T,dir)
if (!isturf(NT) || (NT in found) || (NT in pending))
if (!istype(NT))
continue
if("\ref[NT]" in found)
continue
if("\ref[NT]" in pending)
continue
switch(check_tile_is_border(NT,dir))
if(BORDER_NONE)
pending+=NT
var/area/A = get_area(NT)
if( ( A.name in areas || A.name == "Space" || B.name == "Space" ) &&\
!( "\ref[NT]" in pending || "\ref[NT]" in found) )
//If it is another area, and neither of them are space AND it is not in the list of adjacent areas, then do not add it.
pending |= NT
areas |= A.name
if(BORDER_BETWEEN)
//do nothing, may be later i'll add 'rejected' list as optimization
found["\ref[NT]"] = "[get_area(NT)]"
if(user && !locate(/image) in NT)
var/image/Z = image('ULIcons.dmi',NT,"7-0-0",19)
helper_images |= Z
user.images += Z
if(BORDER_2NDTILE)
found+=NT //tile included to new area, but we dont seek more
found["\ref[NT]"] = "[get_area(NT)]" //tile included to new area, but we dont seek more
if(user && !locate(/image) in NT)
var/image/Z = image('ULIcons.dmi',NT,"7-0-0",19)
helper_images |= Z
user.images += Z
if(BORDER_SPACE)
return ROOM_ERR_SPACE
found+=T
found["\ref[T]"] = "[get_area(T)]"
if(user)
for(var/image/I in user.images)
if(I.loc == T)
user.images.Remove(I)
del(I)
var/image/Z = image('ULIcons.dmi',T,"0-0-7",19)
helper_images |= Z
user.images += Z
while(pending.len)
return found
/*
+7 -8
View File
@@ -51,7 +51,7 @@
//src.damtype = "fire"
for(var/mob/O in viewers(usr, null))
O.show_message(flavor_text, 1)
sd_SetLuminosity(CANDLE_LUM)
ul_SetLuminosity(CANDLE_LUM, CANDLE_LUM -2, 0)
processing_objects.Add(src)
@@ -74,20 +74,19 @@
if(lit)
lit = 0
update_icon()
sd_SetLuminosity(0)
user.total_luminosity -= CANDLE_LUM
ul_SetLuminosity(0)
user.ul_SetLuminosity(user.LuminosityRed - CANDLE_LUM, user.LuminosityGreen - (CANDLE_LUM - 2), user.LuminosityBlue)
pickup(mob/user)
if(lit)
src.sd_SetLuminosity(0)
user.total_luminosity += CANDLE_LUM
ul_SetLuminosity(0)
user.ul_SetLuminosity(user.LuminosityRed + CANDLE_LUM, user.LuminosityGreen + (CANDLE_LUM - 2), user.LuminosityBlue)
dropped(mob/user)
if(lit)
user.total_luminosity -= CANDLE_LUM
src.sd_SetLuminosity(CANDLE_LUM)
user.ul_SetLuminosity(user.LuminosityRed - CANDLE_LUM, user.LuminosityGreen - (CANDLE_LUM - 2), user.LuminosityBlue)
src.ul_SetLuminosity(CANDLE_LUM, CANDLE_LUM, 0)
+1 -1
View File
@@ -82,7 +82,7 @@ MONKEY CUBE BOX
usr.put_in_hand(D)
usr << "You take a donut out of the box."
else
D.loc = get_turf_loc(src)
D.loc = get_turf(src)
usr << "You take a donut out of the box."
src.update()
@@ -441,7 +441,7 @@ ZIPPO
for(var/mob/O in viewers(user, null))
O.show_message("\red After a few attempts, \the [user] manages to light \the [src], they however burn themself in the process.", 1)
user.total_luminosity += 2
user.ul_SetLuminosity(user.LuminosityRed + 2, user.LuminosityGreen + 1, user.LuminosityBlue)
processing_objects.Add(src)
else
src.lit = 0
@@ -454,7 +454,7 @@ ZIPPO
for(var/mob/O in viewers(user, null))
O.show_message("\red [user] quietly shuts off the [src].", 1)
user.total_luminosity -= 2
user.ul_SetLuminosity(user.LuminosityRed - 2, user.LuminosityGreen - 1, user.LuminosityBlue)
processing_objects.Remove(src)
else
return ..()
@@ -483,13 +483,13 @@ ZIPPO
pickup(mob/user)
if(lit)
src.sd_SetLuminosity(0)
user.total_luminosity += 2
ul_SetLuminosity(0)
user.ul_SetLuminosity(user.LuminosityRed + 2, user.LuminosityGreen + 1, user.LuminosityBlue)
return
dropped(mob/user)
if(lit)
user.total_luminosity -= 2
src.sd_SetLuminosity(2)
user.ul_SetLuminosity(user.LuminosityRed - 2, user.LuminosityGreen - 1, user.LuminosityBlue)
ul_SetLuminosity(2)
return
@@ -37,9 +37,9 @@ NOTEBOOK
M << "\red \the [src] burns up."
if(istype(src.loc,/mob))
var/mob/M = src.loc
M.total_luminosity -= 8
M.ul_SetLuminosity(M.LuminosityRed - 8, M.LuminosityGreen - 6, M.LuminosityBlue)
else
src.sd_SetLuminosity(0)
ul_SetLuminosity(0)
processing_objects.Remove(src)
del(src)
@@ -53,13 +53,13 @@ NOTEBOOK
/obj/item/weapon/paper/pickup(mob/user)
if(burning)
src.sd_SetLuminosity(0)
user.total_luminosity += 8
src.ul_SetLuminosity(0)
user.ul_SetLuminosity(user.LuminosityRed + 8, user.LuminosityGreen + 6, user.LuminosityBlue)
/obj/item/weapon/paper/dropped(mob/user)
if(burning)
user.total_luminosity -= 8
src.sd_SetLuminosity(8)
user.ul_SetLuminosity(user.LuminosityRed - 8, user.LuminosityGreen - 6, user.LuminosityBlue)
src.ul_SetLuminosity(8,6,0)
/obj/item/weapon/paper/examine()
set src in view()
@@ -163,7 +163,7 @@ NOTEBOOK
if(is_burn(P))
for(var/mob/M in viewers(5, get_turf(src)))
M << "\red [user] sets \the [src] on fire."
user.total_luminosity += 8
user.ul_SetLuminosity(user.LuminosityRed + 8, user.LuminosityGreen + 6, user.LuminosityBlue)
burning = 1
processing_objects.Add(src)
update_icon()
@@ -360,7 +360,7 @@ NOTEBOOK
usr.put_in_hand(P)
usr << "You take a paper out of the bin."
else
P.loc = get_turf_loc(src)
P.loc = get_turf(src)
usr << "You take a paper out of the bin."
src.update()
+2 -2
View File
@@ -174,7 +174,7 @@
New()
..()
sd_SetLuminosity(3)
ul_SetLuminosity(3)
/obj/structure/mineral_door/sandstone
mineralType = "sandstone"
@@ -281,4 +281,4 @@
isSwitchingStates = 0
Dismantle(devastated = 0)
del(src)
del(src)
+1 -1
View File
@@ -100,7 +100,7 @@
name = "Head of Personnel's Encryption Key"
desc = "An encyption key for a radio headset. Contains cypherkeys."
icon_state = "hop_cypherkey"
channels = list("Command" = 1, "Security" = 0, "Cargo" = 1, "Mining" = 0)
channels = list("Command" = 1, "Cargo" = 1, "Mining" = 0)
/obj/item/device/encryptionkey/headset_mine
name = "Mining Radio Encryption Key"
+2 -2
View File
@@ -52,7 +52,7 @@
user.put_in_hand(pinned_target)
user << "You take the target out of the stake."
else
pinned_target.loc = get_turf_loc(user)
pinned_target.loc = get_turf(user)
user << "You take the target out of the stake."
pinned_target = null
@@ -122,7 +122,7 @@
user.put_in_hand(src)
user << "You take the target out of the stake."
else
src.loc = get_turf_loc(user)
src.loc = get_turf(user)
user << "You take the target out of the stake."
stake.pinned_target = null
+3 -1
View File
@@ -74,6 +74,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \
new/datum/stack_recipe("closet", /obj/structure/closet, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("filling cabinet", /obj/structure/filingcabinet, 3, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, one_per_turf = 1, on_floor = 1), \
null, \
@@ -84,6 +85,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("small machine frame", /obj/machinery/small_constructable_frame, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wall machine frame", /obj/machinery/constructable_frame/wallmount_frame, 2, one_per_turf = 1, on_floor = 1), \
null, \
@@ -140,7 +142,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
return
/obj/item/stack/tile/plasteel/proc/build(turf/S as turf)
S.ReplaceWithPlating()
S.ReplaceWithAirlessPlating()
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
// W.make_plating()
return
+1
View File
@@ -6,6 +6,7 @@ WOOD PLANKS
var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
new/datum/stack_recipe("coat rack", /obj/machinery/coatrack, 2), \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 30, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1), \
+10 -10
View File
@@ -448,20 +448,20 @@ obj/structure/meteorhit(obj/O as obj)
flick("[mineral]fwall_opening", src)
sleep(15)
src.density = 0
src.sd_SetOpacity(0)
src.ul_SetOpacity(0)
var/turf/T = src.loc
T.sd_LumReset()
T.ul_Recalculate()
else
flick("[mineral]fwall_closing", src)
icon_state = "[mineral]0"
sleep(15)
src.density = 1
src.sd_SetOpacity(1)
src.ul_SetOpacity(1)
var/turf/T = src.loc
//T.sd_LumUpdate()
//T.ul_LumUpdate()
src.relativewall()
T.sd_LumReset()
T.ul_Recalculate()
/obj/structure/falsewall/uranium/attack_hand(mob/user as mob)
radiate()
@@ -546,20 +546,20 @@ obj/structure/meteorhit(obj/O as obj)
flick("frwall_opening", src)
sleep(15)
src.density = 0
src.sd_SetOpacity(0)
src.ul_SetOpacity(0)
var/turf/T = src.loc
T.sd_LumReset()
T.ul_Recalculate()
else
icon_state = "r_wall"
flick("frwall_closing", src)
sleep(15)
src.density = 1
src.sd_SetOpacity(1)
src.ul_SetOpacity(1)
var/turf/T = src.loc
//T.sd_LumUpdate()
//T.ul_LumUpdate()
src.relativewall()
T.sd_LumReset()
T.ul_Recalculate()
attackby(obj/item/weapon/W as obj, mob/user as mob)