Merge remote-tracking branch 'upstream/dev' into emergency-shuttle

This commit is contained in:
mwerezak
2014-06-24 17:49:20 -04:00
32 changed files with 2084 additions and 1461 deletions

View File

@@ -61,6 +61,7 @@
#include "code\ATMOSPHERICS\components\binary_devices\circulator.dm"
#include "code\ATMOSPHERICS\components\binary_devices\dp_vent_pump.dm"
#include "code\ATMOSPHERICS\components\binary_devices\passive_gate.dm"
#include "code\ATMOSPHERICS\components\binary_devices\pipeturbine.dm"
#include "code\ATMOSPHERICS\components\binary_devices\pump.dm"
#include "code\ATMOSPHERICS\components\binary_devices\volume_pump.dm"
#include "code\ATMOSPHERICS\components\trinary_devices\filter.dm"
@@ -668,6 +669,7 @@
#include "code\game\verbs\who.dm"
#include "code\js\byjax.dm"
#include "code\js\menus.dm"
#include "code\modules\spawnpoints.dm"
#include "code\modules\admin\admin.dm"
#include "code\modules\admin\admin_investigate.dm"
#include "code\modules\admin\admin_memo.dm"

View File

@@ -0,0 +1,289 @@
#define ADIABATIC_EXPONENT 0.667 //Actually adiabatic exponent - 1.
/obj/machinery/atmospherics/pipeturbine
name = "turbine"
desc = "A gas turbine. Converting pressure into energy since 1884."
icon = 'icons/obj/pipeturbine.dmi'
icon_state = "turbine"
anchored = 0
density = 1
var/efficiency = 0.4
var/kin_energy = 0
var/datum/gas_mixture/air_in = new
var/datum/gas_mixture/air_out = new
var/volume_ratio = 0.2
var/kin_loss = 0.001
var/dP = 0
var/obj/machinery/atmospherics/node1
var/obj/machinery/atmospherics/node2
var/datum/pipe_network/network1
var/datum/pipe_network/network2
New()
..()
air_in.volume = 200
air_out.volume = 800
volume_ratio = air_in.volume / (air_in.volume + air_out.volume)
switch(dir)
if(NORTH)
initialize_directions = EAST|WEST
if(SOUTH)
initialize_directions = EAST|WEST
if(EAST)
initialize_directions = NORTH|SOUTH
if(WEST)
initialize_directions = NORTH|SOUTH
Del()
loc = null
if(node1)
node1.disconnect(src)
del(network1)
if(node2)
node2.disconnect(src)
del(network2)
node1 = null
node2 = null
..()
process()
..()
if(anchored && !(stat&BROKEN))
kin_energy *= 1 - kin_loss
dP = max(air_in.return_pressure() - air_out.return_pressure(), 0)
if(dP > 10)
kin_energy += 1/ADIABATIC_EXPONENT * dP * air_in.volume * (1 - volume_ratio**ADIABATIC_EXPONENT) * efficiency
air_in.temperature *= volume_ratio**ADIABATIC_EXPONENT
var/datum/gas_mixture/air_all = new
air_all.volume = air_in.volume + air_out.volume
air_all.merge(air_in.remove_ratio(1))
air_all.merge(air_out.remove_ratio(1))
air_in.merge(air_all.remove(volume_ratio))
air_out.merge(air_all)
update_icon()
if (network1)
network1.update = 1
if (network2)
network2.update = 1
update_icon()
overlays.Cut()
if (dP > 10)
overlays += image('icons/obj/pipeturbine.dmi', "moto-turb")
if (kin_energy > 100000)
overlays += image('icons/obj/pipeturbine.dmi', "low-turb")
if (kin_energy > 500000)
overlays += image('icons/obj/pipeturbine.dmi', "med-turb")
if (kin_energy > 1000000)
overlays += image('icons/obj/pipeturbine.dmi', "hi-turb")
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
anchored = !anchored
user << "\blue You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor."
if(anchored)
if(dir & (NORTH|SOUTH))
initialize_directions = EAST|WEST
else if(dir & (EAST|WEST))
initialize_directions = NORTH|SOUTH
initialize()
build_network()
if (node1)
node1.initialize()
node1.build_network()
if (node2)
node2.initialize()
node2.build_network()
else
if(node1)
node1.disconnect(src)
del(network1)
if(node2)
node2.disconnect(src)
del(network2)
node1 = null
node2 = null
else
..()
verb/rotate_clockwise()
set category = "Object"
set name = "Rotate Circulator (Clockwise)"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, -90)
verb/rotate_anticlockwise()
set category = "Object"
set name = "Rotate Circulator (Counterclockwise)"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, 90)
//Goddamn copypaste from binary base class because atmospherics machinery API is not damn flexible
network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
if(reference == node1)
network1 = new_network
else if(reference == node2)
network2 = new_network
if(new_network.normal_members.Find(src))
return 0
new_network.normal_members += src
return null
initialize()
if(node1 && node2) return
var/node2_connect = turn(dir, -90)
var/node1_connect = turn(dir, 90)
for(var/obj/machinery/atmospherics/target in get_step(src,node1_connect))
if(target.initialize_directions & get_dir(target,src))
node1 = target
break
for(var/obj/machinery/atmospherics/target in get_step(src,node2_connect))
if(target.initialize_directions & get_dir(target,src))
node2 = target
break
build_network()
if(!network1 && node1)
network1 = new /datum/pipe_network()
network1.normal_members += src
network1.build_network(node1, src)
if(!network2 && node2)
network2 = new /datum/pipe_network()
network2.normal_members += src
network2.build_network(node2, src)
return_network(obj/machinery/atmospherics/reference)
build_network()
if(reference==node1)
return network1
if(reference==node2)
return network2
return null
reassign_network(datum/pipe_network/old_network, datum/pipe_network/new_network)
if(network1 == old_network)
network1 = new_network
if(network2 == old_network)
network2 = new_network
return 1
return_network_air(datum/pipe_network/reference)
var/list/results = list()
if(network1 == reference)
results += air_in
if(network2 == reference)
results += air_out
return results
disconnect(obj/machinery/atmospherics/reference)
if(reference==node1)
del(network1)
node1 = null
else if(reference==node2)
del(network2)
node2 = null
return null
/obj/machinery/power/turbinemotor
name = "motor"
desc = "Electrogenerator. Converts rotation into power."
icon = 'icons/obj/pipeturbine.dmi'
icon_state = "motor"
anchored = 0
density = 1
var/kin_to_el_ratio = 0.1 //How much kinetic energy will be taken from turbine and converted into electricity
var/obj/machinery/atmospherics/pipeturbine/turbine
New()
..()
spawn(1)
updateConnection()
proc/updateConnection()
turbine = null
if(src.loc && anchored)
turbine = locate(/obj/machinery/atmospherics/pipeturbine) in get_step(src,dir)
if (turbine.stat & (BROKEN) || !turbine.anchored || turn(turbine.dir,180) != dir)
turbine = null
process()
updateConnection()
if(!turbine || !anchored || stat & (BROKEN))
return
var/power_generated = kin_to_el_ratio * turbine.kin_energy
turbine.kin_energy -= power_generated
add_avail(power_generated)
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/wrench))
anchored = !anchored
turbine = null
user << "\blue You [anchored ? "secure" : "unsecure"] the bolts holding [src] to the floor."
updateConnection()
else
..()
verb/rotate_clock()
set category = "Object"
set name = "Rotate Motor Clockwise"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, -90)
verb/rotate_anticlock()
set category = "Object"
set name = "Rotate Motor Counterclockwise"
set src in view(1)
if (usr.stat || usr.restrained() || anchored)
return
src.dir = turn(src.dir, 90)

