4989c88a22
http://forums.nanotrasen.com/viewtopic.php?f=16&t=12245#p189186 Ported all the random events to Pete/Gia's event system: >Event system now supports weighting. default is 10. a weight of 5 is half as likely as default, 20 twice as likely....etc. >Increased the frequency of events (dust happens over 60% of the time though) >tidied up some ninja code: ninjas now get ~5 objectives. So they are hardmode. >made the gravity toggle into a random event >event system now supports round-start events >event system now supports holiday events >event system now supports events which can only happen after the round has lasted a certain number of ticks >event system now supports max_occurrences for events. Setting any event's max_occurrences to 0 will stop it randomly occurring >events now support being fed associative lists inside new(). This allows you to override their variables easily. >wormhole events no longer cause loads of lag. They are extremely deadly. wormholes should be avoided Other: >replaced the procs for fetching candidates for ninjas and aliums with /proc/get_candidates(be_special_flag), it returns a list of active clients with that be_special preference enabled. >minor fixes to minds >your memories are displayed to you at Login() >removed aliens_allowed >removed ninjas_allowed >pick_n_take() is now more efficient (uses Cut() rather than Remove() Things I added: - Made the pandemic call ..() instead of doing the checks itself. - Made the staff of animation use more charge. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5720 316c924e-a436-60f5-8080-3fe189b3f50e
59 lines
1.4 KiB
Plaintext
59 lines
1.4 KiB
Plaintext
/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
|
|
unacidable = 1//Can't destroy energy portals.
|
|
var/failchance = 5
|
|
var/obj/item/target = null
|
|
var/creator = null
|
|
anchored = 1.0
|
|
|
|
/obj/effect/portal/Bumped(mob/M as mob|obj)
|
|
spawn(0)
|
|
src.teleport(M)
|
|
return
|
|
return
|
|
|
|
/obj/effect/portal/HasEntered(AM as mob|obj)
|
|
spawn(0)
|
|
src.teleport(AM)
|
|
return
|
|
return
|
|
|
|
/obj/effect/portal/New(loc, turf/target, creator, lifespan=300)
|
|
portals += src
|
|
src.loc = loc
|
|
src.target = target
|
|
src.creator = creator
|
|
if(lifespan > 0)
|
|
spawn(lifespan)
|
|
del(src)
|
|
return
|
|
|
|
/obj/effect/portal/Del()
|
|
portals -= src
|
|
if(istype(creator, /obj/item/weapon/hand_tele))
|
|
var/obj/item/weapon/hand_tele/O = creator
|
|
O.active_portals--
|
|
return ..()
|
|
|
|
/obj/effect/portal/proc/teleport(atom/movable/M as mob|obj)
|
|
if(istype(M, /obj/effect)) //sparks don't teleport
|
|
return
|
|
if(M.anchored&&istype(M, /obj/mecha))
|
|
return
|
|
if(icon_state == "portal1")
|
|
return
|
|
if (!( target ))
|
|
del(src)
|
|
return
|
|
if (istype(M, /atom/movable))
|
|
if(prob(failchance)) //oh dear a problem, put em in deep space
|
|
src.icon_state = "portal1"
|
|
do_teleport(M, locate(rand(5, world.maxx - 5), rand(5, world.maxy -5), 3), 0)
|
|
else
|
|
do_teleport(M, target, 1) ///You will appear adjacent to the beacon
|
|
|