July 5th TG sync (#1883)

July 5th TG sync
This commit is contained in:
Poojawa
2017-07-05 22:14:19 -05:00
committed by GitHub
parent 454b9c3d68
commit b1b4826c0c
1264 changed files with 149689 additions and 570309 deletions
+2 -2
View File
@@ -47,7 +47,7 @@
return 0
if(prob(5))
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
playsound(loc, 'sound/items/welder.ogg', 100, 1)
for(var/obj/O in target)
if(prob(20) && !(resistance_flags & UNACIDABLE))
@@ -82,7 +82,7 @@
. = ..()
if(.)
if(prob(45))
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
playsound(loc, 'sound/items/welder.ogg', 100, 1)
target_strength--
if(target_strength <= 0)
target.visible_message("<span class='warning'>[target] collapses under its own weight into a puddle of goop and undigested debris!</span>")
+2 -2
View File
@@ -113,9 +113,9 @@
/obj/effect/anomaly/grav/Bumped(mob/A)
gravShock(A)
/obj/effect/anomaly/grav/proc/gravShock(mob/A)
/obj/effect/anomaly/grav/proc/gravShock(mob/living/A)
if(boing && isliving(A) && !A.stat)
A.Weaken(2)
A.Knockdown(40)
var/atom/target = get_edge_target_turf(A, get_dir(src, get_step_away(A, src)))
A.throw_at(target, 5, 1)
boing = 0
+46 -46
View File
@@ -1,51 +1,51 @@
/obj/effect/decal/cleanable/crayon
name = "rune"
desc = "Graffiti. Damn kids."
icon = 'icons/effects/crayondecal.dmi'
icon_state = "rune1"
gender = NEUTER
var/do_icon_rotate = TRUE
/obj/effect/decal/cleanable/crayon/Initialize(mapload, main = "#FFFFFF", var/type = "rune1", var/e_name = "rune", var/rotation = 0, var/alt_icon = null)
..()
/obj/effect/decal/cleanable/crayon
name = "rune"
desc = "Graffiti. Damn kids."
icon = 'icons/effects/crayondecal.dmi'
icon_state = "rune1"
gender = NEUTER
var/do_icon_rotate = TRUE
name = e_name
desc = "A [name] vandalizing the station."
if(type == "poseur tag")
type = pick(GLOB.gang_name_pool)
if(alt_icon)
icon = alt_icon
icon_state = type
if(rotation && do_icon_rotate)
var/matrix/M = matrix()
M.Turn(rotation)
src.transform = M
add_atom_colour(main, FIXED_COLOUR_PRIORITY)
/obj/effect/decal/cleanable/crayon/gang
layer = HIGH_OBJ_LAYER //Harder to hide
do_icon_rotate = FALSE //These are designed to always face south, so no rotation please.
var/datum/gang/gang
/obj/effect/decal/cleanable/crayon/Initialize(mapload, main = "#FFFFFF", var/type = "rune1", var/e_name = "rune", var/rotation = 0, var/alt_icon = null)
..()
name = e_name
desc = "A [name] vandalizing the station."
if(type == "poseur tag")
type = pick(GLOB.gang_name_pool)
if(alt_icon)
icon = alt_icon
icon_state = type
if(rotation && do_icon_rotate)
var/matrix/M = matrix()
M.Turn(rotation)
src.transform = M
add_atom_colour(main, FIXED_COLOUR_PRIORITY)
/obj/effect/decal/cleanable/crayon/gang
layer = HIGH_OBJ_LAYER //Harder to hide
do_icon_rotate = FALSE //These are designed to always face south, so no rotation please.
var/datum/gang/gang
var/datum/mind/user_mind
var/area/territory
/obj/effect/decal/cleanable/crayon/gang/Initialize(mapload, var/datum/gang/G, var/e_name = "gang tag", var/rotation = 0, var/mob/user)
if(!type || !G)
qdel(src)
if(!type || !G)
qdel(src)
user_mind = user.mind
territory = get_area(src)
gang = G
var/newcolor = G.color_hex
icon_state = G.name
G.territory_new |= list(territory.type = territory.name)
gang = G
var/newcolor = G.color_hex
icon_state = G.name
G.territory_new |= list(territory.type = territory.name)
//If this isn't tagged by a specific gangster there's no bonus income.
set_mind_owner(user_mind)
..(mapload, newcolor, icon_state, e_name, rotation)
..(mapload, newcolor, icon_state, e_name, rotation)
/obj/effect/decal/cleanable/crayon/gang/proc/set_mind_owner(datum/mind/mind)
if(istype(user_mind) && istype(gang) && islist(gang.tags_by_mind[user_mind])) //Clear us out of old ownership
gang.tags_by_mind[user_mind] -= src
@@ -55,10 +55,10 @@
gang.tags_by_mind[mind] += src
user_mind = mind
/obj/effect/decal/cleanable/crayon/gang/Destroy()
if(gang)
gang.territory -= territory.type
/obj/effect/decal/cleanable/crayon/gang/Destroy()
if(gang)
gang.territory -= territory.type
set_mind_owner(null)
gang.territory_new -= territory.type
gang.territory_lost |= list(territory.type = territory.name)
return ..()
gang.territory_new -= territory.type
gang.territory_lost |= list(territory.type = territory.name)
return ..()
+2 -1
View File
@@ -31,6 +31,7 @@
if(!istype(T)) //you know this will happen somehow
CRASH("Turf decal initialized in an object/nullspace")
T.add_decal(get_decal(),group)
return INITIALIZE_HINT_QDEL
/obj/effect/turf_decal/stripes/line
icon_state = "warningline"
@@ -66,4 +67,4 @@
icon_state = "sandyplating"
/obj/effect/turf_decal/plaque
icon_state = "plaque"
icon_state = "plaque"
+32 -32
View File
@@ -1,34 +1,34 @@
/obj/effect/temp_visual/point
name = "pointer"
icon = 'icons/mob/screen_gen.dmi'
icon_state = "arrow"
layer = POINT_LAYER
duration = 25
name = "pointer"
icon = 'icons/mob/screen_gen.dmi'
icon_state = "arrow"
layer = POINT_LAYER
duration = 25
/obj/effect/temp_visual/point/Initialize(mapload, set_invis = 0)
..()
var/atom/old_loc = loc
loc = get_turf(src)
pixel_x = old_loc.pixel_x
pixel_y = old_loc.pixel_y
invisibility = set_invis
//Used by spraybottles.
/obj/effect/decal/chempuff
name = "chemicals"
icon = 'icons/obj/chempuff.dmi'
pass_flags = PASSTABLE | PASSGRILLE
layer = FLY_LAYER
/obj/effect/decal/sandeffect
name = "sandy tile"
icon = 'icons/turf/floors.dmi'
icon_state = "sandeffect"
layer = ABOVE_OPEN_TURF_LAYER
/obj/effect/decal/fakelattice
name = "lattice"
desc = "A lightweight support lattice."
icon = 'icons/obj/smooth_structures/lattice.dmi'
icon_state = "lattice"
density = 1
..()
var/atom/old_loc = loc
loc = get_turf(src)
pixel_x = old_loc.pixel_x
pixel_y = old_loc.pixel_y
invisibility = set_invis
//Used by spraybottles.
/obj/effect/decal/chempuff
name = "chemicals"
icon = 'icons/obj/chempuff.dmi'
pass_flags = PASSTABLE | PASSGRILLE
layer = FLY_LAYER
/obj/effect/decal/sandeffect
name = "sandy tile"
icon = 'icons/turf/floors.dmi'
icon_state = "sandeffect"
layer = ABOVE_OPEN_TURF_LAYER
/obj/effect/decal/fakelattice
name = "lattice"
desc = "A lightweight support lattice."
icon = 'icons/obj/smooth_structures/lattice.dmi'
icon_state = "lattice"
density = 1
@@ -104,7 +104,7 @@
/obj/effect/particle_effect/foam/Crossed(atom/movable/AM)
if(istype(AM, /mob/living/carbon))
var/mob/living/carbon/M = AM
M.slip(5, 2, src)
M.slip(100, src)
/obj/effect/particle_effect/foam/metal/Crossed(atom/movable/AM)
return
@@ -276,6 +276,10 @@
for(var/obj/item/Item in O)
Item.extinguish()
/obj/structure/foamedmetal/resin/CanPass(atom/movable/mover, turf/target, height)
if(istype(mover) && mover.checkpass(PASSGLASS))
return TRUE
. = ..()
#undef ALUMINUM_FOAM
#undef IRON_FOAM
@@ -128,10 +128,10 @@
s.set_up(2, 1, location)
s.start()
for(var/mob/M in viewers(1, location))
if (prob (50 * amount))
to_chat(M, "<span class='danger'>The explosion knocks you down.</span>")
M.Weaken(rand(1,5))
for(var/mob/living/L in viewers(1, location))
if(prob(50 * amount))
to_chat(L, "<span class='danger'>The explosion knocks you down.</span>")
L.Knockdown(rand(20,100))
return
else
dyn_explosion(location, amount, flashing_factor)
@@ -207,7 +207,7 @@
/obj/effect/particle_effect/smoke/sleeping/smoke_mob(mob/living/carbon/M)
if(..())
M.drop_item()
M.Sleeping(max(M.sleeping,10))
M.Sleeping(200)
M.emote("cough")
return 1
+29 -29
View File
@@ -1,31 +1,31 @@
/obj/effect/forcefield
desc = "A space wizard's magic wall."
name = "FORCEWALL"
icon_state = "m_shield"
anchored = 1
opacity = 0
density = 1
CanAtmosPass = ATMOS_PASS_DENSITY
/obj/effect/forcefield/cult
desc = "An unholy shield that blocks all attacks."
name = "glowing wall"
/obj/effect/forcefield
desc = "A space wizard's magic wall."
name = "FORCEWALL"
icon_state = "m_shield"
anchored = 1
opacity = 0
density = 1
CanAtmosPass = ATMOS_PASS_DENSITY
/obj/effect/forcefield/cult
desc = "An unholy shield that blocks all attacks."
name = "glowing wall"
icon = 'icons/effects/cult_effects.dmi'
icon_state = "cultshield"
///////////Mimewalls///////////
/obj/effect/forcefield/mime
icon_state = "empty"
name = "invisible wall"
desc = "You have a bad feeling about this."
var/timeleft = 300
/obj/effect/forcefield/mime/New()
..()
QDEL_IN(src, timeleft)
/obj/effect/forcefield/mime/advanced
name = "invisible blockade"
desc = "You're goona be here a while."
icon_state = "cultshield"
///////////Mimewalls///////////
/obj/effect/forcefield/mime
icon_state = "empty"
name = "invisible wall"
desc = "You have a bad feeling about this."
var/timeleft = 300
/obj/effect/forcefield/mime/New()
..()
QDEL_IN(src, timeleft)
/obj/effect/forcefield/mime/advanced
name = "invisible blockade"
desc = "You're goona be here a while."
timeleft = 600
+1 -1
View File
@@ -161,7 +161,7 @@
/obj/structure/glowshroom/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
if(damage_type == BURN && damage_amount)
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
/obj/structure/glowshroom/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
+170 -170
View File
@@ -1,173 +1,173 @@
/obj/effect/mine
name = "dummy mine"
desc = "Better stay away from that thing."
density = 0
anchored = 1
icon = 'icons/obj/weapons.dmi'
icon_state = "uglymine"
var/triggered = 0
/obj/effect/mine/proc/mineEffect(mob/victim)
to_chat(victim, "<span class='danger'>*click*</span>")
/obj/effect/mine/Crossed(AM as mob|obj)
if(isturf(loc))
if(ismob(AM))
var/mob/MM = AM
if(!(MM.movement_type & FLYING))
triggermine(AM)
else
triggermine(AM)
/obj/effect/mine/proc/triggermine(mob/victim)
if(triggered)
return
/obj/effect/mine
name = "dummy mine"
desc = "Better stay away from that thing."
density = 0
anchored = 1
icon = 'icons/obj/weapons.dmi'
icon_state = "uglymine"
var/triggered = 0
/obj/effect/mine/proc/mineEffect(mob/victim)
to_chat(victim, "<span class='danger'>*click*</span>")
/obj/effect/mine/Crossed(AM as mob|obj)
if(isturf(loc))
if(ismob(AM))
var/mob/MM = AM
if(!(MM.movement_type & FLYING))
triggermine(AM)
else
triggermine(AM)
/obj/effect/mine/proc/triggermine(mob/victim)
if(triggered)
return
visible_message("<span class='danger'>[victim] sets off [bicon(src)] [src]!</span>")
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, src)
s.start()
mineEffect(victim)
triggered = 1
qdel(src)
/obj/effect/mine/explosive
name = "explosive mine"
var/range_devastation = 0
var/range_heavy = 1
var/range_light = 2
var/range_flash = 3
/obj/effect/mine/explosive/mineEffect(mob/victim)
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(3, 1, src)
s.start()
mineEffect(victim)
triggered = 1
qdel(src)
/obj/effect/mine/explosive
name = "explosive mine"
var/range_devastation = 0
var/range_heavy = 1
var/range_light = 2
var/range_flash = 3
/obj/effect/mine/explosive/mineEffect(mob/victim)
explosion(loc, range_devastation, range_heavy, range_light, range_flash)
/obj/effect/mine/stun
name = "stun mine"
var/stun_time = 8
/obj/effect/mine/stun/mineEffect(mob/victim)
if(isliving(victim))
victim.Weaken(stun_time)
/obj/effect/mine/kickmine
name = "kick mine"
/obj/effect/mine/kickmine/mineEffect(mob/victim)
if(isliving(victim) && victim.client)
to_chat(victim, "<span class='userdanger'>You have been kicked FOR NO REISIN!</span>")
qdel(victim.client)
/obj/effect/mine/gas
name = "oxygen mine"
var/gas_amount = 360
var/gas_type = "o2"
/obj/effect/mine/gas/mineEffect(mob/victim)
atmos_spawn_air("[gas_type]=[gas_amount]")
/obj/effect/mine/gas/plasma
name = "plasma mine"
gas_type = "plasma"
/obj/effect/mine/gas/n2o
name = "\improper N2O mine"
gas_type = "n2o"
/obj/effect/mine/sound
name = "honkblaster 1000"
var/sound = 'sound/items/bikehorn.ogg'
/obj/effect/mine/sound/mineEffect(mob/victim)
playsound(loc, sound, 100, 1)
/obj/effect/mine/sound/bwoink
name = "bwoink mine"
sound = 'sound/effects/adminhelp.ogg'
/obj/effect/mine/pickup
name = "pickup"
desc = "pick me up"
icon = 'icons/effects/effects.dmi'
icon_state = "electricity2"
density = 0
var/duration = 0
/obj/effect/mine/pickup/New()
..()
animate(src, pixel_y = 4, time = 20, loop = -1)
/obj/effect/mine/pickup/triggermine(mob/victim)
if(triggered)
return
triggered = 1
invisibility = INVISIBILITY_ABSTRACT
mineEffect(victim)
qdel(src)
/obj/effect/mine/pickup/bloodbath
name = "Red Orb"
desc = "You feel angry just looking at it."
duration = 1200 //2min
color = "#FF0000"
/obj/effect/mine/pickup/bloodbath/mineEffect(mob/living/carbon/victim)
if(!victim.client || !istype(victim))
return
to_chat(victim, "<span class='reallybig redtext'>RIP AND TEAR</span>")
victim << 'sound/misc/e1m1.ogg'
var/old_color = victim.client.color
var/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
var/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
spawn(0)
/obj/effect/mine/stun
name = "stun mine"
var/stun_time = 80
/obj/effect/mine/stun/mineEffect(mob/living/victim)
if(isliving(victim))
victim.Knockdown(stun_time)
/obj/effect/mine/kickmine
name = "kick mine"
/obj/effect/mine/kickmine/mineEffect(mob/victim)
if(isliving(victim) && victim.client)
to_chat(victim, "<span class='userdanger'>You have been kicked FOR NO REISIN!</span>")
qdel(victim.client)
/obj/effect/mine/gas
name = "oxygen mine"
var/gas_amount = 360
var/gas_type = "o2"
/obj/effect/mine/gas/mineEffect(mob/victim)
atmos_spawn_air("[gas_type]=[gas_amount]")
/obj/effect/mine/gas/plasma
name = "plasma mine"
gas_type = "plasma"
/obj/effect/mine/gas/n2o
name = "\improper N2O mine"
gas_type = "n2o"
/obj/effect/mine/sound
name = "honkblaster 1000"
var/sound = 'sound/items/bikehorn.ogg'
/obj/effect/mine/sound/mineEffect(mob/victim)
playsound(loc, sound, 100, 1)
/obj/effect/mine/sound/bwoink
name = "bwoink mine"
sound = 'sound/effects/adminhelp.ogg'
/obj/effect/mine/pickup
name = "pickup"
desc = "pick me up"
icon = 'icons/effects/effects.dmi'
icon_state = "electricity2"
density = 0
var/duration = 0
/obj/effect/mine/pickup/New()
..()
animate(src, pixel_y = 4, time = 20, loop = -1)
/obj/effect/mine/pickup/triggermine(mob/victim)
if(triggered)
return
triggered = 1
invisibility = INVISIBILITY_ABSTRACT
mineEffect(victim)
qdel(src)
/obj/effect/mine/pickup/bloodbath
name = "Red Orb"
desc = "You feel angry just looking at it."
duration = 1200 //2min
color = "#FF0000"
/obj/effect/mine/pickup/bloodbath/mineEffect(mob/living/carbon/victim)
if(!victim.client || !istype(victim))
return
to_chat(victim, "<span class='reallybig redtext'>RIP AND TEAR</span>")
victim << 'sound/misc/e1m1.ogg'
var/old_color = victim.client.color
var/red_splash = list(1,0,0,0.8,0.2,0, 0.8,0,0.2,0.1,0,0)
var/pure_red = list(0,0,0,0,0,0,0,0,0,1,0,0)
spawn(0)
new /obj/effect/hallucination/delusion(victim.loc,victim,"demon",duration,0)
var/obj/item/weapon/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
chainsaw.flags |= NODROP
victim.drop_all_held_items()
victim.put_in_hands(chainsaw)
chainsaw.attack_self(victim)
chainsaw.wield(victim)
victim.reagents.add_reagent("adminordrazine",25)
victim.client.color = pure_red
animate(victim.client,color = red_splash, time = 10, easing = SINE_EASING|EASE_OUT)
sleep(10)
animate(victim.client,color = old_color, time = duration)//, easing = SINE_EASING|EASE_OUT)
sleep(duration)
to_chat(victim, "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.<span>")
qdel(chainsaw)
qdel(src)
/obj/effect/mine/pickup/healing
name = "Blue Orb"
desc = "You feel better just looking at it."
color = "#0000FF"
/obj/effect/mine/pickup/healing/mineEffect(mob/living/carbon/victim)
if(!victim.client || !istype(victim))
return
to_chat(victim, "<span class='notice'>You feel great!</span>")
victim.revive(full_heal = 1, admin_revive = 1)
/obj/effect/mine/pickup/speed
name = "Yellow Orb"
desc = "You feel faster just looking at it."
color = "#FFFF00"
duration = 300
/obj/effect/mine/pickup/speed/mineEffect(mob/living/carbon/victim)
if(!victim.client || !istype(victim))
return
to_chat(victim, "<span class='notice'>You feel fast!</span>")
victim.status_flags |= GOTTAGOREALLYFAST
sleep(duration)
victim.status_flags &= ~GOTTAGOREALLYFAST
to_chat(victim, "<span class='notice'>You slow down.</span>")
var/obj/item/weapon/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc)
chainsaw.flags |= NODROP
victim.drop_all_held_items()
victim.put_in_hands(chainsaw)
chainsaw.attack_self(victim)
chainsaw.wield(victim)
victim.reagents.add_reagent("adminordrazine",25)
victim.client.color = pure_red
animate(victim.client,color = red_splash, time = 10, easing = SINE_EASING|EASE_OUT)
sleep(10)
animate(victim.client,color = old_color, time = duration)//, easing = SINE_EASING|EASE_OUT)
sleep(duration)
to_chat(victim, "<span class='notice'>Your bloodlust seeps back into the bog of your subconscious and you regain self control.<span>")
qdel(chainsaw)
qdel(src)
/obj/effect/mine/pickup/healing
name = "Blue Orb"
desc = "You feel better just looking at it."
color = "#0000FF"
/obj/effect/mine/pickup/healing/mineEffect(mob/living/carbon/victim)
if(!victim.client || !istype(victim))
return
to_chat(victim, "<span class='notice'>You feel great!</span>")
victim.revive(full_heal = 1, admin_revive = 1)
/obj/effect/mine/pickup/speed
name = "Yellow Orb"
desc = "You feel faster just looking at it."
color = "#FFFF00"
duration = 300
/obj/effect/mine/pickup/speed/mineEffect(mob/living/carbon/victim)
if(!victim.client || !istype(victim))
return
to_chat(victim, "<span class='notice'>You feel fast!</span>")
victim.status_flags |= GOTTAGOREALLYFAST
sleep(duration)
victim.status_flags &= ~GOTTAGOREALLYFAST
to_chat(victim, "<span class='notice'>You slow down.</span>")
+133 -43
View File
@@ -1,25 +1,42 @@
/proc/create_portal_pair(turf/source, turf/destination, _creator = null, _lifespan = 300, accuracy = 0, newtype = /obj/effect/portal)
if(!istype(source) || !istype(destination))
return
var/turf/actual_destination = get_teleport_turf(destination, accuracy)
var/obj/effect/portal/P1 = new newtype(source, _creator, _lifespan, null, FALSE)
var/obj/effect/portal/P2 = new newtype(actual_destination, _creator, _lifespan, P1, TRUE)
if(!istype(P1)||!istype(P2))
return
P1.link_portal(P2)
P1.hardlinked = TRUE
return list(P1, P2)
/obj/effect/portal
name = "portal"
desc = "Looks unstable. Best to test it with the clown."
icon = 'icons/obj/stationobjs.dmi'
icon_state = "portal"
density = 1
var/obj/item/target = null
var/creator = null
anchored = 1
var/precision = 1 // how close to the portal you will teleport. 0 = on the portal, 1 = adjacent
anchored = TRUE
var/mech_sized = FALSE
var/obj/effect/portal/linked
var/hardlinked = TRUE //Requires a linked portal at all times. Destroy if there's no linked portal, if there is destroy it when this one is deleted.
var/creator
var/turf/hard_target //For when a portal needs a hard target and isn't to be linked.
var/atmos_link = FALSE //Link source/destination atmos.
var/turf/open/atmos_source //Atmos link source
var/turf/open/atmos_destination //Atmos link destination
/obj/effect/portal/Bumped(mob/M as mob|obj)
teleport(M)
/obj/effect/portal/anom
name = "wormhole"
icon = 'icons/obj/objects.dmi'
icon_state = "anom"
mech_sized = TRUE
/obj/effect/portal/attack_tk(mob/user)
return
/obj/effect/portal/attack_hand(mob/user)
if(Adjacent(user))
teleport(user)
/obj/effect/portal/Move(newloc)
for(var/T in newloc)
if(istype(T, /obj/effect/portal))
return FALSE
return ..()
/obj/effect/portal/attackby(obj/item/weapon/W, mob/user, params)
if(user && Adjacent(user))
@@ -28,42 +45,115 @@
/obj/effect/portal/make_frozen_visual()
return
/obj/effect/portal/New(loc, turf/target, creator=null, lifespan=300)
..()
/obj/effect/portal/Crossed(atom/movable/AM, oldloc)
if(get_turf(oldloc) == get_turf(linked))
return ..()
if(!teleport(AM))
return ..()
/obj/effect/portal/attack_tk(mob/user)
return
/obj/effect/portal/attack_hand(mob/user)
if(Adjacent(user))
teleport(user)
/obj/effect/portal/Initialize(mapload, _creator, _lifespan = 0, obj/effect/portal/_linked, automatic_link = FALSE, turf/hard_target_override, atmos_link_override)
. = ..()
GLOB.portals += src
src.target = target
src.creator = creator
if(!istype(_linked) && automatic_link)
. = INITIALIZE_HINT_QDEL
CRASH("Somebody fucked up.")
if(_lifespan > 0)
QDEL_IN(src, _lifespan)
if(!isnull(atmos_link_override))
atmos_link = atmos_link_override
link_portal(_linked)
hardlinked = automatic_link
creator = _creator
if(isturf(hard_target_override))
hard_target = hard_target_override
var/area/A = get_area(target)
if(A && A.noteleport) // No point in persisting if the target is unreachable.
qdel(src)
return
if(lifespan > 0)
QDEL_IN(src, lifespan)
/obj/effect/portal/proc/link_portal(obj/effect/portal/newlink)
linked = newlink
if(atmos_link)
link_atmos()
/obj/effect/portal/Destroy()
GLOB.portals -= src
if(istype(creator, /obj/item/weapon/hand_tele))
var/obj/item/weapon/hand_tele/O = creator
O.active_portals--
else if(istype(creator, /obj/item/weapon/gun/energy/wormhole_projector))
var/obj/item/weapon/gun/energy/wormhole_projector/P = creator
P.portal_destroyed(src)
/obj/effect/portal/proc/link_atmos()
if(atmos_source || atmos_destination)
unlink_atmos()
if(!isopenturf(get_turf(src)))
return FALSE
if(linked)
if(isopenturf(get_turf(linked)))
atmos_source = get_turf(src)
atmos_destination = get_turf(linked)
else if(hard_target)
if(isopenturf(hard_target))
atmos_source = get_turf(src)
atmos_destination = hard_target
else
return FALSE
if(!istype(atmos_source) || !istype(atmos_destination))
return FALSE
LAZYINITLIST(atmos_source.atmos_adjacent_turfs)
LAZYINITLIST(atmos_destination.atmos_adjacent_turfs)
if(atmos_source.atmos_adjacent_turfs[atmos_destination] || atmos_destination.atmos_adjacent_turfs[atmos_source]) //Already linked!
return FALSE
atmos_source.atmos_adjacent_turfs[atmos_destination] = TRUE
atmos_destination.atmos_adjacent_turfs[atmos_source] = TRUE
atmos_source.air_update_turf(FALSE)
atmos_destination.air_update_turf(FALSE)
/obj/effect/portal/proc/unlink_atmos()
if(istype(atmos_source))
if(istype(atmos_destination) && !atmos_source.Adjacent(atmos_destination) && !CANATMOSPASS(atmos_destination, atmos_source))
LAZYREMOVE(atmos_source.atmos_adjacent_turfs, atmos_destination)
atmos_source = null
if(istype(atmos_destination))
if(istype(atmos_source) && !atmos_destination.Adjacent(atmos_source) && !CANATMOSPASS(atmos_source, atmos_destination))
LAZYREMOVE(atmos_destination.atmos_adjacent_turfs, atmos_source)
atmos_destination = null
/obj/effect/portal/Destroy() //Calls on_portal_destroy(destroyed portal, location of destroyed portal) on creator if creator has such call.
if(creator && hascall(creator, "on_portal_destroy"))
call(creator, "on_portal_destroy")(src, src.loc)
creator = null
GLOB.portals -= src
unlink_atmos()
if(hardlinked && !QDELETED(linked))
QDEL_NULL(linked)
else
linked = null
return ..()
/obj/effect/portal/proc/teleport(atom/movable/M as mob|obj)
if(istype(M, /obj/effect)) //sparks don't teleport
/obj/effect/portal/proc/teleport(atom/movable/M)
if(!istype(M) || istype(M, /obj/effect) || (istype(M, /obj/mecha) && !mech_sized) || (!isobj(M) && !ismob(M))) //Things that shouldn't teleport.
return
if(M.anchored)
if(!(istype(M, /obj/mecha) && mech_sized))
var/turf/real_target = get_link_target_turf()
if(!istype(real_target))
return FALSE
if(ismegafauna(M))
message_admins("[M] has used a portal at [ADMIN_COORDJMP(src)] made by [usr].")
if(do_teleport(M, real_target, 0))
if(istype(M, /obj/item/projectile))
var/obj/item/projectile/P = M
P.ignore_source_check = TRUE
return TRUE
return FALSE
/obj/effect/portal/proc/get_link_target_turf()
var/turf/real_target
if(!istype(linked) || QDELETED(linked))
if(hardlinked)
qdel(src)
if(!istype(hard_target) || QDELETED(hard_target))
hard_target = null
return
if (!( target ))
qdel(src)
return
if (istype(M, /atom/movable))
if(ismegafauna(M))
message_admins("[M] [ADMIN_FLW(M)] has teleported through [src].")
do_teleport(M, target, precision) ///You will appear adjacent to the beacon
else
real_target = hard_target
linked = null
else
real_target = get_turf(linked)
return real_target
@@ -25,7 +25,7 @@
for(var/j = 1, j<= gibamounts[i], j++)
var/gibType = gibtypes[i]
gib = new gibType(loc)
if(istype(loc,/mob/living/carbon))
if(iscarbon(loc))
var/mob/living/carbon/digester = loc
digester.stomach_contents += gib
+131 -131
View File
@@ -1,59 +1,59 @@
/obj/effect/spawner/lootdrop
icon = 'icons/mob/screen_gen.dmi'
icon_state = "x2"
color = "#00FF00"
var/lootcount = 1 //how many items will be spawned
var/lootdoubles = TRUE //if the same item can be spawned twice
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
/obj/effect/spawner/lootdrop/Initialize(mapload)
..()
if(loot && loot.len)
var/turf/T = get_turf(src)
while(lootcount && loot.len)
var/lootspawn = pickweight(loot)
if(!lootdoubles)
loot.Remove(lootspawn)
if(lootspawn)
new lootspawn(T)
lootcount--
qdel(src)
/obj/effect/spawner/lootdrop/armory_contraband
name = "armory contraband gun spawner"
lootdoubles = FALSE
loot = list(
/obj/item/weapon/gun/ballistic/automatic/pistol = 8,
/obj/item/weapon/gun/ballistic/shotgun/automatic/combat = 5,
/obj/item/weapon/gun/ballistic/revolver/mateba,
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle
)
/obj/effect/spawner/lootdrop/gambling
name = "gambling valuables spawner"
loot = list(
/obj/item/weapon/gun/ballistic/revolver/russian = 5,
/obj/item/weapon/storage/box/syndie_kit/throwing_weapons = 1,
/obj/item/toy/cards/deck/syndicate = 2
)
/obj/effect/spawner/lootdrop/grille_or_trash
name = "maint grille or trash spawner"
loot = list(/obj/structure/grille = 5,
/obj/item/weapon/cigbutt = 1,
/obj/item/trash/cheesie = 1,
/obj/item/trash/candy = 1,
/obj/item/trash/chips = 1,
/obj/item/trash/deadmouse = 1,
/obj/item/trash/pistachios = 1,
/obj/item/trash/plate = 1,
/obj/item/trash/popcorn = 1,
/obj/item/trash/raisins = 1,
/obj/item/trash/sosjerky = 1,
/obj/item/trash/syndi_cakes = 1)
/obj/effect/spawner/lootdrop
icon = 'icons/mob/screen_gen.dmi'
icon_state = "x2"
color = "#00FF00"
var/lootcount = 1 //how many items will be spawned
var/lootdoubles = TRUE //if the same item can be spawned twice
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
/obj/effect/spawner/lootdrop/Initialize(mapload)
..()
if(loot && loot.len)
var/turf/T = get_turf(src)
while(lootcount && loot.len)
var/lootspawn = pickweight(loot)
if(!lootdoubles)
loot.Remove(lootspawn)
if(lootspawn)
new lootspawn(T)
lootcount--
qdel(src)
/obj/effect/spawner/lootdrop/armory_contraband
name = "armory contraband gun spawner"
lootdoubles = FALSE
loot = list(
/obj/item/weapon/gun/ballistic/automatic/pistol = 8,
/obj/item/weapon/gun/ballistic/shotgun/automatic/combat = 5,
/obj/item/weapon/gun/ballistic/revolver/mateba,
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle
)
/obj/effect/spawner/lootdrop/gambling
name = "gambling valuables spawner"
loot = list(
/obj/item/weapon/gun/ballistic/revolver/russian = 5,
/obj/item/weapon/storage/box/syndie_kit/throwing_weapons = 1,
/obj/item/toy/cards/deck/syndicate = 2
)
/obj/effect/spawner/lootdrop/grille_or_trash
name = "maint grille or trash spawner"
loot = list(/obj/structure/grille = 5,
/obj/item/weapon/cigbutt = 1,
/obj/item/trash/cheesie = 1,
/obj/item/trash/candy = 1,
/obj/item/trash/chips = 1,
/obj/item/trash/deadmouse = 1,
/obj/item/trash/pistachios = 1,
/obj/item/trash/plate = 1,
/obj/item/trash/popcorn = 1,
/obj/item/trash/raisins = 1,
/obj/item/trash/sosjerky = 1,
/obj/item/trash/syndi_cakes = 1)
/obj/effect/spawner/lootdrop/three_course_meal
name = "three course meal spawner"
lootcount = 3
@@ -83,83 +83,83 @@
loot = list(pick(soups) = 1,pick(salads) = 1,pick(mains) = 1)
. = ..()
/obj/effect/spawner/lootdrop/maintenance
name = "maintenance loot spawner"
/obj/effect/spawner/lootdrop/maintenance
name = "maintenance loot spawner"
// see code/_globalvars/lists/maintenance_loot.dm for loot table
/obj/effect/spawner/lootdrop/maintenance/Initialize(mapload)
loot = GLOB.maintenance_loot
..()
/obj/effect/spawner/lootdrop/crate_spawner
name = "lootcrate spawner" //USE PROMO CODE "SELLOUT" FOR 20% OFF!
lootdoubles = FALSE
loot = list(
/obj/structure/closet/crate/secure/loot = 20,
"" = 80
)
/obj/effect/spawner/lootdrop/organ_spawner
name = "organ spawner"
loot = list(
/obj/item/organ/heart/gland/bloody = 7,
/obj/item/organ/heart/gland/bodysnatch = 4,
/obj/item/organ/heart/gland/egg = 7,
/obj/item/organ/heart/gland/emp = 3,
/obj/item/organ/heart/gland/mindshock = 5,
/obj/item/organ/heart/gland/plasma = 7,
/obj/item/organ/heart/gland/pop = 5,
/obj/item/organ/heart/gland/slime = 4,
/obj/item/organ/heart/gland/spiderman = 5,
/obj/item/organ/heart/gland/ventcrawling = 1,
/obj/item/organ/body_egg/alien_embryo = 1,
/obj/effect/spawner/lootdrop/crate_spawner
name = "lootcrate spawner" //USE PROMO CODE "SELLOUT" FOR 20% OFF!
lootdoubles = FALSE
loot = list(
/obj/structure/closet/crate/secure/loot = 20,
"" = 80
)
/obj/effect/spawner/lootdrop/organ_spawner
name = "organ spawner"
loot = list(
/obj/item/organ/heart/gland/bloody = 7,
/obj/item/organ/heart/gland/bodysnatch = 4,
/obj/item/organ/heart/gland/egg = 7,
/obj/item/organ/heart/gland/emp = 3,
/obj/item/organ/heart/gland/mindshock = 5,
/obj/item/organ/heart/gland/plasma = 7,
/obj/item/organ/heart/gland/pop = 5,
/obj/item/organ/heart/gland/slime = 4,
/obj/item/organ/heart/gland/spiderman = 5,
/obj/item/organ/heart/gland/ventcrawling = 1,
/obj/item/organ/body_egg/alien_embryo = 1,
/obj/item/organ/regenerative_core = 2)
lootcount = 3
/obj/effect/spawner/lootdrop/two_percent_xeno_egg_spawner
name = "2% chance xeno egg spawner"
loot = list(
/obj/effect/decal/remains/xeno = 49,
/obj/effect/spawner/xeno_egg_delivery = 1)
/obj/effect/spawner/lootdrop/costume
name = "random costume spawner"
/obj/effect/spawner/lootdrop/costume/Initialize()
loot = list()
for(var/path in subtypesof(/obj/effect/spawner/bundle/costume))
loot[path] = TRUE
..()
// Minor lootdrops follow
/obj/effect/spawner/lootdrop/minor/beret_or_rabbitears
name = "beret or rabbit ears spawner"
loot = list(
/obj/item/clothing/head/beret = 1,
/obj/item/clothing/head/rabbitears = 1)
/obj/effect/spawner/lootdrop/minor/bowler_or_that
name = "bowler or top hat spawner"
loot = list(
/obj/item/clothing/head/bowler = 1,
/obj/item/clothing/head/that = 1)
/obj/effect/spawner/lootdrop/minor/kittyears_or_rabbitears
name = "kitty ears or rabbit ears spawner"
loot = list(
/obj/item/clothing/head/kitty = 1,
/obj/item/clothing/head/rabbitears = 1)
/obj/effect/spawner/lootdrop/minor/pirate_or_bandana
name = "pirate hat or bandana spawner"
loot = list(
/obj/item/clothing/head/pirate = 1,
/obj/item/clothing/head/bandana = 1)
/obj/effect/spawner/lootdrop/minor/twentyfive_percent_cyborg_mask
name = "25% cyborg mask spawner"
loot = list(
/obj/item/clothing/mask/gas/cyborg = 25,
"" = 75)
lootcount = 3
/obj/effect/spawner/lootdrop/two_percent_xeno_egg_spawner
name = "2% chance xeno egg spawner"
loot = list(
/obj/effect/decal/remains/xeno = 49,
/obj/effect/spawner/xeno_egg_delivery = 1)
/obj/effect/spawner/lootdrop/costume
name = "random costume spawner"
/obj/effect/spawner/lootdrop/costume/Initialize()
loot = list()
for(var/path in subtypesof(/obj/effect/spawner/bundle/costume))
loot[path] = TRUE
..()
// Minor lootdrops follow
/obj/effect/spawner/lootdrop/minor/beret_or_rabbitears
name = "beret or rabbit ears spawner"
loot = list(
/obj/item/clothing/head/beret = 1,
/obj/item/clothing/head/rabbitears = 1)
/obj/effect/spawner/lootdrop/minor/bowler_or_that
name = "bowler or top hat spawner"
loot = list(
/obj/item/clothing/head/bowler = 1,
/obj/item/clothing/head/that = 1)
/obj/effect/spawner/lootdrop/minor/kittyears_or_rabbitears
name = "kitty ears or rabbit ears spawner"
loot = list(
/obj/item/clothing/head/kitty = 1,
/obj/item/clothing/head/rabbitears = 1)
/obj/effect/spawner/lootdrop/minor/pirate_or_bandana
name = "pirate hat or bandana spawner"
loot = list(
/obj/item/clothing/head/pirate = 1,
/obj/item/clothing/head/bandana = 1)
/obj/effect/spawner/lootdrop/minor/twentyfive_percent_cyborg_mask
name = "25% cyborg mask spawner"
loot = list(
/obj/item/clothing/mask/gas/cyborg = 25,
"" = 75)
+214 -214
View File
@@ -1,215 +1,215 @@
//generic procs copied from obj/effect/alien
/obj/structure/spider
name = "web"
icon = 'icons/effects/effects.dmi'
desc = "it's stringy and sticky"
anchored = 1
density = 0
obj_integrity = 15
/obj/structure/spider/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
if(damage_type == BURN)//the stickiness of the web mutes all attack sounds except fire damage type
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
/obj/structure/spider/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee")
switch(damage_type)
if(BURN)
damage_amount *= 2
if(BRUTE)
damage_amount *= 0.25
. = ..()
/obj/structure/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
take_damage(5, BURN, 0, 0)
/obj/structure/spider/stickyweb
icon_state = "stickyweb1"
/obj/structure/spider/stickyweb/Initialize()
if(prob(50))
icon_state = "stickyweb2"
. = ..()
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider))
return 1
else if(isliving(mover))
if(prob(50))
to_chat(mover, "<span class='danger'>You get stuck in \the [src] for a moment.</span>")
return 0
else if(istype(mover, /obj/item/projectile))
return prob(30)
return 1
/obj/structure/spider/eggcluster
name = "egg cluster"
desc = "They seem to pulse slightly with an inner life"
icon_state = "eggs"
var/amount_grown = 0
var/player_spiders = 0
var/poison_type = "toxin"
var/poison_per_bite = 5
var/list/faction = list("spiders")
/obj/structure/spider/eggcluster/Initialize()
pixel_x = rand(3,-3)
pixel_y = rand(3,-3)
START_PROCESSING(SSobj, src)
. = ..()
/obj/structure/spider/eggcluster/process()
amount_grown += rand(0,2)
if(amount_grown >= 100)
var/num = rand(3,12)
for(var/i=0, i<num, i++)
var/obj/structure/spider/spiderling/S = new /obj/structure/spider/spiderling(src.loc)
S.poison_type = poison_type
S.poison_per_bite = poison_per_bite
S.faction = faction.Copy()
if(player_spiders)
S.player_spiders = 1
qdel(src)
/obj/structure/spider/spiderling
name = "spiderling"
desc = "It never stays still for long."
icon_state = "spiderling"
anchored = 0
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
obj_integrity = 3
var/amount_grown = 0
var/grow_as = null
var/obj/machinery/atmospherics/components/unary/vent_pump/entry_vent
var/travelling_in_vent = 0
var/player_spiders = 0
var/poison_type = "toxin"
var/poison_per_bite = 5
var/list/faction = list("spiders")
/obj/structure/spider/spiderling/Initialize()
pixel_x = rand(6,-6)
pixel_y = rand(6,-6)
START_PROCESSING(SSobj, src)
. = ..()
/obj/structure/spider/spiderling/hunter
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter
/obj/structure/spider/spiderling/nurse
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/nurse
/obj/structure/spider/spiderling/Bump(atom/user)
if(istype(user, /obj/structure/table))
src.loc = user.loc
else
..()
/obj/structure/spider/spiderling/process()
if(travelling_in_vent)
if(isturf(loc))
travelling_in_vent = 0
entry_vent = null
else if(entry_vent)
if(get_dist(src, entry_vent) <= 1)
var/list/vents = list()
var/datum/pipeline/entry_vent_parent = entry_vent.PARENT1
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in entry_vent_parent.other_atmosmch)
vents.Add(temp_vent)
if(!vents.len)
entry_vent = null
return
var/obj/machinery/atmospherics/components/unary/vent_pump/exit_vent = pick(vents)
if(prob(50))
visible_message("<B>[src] scrambles into the ventillation ducts!</B>", \
"<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
spawn(rand(20,60))
loc = exit_vent
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
spawn(travel_time)
if(!exit_vent || exit_vent.welded)
loc = entry_vent
entry_vent = null
return
if(prob(50))
audible_message("<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
sleep(travel_time)
if(!exit_vent || exit_vent.welded)
loc = entry_vent
entry_vent = null
return
loc = exit_vent.loc
entry_vent = null
var/area/new_area = get_area(loc)
if(new_area)
new_area.Entered(src)
//=================
else if(prob(33))
var/list/nearby = oview(10, src)
if(nearby.len)
var/target_atom = pick(nearby)
walk_to(src, target_atom)
if(prob(40))
src.visible_message("<span class='notice'>\The [src] skitters[pick(" away"," around","")].</span>")
else if(prob(10))
//ventcrawl!
for(var/obj/machinery/atmospherics/components/unary/vent_pump/v in view(7,src))
if(!v.welded)
entry_vent = v
walk_to(src, entry_vent, 1)
break
if(isturf(loc))
amount_grown += rand(0,2)
if(amount_grown >= 100)
if(!grow_as)
//generic procs copied from obj/effect/alien
/obj/structure/spider
name = "web"
icon = 'icons/effects/effects.dmi'
desc = "it's stringy and sticky"
anchored = 1
density = 0
obj_integrity = 15
/obj/structure/spider/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
if(damage_type == BURN)//the stickiness of the web mutes all attack sounds except fire damage type
playsound(loc, 'sound/items/welder.ogg', 100, 1)
/obj/structure/spider/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == "melee")
switch(damage_type)
if(BURN)
damage_amount *= 2
if(BRUTE)
damage_amount *= 0.25
. = ..()
/obj/structure/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
take_damage(5, BURN, 0, 0)
/obj/structure/spider/stickyweb
icon_state = "stickyweb1"
/obj/structure/spider/stickyweb/Initialize()
if(prob(50))
icon_state = "stickyweb2"
. = ..()
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider))
return 1
else if(isliving(mover))
if(prob(50))
to_chat(mover, "<span class='danger'>You get stuck in \the [src] for a moment.</span>")
return 0
else if(istype(mover, /obj/item/projectile))
return prob(30)
return 1
/obj/structure/spider/eggcluster
name = "egg cluster"
desc = "They seem to pulse slightly with an inner life"
icon_state = "eggs"
var/amount_grown = 0
var/player_spiders = 0
var/poison_type = "toxin"
var/poison_per_bite = 5
var/list/faction = list("spiders")
/obj/structure/spider/eggcluster/Initialize()
pixel_x = rand(3,-3)
pixel_y = rand(3,-3)
START_PROCESSING(SSobj, src)
. = ..()
/obj/structure/spider/eggcluster/process()
amount_grown += rand(0,2)
if(amount_grown >= 100)
var/num = rand(3,12)
for(var/i=0, i<num, i++)
var/obj/structure/spider/spiderling/S = new /obj/structure/spider/spiderling(src.loc)
S.poison_type = poison_type
S.poison_per_bite = poison_per_bite
S.faction = faction.Copy()
if(player_spiders)
S.player_spiders = 1
qdel(src)
/obj/structure/spider/spiderling
name = "spiderling"
desc = "It never stays still for long."
icon_state = "spiderling"
anchored = 0
layer = PROJECTILE_HIT_THRESHHOLD_LAYER
obj_integrity = 3
var/amount_grown = 0
var/grow_as = null
var/obj/machinery/atmospherics/components/unary/vent_pump/entry_vent
var/travelling_in_vent = 0
var/player_spiders = 0
var/poison_type = "toxin"
var/poison_per_bite = 5
var/list/faction = list("spiders")
/obj/structure/spider/spiderling/Initialize()
pixel_x = rand(6,-6)
pixel_y = rand(6,-6)
START_PROCESSING(SSobj, src)
. = ..()
/obj/structure/spider/spiderling/hunter
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/hunter
/obj/structure/spider/spiderling/nurse
grow_as = /mob/living/simple_animal/hostile/poison/giant_spider/nurse
/obj/structure/spider/spiderling/Bump(atom/user)
if(istype(user, /obj/structure/table))
src.loc = user.loc
else
..()
/obj/structure/spider/spiderling/process()
if(travelling_in_vent)
if(isturf(loc))
travelling_in_vent = 0
entry_vent = null
else if(entry_vent)
if(get_dist(src, entry_vent) <= 1)
var/list/vents = list()
var/datum/pipeline/entry_vent_parent = entry_vent.PARENT1
for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in entry_vent_parent.other_atmosmch)
vents.Add(temp_vent)
if(!vents.len)
entry_vent = null
return
var/obj/machinery/atmospherics/components/unary/vent_pump/exit_vent = pick(vents)
if(prob(50))
visible_message("<B>[src] scrambles into the ventillation ducts!</B>", \
"<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
spawn(rand(20,60))
loc = exit_vent
var/travel_time = round(get_dist(loc, exit_vent.loc) / 2)
spawn(travel_time)
if(!exit_vent || exit_vent.welded)
loc = entry_vent
entry_vent = null
return
if(prob(50))
audible_message("<span class='italics'>You hear something scampering through the ventilation ducts.</span>")
sleep(travel_time)
if(!exit_vent || exit_vent.welded)
loc = entry_vent
entry_vent = null
return
loc = exit_vent.loc
entry_vent = null
var/area/new_area = get_area(loc)
if(new_area)
new_area.Entered(src)
//=================
else if(prob(33))
var/list/nearby = oview(10, src)
if(nearby.len)
var/target_atom = pick(nearby)
walk_to(src, target_atom)
if(prob(40))
src.visible_message("<span class='notice'>\The [src] skitters[pick(" away"," around","")].</span>")
else if(prob(10))
//ventcrawl!
for(var/obj/machinery/atmospherics/components/unary/vent_pump/v in view(7,src))
if(!v.welded)
entry_vent = v
walk_to(src, entry_vent, 1)
break
if(isturf(loc))
amount_grown += rand(0,2)
if(amount_grown >= 100)
if(!grow_as)
grow_as = pick(/mob/living/simple_animal/hostile/poison/giant_spider, /mob/living/simple_animal/hostile/poison/giant_spider/hunter, /mob/living/simple_animal/hostile/poison/giant_spider/nurse)
var/mob/living/simple_animal/hostile/poison/giant_spider/S = new grow_as(src.loc)
S.poison_per_bite = poison_per_bite
S.poison_type = poison_type
S.faction = faction.Copy()
if(player_spiders)
S.playable_spider = TRUE
notify_ghosts("Spider [S.name] can be controlled", null, enter_link="<a href=?src=\ref[S];activate=1>(Click to play)</a>", source=S, action=NOTIFY_ATTACK)
qdel(src)
/obj/structure/spider/cocoon
name = "cocoon"
desc = "Something wrapped in silky spider web"
icon_state = "cocoon1"
obj_integrity = 60
/obj/structure/spider/cocoon/Initialize()
icon_state = pick("cocoon1","cocoon2","cocoon3")
. = ..()
/obj/structure/spider/cocoon/container_resist(mob/living/user)
var/breakout_time = 1
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
to_chat(user, "<span class='notice'>You struggle against the tight bonds... (This will take about [breakout_time] minutes.)</span>")
visible_message("You see something struggling and writhing in \the [src]!")
if(do_after(user,(breakout_time*60*10), target = src))
if(!user || user.stat != CONSCIOUS || user.loc != src)
return
qdel(src)
/obj/structure/spider/cocoon/Destroy()
var/turf/T = get_turf(src)
src.visible_message("<span class='warning'>\The [src] splits open.</span>")
for(var/atom/movable/A in contents)
A.forceMove(T)
return ..()
var/mob/living/simple_animal/hostile/poison/giant_spider/S = new grow_as(src.loc)
S.poison_per_bite = poison_per_bite
S.poison_type = poison_type
S.faction = faction.Copy()
if(player_spiders)
S.playable_spider = TRUE
notify_ghosts("Spider [S.name] can be controlled", null, enter_link="<a href=?src=\ref[S];activate=1>(Click to play)</a>", source=S, action=NOTIFY_ATTACK)
qdel(src)
/obj/structure/spider/cocoon
name = "cocoon"
desc = "Something wrapped in silky spider web"
icon_state = "cocoon1"
obj_integrity = 60
/obj/structure/spider/cocoon/Initialize()
icon_state = pick("cocoon1","cocoon2","cocoon3")
. = ..()
/obj/structure/spider/cocoon/container_resist(mob/living/user)
var/breakout_time = 1
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
to_chat(user, "<span class='notice'>You struggle against the tight bonds... (This will take about [breakout_time] minutes.)</span>")
visible_message("You see something struggling and writhing in \the [src]!")
if(do_after(user,(breakout_time*60*10), target = src))
if(!user || user.stat != CONSCIOUS || user.loc != src)
return
qdel(src)
/obj/structure/spider/cocoon/Destroy()
var/turf/T = get_turf(src)
src.visible_message("<span class='warning'>\The [src] splits open.</span>")
for(var/atom/movable/A in contents)
A.forceMove(T)
return ..()
+2 -2
View File
@@ -16,7 +16,7 @@
return
if(isobserver(H) && !affect_ghosts)
return
if(!istype(H, /mob) && mobs_only)
if(!ismob(H) && mobs_only)
return
Trigger(H)
@@ -45,7 +45,7 @@
var/list/affecting = list()
/obj/effect/step_trigger/thrower/Trigger(atom/A)
if(!A || !istype(A, /atom/movable))
if(!A || !ismovableatom(A))
return
var/atom/movable/AM = A
var/curtiles = 0
@@ -162,10 +162,16 @@
/obj/effect/temp_visual/decoy/fading/fivesecond
duration = 50
/obj/effect/temp_visual/decoy/fading/halfsecond
duration = 5
/obj/effect/temp_visual/small_smoke
icon_state = "smoke"
duration = 50
/obj/effect/temp_visual/small_smoke/halfsecond
duration = 5
/obj/effect/temp_visual/fire
icon = 'icons/effects/fire.dmi'
icon_state = "3"
@@ -312,3 +318,30 @@
pixel_x = rand(-4,4)
pixel_y = rand(-4,4)
animate(src, pixel_y = pixel_y + 32, alpha = 0, time = 25)
/obj/effect/temp_visual/bleed
name = "bleed"
icon = 'icons/effects/bleed.dmi'
icon_state = "bleed0"
duration = 10
var/shrink = TRUE
/obj/effect/temp_visual/bleed/Initialize(mapload, atom/size_calc_target)
. = ..()
var/size_matrix = matrix()
if(size_calc_target)
layer = size_calc_target.layer + 0.01
var/icon/I = icon(size_calc_target.icon, size_calc_target.icon_state, size_calc_target.dir)
size_matrix = matrix() * (I.Height()/world.icon_size)
transform = size_matrix //scale the bleed overlay's size based on the target's icon size
var/matrix/M = transform
if(shrink)
M = size_matrix*0.1
else
M = size_matrix*2
animate(src, alpha = 20, transform = M, time = duration, flags = ANIMATION_PARALLEL)
/obj/effect/temp_visual/bleed/explode
icon_state = "bleed10"
duration = 12
shrink = FALSE