View File

@@ -63,9 +63,11 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
if(!istype(S))
del src
return
if(!S.zone)
del src
return
var/datum/gas_mixture/air_contents = S.return_air()
//get liquid fuels on the ground.
@@ -87,6 +89,7 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
if(!air_contents.check_combustability(liquid))
//del src
RemoveFire()
return
//get a firelevel and set the icon
firelevel = air_contents.calculate_firelevel(liquid)
@@ -104,15 +107,16 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
//im not sure how to implement a version that works for every creature so for now monkeys are firesafe
for(var/mob/living/carbon/human/M in loc)
M.FireBurn(firelevel, air_contents.temperature, air_contents.return_pressure() ) //Burn the humans!
loc.fire_act(air_contents, air_contents.temperature, air_contents.return_volume())
for(var/atom/A in loc)
A.fire_act(air_contents, air_contents.temperature, air_contents.return_volume())
//spread
for(var/direction in cardinal)
if(S.open_directions & direction) //Grab all valid bordering tiles
var/turf/simulated/enemy_tile = get_step(S, direction)
if(istype(enemy_tile))
if(S.open_directions & direction) //Grab all valid bordering tiles
var/datum/gas_mixture/acs = enemy_tile.return_air()
var/obj/effect/decal/cleanable/liquid_fuel/liq = locate() in enemy_tile
if(!acs) continue
@@ -128,6 +132,9 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
if( prob( 50 + 50 * (firelevel/vsc.fire_firelevel_multiplier) ) && S.CanPass(null, enemy_tile, 0,0) && enemy_tile.CanPass(null, S, 0,0))
new/obj/fire(enemy_tile,firelevel)
else
enemy_tile.adjacent_fire_act(loc, air_contents, air_contents.temperature, air_contents.return_volume())
//seperate part of the present gas
//this is done to prevent the fire burning all gases in a single pass
var/datum/gas_mixture/flow = air_contents.remove_ratio(vsc.fire_consuption_rate)

