Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into OrganRefactor

This commit is contained in:
Aurorablade
2016-01-15 08:10:24 -05:00
349 changed files with 23852 additions and 21659 deletions
+14
View File
@@ -102,6 +102,8 @@
var/report_power_alarm = 1
var/shock_proof = 0 //if set to 1, this APC will not arc bolts of electricity if it's overloaded.
/obj/machinery/power/apc/noalarm
report_power_alarm = 0
@@ -1252,6 +1254,18 @@
charging = 0
chargecount = 0
if(excess >= 5000000 && !shock_proof) //If there's more than 5,000,000 watts in the grid, start arcing and shocking people.
if(prob(5))
var/list/shock_mobs = list()
for(var/C in view(get_turf(src), 5)) //We only want to shock a single random mob in range, not every one.
if(iscarbon(C))
shock_mobs +=C
if(shock_mobs.len)
var/mob/living/carbon/S = pick(shock_mobs)
S.electrocute_act(rand(5,25), "electrical arc")
playsound(get_turf(S), 'sound/effects/eleczap.ogg', 75, 1)
Beam(S,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5)
else // no cell, switch everything off
charging = 0
+22 -59
View File
@@ -634,81 +634,43 @@ obj/structure/cable/proc/cableColor(var/colorC)
// Cable laying procedures
//////////////////////////////////////////////
/obj/item/stack/cable_coil/proc/get_new_cable(location)
var/obj/structure/cable/C = new(location)
C.cableColor(color)
return C
// called when cable_coil is clicked on a turf/simulated/floor
/obj/item/stack/cable_coil/proc/turf_place(turf/simulated/floor/F, mob/user)
/obj/item/stack/cable_coil/proc/place_turf(turf/T, mob/user)
if(!isturf(user.loc))
return
if(!T.can_have_cabling())
user << "<span class='warning'>You can only lay cables on catwalks and plating!</span>"
return
if(get_amount() < 1) // Out of cable
user << "There is no cable left."
user << "<span class='warning'>There is no cable left!</span>"
return
if(get_dist(F,user) > 1) // Too far
user << "You can't lay cable at a place that far away."
return
if(F.intact) // Ff floor is intact, complain
user << "You can't lay cable there unless the floor tiles are removed."
if(get_dist(T,user) > 1) // Too far
user << "<span class='warning'>You can't lay cable at a place that far away!</span>"
return
else
var/dirn
if(user.loc == F)
if(user.loc == T)
dirn = user.dir // if laying on the tile we're on, lay in the direction we're facing
else
dirn = get_dir(F, user)
dirn = get_dir(T, user)
for(var/obj/structure/cable/LC in F)
if((LC.d1 == dirn && LC.d2 == 0 ) || ( LC.d2 == dirn && LC.d1 == 0))
user << "<span class='warning'>There's already a cable at that position.</span>"
return
///// Z-Level Stuff
// check if the target is open space
/* if(istype(F, /turf/simulated/floor/open))
for(var/obj/structure/cable/LC in F)
if((LC.d1 == dirn && LC.d2 == 11 ) || ( LC.d2 == dirn && LC.d1 == 11))
user << "<span class='warning'>There's already a cable at that position.</span>"
return
var/turf/simulated/floor/open/temp = F
var/obj/structure/cable/C = new(F)
var/obj/structure/cable/D = new(temp.floorbelow)
C.cableColor(color)
C.d1 = 11
C.d2 = dirn
C.add_fingerprint(user)
C.updateicon()
var/datum/powernet/PN = new()
PN.add_cable(C)
C.mergeConnectedNetworks(C.d2)
C.mergeConnectedNetworksOnTurf()
D.cableColor(color)
D.d1 = 12
D.d2 = 0
D.add_fingerprint(user)
D.updateicon()
PN.add_cable(D)
D.mergeConnectedNetworksOnTurf()
// do the normal stuff
else */
///// Z-Level Stuff
for(var/obj/structure/cable/LC in F)
if((LC.d1 == dirn && LC.d2 == 0 ) || ( LC.d2 == dirn && LC.d1 == 0))
user << "There's already a cable at that position."
for(var/obj/structure/cable/LC in T)
if(LC.d2 == dirn && LC.d1 == 0)
user << "<span class='warning'>There's already a cable at that position!</span>"
return
var/obj/structure/cable/C = new(F)
C.cableColor(color)
var/obj/structure/cable/C = get_new_cable(T)
//set up the new cable
C.d1 = 0 //it's a O-X node cable
@@ -728,6 +690,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
use(1)
if (C.shock(user, 50))
if (prob(50)) //fail
new/obj/item/stack/cable_coil(C.loc, 1, C.color)
@@ -751,7 +714,7 @@ obj/structure/cable/proc/cableColor(var/colorC)
if(U == T) //if clicked on the turf we're standing on, try to put a cable in the direction we're facing
turf_place(T,user)
place_turf(T,user)
return
var/dirn = get_dir(C, user)
+1 -1
View File
@@ -132,7 +132,7 @@
if(get_dist(src, user) > 1)
return
coil.turf_place(T, user)
coil.place_turf(T, user)
return
else
..()
+1 -1
View File
@@ -186,7 +186,7 @@
src.last_shot = world.time
if(src.shot_number < 3)
src.fire_delay = 2
src.shot_number ++
src.shot_number++
else
src.fire_delay = rand(minimum_fire_delay,maximum_fire_delay)
src.shot_number = 0
@@ -98,7 +98,7 @@
var/stability = num2text(round((damage / explosion_point) * 100))
if(damage > emergency_point)
radio.autosay("[emergency_alert] Instability: [stability]%", src)
radio.autosay("[emergency_alert] Instability: [stability]%", src.name)
lastwarning = world.timeofday
if(!has_reached_emergency)
investigate_log("has reached the emergency point for the first time.", "supermatter")
@@ -106,11 +106,11 @@
has_reached_emergency = 1
else if(damage >= damage_archived) // The damage is still going up
radio.autosay("[warning_alert] Instability: [stability]%", src)
radio.autosay("[warning_alert] Instability: [stability]%", src.name)
lastwarning = world.timeofday - 150
else // Phew, we're safe
radio.autosay("[safe_alert]", src)
radio.autosay("[safe_alert]", src.name)
lastwarning = world.timeofday
if(damage > explosion_point)
+3 -3
View File
@@ -44,7 +44,7 @@ var/list/blacklisted_tesla_types = list(/obj/machinery/atmospherics,
move_the_basket_ball(amount_to_move)
pixel_x = 0
pixel_y = 0
playsound(src.loc, 'sound/magic/lightningbolt.ogg', 100, 1, extrarange = 5)
playsound(src.loc, 'sound/magic/lightningbolt.ogg', 100, 1, extrarange = 15)
tesla_zap(src, 7, what_does_the_scouter_say_about_the_balls_power_level)
pixel_x = -32
pixel_y = -32
@@ -69,7 +69,7 @@ var/list/blacklisted_tesla_types = list(/obj/machinery/atmospherics,
/obj/singularity/energy_ball/proc/handle_energy()
if(energy >= 300)
energy -= 300
playsound(src.loc, 'sound/magic/lightning_chargeup.ogg', 100, 1, extrarange = 5)
playsound(src.loc, 'sound/magic/lightning_chargeup.ogg', 100, 1, extrarange = 15)
spawn(100)
var/obj/singularity/energy_ball/EB = new(loc)
orbiting_balls.Add(EB)
@@ -113,7 +113,7 @@ var/list/blacklisted_tesla_types = list(/obj/machinery/atmospherics,
return closest_atom
/proc/tesla_zap(var/atom/source, zap_range = 3, power)
if(power < 500)
if(power < 1000)
return
var/list/tesla_coils = list()
var/list/grounding_rods = list()