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

Conflicts:
	config/config.txt
This commit is contained in:
Miniature
2012-05-12 00:52:42 +09:30
389 changed files with 23433 additions and 22088 deletions

View File

@@ -195,15 +195,15 @@
..()
*/
var/obj/effect/decal/cleanable/blood/B = new(src.loc)
var/list/blood_DNA_temp[1]
blood_DNA_temp[1] = list(H.dna.unique_enzymes, H.dna.b_type)
B.blood_DNA = blood_DNA_temp
B.virus2 = H.virus2
for(var/datum/disease/D in H.viruses)
var/datum/disease/newDisease = new D.type
B.viruses += newDisease
newDisease.holder = B
// var/obj/effect/decal/cleanable/blood/B = new(src.loc)
// var/list/blood_DNA_temp[1]
// blood_DNA_temp[1] = list(H.dna.unique_enzymes, H.dna.b_type)
// B.blood_DNA = blood_DNA_temp
// B.virus2 = H.virus2
// for(var/datum/disease/D in H.viruses)
// var/datum/disease/newDisease = new D.type
// B.viruses += newDisease
// newDisease.holder = B
H:weakened = max(H:weakened,2)
H:updatehealth()

View File

@@ -22,6 +22,7 @@ Deuterium-tritium fusion: 4.5 x 10^7 K
//
var/obj/machinery/rust/core/owned_core
var/list/dormant_reactant_quantities = new
luminosity = 1
//
var/energy = 0
var/mega_energy = 0

View File

@@ -84,12 +84,14 @@ max volume of plasma storeable by the field = the total volume of a number of ti
if(owned_field)
owned_field.ChangeFieldStrength(field_strength)
icon_state = "core1"
luminosity = 1
return 1
proc/Shutdown()
icon_state = "core0"
on = 0
del(owned_field)
luminosity = 0
proc/AddParticles(var/name, var/quantity = 1)
if(owned_field)
@@ -104,6 +106,9 @@ max volume of plasma storeable by the field = the total volume of a number of ti
Shutdown()
return
//
luminosity = round(owned_field.field_strength/10)
luminosity = max(luminosity,1)
//
if(stat & (NOPOWER|BROKEN))
Shutdown()

View File

@@ -9,7 +9,7 @@
New()
spawn(0)
core_generator = locate() in range(15,src)
core_generator = locate() in world
attack_ai(mob/user)
attack_hand(user)

View File

@@ -20,7 +20,7 @@
fuel_injectors.Add("SCRAM")
fuel_injectors["SCRAM"] = new/list
spawn(0)
for(var/obj/machinery/rust/fuel_injector/Injector in range(50,src))
for(var/obj/machinery/rust/fuel_injector/Injector in world)
if(Injector.stage in fuel_injectors)
var/list/targetlist = fuel_injectors[Injector.stage]
targetlist.Add(Injector)

View File

@@ -44,7 +44,7 @@
return
var/t = "<B>Gyrotron Remote Control Console</B><BR>"
t += "<hr>"
for(var/obj/machinery/rust/gyrotron/gyro in range(25))
for(var/obj/machinery/rust/gyrotron/gyro in world)
if(gyro.remoteenabled && gyro.on)
t += "<font color=green>Gyrotron operational</font><br>"
t += "Operational mode: <font color=blue>"

View File

@@ -6,6 +6,7 @@
icon = 'effects.dmi'
icon_state = "energynet"
density = 0
anchored = 1
var/obj/machinery/rust/em_field/parent
var/mysize = 0

View File