View File

@@ -26,6 +26,10 @@
#endif
var/turf/unsim = get_step(src, d)
if(!unsim)
continue
block = unsim.c_airblock(src)
if(block & AIR_BLOCKED)
@@ -75,6 +79,10 @@
#endif
var/turf/unsim = get_step(src, d)
if(!unsim) //edge of map
continue
var/block = unsim.c_airblock(src)
if(block & AIR_BLOCKED)
@@ -108,6 +116,8 @@
if(istype(unsim, /turf/simulated))
var/turf/simulated/sim = unsim
sim.open_directions |= reverse_dir[d]
if(air_master.has_valid_zone(sim))
//Might have assigned a zone, since this happens for each direction.

View File

@@ -83,6 +83,9 @@ datum/controller/game_controller/proc/setup()
var/datum/ore_distribution/O = new()
O.populate_distribution_map()
//Set up spawn points.
populate_spawn_points()
spawn(0)
if(ticker)
ticker.pregame()

View File

@@ -20,8 +20,8 @@
/datum/game_mode/cult
name = "cult"
config_tag = "cult"
restricted_jobs = list("Chaplain","AI", "Cyborg", "Security Officer", "Warden", "Detective", "Head of Security", "Captain")
protected_jobs = list()
restricted_jobs = list("Chaplain","AI", "Cyborg", "Lawyer", "Head of Security", "Captain")
protected_jobs = list("Security Officer", "Warden", "Detective")
required_players = 5
required_players_secret = 15
required_enemies = 3

View File

