Revert All of Cael_Aislinn's stuff from the last day, committed by Cib.

Reason: Compile Error, hung server. Damnit Cael.
This commit is contained in:
Hawk-v3
2012-06-15 22:33:18 +01:00
parent 9064a15bca
commit e68a32c173
12 changed files with 16 additions and 524 deletions

View File

@@ -1,41 +0,0 @@
//---------- actual energy field
/obj/effect/energy_field
name = "energy field"
desc = "Impenetrable field of energy, capable of blocking anything as long as it's active."
icon = 'shielding.dmi'
icon_state = "shieldsparkles"
anchored = 1
layer = 2.1
density = 0
invisibility = 2
var/strength = 0
var/obj/machinery/shield_gen/parent
var/stress = 0
/obj/effect/energy_field/ex_act(var/severity)
Stress(2)
//nothing
/obj/effect/energy_field/meteorhit(obj/effect/meteor/M as obj)
if(M)
walk(M,0)
/obj/effect/energy_field/proc/Stress(var/severity)
strength -= severity
stress += severity
//if we take too much damage, drop out - the generator will bring us back up if we have enough power
if(strength < 1)
invisibility = 2
density = 0
/obj/effect/energy_field/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
//Purpose: Determines if the object (or airflow) can pass this atom.
//Called by: Movement, airflow.
//Inputs: The moving atom (optional), target turf, "height" and air group
//Outputs: Boolean if can pass.
//return (!density || !height || air_group)
return 0

View File