@@ -61,12 +61,6 @@
//a lot of these variables are pretty hacked, so dont rely on the comments
/obj/machinery/power/supermatter/process()
var/datum/gas_mixture/env = loc.return_air()
//Remove gas from surrounding area
var/transfer_moles = gasefficency * env.total_moles()
var/datum/gas_mixture/removed = env.remove(transfer_moles)
//core can no longer spontaneously explode
/*
previousdet = det
@@ -111,15 +105,24 @@
#define REACTION_POWER_MODIFIER 0.5 //Higher == more overall power
*/
//100% oxygen atmosphere = 100% plasma production
//100% nitrogen atmosphere = 0% plasma production
//anything else is halfway in between; an atmosphere with no nitrogen or oxygen will still be at 50% (but steadily rise as more oxygen is made)
var/total_moles = removed.total_moles()
var/datum/gas_mixture/env = loc.return_air()
//nothing can happen in a vacuum
var/datum/gas_mixture/removed = env
var/retardation_factor = 0.5
if(total_moles)
retardation_factor += removed.oxygen / (total_moles * 2) - removed.nitrogen / (total_moles * 2)
else
retardation_factor -= 0.25
if(env.total_moles())
//Remove gas from surrounding area
var/transfer_moles = gasefficency * env.total_moles()
removed = env.remove(transfer_moles)
//100% oxygen atmosphere = 100% plasma production
//100% nitrogen atmosphere = 0% plasma production
//anything else is halfway in between; an atmosphere with no nitrogen or oxygen will still be at 50% (but steadily rise as more oxygen is made)
var/total_moles = removed.total_moles()
if(total_moles)
retardation_factor += removed.oxygen / (total_moles * 2) - removed.nitrogen / (total_moles * 2)
else
retardation_factor -= 0.25
var/device_energy = mega_energy * REACTION_POWER_MODIFIER //device energy is provided by the zero point lasers
device_energy *= removed.temperature / T0C //environmental heat directly affects device energy

View File

@@ -54,7 +54,7 @@
t_his = "her"
t_him = "her"
msg += "<EM>\a [src], one of the cat-like Tajarans.</EM>!\n"
msg += "<EM>\a [src], one of the cat-like Tajarans</EM>!\n"
//uniform
if (src.w_uniform && !skipjumpsuit)

View File