@@ -14,7 +14,8 @@
/datum/game_mode/revolution
name = "revolution"
config_tag = "revolution"
restricted_jobs = list("Security Officer", "Warden", "Detective", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
restricted_jobs = list("Lawyer", "AI", "Cyborg","Captain", "Head of Personnel", "Head of Security", "Chief Engineer", "Research Director", "Chief Medical Officer")
protected_jobs = list("Security Officer", "Warden", "Detective")
required_players = 4
required_players_secret = 15
required_enemies = 3

View File

@@ -26,7 +26,7 @@ var/global/list/frozen_items = list()
/obj/machinery/computer/cryopod/attack_ai()
src.attack_hand()
obj/machinery/computer/cryopod/attack_hand(mob/user = usr)
/obj/machinery/computer/cryopod/attack_hand(mob/user = usr)
if(stat & (NOPOWER|BROKEN))
return
@@ -43,12 +43,11 @@ obj/machinery/computer/cryopod/attack_hand(mob/user = usr)
dat += "<a href='?src=\ref[src];log=1'>View storage log</a>.<br>"
dat += "<a href='?src=\ref[src];item=1'>Recover object</a>.<br>"
dat += "<a href='?src=\ref[src];allitems=1'>Recover all objects</a>.<br>"
dat += "<a href='?src=\ref[src];crew=1'>Revive crew</a>.<br/><hr/>"
user << browse(dat, "window=cryopod_console")
onclose(user, "cryopod_console")
obj/machinery/computer/cryopod/Topic(href, href_list)
/obj/machinery/computer/cryopod/Topic(href, href_list)
if(..())
return
@@ -95,9 +94,6 @@ obj/machinery/computer/cryopod/Topic(href, href_list)
I.loc = get_turf(src)
frozen_items -= I
else if(href_list["crew"])
user << "\red Functionality unavailable at this time."
src.updateUsrDialog()
return

View File

@@ -40,6 +40,14 @@
latejoin += loc
del(src)
if("JoinLateGateway")
latejoin_gateway += loc
del(src)
if("JoinLateCryo")
latejoin_cryo += loc
del(src)
//prisoners
if("prisonwarp")
prisonwarp += loc

View File

@@ -1,11 +1,12 @@
obj/structure
/obj/structure
icon = 'icons/obj/structures.dmi'
var/climbable
obj/structure/blob_act()
/obj/structure/blob_act()
if(prob(50))
del(src)
obj/structure/ex_act(severity)
/obj/structure/ex_act(severity)
switch(severity)
if(1.0)
del(src)
@@ -17,12 +18,84 @@ obj/structure/ex_act(severity)
if(3.0)
return
obj/structure/meteorhit(obj/O as obj)
/obj/structure/meteorhit(obj/O as obj)
del(src)
/obj/structure/New()
..()
if(climbable)
verbs += /obj/structure/proc/do_climb
/obj/structure/proc/do_climb()
set name = "Climb structure"
set desc = "Climbs onto a structure."
set category = "Object"
set src in oview(1)
if (!can_touch(usr) || !climbable)
return
usr.visible_message("<span class='warning'>[usr] starts climbing onto \the [src]!</span>")
if(!do_after(usr,50))
return
usr.loc = get_turf(src)
if (get_turf(usr) == get_turf(src))
usr.visible_message("<span class='warning'>[usr] climbs onto \the [src]!</span>")
/obj/structure/proc/structure_shaken()
for(var/mob/living/M in get_turf(src))
if(M.lying) return //No spamming this on people.
M.Weaken(5)
M << "\red You topple as \the [src] moves under you!"
if(prob(25))
var/damage = rand(15,30)
var/mob/living/carbon/human/H = M
if(!istype(M))
H << "\red You land heavily!"
M.adjustBruteLoss(damage)
return
var/datum/organ/external/affecting
switch(pick(list("ankle","wrist","head","knee","elbow")))
if("ankle")
affecting = H.get_organ(pick("l_foot", "r_foot"))
if("knee")
affecting = H.get_organ(pick("l_leg", "r_leg"))
if("wrist")
affecting = H.get_organ(pick("l_hand", "r_hand"))
if("elbow")
affecting = H.get_organ(pick("l_arm", "r_arm"))
if("head")
affecting = H.get_organ("head")
if(affecting)
M << "\red You land heavily on your [affecting.display_name]!"
affecting.take_damage(damage, 0)
if(affecting.parent)
affecting.parent.add_autopsy_data("Misadventure", damage)
else
H << "\red You land heavily!"
H.adjustBruteLoss(damage)
H.UpdateDamageIcon()
H.updatehealth()
return
/obj/structure/proc/can_touch(var/mob/user)
if (!user)
return 0
if (user.stat || user.restrained() || user.paralysis || user.sleeping || user.lying || user.weakened)
return 0
if (issilicon(user))
user << "<span class='notice'>You need hands for this.</span>"
return 0
return 1

View File

@@ -7,6 +7,7 @@
icon_state = "crate"
icon_opened = "crateopen"
icon_closed = "crate"
climbable = 1
// mouse_drag_pointer = MOUSE_ACTIVE_POINTER //???
var/rigged = 0
@@ -36,7 +37,11 @@
O.loc = get_turf(src)
icon_state = icon_opened
src.opened = 1
return 1
if(climbable)
structure_shaken()
return
/obj/structure/closet/crate/close()
if(!src.opened)

View File

@@ -19,6 +19,8 @@
anchored = 1.0
layer = 2.8
throwpass = 1 //You can throw objects over this, despite it's density.")
climbable = 1
var/parts = /obj/item/weapon/table_parts
var/flipped = 0
var/health = 100
@@ -412,29 +414,24 @@
return 0
return T.straight_table_check(direction)
/obj/structure/table/verb/can_touch(var/mob/user)
if (!user)
return 0
if (user.stat) //zombie goasts go away
return 0
if (issilicon(user))
user << "<span class='notice'>You need hands for this.</span>"
return 0
return 1
/obj/structure/table/verb/do_flip()
set name = "Flip table"
set desc = "Flips a non-reinforced table"
set category = "Object"
set src in oview(1)
if(ismouse(usr))
return
if (!can_touch(usr))
if (!can_touch(usr) || ismouse(usr))
return
if(!flip(get_cardinal_dir(usr,src)))
usr << "<span class='notice'>It won't budge.</span>"
else
return
usr.visible_message("<span class='warning'>[usr] flips \the [src]!</span>")
if(climbable)
structure_shaken()
return
/obj/structure/table/proc/unflipping_check(var/direction)

View File

@@ -324,7 +324,7 @@
//checks if this window is full-tile one
/obj/structure/window/proc/is_fulltile()
if(dir in list(5,6,9,10))
if(dir & (dir - 1))
return 1
return 0

View File

@@ -75,6 +75,21 @@ var/list/wood_icons = list("wood","wood-broken")
src.hotspot_expose(1000,CELL_VOLUME)
return
/turf/simulated/floor/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(!burnt && prob(5))
burn_tile()
else if(prob(1) && !is_plating())
make_plating()
burn_tile()
return
/turf/simulated/floor/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
var/dir_to = get_dir(src, adj_turf)
for(var/obj/structure/window/W in src)
if(W.dir == dir_to || W.is_fulltile()) //Same direction or diagonal (full tile)
W.fire_act(adj_air, adj_temp, adj_volume)
/turf/simulated/floor/blob_act()
return

View File

@@ -4,6 +4,15 @@
icon = 'icons/turf/walls.dmi'
var/mineral = "metal"
var/rotting = 0
var/damage = 0
var/damage_cap = 100 //Wall will break down to girders if damage reaches this point
var/damage_overlay
var/global/damage_overlays[8]
var/max_temperature = 1800 //K, walls will take damage if they're next to a fire hotter than this
opacity = 1
density = 1
blocks_air = 1
@@ -13,6 +22,89 @@
var/walltype = "metal"
/turf/simulated/wall/Del()
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
..()
/turf/simulated/wall/ChangeTurf(var/newtype)
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
..(newtype)
//Appearance
/turf/simulated/wall/examine()
. = ..()
if(!damage)
usr << "<span class='notice'>It looks fully intact.</span>"
else
var/dam = damage / damage_cap
if(dam <= 0.3)
usr << "<span class='warning'>It looks slightly damaged.</span>"
else if(dam <= 0.6)
usr << "<span class='warning'>It looks moderately damaged.</span>"
else
usr << "<span class='danger'>It looks heavily damaged.</span>"
if(rotting)
usr << "<span class='warning'>There is fungus growing on [src].</span>"
/turf/simulated/wall/proc/update_icon()
if(!damage_overlays[1]) //list hasn't been populated
generate_overlays()
if(!damage)
overlays.Cut()
return
var/overlay = round(damage / damage_cap * damage_overlays.len) + 1
if(overlay > damage_overlays.len)
overlay = damage_overlays.len
if(damage_overlay && overlay == damage_overlay) //No need to update.
return
overlays.Cut()
overlays += damage_overlays[overlay]
damage_overlay = overlay
return
/turf/simulated/wall/proc/generate_overlays()
var/alpha_inc = 256 / damage_overlays.len
for(var/i = 1; i <= damage_overlays.len; i++)
var/image/img = image(icon = 'icons/turf/walls.dmi', icon_state = "overlay_damage")
img.blend_mode = BLEND_MULTIPLY
img.alpha = (i * alpha_inc) - 1
damage_overlays[i] = img
//Damage
/turf/simulated/wall/proc/take_damage(dam)
if(dam)
damage = max(0, damage + dam)
update_damage()
return
/turf/simulated/wall/proc/update_damage()
var/cap = damage_cap
if(rotting)
cap = cap / 10
if(damage >= cap)
dismantle_wall()
else
update_icon()
return
/turf/simulated/wall/adjacent_fire_act(turf/simulated/floor/adj_turf, datum/gas_mixture/adj_air, adj_temp, adj_volume)
if(adj_temp > max_temperature)
take_damage(rand(10, 20) * (adj_temp / max_temperature))
return ..()
/turf/simulated/wall/proc/dismantle_wall(devastated=0, explode=0)
if(istype(src,/turf/simulated/wall/r_wall))
if(!devastated)
@@ -64,31 +156,76 @@
ChangeTurf(/turf/simulated/floor/plating)
/turf/simulated/wall/ex_act(severity)
if(rotting) severity = 1.0
switch(severity)
if(1.0)
//SN src = null
src.ChangeTurf(/turf/space)
return
if(2.0)
if (prob(50))
dismantle_wall(0,1)
if(prob(75))
take_damage(rand(150, 250))
else
dismantle_wall(1,1)
if(3.0)
var/proba
if (istype(src, /turf/simulated/wall/r_wall))
proba = 15
else
proba = 40
if (prob(proba))
dismantle_wall(0,1)
take_damage(rand(0, 250))
else
return
/turf/simulated/wall/blob_act()
if(prob(50) || rotting)
take_damage(rand(75, 125))
return
// Wall-rot effect, a nasty fungus that destroys walls.
/turf/simulated/wall/proc/rot()
if(!rotting)
rotting = 1
var/number_rots = rand(2,3)
for(var/i=0, i<number_rots, i++)
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Wallrot"
O.desc = "Ick..."
O.icon = 'icons/effects/wallrot.dmi'
O.pixel_x += rand(-10, 10)
O.pixel_y += rand(-10, 10)
O.anchored = 1
O.density = 1
O.layer = 5
O.mouse_opacity = 0
/turf/simulated/wall/proc/thermitemelt(mob/user as mob)
if(mineral == "diamond")
return
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Thermite"
O.desc = "Looks hot."
O.icon = 'icons/effects/fire.dmi'
O.icon_state = "2"
O.anchored = 1
O.density = 1
O.layer = 5
src.ChangeTurf(/turf/simulated/floor/plating)
var/turf/simulated/floor/F = src
F.burn_tile()
F.icon_state = "wall_thermite"
user << "<span class='warning'>The thermite starts melting through the wall.</span>"
spawn(100)
if(O) del(O)
// F.sd_LumReset() //TODO: ~Carn
return
/turf/simulated/wall/meteorhit(obj/M as obj)
if (prob(15) && !rotting)
dismantle_wall()
else if(prob(70) && !rotting)
ChangeTurf(/turf/simulated/floor/plating)
else
ReplaceWithLattice()
return 0
//Interactions
/turf/simulated/wall/attack_paw(mob/user as mob)
if ((HULK in user.mutations))
@@ -99,6 +236,7 @@
return
else
usr << text("\blue You punch the wall.")
take_damage(rand(25, 75))
return
return src.attack_hand(user)
@@ -116,6 +254,7 @@
return
else
M << text("\blue You smash against the wall.")
take_damage(rand(25, 75))
return
M << "\blue You push the wall but nothing happens!"
@@ -130,6 +269,7 @@
return
else
usr << text("\blue You punch the wall.")
take_damage(rand(25, 75))
return
if(rotting)
@@ -193,8 +333,22 @@
//DECONSTRUCTION
if( istype(W, /obj/item/weapon/weldingtool) )
var/response = "Dismantle"
if(damage)
response = alert(user, "Would you like to repair or dismantle [src]?", "[src]", "Repair", "Dismantle")
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
if(response == "Repair")
user << "<span class='notice'>You start repairing the damage to [src].</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, max(5, damage / 5)) && WT && WT.isOn())
user << "<span class='notice'>You finish repairing the damage to [src].</span>"
take_damage(-damage)
else if(response == "Dismantle")
user << "<span class='notice'>You begin slicing through the outer plating.</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
@@ -204,6 +358,7 @@
if( user.loc == T && user.get_active_hand() == WT )
user << "<span class='notice'>You remove the outer plating.</span>"
dismantle_wall()
return
else
user << "<span class='notice'>You need more welding fuel to complete this task.</span>"
return
@@ -306,62 +461,3 @@
else
return attack_hand(user)
return
// Wall-rot effect, a nasty fungus that destroys walls.
/turf/simulated/wall/proc/rot()
if(!rotting)
rotting = 1
var/number_rots = rand(2,3)
for(var/i=0, i<number_rots, i++)
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Wallrot"
O.desc = "Ick..."
O.icon = 'icons/effects/wallrot.dmi'
O.pixel_x += rand(-10, 10)
O.pixel_y += rand(-10, 10)
O.anchored = 1
O.density = 1
O.layer = 5
O.mouse_opacity = 0
/turf/simulated/wall/proc/thermitemelt(mob/user as mob)
if(mineral == "diamond")
return
var/obj/effect/overlay/O = new/obj/effect/overlay( src )
O.name = "Thermite"
O.desc = "Looks hot."
O.icon = 'icons/effects/fire.dmi'
O.icon_state = "2"
O.anchored = 1
O.density = 1
O.layer = 5
src.ChangeTurf(/turf/simulated/floor/plating)
var/turf/simulated/floor/F = src
F.burn_tile()
F.icon_state = "wall_thermite"
user << "<span class='warning'>The thermite starts melting through the wall.</span>"
spawn(100)
if(O) del(O)
// F.sd_LumReset() //TODO: ~Carn
return
/turf/simulated/wall/meteorhit(obj/M as obj)
if (prob(15) && !rotting)
dismantle_wall()
else if(prob(70) && !rotting)
ChangeTurf(/turf/simulated/floor/plating)
else
ReplaceWithLattice()
return 0
/turf/simulated/wall/Del()
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
..()
/turf/simulated/wall/ChangeTurf(var/newtype)
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
..(newtype)

View File

@@ -5,6 +5,9 @@
opacity = 1
density = 1
damage_cap = 200
max_temperature = 6000
walltype = "rwall"
var/d_state = 0
@@ -81,6 +84,19 @@
user << "<span class='notice'>This wall is too thick to slice through. You will need to find a different path.</span>"
return
if(damage && istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0,user))
user << "<span class='notice'>You start repairing the damage to [src].</span>"
playsound(src, 'sound/items/Welder.ogg', 100, 1)
if(do_after(user, max(5, damage / 5)) && WT && WT.isOn())
user << "<span class='notice'>You finish repairing the damage to [src].</span>"
take_damage(-damage)
return
else
user << "<span class='warning'>You need more welding fuel to complete this task.</span>"
return
var/turf/T = user.loc //get user's location for delay checks
//DECONSTRUCTION

