Merge branch 'Bleeding-Edge' of gitlab.com:vgstation/vgstation into Bleeding-Edge

This commit is contained in:
Rob Nelson
2015-08-26 22:28:14 -07:00
8 changed files with 99 additions and 27 deletions

View File

@@ -340,6 +340,7 @@
crewmonitor.sendResources(src)
if(adv_camera && minimapinit)
adv_camera.sendResources(src)
vote.interface.sendAssets(src)
/proc/get_role_desire_str(var/rolepref)
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_role_desire_str() called tick#: [world.time]")

View File

@@ -5,19 +5,19 @@ var/global/datum/controller/vote/vote = new()
#define VOTE_SCREEN_HEIGHT 400
/datum/html_interface/nanotrasen/registerResources()
/datum/html_interface/nanotrasen/vote/registerResources()
. = ..()
register_asset("voting.js", 'voting.js')
register_asset("voting.css", 'voting.css')
/datum/html_interface/nanotrasen/sendAssets(var/client/client)
/datum/html_interface/nanotrasen/vote/sendAssets(var/client/client)
..()
send_asset(client, "voting.js")
send_asset(client, "voting.css")
/datum/html_interface/nanotrasen/Topic(href, href_list[])
/datum/html_interface/nanotrasen/vote/Topic(href, href_list[])
..()
if(href_list["html_interface_action"] == "onclose")
@@ -40,7 +40,7 @@ var/global/datum/controller/vote/vote = new()
var/list/ismapvote
var/chosen_map
var/name = "datum"
var/datum/html_interface/nanotrasen/interface
var/datum/html_interface/nanotrasen/vote/interface
var/list/data
var/list/status_data
var/last_update = 0
@@ -53,7 +53,7 @@ var/global/datum/controller/vote/vote = new()
src.status_data = list()
spawn(5)
if(!src.interface)
src.interface = new/datum/html_interface/nanotrasen(src, "Voting Panel", 400, 400, vote_head)
src.interface = new/datum/html_interface/nanotrasen/vote(src, "Voting Panel", 400, 400, vote_head)
src.interface.updateContent("content", "<div id='vote_main'></div><div id='vote_choices'></div><div id='vote_admin'></div>")
initialized = 1
if (vote != src)
@@ -345,7 +345,7 @@ var/global/datum/controller/vote/vote = new()
/datum/controller/vote/proc/update(refresh = 0)
if(!interface)
interface = new/datum/html_interface/nanotrasen(src, "Voting Panel", 400, 400, vote_head)
interface = new/datum/html_interface/nanotrasen/vote(src, "Voting Panel", 400, 400, vote_head)
interface.updateContent("content", "<div id='vote_main'></div><div id='vote_choices'></div><div id='vote_admin'></div>")
if(world.time < last_update + 2)

View File

@@ -431,11 +431,18 @@ var/list/impact_master = list()
/obj/item/projectile/process()
var/first = 1
var/tS = 0
spawn while(loc)
if(first && timestopped)
tS = 1
timestopped = 0
while((loc.timestopped || timestopped) && !first)
sleep(3)
first = 0
src.process_step()
if(tS)
timestopped = loc.timestopped
tS = 0
return
/obj/item/projectile/proc/dumbfire(var/dir) // for spacepods, go snowflake go
@@ -450,7 +457,11 @@ var/list/impact_master = list()
returnToPool(src)
kill_count--
var/first = 1
var/tS = 0
spawn while(loc)
if(first && timestopped)
tS = 1
timestopped = 0
var/turf/T = get_step(src, dir)
step_towards(src, T)
if(!bumped && !isturf(original))
@@ -461,6 +472,9 @@ var/list/impact_master = list()
while((loc.timestopped || timestopped) && !first)
sleep(3)
first = 0
if(tS)
timestopped = loc.timestopped
tS = 0
sleep(1)
return

View File