@@ -1,64 +0,0 @@
//---------- external shield generator
//generates an energy field that loops around any built up area in space (is useless inside) halts movement and airflow, is blocked by walls, windows, airlocks etc
/obj/machinery/shield_gen/external/New()
..()
/obj/machinery/shield_gen/external/get_shielded_turfs()
var
list
open = list(get_turf(src))
closed = list()
while(open.len)
for(var/turf/T in open)
for(var/turf/O in orange(1, T))
if(get_dist(O,src) > field_radius)
continue
var/add_this_turf = 0
if(istype(O,/turf/space))
for(var/turf/simulated/G in orange(1, O))
add_this_turf = 1
break
for(var/obj/structure/S in orange(1, O))
add_this_turf = 1
break
for(var/obj/structure/S in O)
add_this_turf = 0
break
if(add_this_turf && !(O in open) && !(O in closed))
open += O
open -= T
closed += T
return closed
/obj/machinery/shield_gen/external/process()
/*if(stat & (NOPOWER|BROKEN))
return*/
if(!active)
return
/*spawn(100)
power()*/
/*if(src.active >= 1)
if(src.power == 0)
src.visible_message("\red The [src.name] shuts down due to lack of power!", \
"You hear heavy droning fade out")
icon_state = "generator0"
src.active = 0*/
..()
/obj/item/weapon/circuitboard/shield_gen/external
name = "Circuit Board (External Shield Generator)"
build_path = "/obj/machinery/shield_gen/external"
board_type = "machine"
origin_tech = "electromagnetic=3;engineering=2;power=1"
frame_desc = "Requires, 2 Cable Coil, 2 Nano Manipulator, 1 Advanced Matter Bin, 1 Console Screen and 1 High-Power Micro-Laser. "
req_components = list(
"/obj/item/weapon/cable_coil" = 2,
"/obj/item/weapon/stock_parts/manipulator/nano" = 2,
"/obj/item/weapon/stock_parts/matter_bin/adv" = 1,
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/stock_parts/micro_laser/high" = 1)

View File

@@ -1,156 +0,0 @@
//---------- shield capacitor
//pulls energy out of a power net and charges an adjacent generator
/obj/machinery/shield_capacitor
name = "shield capacitor"
desc = "Machine that charges a shield generator."
icon = 'shielding.dmi'
icon_state = "capacitor"
var/active = 1
density = 1
anchored = 1
var/obj/machinery/shield_gen/target_generator
var/stored_charge = 0
var/time_since_fail = 100
var/max_charge = 1000000
var/max_charge_rate = 100000
var/min_charge_rate = 0
var/locked = 0
//
use_power = 1 //0 use nothing
//1 use idle power
//2 use active power
idle_power_usage = 10
active_power_usage = 100
var/charge_rate = 100
/obj/machinery/shield_capacitor/New()
..()
target_generator = locate() in get_step(src,dir)
if(target_generator && !target_generator.owned_capacitor)
target_generator.owned_capacitor = src
/*spawn(10)
check_powered()*/
/obj/machinery/shield_capacitor/power_change()
if(stat & BROKEN)
icon_state = "broke"
else
if( powered() )
if (src.active)
icon_state = "capacitor"
else
icon_state = "capacitor"
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "capacitor"
stat |= NOPOWER
/obj/machinery/shield_capacitor/process()
//
if(active)
use_power = 2
if(stored_charge + charge_rate > max_charge)
active_power_usage = max_charge - stored_charge
else
active_power_usage = charge_rate
stored_charge += active_power_usage
else
use_power = 1
time_since_fail++
if(stored_charge < active_power_usage * 1.5)
time_since_fail = 0
//
updateDialog()
/obj/machinery/shield_capacitor/attackby(obj/item/W, mob/user)
/*if(istype(W, /obj/item/weapon/wrench))
if(active)
user << "Turn off the field generator first."
return
else if(state == 0)
state = 1
playsound(src.loc, 'Ratchet.ogg', 75, 1)
user << "You secure the external reinforcing bolts to the floor."
src.anchored = 1
return
else if(state == 1)
state = 0
playsound(src.loc, 'Ratchet.ogg', 75, 1)
user << "You undo the external reinforcing bolts."
src.anchored = 0
return*/
if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if (src.allowed(user))
src.locked = !src.locked
user << "Controls are now [src.locked ? "locked." : "unlocked."]"
else
user << "\red Access denied."
else
src.add_fingerprint(user)
user << "\red You hit the [src.name] with your [W.name]!"
for(var/mob/M in viewers(src))
if(M == user) continue
M.show_message("\red The [src.name] has been hit with the [W.name] by [user.name]!")
/obj/machinery/shield_capacitor/attack_hand(mob/user as mob)
interact(user)
src.add_fingerprint(user)
/obj/machinery/shield_capacitor/Topic(href, href_list[])
..()
if( href_list["close"] )
usr << browse(null, "window=shield_capacitor")
usr.machine = null
return
if( href_list["toggle"] )
active = !active
if(active)
use_power = 2
else
use_power = 1
if( href_list["charge_rate"] )
charge_rate += text2num(href_list["charge_rate"])
if(charge_rate > max_charge_rate)
charge_rate = max_charge_rate
else if(charge_rate < min_charge_rate)
charge_rate = min_charge_rate
//
updateDialog()
/obj/machinery/shield_capacitor/proc/interact(mob/user)
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
if (!istype(user, /mob/living/silicon))
user.machine = null
user << browse(null, "window=shield_capacitor")
return
var/t = "<B>Shield Capacitor Control Console</B><BR>"
t += "[target_generator ? "<font color=green>Shield generator connected.</font>" : "<font color=red>Unable to locate shield generator!</font>"]<br>"
t += "This capacitor is: [active ? "<font color=green>Online</font>" : "<font color=red>Offline</font>" ] <a href='?src=\ref[src];toggle=1'>[active ? "\[Deactivate\]" : "\[Activate\]"]</a><br>"
t += "[time_since_fail > 2 ? "<font color=green>Charging stable.</font>" : "<font color=red>Warning, low charge!</font>"]<br>"
t += "Capacitor charge: [stored_charge] Watts ([100 * stored_charge/max_charge]%)<br>"
t += "Capacitor charge rate (approx): <a href='?src=\ref[src];charge_rate=[-max_charge_rate]'>\[min\]</a> <a href='?src=\ref[src];charge_rate=-1000'>\[--\]</a> <a href='?src=\ref[src];charge_rate=-100'>\[-\]</a>[charge_rate] Watts/sec <a href='?src=\ref[src];charge_rate=100'>\[+\]</a> <a href='?src=\ref[src];charge_rate=1000'>\[++\]</a> <a href='?src=\ref[src];charge_rate=[max_charge_rate]'>\[max\]</a><br>"
t += "<hr>"
t += "<A href='?src=\ref[src];close=1'>Close</A><BR>"
user << browse(t, "window=shield_capacitor;size=500x800")
user.machine = src
/obj/item/weapon/circuitboard/shield_capacitor
name = "Circuit Board (Shield Capacitor)"
build_path = "/obj/machinery/shield_capacitor"
board_type = "machine"
origin_tech = "electromagnetic=3;engineering=2;power=1"
frame_desc = "Requires, 2 Cable Coil, 2 Nano Manipulator, 1 Advanced Matter Bin, 1 Console Screen and 1 High-Power Micro-Laser. "
req_components = list(
"/obj/item/weapon/cable_coil" = 2,
"/obj/item/weapon/stock_parts/manipulator/nano" = 2,
"/obj/item/weapon/stock_parts/matter_bin/adv" = 1,
"/obj/item/weapon/stock_parts/console_screen" = 1,
"/obj/item/weapon/stock_parts/micro_laser/high" = 1)

View File

@@ -67,10 +67,10 @@ proc/FloodFill(turf/start)
return closed
turf/proc/ZCanPass(turf/T, var/include_space = 0)
turf/proc/ZCanPass(turf/T)
//Fairly standard pass checks for turfs, objects and directional windows. Also stops at the edge of space.
if(istype(T,/turf/space) && !include_space) return 0
if(istype(T,/turf/space)) return 0
else
if(T.blocks_air||blocks_air)
return 0

View File

@@ -804,8 +804,7 @@
/datum/supply_packs/randomised/contraband
num_contained = 5
//We randomly pick 5 items from this list through the constructor, look below
contains = list("/obj/item/weapon/contraband/poster","/obj/item/weapon/cigpacket/dromedaryco","/obj/item/clothing/mask/cigarette/cigar/havana", "/obj/item/seeds/plumphelmet", "/obj/item/seeds/libertycap", "/obj/item/seeds/bloodtomato", "/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe", "/obj/item/weapon/reagent_containers/food/drinks/bottle/deadrum" )
contains = list("/obj/item/weapon/contraband/poster","/obj/item/weapon/cigpacket/dromedaryco") //We randomly pick 5 items from this list through the constructor, look below
name = "Contraband crate"
cost = 30
containertype = "/obj/structure/closet/crate"

View File

@@ -295,124 +295,3 @@ proc/is_carrying(var/M as mob, var/O as obj)
return 1
O = O:loc
return 0
//hackcopy from a ZAS function, first created for use with intertial_damper/new shielding
proc/CircleFloodFill(turf/start, var/radius = 3)
if(!istype(start))
return list()
var
list
open = list(start)
closed = list()
possibles = circlerange(start,radius)
while(open.len)
for(var/turf/T in open)
//Stop if there's a door, even if it's open. These are handled by indirect connection.
if(!T.HasDoor())
for(var/d in cardinal)
var/turf/O = get_step(T,d)
//Simple pass check.
if(O.ZCanPass(T, 1) && !(O in open) && !(O in closed) && O in possibles)
open += O
open -= T
closed += T
return closed
//floods in a square area, flowing around any shielding but including all other turf types
//created initially for explosion / shield interaction
proc/ExplosionFloodFill(turf/start, var/radius = 3)
if(!istype(start))
return list()
var
list
open = list(start)
closed = list()
possibles = range(start,radius)
while(open.len)
for(var/turf/T in open)
for(var/turf/O in range(T,1))
if( !(O in possibles) || O in open || O in closed )
continue
var/shield_here = 0
for(var/obj/effect/energy_field/E in O)
if(E.density)
shield_here = 1
break
if(!shield_here)
open += O
open -= T
closed += T
return closed
/*
/obj/machinery/shield_gen/external/get_shielded_turfs()
var
list
open = list(get_turf(src))
closed = list()
while(open.len)
for(var/turf/T in open)
for(var/turf/O in orange(1, T))
if(get_dist(O,src) > field_radius)
continue
var/add_this_turf = 0
if(istype(O,/turf/space))
for(var/turf/simulated/G in orange(1, O))
add_this_turf = 1
break
for(var/obj/structure/S in orange(1, O))
add_this_turf = 1
break
for(var/obj/structure/S in O)
add_this_turf = 0
break
if(add_this_turf && !(O in open) && !(O in closed))
open += O
open -= T
closed += T
return closed
*/
//floods in a circular area, flowing around any shielding but including all other turf types
//created initially for explosion / shield interaction
proc/ExplosionCircleFloodFill(turf/start, var/radius = 3)
if(!istype(start))
return list()
var
list
open = list(start)
closed = list()
possibles = circlerange(start,radius)
while(open.len)
for(var/turf/T in open)
for(var/turf/O in range(T,1))
if(get_dist(O,start) > radius)
continue
if( !(O in possibles) || O in open || O in closed )
continue
var/shield_here = 0
for(var/obj/effect/energy_field/E in O)
if(E.density)
shield_here = 1
break
if(!shield_here && (O in possibles) && !(O in open) && !(O in closed))
open += O
open -= T
closed += T
return closed

View File

@@ -30,91 +30,22 @@ 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)
//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)*/
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)
if(roundExplosions)
if(/obj/effect/energy_field in range(src, max(devastation_range, heavy_impact_range, light_impact_range)))
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 = 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)
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
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
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.