View File

@@ -149,6 +149,9 @@
return
return
/turf/proc/adjacent_fire_act(turf/simulated/floor/source, temperature, volume)
return
/turf/proc/is_plating()
return 0
/turf/proc/is_asteroid_floor()

View File

@@ -125,7 +125,12 @@ var/airtunnel_bottom = 72 // default
var/list/monkeystart = list()
var/list/wizardstart = list()
var/list/newplayer_start = list()
//Spawnpoints.
var/list/latejoin = list()
var/list/latejoin_gateway = list()
var/list/latejoin_cryo = list()
var/list/prisonwarp = list() //prisoners go to these
var/list/holdingfacility = list() //captured people go here
var/list/xeno_spawn = list()//Aliens spawn at these.
@@ -141,6 +146,8 @@ var/list/ninjastart = list()
// list/traitors = list() //traitor list
var/list/cardinal = list( NORTH, SOUTH, EAST, WEST )
var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
// reverse_dir[dir] = reverse of dir
var/list/reverse_dir = list(2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 32, 34, 33, 35, 40, 42, 41, 43, 36, 38, 37, 39, 44, 46, 45, 47, 16, 18, 17, 19, 24, 26, 25, 27, 20, 22, 21, 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63)
var/datum/station_state/start_state = null
var/datum/configuration/config = null