@@ -33,7 +33,7 @@ var/list/beam_master = list()
var/tang = 0
layer = 13
var/turf/last = null
kill_count = 6
kill_count = 12
/obj/item/projectile/beam/lightning/proc/adjustAngle(angle)
angle = round(angle) + 45
@@ -70,7 +70,8 @@ var/list/beam_master = list()
var/count = 0
var/turf/T = get_turf(src)
var/list/ouroverlays = list()
for(N,N<length,N+=32)
spawn() for(N,N<length,N+=32)
if(count >= kill_count)
break
count++
@@ -134,7 +135,7 @@ var/list/beam_master = list()
X.pixel_y=Pixel_y
var/turf/TT = get_turf(X.loc)
while((TT.timestopped || timestopped || X.timestopped) && count)
sleep(3)
sleep(2)
if(TT == firer.loc)
continue
if(TT.density)
@@ -155,16 +156,25 @@ var/list/beam_master = list()
if(X)
del(X)
break
spawn(10) for(var/atom/thing in ouroverlays)
ouroverlays -= thing
returnToPool(thing)
spawn(10)
for(var/atom/thing in ouroverlays)
if(!thing.timestopped && !thing.loc.timestopped)
ouroverlays -= thing
returnToPool(thing)
spawn
var/tS = 0
while(loc) //Move until we hit something
//world << "[src] start of while loop curr [formatJumpTo(loc)] last [formatJumpTo(last)]"
if(tS)
tS = 0
timestopped = loc.timestopped
while((loc.timestopped || timestopped) && !first)
tS = 1
sleep(3)
if(first)
icon = midicon
if(timestopped || loc.timestopped)
tS = 1
timestopped = 0
if((!( current ) || loc == current)) //If we pass our target
broken = 1
icon = endicon
@@ -211,6 +221,11 @@ var/list/beam_master = list()
if(src.loc != current)
tang = adjustAngle(get_angle(src.loc,current))
icon_state = "[tang]"
if(ouroverlays.len)
sleep(10)
for(var/atom/thing in ouroverlays)
ouroverlays -= thing
returnToPool(thing)
//del(src)
returnToPool(src)
@@ -229,11 +244,13 @@ var/list/beam_master = list()
/obj/item/projectile/beam/lightning/spell
var/spell/lightning/our_spell
Bump(atom/A as mob|obj|turf|area)
. = ..()
if(.)
our_spell.lastbumped = A
return .
weaken = 0
stun = 0
/obj/item/projectile/beam/lightning/spell/Bump(atom/A as mob|obj|turf|area)
. = ..()
if(.)
our_spell.lastbumped = A
return .
/obj/item/projectile/beam
name = "laser"
@@ -314,7 +331,11 @@ var/list/beam_master = list()
/obj/item/projectile/beam/bresenham_step(var/distA, var/distB, var/dA, var/dB, var/lastposition, var/target_dir, var/reference)
var/first = 1
var/tS = 0
while(src && src.loc)// only stop when we've hit something, or hit the end of the map
if(first && timestopped)
tS = 1
timestopped = 0
if(error < 0)
var/atom/step = get_step(src, dB)
if(!step)
@@ -334,7 +355,7 @@ var/list/beam_master = list()
if(isnull(loc))
return reference
if(lastposition == loc)
if(lastposition == loc && (!tS && !timestopped && !loc.timestopped))
kill_count = 0
lastposition = loc
if(kill_count < 1)
@@ -393,6 +414,9 @@ var/list/beam_master = list()
var/list/turfs = list()
turfs["[icon_state][target_dir]"] = list(loc)
beam_master[reference] = turfs
if(tS)
timestopped = loc.timestopped
tS = 0
while((loc.timestopped || timestopped) && !first)
sleep(3)
first = 0
@@ -407,13 +431,18 @@ var/list/beam_master = list()
spawn(0)
var/target_dir = dir ? dir : src.dir// TODO: remove dir arg. Or don't because the way this was set up without it broke spacepods.
var/first = 1
var/tS = 0
while(loc) // Move until we hit something.
if((x == 1 || x == world.maxx || y == 1 || y == world.maxy))
returnToPool(src)
break
if(first && timestopped)
tS = 1
timestopped = 0
step(src, target_dir) // Move.
if(tS)
tS = 0
timestopped = loc.timestopped
if(bumped)
break
@@ -453,15 +482,27 @@ var/list/beam_master = list()
var/TS
var/atom/lastloc
var/starttime = world.time
while(world.time - starttime <= 3 || TS)
var/cleanedup = 0
while(world.time - starttime < 3 || TS)
if(loc)
lastloc = loc
TS = lastloc.timestopped
if(TS)
sleep(3)
if(world.time - starttime > 3)
if(!cleanedup)
var/list/turf_master = beam_master[reference]
for(var/laser_state in turf_master)
var/list/turfs = turf_master[laser_state]
for(var/turf/T in turfs)
if(!T.timestopped)
T.overlays.Remove(beam_master[laser_state])
cleanedup = 1
sleep(2)
else sleep(1)
if(cleanedup) sleep(2)
var/list/turf_master = beam_master[reference]
for(var/laser_state in turf_master)

View File

@@ -19,6 +19,7 @@
var/list/oureffects = list()
var/list/affected = list()
var/sleepfor
var/the_world_chance = 30
/spell/aoe_turf/fall/New()
@@ -53,7 +54,7 @@
return
var/list/targets = choose_targets(user)
if(targets && targets.len)
if(prob(15)) invocation = "ZA WARUDO"
if(prob(the_world_chance)) invocation = "ZA WARUDO"
invocation(user, targets)
take_charge(user, skipcharge)
@@ -161,6 +162,7 @@
returnToPool(S)
oureffects -= S
for(var/atom/everything in affected)
if(!istype(everything)) continue
var/icon/I = everything.tempoverlay
everything.overlays.Remove(I)
everything.ignoreinvert = initial(everything.ignoreinvert)

View File

@@ -185,8 +185,7 @@
//world << "new target is [formatJumpTo(target)](<a href='?_src_=vars;Vars=\ref[target]'>VV</a>)"
if(istype(target))
target.emp_act(2)
target.apply_damage(basedamage, BURN, "chest", "blocked" = 0)
target.Weaken(1)
target.apply_damage((issilicon(target) ? basedamage*0.66 : basedamage), BURN, "chest", "blocked" = 0)
else if(target)
var/obj/item/projectile/beam/B = getFromPool(/obj/item/projectile/beam/lightning/spell)
B.damage = basedamage