View File

@@ -2749,47 +2749,12 @@ datum
color = "#664300" // rgb: 102, 67, 0
dizzy_adj = 3
absinthe
name = "Absinthe"
id = "absinthe"
description = "Watch out that the Green Fairy doesn't come for you!"
color = "#33EE00" // rgb: lots, ??, ??
dizzy_adj = 5
slur_start = 25
confused_start = 100
//copy paste from LSD... shoot me
on_mob_life(var/mob/M)
if(!M) M = holder.my_atom
if(!data) data = 1
data++
M:hallucination += 5
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
// if(data >= 100)
// M:adjustToxLoss(0.1)
..()
return
rum
name = "Rum"
id = "rum"
description = "Yohoho and all that."
color = "#664300" // rgb: 102, 67, 0
deadrum
name = "Deadrum"
id = "rum"
description = "Popular with the sailors. Not very popular with everyone else."
color = "#664300" // rgb: 102, 67, 0
on_mob_life(var/mob/living/M as mob)
..()
M.dizziness +=5
if(volume > REAGENTS_OVERDOSE)
M:adjustToxLoss(1)
return
vodka
name = "Vodka"
id = "vodka"

View File

@@ -3009,14 +3009,6 @@
..()
reagents.add_reagent("rum", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/deadrum
name = "Deadrum Bumbo"
desc = "Tastes a lot sweeter than ordinary rum (that's to help disguise the kick)."
icon_state = "deadrumbottle"
New()
..()
reagents.add_reagent("deadrum", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/holywater
name = "Flask of Holy Water"
desc = "A flask of the chaplain's holy water."
@@ -3065,14 +3057,6 @@
..()
reagents.add_reagent("wine", 100)
/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe
name = "Jailbreaker Verte"
desc = "Twenty-fourth century Green Fairy, one sip of this and you just know you're gonna have a good time."
icon_state = "absinthebottle"
New()
..()
reagents.add_reagent("absinthe", 100)
//////////////////////////JUICES AND STUFF ///////////////////////
/obj/item/weapon/reagent_containers/food/drinks/bottle/orangejuice

View File

@@ -123,7 +123,7 @@
//if it's a crate, move the item into the crate
var/turf/T = get_step(A,movedir)
for(var/obj/structure/closet/crate/C in T)
if(C && C.opened && !istype(A, /obj/structure/closet/crate))
if(C && C.opened)
A.loc = C.loc
break