View File

@@ -53,6 +53,7 @@ datum/preferences
var/be_random_name = 0 //whether we are a random name every round
var/gender = MALE //gender of character (well duh)
var/age = 30 //age of character
var/spawnpoint = "Arrivals Shuttle" //where this character will spawn (0-2).
var/b_type = "A+" //blood type (not-chooseable)
var/underwear = 1 //underwear type
var/undershirt = 1 //undershirt type
@@ -246,7 +247,8 @@ datum/preferences
dat += "<br>"
dat += "<b>Gender:</b> <a href='?_src_=prefs;preference=gender'><b>[gender == MALE ? "Male" : "Female"]</b></a><br>"
dat += "<b>Age:</b> <a href='?_src_=prefs;preference=age;task=input'>[age]</a>"
dat += "<b>Age:</b> <a href='?_src_=prefs;preference=age;task=input'>[age]</a><br>"
dat += "<b>Spawn Point</b>: <a href='byond://?src=\ref[user];preference=spawnpoint;task=input'>[spawnpoint]</a>"
dat += "<br>"
dat += "<b>UI Style:</b> <a href='?_src_=prefs;preference=ui'><b>[UI_style]</b></a><br>"
@@ -1179,6 +1181,16 @@ datum/preferences
var/skin_style_name = input(user, "Select a new skin style") as null|anything in list("default1", "default2", "default3")
if(!skin_style_name) return
if("spawnpoint")
var/list/spawnkeys = list()
for(var/S in spawntypes)
spawnkeys += S
var/choice = input(user, "Where would you like to spawn when latejoining?") as null|anything in spawnkeys
if(!choice || !spawntypes[choice])
spawnpoint = "Arrivals Shuttle"
return
spawnpoint = choice
else
switch(href_list["preference"])
if("gender")

