mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Fixed the map/code issues that the body bags caused.
/obj/effects is now /obj/effect. /obj/station_objects is now /obj/structure. Did a bit of minor blob work. The Bay 12 body bags were replaced with closets because having two sets of code that do almost the same thing is silly. Changed back a few of the last jobproc edits as the remove from list before assign was a check to see if the mob was fucked up and if it was remove it so we did not check it again as it would still be fucked up. The medbay/tox monkeys names are random once more. More random name monkeys will help with changeling and clean up the observe/mob menus. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2324 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -181,7 +181,7 @@
|
||||
if(energy > convert2energy(8e-12)) //FAR TOO MUCH ENERGY STILL
|
||||
for(var/mob/M in hearers(src, null))
|
||||
M.show_message(text("\red <big>BANG!</big>"))
|
||||
new /obj/effects/bhole(src.loc)
|
||||
new /obj/effect/bhole(src.loc)
|
||||
|
||||
else //this amount of energy is okay so it does the proper output thing
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
/obj/item/weapon/fuel/attack(mob/M as mob, mob/user as mob)
|
||||
if (user != M)
|
||||
var/obj/effects/equip_e/human/O = new /obj/effects/equip_e/human( )
|
||||
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
|
||||
O.source = user
|
||||
O.target = M
|
||||
O.item = src
|
||||
|
||||
@@ -325,9 +325,9 @@
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 20) && C.amount >= 10)
|
||||
var/turf/T = get_turf_loc(src)
|
||||
var/obj/station_objects/cable/N = T.get_cable_node()
|
||||
var/obj/structure/cable/N = T.get_cable_node()
|
||||
if (prob(50) && electrocute_mob(usr, N, N))
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return
|
||||
@@ -345,7 +345,7 @@
|
||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||
if(do_after(user, 50))
|
||||
if (prob(50) && electrocute_mob(usr, terminal.powernet, terminal))
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return
|
||||
@@ -851,11 +851,11 @@
|
||||
malfai << "Hack complete. The APC is now under your exclusive control. Discharging cell to fuse interface."
|
||||
updateicon()
|
||||
|
||||
var/datum/effects/system/harmless_smoke_spread/smoke = new /datum/effects/system/harmless_smoke_spread()
|
||||
var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread()
|
||||
smoke.set_up(3, 0, src.loc)
|
||||
smoke.attach(src)
|
||||
smoke.start()
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
for(var/mob/M in viewers(src))
|
||||
@@ -880,11 +880,11 @@
|
||||
cell.corrupt()
|
||||
src.malfhack = 1
|
||||
updateicon()
|
||||
var/datum/effects/system/harmless_smoke_spread/smoke = new /datum/effects/system/harmless_smoke_spread()
|
||||
var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread()
|
||||
smoke.set_up(3, 0, src.loc)
|
||||
smoke.attach(src)
|
||||
smoke.start()
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
for(var/mob/M in viewers(src))
|
||||
@@ -1160,7 +1160,7 @@
|
||||
/obj/machinery/power/apc/proc/shock(mob/user, prb)
|
||||
if(!prob(prb))
|
||||
return 0
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
if (electrocute_mob(user, src, src))
|
||||
|
||||
+23
-23
@@ -19,12 +19,12 @@
|
||||
|
||||
var/dirn = get_dir(user, src)
|
||||
|
||||
for(var/obj/station_objects/cable/LC in T)
|
||||
for(var/obj/structure/cable/LC in T)
|
||||
if( (LC.d1 == dirn && LC.d2 == 0 ) || ( LC.d2 == dirn && LC.d1 == 0) )
|
||||
user << "There's already a cable at that position."
|
||||
return
|
||||
|
||||
var/obj/station_objects/cable/NC = new(T)
|
||||
var/obj/structure/cable/NC = new(T)
|
||||
|
||||
NC.cableColor(coil.color)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
// the power cable object
|
||||
|
||||
/obj/station_objects/cable/New()
|
||||
/obj/structure/cable/New()
|
||||
..()
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
if(level==1) hide(T.intact)
|
||||
|
||||
|
||||
/obj/station_objects/cable/Del() // called when a cable is deleted
|
||||
/obj/structure/cable/Del() // called when a cable is deleted
|
||||
|
||||
if(!defer_powernet_rebuild) // set if network will be rebuilt manually
|
||||
|
||||
@@ -111,13 +111,13 @@
|
||||
if(Debug) diary << "Defered cable deletion at [x],[y]: #[netnum]"
|
||||
..() // then go ahead and delete the cable
|
||||
|
||||
/obj/station_objects/cable/hide(var/i)
|
||||
/obj/structure/cable/hide(var/i)
|
||||
|
||||
if(level == 1 && istype(loc, /turf))
|
||||
invisibility = i ? 101 : 0
|
||||
updateicon()
|
||||
|
||||
/obj/station_objects/cable/proc/updateicon()
|
||||
/obj/structure/cable/proc/updateicon()
|
||||
if(invisibility)
|
||||
icon_state = "[d1]-[d2]-f"
|
||||
else
|
||||
@@ -125,19 +125,19 @@
|
||||
|
||||
|
||||
// returns the powernet this cable belongs to
|
||||
/obj/station_objects/cable/proc/get_powernet()
|
||||
/obj/structure/cable/proc/get_powernet()
|
||||
var/datum/powernet/PN // find the powernet
|
||||
if(netnum && powernets && powernets.len >= netnum)
|
||||
PN = powernets[netnum]
|
||||
return PN
|
||||
|
||||
/obj/station_objects/cable/attack_hand(mob/user)
|
||||
/obj/structure/cable/attack_hand(mob/user)
|
||||
if(ishuman(user))
|
||||
if(istype(user:gloves, /obj/item/clothing/gloves/space_ninja)&&user:gloves:candrain&&!user:gloves:draining)
|
||||
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("WIRE",src,user:wear_suit)
|
||||
return
|
||||
|
||||
/obj/station_objects/cable/attackby(obj/item/W, mob/user)
|
||||
/obj/structure/cable/attackby(obj/item/W, mob/user)
|
||||
|
||||
var/turf/T = src.loc
|
||||
if(T.intact)
|
||||
@@ -189,18 +189,18 @@
|
||||
|
||||
// shock the user with probability prb
|
||||
|
||||
/obj/station_objects/cable/proc/shock(mob/user, prb, var/siemens_coeff = 1.0)
|
||||
/obj/structure/cable/proc/shock(mob/user, prb, var/siemens_coeff = 1.0)
|
||||
if(!prob(prb))
|
||||
return 0
|
||||
if (electrocute_mob(user, powernets[src.netnum], src, siemens_coeff))
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/station_objects/cable/ex_act(severity)
|
||||
/obj/structure/cable/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
@@ -320,12 +320,12 @@
|
||||
else
|
||||
dirn = get_dir(F, user)
|
||||
|
||||
for(var/obj/station_objects/cable/LC in F)
|
||||
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."
|
||||
return
|
||||
|
||||
var/obj/station_objects/cable/C = new(F)
|
||||
var/obj/structure/cable/C = new(F)
|
||||
|
||||
C.cableColor(color)
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
|
||||
// called when cable_coil is click on an installed obj/cable
|
||||
|
||||
/obj/item/weapon/cable_coil/proc/cable_join(obj/station_objects/cable/C, mob/user)
|
||||
/obj/item/weapon/cable_coil/proc/cable_join(obj/structure/cable/C, mob/user)
|
||||
|
||||
var/turf/U = user.loc
|
||||
if(!isturf(U))
|
||||
@@ -386,12 +386,12 @@
|
||||
|
||||
var/fdirn = turn(dirn, 180) // the opposite direction
|
||||
|
||||
for(var/obj/station_objects/cable/LC in U) // check to make sure there's not a cable there already
|
||||
for(var/obj/structure/cable/LC in U) // check to make sure there's not a cable there already
|
||||
if(LC.d1 == fdirn || LC.d2 == fdirn)
|
||||
user << "There's already a cable at that position."
|
||||
return
|
||||
|
||||
var/obj/station_objects/cable/NC = new(U)
|
||||
var/obj/structure/cable/NC = new(U)
|
||||
NC.cableColor(color)
|
||||
|
||||
NC.d1 = 0
|
||||
@@ -422,7 +422,7 @@
|
||||
nd2 = C.d2
|
||||
|
||||
|
||||
for(var/obj/station_objects/cable/LC in T) // check to make sure there's no matching cable
|
||||
for(var/obj/structure/cable/LC in T) // check to make sure there's no matching cable
|
||||
if(LC == C) // skip the cable we're interacting with
|
||||
continue
|
||||
if((LC.d1 == nd1 && LC.d2 == nd2) || (LC.d1 == nd2 && LC.d2 == nd1) ) // make sure no cable matches either direction
|
||||
@@ -451,13 +451,13 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/station_objects/cable/proc/mergeConnectedNetworks(var/direction)
|
||||
/obj/structure/cable/proc/mergeConnectedNetworks(var/direction)
|
||||
var/turf/TB
|
||||
if((d1 == direction || d2 == direction) != 1)
|
||||
return
|
||||
TB = get_step(src, direction)
|
||||
|
||||
for(var/obj/station_objects/cable/TC in TB)
|
||||
for(var/obj/structure/cable/TC in TB)
|
||||
|
||||
if(!TC)
|
||||
continue
|
||||
@@ -482,10 +482,10 @@
|
||||
|
||||
PN.merge_powernets(TPN)
|
||||
|
||||
/obj/station_objects/cable/proc/mergeConnectedNetworksOnTurf()
|
||||
/obj/structure/cable/proc/mergeConnectedNetworksOnTurf()
|
||||
|
||||
|
||||
for(var/obj/station_objects/cable/C in loc)
|
||||
for(var/obj/structure/cable/C in loc)
|
||||
|
||||
|
||||
if(!C)
|
||||
@@ -545,7 +545,7 @@
|
||||
|
||||
PN.merge_powernets(TPN)
|
||||
|
||||
obj/station_objects/cable/proc/cableColor(var/colorC)
|
||||
obj/structure/cable/proc/cableColor(var/colorC)
|
||||
var/color_n = "red"
|
||||
if(colorC)
|
||||
color_n = colorC
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
..()
|
||||
var/obj/item/clothing/gloves/G = W
|
||||
if(istype(G))
|
||||
// var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
// var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
// s.set_up(3, 1, src)
|
||||
// s.start()
|
||||
// if (prob(80+(G.siemens_coefficient*100)) && electrocute_mob(user, src, src))
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
else if(status == LIGHT_EMPTY)
|
||||
user << "You stick \the [W] into the light socket!"
|
||||
if(has_power() && (W.flags & CONDUCT))
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
//if(!user.mutations & COLD_RESISTANCE)
|
||||
@@ -324,7 +324,7 @@
|
||||
if(status == LIGHT_OK || status == LIGHT_BURNED)
|
||||
playsound(src.loc, 'Glasshit.ogg', 75, 1)
|
||||
if(on)
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
status = LIGHT_BROKEN
|
||||
|
||||
+21
-21
@@ -64,14 +64,14 @@
|
||||
var/netcount = 0
|
||||
powernets = list()
|
||||
|
||||
for(var/obj/station_objects/cable/PC in world)
|
||||
for(var/obj/structure/cable/PC in world)
|
||||
PC.netnum = 0
|
||||
for(var/obj/machinery/power/M in machines)
|
||||
if(M.netnum >=0)
|
||||
M.netnum = 0
|
||||
|
||||
|
||||
for(var/obj/station_objects/cable/PC in world)
|
||||
for(var/obj/structure/cable/PC in world)
|
||||
if(!PC.netnum)
|
||||
PC.netnum = ++netcount
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
PN.number = L
|
||||
|
||||
|
||||
for(var/obj/station_objects/cable/C in world)
|
||||
for(var/obj/structure/cable/C in world)
|
||||
var/datum/powernet/PN = powernets[C.netnum]
|
||||
PN.cables += C
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
result += P
|
||||
|
||||
|
||||
for(var/obj/station_objects/cable/C in T)
|
||||
for(var/obj/structure/cable/C in T)
|
||||
if(C.d1 == fdir || C.d2 == fdir)
|
||||
if(!unmarked || !C.netnum)
|
||||
result += C
|
||||
@@ -129,7 +129,7 @@
|
||||
return result
|
||||
|
||||
|
||||
/obj/station_objects/cable/proc/get_connections()
|
||||
/obj/structure/cable/proc/get_connections()
|
||||
|
||||
var/list/res = list() // this will be a list of all connected power objects
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
cdir = get_dir(T, src)
|
||||
|
||||
for(var/obj/station_objects/cable/C in T)
|
||||
for(var/obj/structure/cable/C in T)
|
||||
|
||||
if(C.netnum)
|
||||
continue
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
var/list/res = list()
|
||||
|
||||
for(var/obj/station_objects/cable/C in src.loc)
|
||||
for(var/obj/structure/cable/C in src.loc)
|
||||
|
||||
if(C.netnum)
|
||||
continue
|
||||
@@ -194,8 +194,8 @@
|
||||
|
||||
while(1)
|
||||
|
||||
if( istype(O, /obj/station_objects/cable) )
|
||||
var/obj/station_objects/cable/C = O
|
||||
if( istype(O, /obj/structure/cable) )
|
||||
var/obj/structure/cable/C = O
|
||||
|
||||
C.netnum = num
|
||||
P = C.get_connections()
|
||||
@@ -223,7 +223,7 @@
|
||||
|
||||
// cut a powernet at this cable object
|
||||
|
||||
/datum/powernet/proc/cut_cable(var/obj/station_objects/cable/C)
|
||||
/datum/powernet/proc/cut_cable(var/obj/structure/cable/C)
|
||||
|
||||
var/turf/T1 = C.loc
|
||||
if(C.d1)
|
||||
@@ -237,9 +237,9 @@
|
||||
|
||||
if(Debug)
|
||||
for(var/obj/O in P1)
|
||||
world.log << "P1: [O] at [O.x] [O.y] : [istype(O, /obj/station_objects/cable) ? "[O:d1]/[O:d2]" : null] "
|
||||
world.log << "P1: [O] at [O.x] [O.y] : [istype(O, /obj/structure/cable) ? "[O:d1]/[O:d2]" : null] "
|
||||
for(var/obj/O in P2)
|
||||
world.log << "P2: [O] at [O.x] [O.y] : [istype(O, /obj/station_objects/cable) ? "[O:d1]/[O:d2]" : null] "
|
||||
world.log << "P2: [O] at [O.x] [O.y] : [istype(O, /obj/structure/cable) ? "[O:d1]/[O:d2]" : null] "
|
||||
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
|
||||
// zero the netnum of all cables & nodes in this powernet
|
||||
|
||||
for(var/obj/station_objects/cable/OC in cables)
|
||||
for(var/obj/structure/cable/OC in cables)
|
||||
OC.netnum = 0
|
||||
for(var/obj/machinery/power/OM in nodes)
|
||||
OM.netnum = 0
|
||||
@@ -276,8 +276,8 @@
|
||||
if(OM.netnum != number)
|
||||
notlooped = 1
|
||||
break
|
||||
else if( istype(O, /obj/station_objects/cable) )
|
||||
var/obj/station_objects/cable/OC = O
|
||||
else if( istype(O, /obj/structure/cable) )
|
||||
var/obj/structure/cable/OC = O
|
||||
if(OC.netnum != number)
|
||||
notlooped = 1
|
||||
break
|
||||
@@ -293,7 +293,7 @@
|
||||
|
||||
if(Debug) world.log << "Was not looped: spliting PN#[number] ([cables.len];[nodes.len])"
|
||||
|
||||
for(var/obj/station_objects/cable/OC in cables)
|
||||
for(var/obj/structure/cable/OC in cables)
|
||||
|
||||
if(!OC.netnum) // non-connected cables will have netnum==0, since they weren't reached by propagation
|
||||
|
||||
@@ -401,13 +401,13 @@
|
||||
else
|
||||
P.cables += cables
|
||||
cables = P.cables
|
||||
for(var/obj/station_objects/cable/C in cables)
|
||||
for(var/obj/structure/cable/C in cables)
|
||||
C.netnum = number
|
||||
del P
|
||||
|
||||
/obj/machinery/power/proc/connect_to_network()
|
||||
var/turf/T = src.loc
|
||||
var/obj/station_objects/cable/C = T.get_cable_node()
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if (!C || !C.netnum)
|
||||
return
|
||||
makepowernets() //TODO: find fast way
|
||||
@@ -419,7 +419,7 @@
|
||||
/turf/proc/get_cable_node()
|
||||
if(!istype(src, /turf/simulated/floor))
|
||||
return null
|
||||
for(var/obj/station_objects/cable/C in src)
|
||||
for(var/obj/structure/cable/C in src)
|
||||
if(C.d1 == 0)
|
||||
return C
|
||||
return null
|
||||
@@ -448,8 +448,8 @@
|
||||
if (istype(power_source,/area))
|
||||
source_area = power_source
|
||||
power_source = source_area.get_apc()
|
||||
if (istype(power_source,/obj/station_objects/cable))
|
||||
var/obj/station_objects/cable/tmp = power_source
|
||||
if (istype(power_source,/obj/structure/cable))
|
||||
var/obj/structure/cable/tmp = power_source
|
||||
power_source = powernets[tmp.netnum]
|
||||
|
||||
var/datum/powernet/PN
|
||||
|
||||
@@ -53,8 +53,8 @@ Using sd_DynamicAreaLighting
|
||||
1) Luminosity changes at run time.
|
||||
If your program makes changes in luminosity while it is
|
||||
running, you need to use sd_SetLuminosity(new_luminosity)
|
||||
so the library can remove the effects of the old luminosity
|
||||
and apply the new effects.
|
||||
so the library can remove the effect of the old luminosity
|
||||
and apply the new effect.
|
||||
|
||||
2) Opacity changes at run time.
|
||||
As with luminosity changes, you need to use
|
||||
@@ -64,15 +64,15 @@ Using sd_DynamicAreaLighting
|
||||
3) New atoms that change the opacity of a location.
|
||||
This is somewhat more complex, and the library doesn't
|
||||
have a simple proc to take care of it yet. You should use
|
||||
sd_StripLocalLum() to strip the luminosity effects of
|
||||
sd_StripLocalLum() to strip the luminosity effect of
|
||||
anything shining on that space, create the new atom, then
|
||||
use sd_ApplyLocalLum() to reapply the luminosity effects.
|
||||
use sd_ApplyLocalLum() to reapply the luminosity effect.
|
||||
Examine the sd_SetOpacity() proc for an example of the
|
||||
procedure.
|
||||
|
||||
All areas will automatically use the sd_DynamicAreaLighting
|
||||
library when it is included in your project. You may disable
|
||||
lighting effects in an area by specifically setting the area's
|
||||
lighting effect in an area by specifically setting the area's
|
||||
sd_lighting var to 0. For example:
|
||||
|
||||
area/always_lit
|
||||
@@ -80,13 +80,13 @@ Using sd_DynamicAreaLighting
|
||||
sd_lighting = 0
|
||||
|
||||
This library chops areas into 5 separate areas of differing
|
||||
light effects, so you may want to modify area Enter(), Exit(),
|
||||
light effect, so you may want to modify area Enter(), Exit(),
|
||||
Entered(), and Exited() procs to make sure the atom has moved
|
||||
from a different area instead of a different light zone of the
|
||||
same area.
|
||||
|
||||
IMPORTANT NOTE: Since sd_DynamicAreaLighting uses the view()
|
||||
proc, large luminosity settings may cause strange effects. You
|
||||
proc, large luminosity settings may cause strange effect. You
|
||||
should limit luminosity to (world.view * 2) or less.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
@@ -173,7 +173,7 @@ DAY/NIGHT CYCLES
|
||||
|
||||
The sd_OutsideLight() proc does not automatically detect a
|
||||
range out of bounds in case you want to use nonstandard values
|
||||
for interesting effects. For instance, you could use a negative
|
||||
for interesting effect. For instance, you could use a negative
|
||||
value to dampen light sources.
|
||||
|
||||
If you want daylight to spill indoors:
|
||||
@@ -240,18 +240,18 @@ All atoms have the following procs:
|
||||
|
||||
sd_StripLum(list/V = view(luminosity,src), center = src)
|
||||
The reverse of sd_ApplyLum(), sd_StripLum removes luminosity
|
||||
effects.
|
||||
effect.
|
||||
|
||||
sd_ApplyLocalLum(list/affected = viewers(20,src))
|
||||
Applies the lighting effects of all atoms in affected. This
|
||||
proc is used with sd_StripLocalLum() for effects that may
|
||||
Applies the lighting effect of all atoms in affected. This
|
||||
proc is used with sd_StripLocalLum() for effect that may
|
||||
change the opacity of a turf.
|
||||
|
||||
sd_StripLocalLum()
|
||||
Strips effects of all local luminous atoms.
|
||||
Strips effect of all local luminous atoms.
|
||||
RETURNS: list of all the luminous atoms stripped
|
||||
IMPORTANT! Each sd_StripLocalLum() call should have a matching
|
||||
sd_ApplyLocalLum() to restore the local effects.
|
||||
sd_ApplyLocalLum() to restore the local effect.
|
||||
|
||||
sd_SetLuminosity(new_luminosity as num)
|
||||
Sets the atom's luminosity, making adjustments to the
|
||||
@@ -309,11 +309,11 @@ Turfs have these additional procs and vars:
|
||||
zeroing the lumcount, then reapplying local luminosity.
|
||||
|
||||
sd_ApplySpill()
|
||||
Applies to effects of daylight spilling into inside
|
||||
Applies to effect of daylight spilling into inside
|
||||
areas in view of this turf.
|
||||
|
||||
sd_StripSpill()
|
||||
Removes to effects of daylight spilling into inside
|
||||
Removes to effect of daylight spilling into inside
|
||||
areas in view of this turf.
|
||||
|
||||
\********************************************************************/
|
||||
@@ -321,7 +321,7 @@ Turfs have these additional procs and vars:
|
||||
var
|
||||
sd_dark_icon = 'ss13_dark_alpha7.dmi' // icon used for darkness
|
||||
sd_dark_shades = 7 // number of icon state in sd_dark_icon
|
||||
sd_light_layer = 10 // graphics layer for light effects
|
||||
sd_light_layer = 10 // graphics layer for light effect
|
||||
sd_light_outside = 0 // how bright it is outside
|
||||
sd_top_luminosity = 0
|
||||
|
||||
@@ -409,7 +409,7 @@ atom
|
||||
T.sd_LumUpdate()
|
||||
|
||||
sd_ApplyLocalLum(list/affected = view(sd_top_luminosity,src))
|
||||
// Reapplies the lighting effects of all atoms in affected.
|
||||
// Reapplies the lighting effect of all atoms in affected.
|
||||
for(var/atom/A in affected)
|
||||
if(A.luminosity) A.sd_ApplyLum()
|
||||
|
||||
@@ -422,7 +422,7 @@ atom
|
||||
RETURNS: list of all the luminous atoms stripped
|
||||
|
||||
IMPORTANT! Each sd_StripLocalLum() call should have a matching
|
||||
sd_ApplyLocalLum() to restore the local effects. */
|
||||
sd_ApplyLocalLum() to restore the local effect. */
|
||||
var/list/affected = list()
|
||||
for(var/atom/A in view(sd_top_luminosity,src))
|
||||
var/turfflag = (isturf(src)?1:0)
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
del(src)
|
||||
return 0
|
||||
if(iscarbon(user))
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(5, 1, user.loc)
|
||||
s.start()
|
||||
var/shock_damage = min(rand(30,40),rand(30,40))
|
||||
@@ -72,7 +72,7 @@
|
||||
user.throw_at(target, 200, 4)
|
||||
return
|
||||
else if(issilicon(user))
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(5, 1, user.loc)
|
||||
s.start()
|
||||
var/shock_damage = rand(15,30)
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
A.icon_state = "u_laser"
|
||||
playsound(src.loc, 'emitter.ogg', 25, 1)
|
||||
if(prob(35))
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
A.dir = src.dir
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
///obj/machinery/the_singularitygen/Bumped(atom/A)
|
||||
// if(istype(A,/obj/effects/accelerated_particle))
|
||||
// if(istype(A,/obj/effect/accelerated_particle))
|
||||
// src.energy += A:energy
|
||||
// return
|
||||
// ..()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/effects/accelerated_particle
|
||||
/obj/effect/accelerated_particle
|
||||
name = "Accelerated Particles"
|
||||
desc = "Small things moving very fast."
|
||||
icon = 'particle_accelerator.dmi'
|
||||
|
||||
@@ -39,7 +39,7 @@ PE|PE|PE
|
||||
|
||||
*/
|
||||
|
||||
/obj/station_objects/particle_accelerator
|
||||
/obj/structure/particle_accelerator
|
||||
name = "Particle Accelerator"
|
||||
desc = "Part of a Particle Accelerator."
|
||||
icon = 'particle_accelerator.dmi'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/station_objects/particle_accelerator/fuel_chamber
|
||||
/obj/structure/particle_accelerator/fuel_chamber
|
||||
name = "Particle Accelerator Fuel Control"
|
||||
desc = "Part of a Particle Accelerator."
|
||||
icon = 'particle_accelerator.dmi'
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
construction_state = 0
|
||||
active = 0
|
||||
var
|
||||
list/obj/station_objects/particle_accelerator/connected_parts
|
||||
list/obj/structure/particle_accelerator/connected_parts
|
||||
assembled = 0
|
||||
strength = 0
|
||||
|
||||
@@ -70,12 +70,12 @@
|
||||
|
||||
process()
|
||||
if(src.active)
|
||||
for(var/obj/station_objects/particle_accelerator/particle_emitter/PE in connected_parts)
|
||||
for(var/obj/structure/particle_accelerator/particle_emitter/PE in connected_parts)
|
||||
if(PE)
|
||||
PE.emit_particle(src.strength)
|
||||
// for(var/obj/station_objects/particle_accelerator/fuel_chamber/PF in connected_parts)
|
||||
// for(var/obj/structure/particle_accelerator/fuel_chamber/PF in connected_parts)
|
||||
// PF.doshit()
|
||||
// for(var/obj/station_objects/particle_accelerator/power_box/PB in connected_parts)
|
||||
// for(var/obj/structure/particle_accelerator/power_box/PB in connected_parts)
|
||||
// PB.doshit()
|
||||
//finish up putting the fuel run and power use things in here
|
||||
return
|
||||
@@ -107,24 +107,24 @@
|
||||
odir = 4
|
||||
var/turf/T = src.loc
|
||||
T = get_step(T,rdir)
|
||||
if(check_part(T,/obj/station_objects/particle_accelerator/fuel_chamber))
|
||||
if(check_part(T,/obj/structure/particle_accelerator/fuel_chamber))
|
||||
tally++
|
||||
T = get_step(T,odir)
|
||||
if(check_part(T,/obj/station_objects/particle_accelerator/end_cap))
|
||||
if(check_part(T,/obj/structure/particle_accelerator/end_cap))
|
||||
tally++
|
||||
T = get_step(T,dir)
|
||||
T = get_step(T,dir)
|
||||
if(check_part(T,/obj/station_objects/particle_accelerator/power_box))
|
||||
if(check_part(T,/obj/structure/particle_accelerator/power_box))
|
||||
tally++
|
||||
T = get_step(T,dir)
|
||||
if(check_part(T,/obj/station_objects/particle_accelerator/particle_emitter/center))
|
||||
if(check_part(T,/obj/structure/particle_accelerator/particle_emitter/center))
|
||||
tally++
|
||||
T = get_step(T,ldir)
|
||||
if(check_part(T,/obj/station_objects/particle_accelerator/particle_emitter/left))
|
||||
if(check_part(T,/obj/structure/particle_accelerator/particle_emitter/left))
|
||||
tally++
|
||||
T = get_step(T,rdir)
|
||||
T = get_step(T,rdir)
|
||||
if(check_part(T,/obj/station_objects/particle_accelerator/particle_emitter/right))
|
||||
if(check_part(T,/obj/structure/particle_accelerator/particle_emitter/right))
|
||||
tally++
|
||||
if(tally >= 6)
|
||||
assembled = 1
|
||||
@@ -137,7 +137,7 @@
|
||||
check_part(var/turf/T, var/type)
|
||||
if(!(T)||!(type))
|
||||
return 0
|
||||
var/obj/station_objects/particle_accelerator/PA = locate(/obj/station_objects/particle_accelerator) in T
|
||||
var/obj/structure/particle_accelerator/PA = locate(/obj/structure/particle_accelerator) in T
|
||||
if(istype(PA, type))
|
||||
if(PA.connect_master(src))
|
||||
if(PA.report_ready(src))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/station_objects/particle_accelerator/particle_emitter
|
||||
/obj/structure/particle_accelerator/particle_emitter
|
||||
name = "Particle Accelerator Emitter"
|
||||
desc = "Part of a Particle Accelerator, might not want to stand near this end."
|
||||
icon = 'particle_accelerator.dmi'
|
||||
@@ -32,15 +32,15 @@
|
||||
emit_particle(var/strength = 0)
|
||||
if((src.last_shot + src.fire_delay) <= world.time)
|
||||
src.last_shot = world.time
|
||||
var/obj/effects/accelerated_particle/A = null
|
||||
var/obj/effect/accelerated_particle/A = null
|
||||
var/turf/T = get_step(src,dir)
|
||||
switch(strength)
|
||||
if(0)
|
||||
A = new/obj/effects/accelerated_particle/weak(T, dir)
|
||||
A = new/obj/effect/accelerated_particle/weak(T, dir)
|
||||
if(1)
|
||||
A = new/obj/effects/accelerated_particle(T, dir)
|
||||
A = new/obj/effect/accelerated_particle(T, dir)
|
||||
if(2)
|
||||
A = new/obj/effects/accelerated_particle/strong(T, dir)
|
||||
A = new/obj/effect/accelerated_particle/strong(T, dir)
|
||||
if(A)
|
||||
A.dir = src.dir
|
||||
return 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/station_objects/particle_accelerator/power_box
|
||||
/obj/structure/particle_accelerator/power_box
|
||||
name = "Particle Accelerator"
|
||||
desc = "Part of a Particle Accelerator, this part seems to have a maintenance panel on it."
|
||||
icon = 'particle_accelerator.dmi'
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
var/global/list/uneatable = list(
|
||||
/turf/space,
|
||||
/obj/effects,
|
||||
/obj/effects/overlay,
|
||||
/obj/effects/decal/cleanable,
|
||||
/obj/effects/rune
|
||||
/obj/effect,
|
||||
/obj/effect/overlay,
|
||||
/obj/effect/decal/cleanable,
|
||||
/obj/effect/rune
|
||||
)
|
||||
|
||||
/obj/machinery/singularity/
|
||||
|
||||
@@ -324,7 +324,7 @@
|
||||
for(var/mob/M in viewers(src))
|
||||
M.show_message("\red The [src.name] is making strange noises!", 3, "\red You hear sizzling electronics.", 2)
|
||||
sleep(10*pick(4,5,6,7,10,14))
|
||||
var/datum/effects/system/harmless_smoke_spread/smoke = new /datum/effects/system/harmless_smoke_spread()
|
||||
var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread()
|
||||
smoke.set_up(3, 0, src.loc)
|
||||
smoke.attach(src)
|
||||
smoke.start()
|
||||
@@ -333,7 +333,7 @@
|
||||
return
|
||||
if(prob(15)) //Power drain
|
||||
world << "\red SMES power drain in [src.loc.loc]"
|
||||
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
||||
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
s.start()
|
||||
if(prob(50))
|
||||
@@ -342,7 +342,7 @@
|
||||
emp_act(2)
|
||||
if(prob(5)) //smoke only
|
||||
world << "\red SMES smoke in [src.loc.loc]"
|
||||
var/datum/effects/system/harmless_smoke_spread/smoke = new /datum/effects/system/harmless_smoke_spread()
|
||||
var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread()
|
||||
smoke.set_up(3, 0, src.loc)
|
||||
smoke.attach(src)
|
||||
smoke.start()
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
if(do_after(user, 20))
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/station_objects/computerframe/A = new /obj/station_objects/computerframe( src.loc )
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
|
||||
for (var/obj/C in src)
|
||||
@@ -236,7 +236,7 @@
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/station_objects/computerframe/A = new /obj/station_objects/computerframe( src.loc )
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
var/obj/item/weapon/circuitboard/solar_control/M = new /obj/item/weapon/circuitboard/solar_control( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
if(do_after(user, 20))
|
||||
if (src.stat & BROKEN)
|
||||
user << "\blue The broken glass falls out."
|
||||
var/obj/station_objects/computerframe/A = new /obj/station_objects/computerframe( src.loc )
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
new /obj/item/weapon/shard( src.loc )
|
||||
var/obj/item/weapon/circuitboard/turbine_control/M = new /obj/item/weapon/circuitboard/turbine_control( A )
|
||||
for (var/obj/C in src)
|
||||
@@ -256,7 +256,7 @@
|
||||
del(src)
|
||||
else
|
||||
user << "\blue You disconnect the monitor."
|
||||
var/obj/station_objects/computerframe/A = new /obj/station_objects/computerframe( src.loc )
|
||||
var/obj/structure/computerframe/A = new /obj/structure/computerframe( src.loc )
|
||||
var/obj/item/weapon/circuitboard/turbine_control/M = new /obj/item/weapon/circuitboard/turbine_control( A )
|
||||
for (var/obj/C in src)
|
||||
C.loc = src.loc
|
||||
|
||||
Reference in New Issue
Block a user