Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into newmalf-merge

This commit is contained in:
Atlantiscze
2015-05-13 06:17:26 +02:00
217 changed files with 2423 additions and 3260 deletions
+1 -1
View File
@@ -210,7 +210,7 @@ proc/cardinalrange(var/center)
throwforce = 5
throw_speed = 1
throw_range = 2
matter = list("metal" = 100, "waste" = 2000)
matter = list(DEFAULT_WALL_MATERIAL = 100, "waste" = 2000)
/obj/item/device/am_shielding_container/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/device/multitool) && istype(src.loc,/turf))
+24 -17
View File
@@ -151,30 +151,34 @@
if (building==0)
init()
else
area = src.loc.loc:master
area = get_area(src)
area.apc |= src
opened = 1
operating = 0
name = "[area.name] APC"
stat |= MAINT
src.update_icon()
spawn(5)
src.update()
/obj/machinery/power/apc/initialize()
..()
src.update()
/obj/machinery/power/apc/Destroy()
area.apc -= src
area.power_light = 0
area.power_equip = 0
area.power_environ = 0
area.power_change()
if(wires)
wires.Destroy()
qdel(wires)
wires = null
if(cell)
cell.loc = loc
cell = null
if(terminal)
disconnect_terminal()
qdel(terminal)
terminal = null
// Malf AI, removes the APC from AI's hacked APCs list.
if(hacker && hacker.hacked_apcs && src in hacker.hacked_apcs)
@@ -441,18 +445,21 @@
if(cell)
user << "There is a power cell already installed."
return
else
if (stat & MAINT)
user << "<span class='warning'>There is no connector for your power cell.</span>"
return
user.drop_item()
W.loc = src
cell = W
user.visible_message(\
"<span class='warning'>[user.name] has inserted the power cell to [src.name]!</span>",\
"<span class='notice'>You insert the power cell.</span>")
chargecount = 0
update_icon()
if (stat & MAINT)
user << "<span class='warning'>There is no connector for your power cell.</span>"
return
if(W.w_class != 3)
user << "\The [W] is too [W.w_class < 3? "small" : "large"] to fit here."
return
user.drop_item()
W.loc = src
cell = W
user.visible_message(\
"<span class='warning'>[user.name] has inserted the power cell to [src.name]!</span>",\
"<span class='notice'>You insert the power cell.</span>")
chargecount = 0
update_icon()
else if (istype(W, /obj/item/weapon/screwdriver)) // haxing
if(opened)
if (cell)
+1 -1
View File
@@ -475,7 +475,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
w_class = 2.0
throw_speed = 2
throw_range = 5
matter = list("metal" = 50, "glass" = 20)
matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 20)
flags = CONDUCT
slot_flags = SLOT_BELT
item_state = "coil"
+3 -2
View File
@@ -6,8 +6,9 @@
..()
charge = maxcharge
spawn(5)
updateicon()
/obj/item/weapon/cell/initialize()
..()
updateicon()
/obj/item/weapon/cell/drain_power(var/drain_check, var/surge, var/amount = 0)
+1 -58
View File
@@ -8,65 +8,8 @@
#define LIGHT_EMPTY 1
#define LIGHT_BROKEN 2
#define LIGHT_BURNED 3
#define LIGHT_BULB_TEMPERATURE 400 //K - used value for a 60W bulb
/obj/item/light_fixture_frame
name = "light fixture frame"
desc = "Used for building lights."
icon = 'icons/obj/lighting.dmi'
icon_state = "tube-construct-item"
flags = CONDUCT
var/fixture_type = "tube"
var/obj/machinery/light/newlight = null
var/sheets_refunded = 2
/obj/item/light_fixture_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/metal( get_turf(src.loc), sheets_refunded )
qdel(src)
return
..()
/obj/item/light_fixture_frame/proc/try_build(turf/on_wall)
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(usr,on_wall)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
if (!istype(loc, /turf/simulated/floor))
usr << "\red [src.name] cannot be placed on this spot."
return
usr << "Attaching [src] to the wall."
playsound(src.loc, 'sound/machines/click.ogg', 75, 1)
var/constrdir = usr.dir
var/constrloc = usr.loc
if (!do_after(usr, 30))
return
switch(fixture_type)
if("bulb")
newlight = new /obj/machinery/light_construct/small(constrloc)
if("tube")
newlight = new /obj/machinery/light_construct(constrloc)
newlight.dir = constrdir
newlight.fingerprints = src.fingerprints
newlight.fingerprintshidden = src.fingerprintshidden
newlight.fingerprintslast = src.fingerprintslast
usr.visible_message("[usr.name] attaches [src] to the wall.", \
"You attach [src] to the wall.")
qdel(src)
/obj/item/light_fixture_frame/small
name = "small light fixture frame"
desc = "Used for building small lights."
icon = 'icons/obj/lighting.dmi'
icon_state = "bulb-construct-item"
flags = CONDUCT
fixture_type = "bulb"
sheets_refunded = 1
/obj/machinery/light_construct
name = "light fixture frame"
desc = "A light fixture under construction."
@@ -658,7 +601,7 @@
var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/base_state
var/switchcount = 0 // number of times switched
matter = list("metal" = 60)
matter = list(DEFAULT_WALL_MATERIAL = 60)
var/rigged = 0 // true if rigged to explode
var/brightness_range = 2 //how much light it gives off
var/brightness_power = 1
@@ -75,7 +75,6 @@ datum/design/rust_fuel_compressor
build_path = "/obj/machinery/power/rust_core"
board_type = "machine"
origin_tech = "bluespace=3;phorontech=4;magnets=5;powerstorage=6"
frame_desc = "Requires 2 Pico Manipulators, 1 Ultra Micro-Laser, 5 Pieces of Cable, 1 Subspace Crystal and 1 Console Screen."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
"/obj/item/weapon/stock_parts/micro_laser/ultra" = 1,
@@ -101,7 +100,6 @@ datum/design/rust_core
build_path = "/obj/machinery/power/rust_fuel_injector"
board_type = "machine"
origin_tech = "powerstorage=3;engineering=4;phorontech=4;materials=6"
frame_desc = "Requires 2 Pico Manipulators, 1 Phasic Scanning Module, 1 Super Matter Bin, 1 Console Screen and 5 Pieces of Cable."
req_components = list(
"/obj/item/weapon/stock_parts/manipulator/pico" = 2,
"/obj/item/weapon/stock_parts/scanning_module/phasic" = 1,
@@ -1,37 +1,3 @@
//frame assembly
/obj/item/rust_fuel_assembly_port_frame
name = "Fuel Assembly Port frame"
icon = 'icons/rust.dmi'
icon_state = "port2"
w_class = 4
flags = CONDUCT
/obj/item/rust_fuel_assembly_port_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
qdel(src)
return
..()
/obj/item/rust_fuel_assembly_port_frame/proc/try_build(turf/on_wall)
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(usr,on_wall)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Port cannot be placed on this spot."
return
if (A.requires_power == 0 || A.name == "Space")
usr << "\red Port cannot be placed in this area."
return
new /obj/machinery/rust_fuel_assembly_port(loc, ndir, 1)
qdel(src)
//construction steps
/obj/machinery/rust_fuel_assembly_port/New(turf/loc, var/ndir, var/building=0)
..()
@@ -122,7 +88,7 @@
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 50))
if(!src || !WT.remove_fuel(3, user)) return
new /obj/item/rust_fuel_assembly_port_frame(loc)
new /obj/item/frame/rust/assembly(loc)
user.visible_message(\
"\red [src] has been cut away from the wall by [user.name].",\
"You detached the port frame.",\
@@ -1,38 +1,3 @@
//frame assembly
/obj/item/rust_fuel_compressor_frame
name = "Fuel Compressor frame"
icon = 'icons/rust.dmi'
icon_state = "fuel_compressor0"
w_class = 4
flags = CONDUCT
/obj/item/rust_fuel_compressor_frame/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
new /obj/item/stack/sheet/plasteel( get_turf(src.loc), 12 )
qdel(src)
return
..()
/obj/item/rust_fuel_compressor_frame/proc/try_build(turf/on_wall)
if (get_dist(on_wall,usr)>1)
return
var/ndir = get_dir(usr,on_wall)
if (!(ndir in cardinal))
return
var/turf/loc = get_turf(usr)
var/area/A = loc.loc
if (!istype(loc, /turf/simulated/floor))
usr << "\red Compressor cannot be placed on this spot."
return
if (A.requires_power == 0 || A.name == "Space")
usr << "\red Compressor cannot be placed in this area."
return
new /obj/machinery/rust_fuel_assembly_port(loc, ndir, 1)
qdel(src)
//construction steps
/obj/machinery/rust_fuel_compressor/New(turf/loc, var/ndir, var/building=0)
..()
@@ -149,7 +114,7 @@
playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
if(do_after(user, 50))
if(!src || !WT.remove_fuel(3, user)) return
new /obj/item/rust_fuel_assembly_port_frame(loc)
new /obj/item/frame/rust(loc)
user.visible_message(\
"\red [src] has been cut away from the wall by [user.name].",\
"You detached the compressor frame.",\
+12 -11
View File
@@ -108,18 +108,19 @@
return 2
/turf/simulated/wall/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
if(prob(75))
dismantle_wall()
return
if(current_size == STAGE_FOUR)
if(prob(30))
dismantle_wall()
/turf/simulated/wall/r_wall/singularity_pull(S, current_size)
if(current_size >= STAGE_FIVE)
if(prob(30))
dismantle_wall()
if(!reinf_material)
if(current_size >= STAGE_FIVE)
if(prob(75))
dismantle_wall()
return
if(current_size == STAGE_FOUR)
if(prob(30))
dismantle_wall()
else
if(current_size >= STAGE_FIVE)
if(prob(30))
dismantle_wall()
/turf/space/singularity_act()
return
+2 -1
View File
@@ -23,6 +23,7 @@
/obj/machinery/power/terminal/Destroy()
if(master)
master.disconnect_terminal()
master = null
return ..()
/obj/machinery/power/terminal/hide(var/i)
@@ -36,4 +37,4 @@
// Needed so terminals are not removed from machines list.
// Powernet rebuilds need this to work properly.
/obj/machinery/power/terminal/process()
return 1
return 1