View File

@@ -108,6 +108,7 @@
S["age"] >> age
S["species"] >> species
S["language"] >> language
S["spawnpoint"] >> spawnpoint
//colors to be consolidated into hex strings (requires some work with dna code)
S["hair_red"] >> r_hair
@@ -168,6 +169,7 @@
real_name = reject_bad_name(real_name)
if(isnull(species)) species = "Human"
if(isnull(language)) language = "None"
if(isnull(spawnpoint)) spawnpoint = "Arrivals Shuttle"
if(isnull(nanotrasen_relation)) nanotrasen_relation = initial(nanotrasen_relation)
if(!real_name) real_name = random_name(gender)
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))

View File

@@ -49,3 +49,11 @@
desc = "It's a small maintenance robot."
icon_state = "drone"
origin_tech = "magnets=3;engineering=5"
/obj/item/weapon/holder/cat
name = "cat"
desc = "It's a cat. Meow."
icon_state = "cat"
origin_tech = null

View File

@@ -60,6 +60,25 @@
stop_automated_movement = 1
walk_to(src,movement_target,0,3)
/mob/living/simple_animal/cat/MouseDrop(atom/over_object)
var/mob/living/carbon/human/H = over_object
if(!istype(H)) return ..()
//This REALLY needs to be moved to a general mob proc somewhere.
if(H.a_intent == "help")
var/obj/item/weapon/holder/cat/C = new(loc)
src.loc = C
C.name = loc.name
C.attack_hand(H)
H << "You scoop up [src]."
src << "[H] scoops you up."
H.status_flags |= PASSEMOTES
return
else
return ..()
//RUNTIME IS ALIVE! SQUEEEEEEEE~
/mob/living/simple_animal/cat/Runtime
name = "Runtime"

