mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-31 00:26:21 +01:00
Baystation Update Merge 01
Mahoosive update. A lot of things.
This commit is contained in:
@@ -201,7 +201,8 @@ steam.start() -- spawns the effect
|
||||
sleep(5)
|
||||
step(sparks,direction)
|
||||
spawn(20)
|
||||
sparks.delete()
|
||||
if(sparks)
|
||||
sparks.delete()
|
||||
src.total_sparks--
|
||||
|
||||
|
||||
@@ -379,116 +380,7 @@ steam.start() -- spawns the effect
|
||||
|
||||
/datum/effect/effect/system/smoke_spread/mustard
|
||||
smoke_type = /obj/effect/effect/smoke/mustard
|
||||
/////////////////////////////////////////////
|
||||
// Chem smoke
|
||||
/////////////////////////////////////////////
|
||||
/obj/effect/effect/smoke/chem
|
||||
icon = 'icons/effects/chemsmoke.dmi'
|
||||
|
||||
/obj/effect/effect/smoke/chem/New()
|
||||
..()
|
||||
var/datum/reagents/R = new/datum/reagents(500)
|
||||
reagents = R
|
||||
R.my_atom = src
|
||||
return
|
||||
|
||||
/obj/effect/effect/smoke/chem/Move()
|
||||
..()
|
||||
for(var/atom/A in view(2, src))
|
||||
if(reagents.has_reagent("radium")||reagents.has_reagent("uranium")||reagents.has_reagent("carbon")||reagents.has_reagent("thermite"))//Prevents unholy radium spam by reducing the number of 'greenglows' down to something reasonable -Sieve
|
||||
if(prob(5))
|
||||
reagents.reaction(A)
|
||||
else
|
||||
reagents.reaction(A)
|
||||
|
||||
return
|
||||
|
||||
/obj/effect/effect/smoke/chem/affect(mob/living/carbon/M as mob )
|
||||
reagents.reaction(M)
|
||||
|
||||
/datum/effect/effect/system/smoke_spread/chem
|
||||
smoke_type = /obj/effect/effect/smoke/chem
|
||||
var/obj/chemholder
|
||||
|
||||
New()
|
||||
..()
|
||||
chemholder = new/obj()
|
||||
var/datum/reagents/R = new/datum/reagents(500)
|
||||
chemholder.reagents = R
|
||||
R.my_atom = chemholder
|
||||
|
||||
set_up(var/datum/reagents/carry = null, n = 5, c = 0, loca, direct)
|
||||
if(n > 20)
|
||||
n = 20
|
||||
number = n
|
||||
cardinals = c
|
||||
carry.copy_to(chemholder, carry.total_volume)
|
||||
|
||||
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
if(direct)
|
||||
direction = direct
|
||||
|
||||
var/contained = ""
|
||||
for(var/reagent in carry.reagent_list)
|
||||
contained += " [reagent] "
|
||||
if(contained)
|
||||
contained = "\[[contained]\]"
|
||||
var/area/A = get_area(location)
|
||||
|
||||
var/where = "[A.name] | [location.x], [location.y]"
|
||||
var/whereLink = "<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>[where]</a>"
|
||||
|
||||
if(carry.my_atom.fingerprintslast)
|
||||
var/mob/M = get_mob_by_key(carry.my_atom.fingerprintslast)
|
||||
var/more = ""
|
||||
if(M)
|
||||
more = "(<A HREF='?_src_=holder;adminmoreinfo=\ref[M]'>?</a>)"
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink])[contained]. Last associated key is [carry.my_atom.fingerprintslast][more].", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].")
|
||||
else
|
||||
message_admins("A chemical smoke reaction has taken place in ([whereLink]). No associated key.", 0, 1)
|
||||
log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.")
|
||||
|
||||
start()
|
||||
var/i = 0
|
||||
|
||||
var/color = mix_color_from_reagents(chemholder.reagents.reagent_list)
|
||||
|
||||
for(i=0, i<src.number, i++)
|
||||
if(src.total_smoke > 20)
|
||||
return
|
||||
spawn(0)
|
||||
if(holder)
|
||||
src.location = get_turf(holder)
|
||||
var/obj/effect/effect/smoke/chem/smoke = new /obj/effect/effect/smoke/chem(src.location)
|
||||
src.total_smoke++
|
||||
var/direction = src.direction
|
||||
if(!direction)
|
||||
if(src.cardinals)
|
||||
direction = pick(cardinal)
|
||||
else
|
||||
direction = pick(alldirs)
|
||||
|
||||
if(chemholder.reagents.total_volume != 1) // can't split 1 very well
|
||||
chemholder.reagents.copy_to(smoke, chemholder.reagents.total_volume / number) // copy reagents to each smoke, divide evenly
|
||||
|
||||
if(color)
|
||||
smoke.icon += color // give the smoke color, if it has any to begin with
|
||||
else
|
||||
// if no color, just use the old smoke icon
|
||||
smoke.icon = 'icons/effects/96x96.dmi'
|
||||
smoke.icon_state = "smoke"
|
||||
|
||||
for(i=0, i<pick(0,1,1,1,2,2,2,3), i++)
|
||||
sleep(10)
|
||||
step(smoke,direction)
|
||||
spawn(150+rand(10,30))
|
||||
smoke.delete()
|
||||
src.total_smoke--
|
||||
|
||||
/////////////////////////////////////////////
|
||||
//////// Attach an Ion trail to any object, that spawns when it moves (like for the jetpack)
|
||||
@@ -615,6 +507,7 @@ steam.start() -- spawns the effect
|
||||
playsound(src, 'sound/effects/bubbles2.ogg', 80, 1, -3)
|
||||
spawn(3 + metal*3)
|
||||
process()
|
||||
checkReagents()
|
||||
spawn(120)
|
||||
processing_objects.Remove(src)
|
||||
sleep(30)
|
||||
@@ -629,14 +522,13 @@ steam.start() -- spawns the effect
|
||||
delete()
|
||||
return
|
||||
|
||||
// on delete, transfer any reagents to the floor
|
||||
/obj/effect/effect/foam/Del()
|
||||
// transfer any reagents to the floor
|
||||
/obj/effect/effect/foam/proc/checkReagents()
|
||||
if(!metal && reagents)
|
||||
for(var/atom/A in oview(0,src))
|
||||
for(var/atom/A in src.loc.contents)
|
||||
if(A == src)
|
||||
continue
|
||||
reagents.reaction(A, 1, 1)
|
||||
..()
|
||||
|
||||
/obj/effect/effect/foam/process()
|
||||
if(--amount < 0)
|
||||
@@ -663,7 +555,7 @@ steam.start() -- spawns the effect
|
||||
F.create_reagents(10)
|
||||
if (reagents)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
F.reagents.add_reagent(R.id,1)
|
||||
F.reagents.add_reagent(R.id, 1, safety = 1) //added safety check since reagents in the foam have already had a chance to react
|
||||
|
||||
// foam disolves when heated
|
||||
// except metal foams
|
||||
@@ -734,9 +626,9 @@ steam.start() -- spawns the effect
|
||||
|
||||
if(carried_reagents)
|
||||
for(var/id in carried_reagents)
|
||||
F.reagents.add_reagent(id,1)
|
||||
F.reagents.add_reagent(id, 1, null, 1) //makes a safety call because all reagents should have already reacted anyway
|
||||
else
|
||||
F.reagents.add_reagent("water", 1)
|
||||
F.reagents.add_reagent("water", 1, safety = 1)
|
||||
|
||||
// wall formed by metal foams
|
||||
// dense and opaque, but easy to break
|
||||
@@ -827,7 +719,7 @@ steam.start() -- spawns the effect
|
||||
if(!air_master)
|
||||
return 0
|
||||
|
||||
air_master.AddTurfToUpdate(get_turf(src))
|
||||
air_master.mark_for_update(get_turf(src))
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user