@@ -2,7 +2,7 @@
name = "tajaran"
real_name = "tajaran"
voice_name = "tajaran"
icon = 'mob.dmi'
icon = 'tajaran.dmi'
icon_state = "m-none"
var/list/tajspeak_letters
//
@@ -41,10 +41,10 @@
var/fat = ""
/*if (mutations & FAT)
fat = "fat"*/
/*
if (mutations & HULK)
overlays += image("icon" = 'genetics.dmi', "icon_state" = "hulk[fat][!lying ? "_s" : "_l"]")
*/
if (mutations & COLD_RESISTANCE)
overlays += image("icon" = 'genetics.dmi', "icon_state" = "fire[fat][!lying ? "_s" : "_l"]")
@@ -354,37 +354,8 @@
overlays += image("icon" = 'belt.dmi', "icon_state" = text("[][]", t1, (!( lying ) ? null : "2")), "layer" = MOB_LAYER)
belt.screen_loc = ui_belt
if ((wear_mask && !(wear_mask.see_face)) || (head && !(head.see_face))) // can't see the face
if (wear_id)
if (istype(wear_id, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/id = wear_id
if (id.registered_name)
name = id.registered_name
else
name = "Unknown"
else if (istype(wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = wear_id
if (pda.owner)
name = pda.owner
else
name = "Unknown"
else
name = "Unknown"
else
if (wear_id)
if (istype(wear_id, /obj/item/weapon/card/id))
var/obj/item/weapon/card/id/id = wear_id
if (id.registered_name != real_name)
name = "[real_name] (as [id.registered_name])"
else if (istype(wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = wear_id
if (pda.owner)
if (pda.owner != real_name)
name = "[real_name] (as [pda.owner])"
else
name = real_name
name = get_visible_name()
if (wear_id)
wear_id.screen_loc = ui_id
@@ -489,6 +460,8 @@
stand_icon = new /icon('tajaran.dmi', "torso_[g]_s")
lying_icon = new /icon('tajaran.dmi', "torso_[g]_l")
var/husk = (mutations & HUSK)
//var/obese = (mutations & FAT)
@@ -620,4 +593,95 @@
del(eyes_s)
/mob/living/carbon/human/tajaran/co2overloadtime = null
/mob/living/carbon/human/tajaran/temperature_resistance = T0C+70
/mob/living/carbon/human/tajaran/temperature_resistance = T0C+70
/* //This is silly. -- Erthilo
/mob/living/carbon/human/tajaran/Emissary/
unacidable = 1
var/aegis = 1
/mob/living/carbon/human/tajaran/Emissary/New()
..()
reagents.add_reagent("hyperzine", 5000) //From the dark, to the light, it's a supersonic flight!
// Gotta keep it going!
if (!(mutations & HULK))
mutations |= HULK
if (!(mutations & LASER))
mutations |= LASER
if (!(mutations & XRAY))
mutations |= XRAY
sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
see_in_dark = 8
see_invisible = 2
if (!(mutations & COLD_RESISTANCE))
mutations |= COLD_RESISTANCE
if (!(mutations & TK))
mutations |= TK
if(!(mutations & HEAL))
mutations |= HEAL
spawn(0)
while(src)
adjustBruteLoss(-10)
adjustToxLoss(-10)
adjustOxyLoss(-10)
adjustFireLoss(-10)
sleep(10)
/mob/living/carbon/human/tajaran/Emissary/ex_act()
return
/mob/living/carbon/human/tajaran/Emissary/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params)
if(istype(target , /obj/machinery/door/airlock))
if(target:locked)
target:locked = 0
if(!target:density)
return 1
if(target:operating > 0)
return
if(!ticker)
return 0
if(!target:operating)
target:operating = 1
target:animate("opening")
target:sd_SetOpacity(0)
sleep(10)
target:layer = 2.7
target:density = 0
target:update_icon()
target:sd_SetOpacity(0)
target:update_nearby_tiles()
target:operating = -1
user << "You force the door open, shearing the bolts and burning out the motor."
if(target:operating)
target:operating = -1
else if(istype(target , /obj/machinery/door/firedoor))
target:open()
/mob/living/carbon/human/tajaran/Emissary/Life()
..()
if (!(mutations & HULK))
mutations |= HULK
if((stat == 2) && aegis)
src.show_message("\red [src]'s eyes open suddenlly.", 3, "\red \"I gave a solemn vow to never die for long.\"", 2)
src.heal_overall_damage(9001,9001)
src.stat = 0
aegis = 0
*/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1,128 +0,0 @@
/obj/machinery/engine/laser
name = "Zero-point laser"
desc = "A super-powerful laser"
var/visible = 1
var/state = 1.0
var/obj/effect/beam/e_beam/first
var/power = 500
icon = 'engine.dmi'
icon_state = "laser"
anchored = 1
var/id
var/on = 0
var/freq = 50000
var/phase = 0
var/phase_variance = 0
/obj/machinery/engine/laser/process()
if(on)
if(!first)
src.first = new /obj/effect/beam/e_beam(src.loc)
src.first.master = src
src.first.dir = src.dir
src.first.power = src.power
src.first.freq = src.freq
src.first.phase = src.phase
src.first.phase_variance = src.phase_variance
step(first, dir)
if(first)
src.first.updatebeam()
else
src.first.updatebeam()
else
if(first)
del first
/obj/machinery/engine/laser/proc/setpower(var/powera)
src.power = powera
if(first)
first.setpower(src.power)
/obj/effect/beam/e_beam
name = "Laser beam"
icon = 'projectiles.dmi'
icon_state = "u_laser"
var/obj/machinery/engine/laser/master = null
var/obj/effect/beam/e_beam/next = null
var/power
var/freq = 50000
var/phase = 0
var/phase_variance = 0
anchored = 1
/obj/effect/beam/e_beam/New()
src.sd_SetLuminosity(4)
/obj/effect/beam/e_beam/proc/updatebeam()
if(!next)
if(get_step(src.loc,src.dir))
var/obj/effect/beam/e_beam/e = new /obj/effect/beam/e_beam(src.loc)
e.dir = src.dir
src.next = e
e.master = src.master
e.power = src.power
e.phase = src.phase
src.phase+=src.phase_variance
e.freq = src.freq
e.phase_variance = src.phase_variance
if(src.loc.density == 0)
for(var/atom/o in src.loc.contents)
if(o.density || o == src.master || (ismob(o) && !istype(o, /mob/dead)) )
o.laser_act(src)
del src
return
else
src.loc.laser_act(src)
del e
return
step(e,e.dir)
if(e)
e.updatebeam()
else
next.updatebeam()
/atom/proc/laser_act(var/obj/effect/beam/e_beam/b)
return
/mob/living/carbon/laser_act(var/obj/effect/beam/e_beam/b)
for(var/t in organs)
var/datum/organ/external/affecting = organs["[t]"]
if (affecting.take_damage(0, b.power/400,0,0))
UpdateDamageIcon()
else
UpdateDamage()
/obj/effect/beam/e_beam/Bump(atom/Obstacle)
Obstacle.laser_act(src)
del(src)
return
/obj/effect/beam/e_beam/proc/setpower(var/powera)
src.power = powera
if(src.next)
src.next.setpower(powera)
/obj/effect/beam/e_beam/Bumped()
src.hit()
return
/obj/effect/beam/e_beam/HasEntered(atom/movable/AM as mob|obj)
if (istype(AM, /obj/effect/beam))
return
spawn( 0 )
AM.laser_act(src)
src.hit()
return
return
/obj/effect/beam/e_beam/Del()
if(next)
del(next)
..()
return
/obj/effect/beam/e_beam/proc/hit()
del src
return

View File

@@ -1,130 +0,0 @@
//The laser control computer
//Used to control the lasers
/obj/machinery/computer/lasercon
name = "Laser control computer"
var/obj/machinery/engine/laser/laser = null
icon_state = "atmos"
var/id
var/advanced = 0
/obj/machinery/computer/lasercon/New()
spawn(1)
if(istype(src.id,/list))
laser = list()
for(var/obj/machinery/engine/laser/las in world)
if(las.id in src.id)
laser += las
else
for(var/obj/machinery/engine/laser/las in world)
if(las.id == src.id)
laser = list(las)
/obj/machinery/computer/lasercon/attack_ai(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
/obj/machinery/computer/lasercon/attack_hand(mob/user)
add_fingerprint(user)
if(stat & (BROKEN|NOPOWER))
return
interact(user)
/obj/machinery/computer/lasercon/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=powcomp")
return
user.machine = src
var/t = "<TT><B>Laser status monitor</B><HR>"
var/obj/machinery/engine/laser/laser = src.laser[1]
if(!laser)
t += "\red No laser found"
else
t += "Power level: <A href = '?src=\ref[src];input=-4'>-</A> <A href = '?src=\ref[src];input=-3'>-</A> <A href = '?src=\ref[src];input=-2'>-</A> <A href = '?src=\ref[src];input=-1'>-</A> [add_lspace(laser.power,5)] <A href = '?src=\ref[src];input=1'>+</A> <A href = '?src=\ref[src];input=2'>+</A> <A href = '?src=\ref[src];input=3'>+</A> <A href = '?src=\ref[src];input=4'>+</A><BR>"
if(advanced)
t += "Frequency: <A href = '?src=\ref[src];freq=-10000'>-</A> <A href = '?src=\ref[src];freq=-1000'>-</A> [add_lspace(laser.freq,5)] <A href = '?src=\ref[src];freq=1000'>+</A> <A href = '?src=\ref[src];freq=10000'>+</A><BR>"
t += "Output: [laser.on ? "<B>Online</B> <A href = '?src=\ref[src];online=1'>Offline</A>" : "<A href = '?src=\ref[src];online=1'>Online</A> <B>Offline</B> "]<BR>"
t += "<BR><HR><A href='?src=\ref[src];close=1'>Close</A></TT>"
user << browse(t, "window=lascomp;size=420x700")
onclose(user, "lascomp")
/obj/machinery/computer/lasercon/Topic(href, href_list)
..()
if( href_list["close"] )
usr << browse(null, "window=lascomp")
usr.machine = null
return
else if( href_list["input"] )
var/i = text2num(href_list["input"])
var/d = 0
switch(i)
if(-4)
d = -1000
if(4)
d = 1000
if(1)
d = 1
if(-1)
d = -1
if(2)
d = 10
if(-2)
d = -10
if(3)
d = 100
if(-3)
d = -100
for(var/obj/machinery/engine/laser/laser in src.laser)
laser.power += d
laser.setpower(max(1, min(3000, laser.power)))// clamp to range
src.updateDialog()
else if( href_list["online"] )
for(var/obj/machinery/engine/laser/laser in src.laser)
laser.on = !laser.on
src.updateDialog()
else if( href_list["freq"] )
var/amt = text2num(href_list["freq"])
for(var/obj/machinery/engine/laser/laser in src.laser)
if(laser.freq+amt>0)
laser.freq+=amt
src.updateDialog()
/obj/machinery/computer/lasercon/process()
if(!(stat & (NOPOWER|BROKEN)) )
use_power(250)
//src.updateDialog()
/obj/machinery/computer/lasercon/power_change()
if(stat & BROKEN)
icon_state = "broken"
else
if( powered() )
icon_state = initial(icon_state)
stat &= ~NOPOWER
else
spawn(rand(0, 15))
src.icon_state = "c_unpowered"
stat |= NOPOWER

View File

@@ -1,120 +0,0 @@
#define NITROGEN_RETARDATION_FACTOR 4 //Higher == N2 slows reaction more
#define THERMAL_RELEASE_MODIFIER 50 //Higher == less heat released during reaction
#define PLASMA_RELEASE_MODIFIER 750 //Higher == less plasma released by reaction
#define OXYGEN_RELEASE_MODIFIER 1500 //Higher == less oxygen released at high temperature/power
#define REACTION_POWER_MODIFIER 1.1 //Higher == more overall power
/obj/machinery/engine/supermatter
name = "Supermatter"
desc = "A strangely translucent and iridescent crystal. \red You get headaches just from looking at it."
icon = 'engine.dmi'
icon_state = "darkmatter"
density = 1
anchored = 1
var/gasefficency = 0.25
var/det = 0
var/previousdet = 0
var/const/explosiondet = 3500
var/const/warningtime = 50 // Make the CORE OVERLOAD message repeat only every aprox. ?? seconds
var/lastwarning = 0 // Time in 1/10th of seconds since the last sent warning
/obj/machinery/engine/klaxon
name = "Emergency Klaxon"
icon = 'engine.dmi'
icon_state = "darkmatter"
density = 1
anchored = 1
var/obj/machinery/engine/supermatter/sup
/obj/machinery/engine/klaxon/process()
if(!sup)
for(var/obj/machinery/engine/supermatter/T in world)
sup = T
break
if(sup.det >= 1)
return
/obj/machinery/engine/supermatter/process()
var/turf/simulated/L = loc
//Ok, get the air from the turf
var/datum/gas_mixture/env = L.return_air()
//Remove gas from surrounding area
var/transfer_moles = gasefficency * env.total_moles()
var/datum/gas_mixture/removed = env.remove(transfer_moles)
previousdet = det
det += (removed.temperature - 1000) / 150
det = max(det, 0)
if(det > 0 && removed.temperature > 1000) // while the core is still damaged and it's still worth noting its status
if((world.realtime - lastwarning) / 10 >= warningtime)
lastwarning = world.realtime
if(explosiondet - det <= 300)
radioalert("CORE EXPLOSION IMMINENT","Core control computer")
else if(det >= previousdet) // The damage is still going up
radioalert("CORE OVERLOAD","Core control computer")
else // Phew, we're safe
radioalert("Core returning to safe operating levels.","Core control computer")
if(det > explosiondet)
roundinfo.core = 1
//proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, force = 0)
explosion(src.loc,8,15,20,30,1)
det = 0
if (!removed)
return 1
var/power = max(round((removed.temperature - T0C) / 20), 0) //Total laser power plus an overload factor
//Get the collective laser power
for(var/dir in cardinal)
var/turf/T = get_step(L, dir)
for(var/obj/effect/beam/e_beam/item in T)
power += item.power
//Ok, 100% oxygen atmosphere = best reaction
//Maxes out at 100% oxygen pressure
var/oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0)
var/device_energy = oxygen * power
device_energy *= removed.temperature / T0C
device_energy = round(device_energy * REACTION_POWER_MODIFIER)
//To figure out how much temperature to add each tick, consider that at one atmosphere's worth
//of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
//that the device energy is around 2140. At that stage, we don't want too much heat to be put out
//Since the core is effectively "cold"
//Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
//is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
removed.temperature += max((device_energy / THERMAL_RELEASE_MODIFIER), 0)
removed.temperature = min(removed.temperature, 1500)
//Calculate how much gas to release
removed.toxins += max(round(device_energy / PLASMA_RELEASE_MODIFIER), 0)
removed.oxygen += max(round((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER), 0)
env.merge(removed)
//Not functional currently. -- SkyMarshal
/*
for(var/mob/living/carbon/l in view(src, 6)) // you have to be seeing the core to get hallucinations
if(prob(10) && !(l.glasses && istype(l.glasses, /obj/item/clothing/glasses/meson)))
l.hallucination = 50
*/
for(var/mob/living/l in view(src,3))
l.bruteloss += 50
l.updatehealth()
return 1

View File

@@ -1,6 +1,6 @@
/obj/item/weapon/stamperaser
name = "Eraser"
desc = "Some type of eraser, you guess."
name = "eraser"
desc = "It looks like some kind of eraser."
flags = FPRINT | TABLEPASS
icon = 'items.dmi'
icon_state = "zippo"