View File

@@ -159,7 +159,7 @@
src << alert("You are currently not whitelisted to play [client.prefs.species].")
return 0
AttemptLateSpawn(href_list["SelectedJob"])
AttemptLateSpawn(href_list["SelectedJob"],client.prefs.spawnpoint)
return
if(href_list["privacy_poll"])
@@ -270,7 +270,7 @@
return 1
proc/AttemptLateSpawn(rank)
proc/AttemptLateSpawn(rank,var/spawning_at)
if (src != usr)
return 0
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
@@ -291,7 +291,21 @@
var/mob/living/carbon/human/character = create_character() //creates the human and transfers vars and mind
job_master.EquipRank(character, rank, 1) //equips the human
EquipCustomItems(character)
//Find our spawning point.
var/join_message
var/datum/spawnpoint/S
if(spawning_at)
S = spawntypes[spawning_at]
if(S && istype(S))
character.loc = pick(S.turfs)
join_message = S.msg
else
character.loc = pick(latejoin)
join_message = "has arrived on the station"
character.lastarea = get_area(loc)
// Moving wheelchair if they have one
if(character.buckled && istype(character.buckled, /obj/structure/stool/bed/chair/wheelchair))
@@ -305,18 +319,18 @@
if(character.mind.assigned_role != "Cyborg")
data_core.manifest_inject(character)
ticker.minds += character.mind//Cyborgs and AIs handle this in the transform proc. //TODO!!!!! ~Carn
AnnounceArrival(character, rank)
AnnounceArrival(character, rank, join_message)
else
character.Robotize()
del(src)
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank, var/join_message)
if (ticker.current_state == GAME_STATE_PLAYING)
var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI.
if(character.mind.role_alt_title)
rank = character.mind.role_alt_title
a.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] has arrived on the station.", "Arrivals Announcement Computer")
a.autosay("[character.real_name],[rank ? " [rank]," : " visitor," ] [join_message ? join_message : "has arrived on the station"].", "Arrivals Announcement Computer")
del(a)
proc/LateChoices()

View File

@@ -51,6 +51,9 @@
turbine = locate() in get_step(src, get_dir(inturf, src))
if(!turbine)
stat |= BROKEN
else
turbine.stat &= !BROKEN
turbine.compressor = src
#define COMPFRICTION 5e5
@@ -105,6 +108,9 @@
compressor = locate() in get_step(src, get_dir(outturf, src))
if(!compressor)
stat |= BROKEN
else
compressor.stat &= !BROKEN
compressor.turbine = src
#define TURBPRES 9000000

View File

@@ -0,0 +1,36 @@
var/list/spawntypes = list()
/proc/populate_spawn_points()
spawntypes = list()
for(var/type in typesof(/datum/spawnpoint)-/datum/spawnpoint)
var/datum/spawnpoint/S = new type()
spawntypes[S.display_name] = S
/datum/spawnpoint
var/msg //Message to display on the arrivals computer.
var/list/turfs //List of turfs to spawn on.
var/display_name //Name used in preference setup.
/datum/spawnpoint/arrivals
display_name = "Arrivals Shuttle"
msg = "has arrived on the station"
/datum/spawnpoint/arrivals/New()
..()
turfs = latejoin
/*/datum/spawnpoint/gateway
display_name = "Gateway"
msg = "has completed translation from offsite gateway"
/datum/spawnpoint/gateway/New()
..()
turfs = latejoin_gateway*/
/datum/spawnpoint/cryo
display_name = "Cryogenic Storage"
msg = "has completed cryogenic revival"
/datum/spawnpoint/cryo/New()
..()
turfs = latejoin_cryo

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 120 KiB

BIN
icons/obj/pipeturbine.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 147 KiB

File diff suppressed because it is too large Load Diff