Merge branch 'master' into findnreplace

This commit is contained in:
Mark van Alphen
2017-04-19 20:41:05 +02:00
committed by GitHub
64 changed files with 973 additions and 502 deletions
+13 -1
View File
@@ -114,6 +114,7 @@
preloadRuinTemplates()
preloadShelterTemplates()
preloadShuttleTemplates()
preloadVRTemplates()
/proc/preloadRuinTemplates()
// Still supporting bans by filename
@@ -163,4 +164,15 @@
var/datum/map_template/shuttle/S = new shuttle_type()
shuttle_templates[S.shuttle_id] = S
map_templates[S.shuttle_id] = S
map_templates[S.shuttle_id] = S
/proc/preloadVRTemplates()
for(var/item in subtypesof(/datum/map_template/vr))
var/datum/map_template/vr/vr_type = item
if(!initial(vr_type.suffix))
continue
var/datum/map_template/vr/V = new vr_type()
vr_templates[V.id] = V
map_templates[V.id] = V
+34 -12
View File
@@ -15,13 +15,15 @@
var/image/halo = null
action_icon_state = "lightning"
var/sound/Snd // so far only way i can think of to stop a sound, thank MSO for the idea.
var/damaging = TRUE
/obj/effect/proc_holder/spell/targeted/lightning/lightnian
clothes_req = 0
invocation_type = "none"
damaging = 0
/obj/effect/proc_holder/spell/targeted/lightning/Click()
if(!ready && start_time==0)
if(!ready && start_time == 0)
if(cast_check())
StartChargeup()
else
@@ -32,12 +34,12 @@
/obj/effect/proc_holder/spell/targeted/lightning/proc/StartChargeup(mob/user = usr)
ready = 1
to_chat(user, "<span class='notice'>You start gathering the power.</span>")
Snd = new/sound('sound/magic/lightning_chargeup.ogg',channel = 7)
Snd = new/sound('sound/magic/lightning_chargeup.ogg', channel = 7)
halo = image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = EFFECTS_LAYER)
user.overlays.Add(halo)
playsound(get_turf(user), Snd, 50, 0)
start_time = world.time
if(do_mob(user,user,100,uninterruptible=1))
if(do_mob(user, user, 100, uninterruptible=1))
if(ready)
Discharge()
@@ -61,9 +63,9 @@ obj/effect/proc_holder/spell/targeted/lightning/proc/Reset(mob/user = usr)
/obj/effect/proc_holder/spell/targeted/lightning/cast(list/targets, mob/user = usr)
ready = 0
var/mob/living/carbon/target = targets[1]
Snd=sound(null, repeat = 0, wait = 1, channel = Snd.channel) //byond, why you suck?
playsound(get_turf(user),Snd,50,0)// Sorry MrPerson, but the other ways just didn't do it the way i needed to work, this is the only way.
var/mob/living/target = targets[1]
Snd = sound(null, repeat = 0, wait = 1, channel = Snd.channel) //byond, why you suck?
playsound(get_turf(user), Snd, 50, 0)// Sorry MrPerson, but the other ways just didn't do it the way i needed to work, this is the only way.
if(get_dist(user,target)>range)
to_chat(user, "<span class='notice'>They are too far away!</span>")
Reset(user)
@@ -73,17 +75,37 @@ obj/effect/proc_holder/spell/targeted/lightning/proc/Reset(mob/user = usr)
user.Beam(target,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5)
var/energy = min(world.time - start_time,100)
Bolt(user,target,max(15,energy/2),5,user) //5 bounces for energy/2 burn
if(damaging)
Bolt(user,target,max(15,energy/2),5,user) //5 bounces for energy/2 burn
else
var/bounces = round(energy/20)
Bolt(user,target,0,bounces,user)
Reset(user)
/obj/effect/proc_holder/spell/targeted/lightning/proc/Bolt(mob/origin, mob/target, bolt_energy, bounces, mob/user = usr)
origin.Beam(target,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5)
var/mob/living/carbon/current = target
/obj/effect/proc_holder/spell/targeted/lightning/proc/Bolt(mob/origin, mob/living/target, bolt_energy, bounces, mob/user = usr)
origin.Beam(target,icon_state="lightning[rand(1,12)]", icon='icons/effects/effects.dmi', time=5)
var/mob/living/current = target
if(bounces < 1)
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
if(damaging)
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
else
current.AdjustJitter(1000) //High numbers for violent convulsions
current.do_jitter_animation(current.jitteriness)
current.AdjustStuttering(2)
current.Slowed(3)
spawn(20)
current.AdjustJitter(-1000, bound_lower = 10) //Still jittery, but vastly less
playsound(get_turf(current), 'sound/magic/LightningShock.ogg', 50, 1, -1)
else
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
if(damaging)
current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
else
current.AdjustJitter(1000) //High numbers for violent convulsions
current.do_jitter_animation(current.jitteriness)
current.AdjustStuttering(2)
current.Slowed(3)
spawn(20)
current.AdjustJitter(-1000, bound_lower = 10) //Still jittery, but vastly less
playsound(get_turf(current), 'sound/magic/LightningShock.ogg', 50, 1, -1)
var/list/possible_targets = new
for(var/mob/living/M in view_or_range(range,target,"view"))
+20 -17
View File
@@ -12,34 +12,37 @@
random_target = 1
var/energy = 0
var/ready = 0
var/start_time = 0
var/image/halo = null
var/sound/Snd // so far only way i can think of to stop a sound, thank MSO for the idea.
action_icon_state = "tech"
/obj/effect/proc_holder/spell/targeted/magnet/Click()
if(!ready)
if(!ready && start_time == 0)
if(cast_check())
StartChargeup()
else
if(cast_check(skipcharge=1))
if(ready && cast_check(skipcharge=1))
choose_targets()
return 1
/obj/effect/proc_holder/spell/targeted/magnet/proc/StartChargeup(mob/user = usr)
ready = 1
to_chat(user, "<span class='notice'>You start gathering the power.</span>")
Snd = new/sound('sound/magic/lightning_chargeup.ogg', channel = 7)
halo = image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = EFFECTS_LAYER)
user.overlays.Add(halo)
spawn(0)
while(ready)
sleep(1)
energy++
if(energy >= 100 && ready)
Discharge()
playsound(get_turf(user), Snd, 50, 0)
start_time = world.time
if(do_mob(user, user, 100, uninterruptible=1))
if(ready)
Discharge()
obj/effect/proc_holder/spell/targeted/magnet/proc/Reset(mob/user = usr)
ready = 0
energy = 0
start_time = 0
if(halo)
user.overlays.Remove(halo)
@@ -50,16 +53,16 @@ obj/effect/proc_holder/spell/targeted/magnet/proc/Reset(mob/user = usr)
/obj/effect/proc_holder/spell/targeted/magnet/proc/Discharge(mob/user = usr)
var/mob/living/M = user
//M.electrocute_act(25,"magnet Bolt")
to_chat(M, "<span class='danger'>You lose control over the power.</span>")
Reset(user)
start_recharge()
/obj/effect/proc_holder/spell/targeted/magnet/cast(list/targets, mob/user = usr)
var/mob/living/carbon/target = targets[1]
ready = 0
var/mob/living/target = targets[1]
Snd = sound(null, repeat = 0, wait = 1, channel = Snd.channel) //byond, why you suck?
playsound(get_turf(user), Snd, 50, 0)// Sorry MrPerson, but the other ways just didn't do it the way i needed to work, this is the only way.
if(get_dist(user,target)>range)
to_chat(user, "<span class='notice'>They are too far away!</span>")
Reset(user)
@@ -88,13 +91,13 @@ obj/effect/proc_holder/spell/targeted/magnet/proc/Reset(mob/user = usr)
playsound(get_turf(target), 'sound/machines/defib_zap.ogg', 50, 1, -1)
if(75 to 100)
//CHAIN magnet
Bolt(user,target,energy,user)
Bolt(user,target,energy,5,user)
Reset(user)
/obj/effect/proc_holder/spell/targeted/magnet/proc/Bolt(mob/origin,mob/target,bolt_energy,mob/user = usr)
origin.Beam(target,icon_state="lightning",icon='icons/effects/effects.dmi',time=5)
/obj/effect/proc_holder/spell/targeted/magnet/proc/Bolt(mob/origin,mob/target,bolt_energy,bounces, mob/user = usr)
origin.Beam(target, icon_state="lightning", icon='icons/effects/effects.dmi', time=5)
var/mob/living/carbon/current = target
if(bolt_energy < 75)
if(bounces < 1)
for(var/obj/item/I in target.l_hand)
if(I.flags & CONDUCT)
I.throw_at(user, I.throw_range, 4, target)
@@ -119,4 +122,4 @@ obj/effect/proc_holder/spell/targeted/magnet/proc/Reset(mob/user = usr)
return
var/mob/living/next = pick(possible_targets)
if(next)
Bolt(current,next,bolt_energy-6,user) // 5 max bounces
Bolt(current,next,bolt_energy,bounces-1,user) // 5 max bounces
+15
View File
@@ -0,0 +1,15 @@
/datum/map_template/vr
name = null
var/id = null // For blacklisting purposes, all vr levels need an id
var/description = "This is a placeholder. Please contact your virtual adminsitrator if you see this."
var/outfit = null
var/prefix = null
var/suffix = null
/datum/map_template/vr/New()
if(!name && id)
name = id
mappath = prefix + suffix
..(path = mappath)
+16
View File
@@ -0,0 +1,16 @@
/datum/map_template/vr/level
prefix = "_maps/map_files/vr/"
/datum/map_template/vr/level/lobby
id = "lobby"
suffix = "lobby.dmm"
name = "Virtual Hub Facility"
description = "This is the lobby. The hub for all things VR."
outfit = /datum/outfit/vr/vr_basic
/datum/map_template/vr/level/roman
id = "roman"
suffix = "blood_and_sand.dmm"
name = "Blood and Sand Arena"
description = "To the Death!"
outfit = /datum/outfit/vr/roman