mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
Merge branch 'bleeding-edge-freeze' of https://github.com/Baystation12/Baystation12 into bleeding-edge-freeze
This commit is contained in:
+22
-12
@@ -26,9 +26,6 @@
|
||||
#define FILE_DIR "code/FEA"
|
||||
#define FILE_DIR "code/game"
|
||||
#define FILE_DIR "code/game/area"
|
||||
#define FILE_DIR "code/game/events"
|
||||
#define FILE_DIR "code/game/events/EventProcs"
|
||||
#define FILE_DIR "code/game/events/Events"
|
||||
#define FILE_DIR "code/game/gamemodes"
|
||||
#define FILE_DIR "code/game/gamemodes/autotraitor"
|
||||
#define FILE_DIR "code/game/gamemodes/blob"
|
||||
@@ -122,6 +119,7 @@
|
||||
#define FILE_DIR "code/modules/clothing/under"
|
||||
#define FILE_DIR "code/modules/clothing/under/jobs"
|
||||
#define FILE_DIR "code/modules/customitems"
|
||||
#define FILE_DIR "code/modules/destilery"
|
||||
#define FILE_DIR "code/modules/DetectiveWork"
|
||||
#define FILE_DIR "code/modules/events"
|
||||
#define FILE_DIR "code/modules/flufftext"
|
||||
@@ -156,6 +154,7 @@
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal/friendly"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal/hostile"
|
||||
#define FILE_DIR "code/modules/mob/living/simple_animal/hostile/retaliate"
|
||||
#define FILE_DIR "code/modules/mob/new_player"
|
||||
#define FILE_DIR "code/modules/paperwork"
|
||||
#define FILE_DIR "code/modules/power"
|
||||
@@ -213,7 +212,6 @@
|
||||
#define FILE_DIR "code/WorkInProgress/Chinsky"
|
||||
#define FILE_DIR "code/WorkInProgress/Cib"
|
||||
#define FILE_DIR "code/WorkInProgress/Cib/amorph"
|
||||
#define FILE_DIR "code/WorkInProgress/mapload"
|
||||
#define FILE_DIR "code/WorkInProgress/Mini"
|
||||
#define FILE_DIR "code/WorkInProgress/Mloc"
|
||||
#define FILE_DIR "code/WorkInProgress/organs"
|
||||
@@ -273,11 +271,9 @@
|
||||
#define FILE_DIR "tools"
|
||||
#define FILE_DIR "tools/Redirector"
|
||||
// END_FILE_DIR
|
||||
|
||||
// BEGIN_PREFERENCES
|
||||
#define DEBUG
|
||||
// END_PREFERENCES
|
||||
|
||||
// BEGIN_INCLUDE
|
||||
#include "code\global.dm"
|
||||
#include "code\hub.dm"
|
||||
@@ -464,6 +460,7 @@
|
||||
#include "code\game\gamemodes\events\miniblob.dm"
|
||||
#include "code\game\gamemodes\events\ninja_abilities.dm"
|
||||
#include "code\game\gamemodes\events\ninja_equipment.dm"
|
||||
#include "code\game\gamemodes\events\power_failure.dm"
|
||||
#include "code\game\gamemodes\events\space_ninja.dm"
|
||||
#include "code\game\gamemodes\events\spacevines.dm"
|
||||
#include "code\game\gamemodes\events\wormholes.dm"
|
||||
@@ -660,6 +657,7 @@
|
||||
#include "code\game\objects\weapons.dm"
|
||||
#include "code\game\objects\closets\walllocker.dm"
|
||||
#include "code\game\objects\effects\aliens.dm"
|
||||
#include "code\game\objects\effects\barsign.dm"
|
||||
#include "code\game\objects\effects\bump_teleporter.dm"
|
||||
#include "code\game\objects\effects\effect_system.dm"
|
||||
#include "code\game\objects\effects\gibs.dm"
|
||||
@@ -970,6 +968,7 @@
|
||||
#include "code\modules\clothing\shoes\colour.dm"
|
||||
#include "code\modules\clothing\shoes\magboots.dm"
|
||||
#include "code\modules\clothing\shoes\miscellaneous.dm"
|
||||
#include "code\modules\clothing\spacesuits\alien.dm"
|
||||
#include "code\modules\clothing\spacesuits\captain.dm"
|
||||
#include "code\modules\clothing\spacesuits\ert.dm"
|
||||
#include "code\modules\clothing\spacesuits\miscellaneous.dm"
|
||||
@@ -997,25 +996,34 @@
|
||||
#include "code\modules\customitems\item_defines.dm"
|
||||
#include "code\modules\customitems\item_spawning.dm"
|
||||
#include "code\modules\destilery\main.dm"
|
||||
#include "code\modules\detectivework\detective_work.dm"
|
||||
#include "code\modules\detectivework\evidence.dm"
|
||||
#include "code\modules\detectivework\footprints_and_rag.dm"
|
||||
#include "code\modules\detectivework\scanner.dm"
|
||||
#include "code\modules\DetectiveWork\detective_work.dm"
|
||||
#include "code\modules\DetectiveWork\evidence.dm"
|
||||
#include "code\modules\DetectiveWork\footprints_and_rag.dm"
|
||||
#include "code\modules\DetectiveWork\scanner.dm"
|
||||
#include "code\modules\events\alien_infestation.dm"
|
||||
#include "code\modules\events\blob.dm"
|
||||
#include "code\modules\events\brand_intelligence.dm"
|
||||
#include "code\modules\events\carp_migration.dm"
|
||||
#include "code\modules\events\comms_blackout.dm"
|
||||
#include "code\modules\events\communications_blackout.dm"
|
||||
#include "code\modules\events\disease_outbreak.dm"
|
||||
#include "code\modules\events\electrical_storm.dm"
|
||||
#include "code\modules\events\event.dm"
|
||||
#include "code\modules\events\event_dynamic.dm"
|
||||
#include "code\modules\events\event_manager.dm"
|
||||
#include "code\modules\events\meteor_wave.dm"
|
||||
#include "code\modules\events\grid_check.dm"
|
||||
#include "code\modules\events\infestation.dm"
|
||||
#include "code\modules\events\ion_storm.dm"
|
||||
#include "code\modules\events\meteors.dm"
|
||||
#include "code\modules\events\prison_break.dm"
|
||||
#include "code\modules\events\radiation_storm.dm"
|
||||
#include "code\modules\events\rogue_drones.dm"
|
||||
#include "code\modules\events\space_ninja.dm"
|
||||
#include "code\modules\events\spacevine.dm"
|
||||
#include "code\modules\events\spider_infestation.dm"
|
||||
#include "code\modules\events\spontaneous_appendicitis.dm"
|
||||
#include "code\modules\events\viral_infection.dm"
|
||||
#include "code\modules\events\viral_outbreak.dm"
|
||||
#include "code\modules\flufftext\Dreaming.dm"
|
||||
#include "code\modules\flufftext\Hallucination.dm"
|
||||
#include "code\modules\flufftext\TextFilters.dm"
|
||||
@@ -1219,6 +1227,7 @@
|
||||
#include "code\modules\mob\living\simple_animal\hostile\syndicate.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\tree.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\retaliate\clown.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\retaliate\drone.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\retaliate\retaliate.dm"
|
||||
#include "code\modules\mob\new_player\hud.dm"
|
||||
#include "code\modules\mob\new_player\login.dm"
|
||||
@@ -1428,6 +1437,7 @@
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\SuperMatter.dm"
|
||||
#include "code\WorkInProgress\Cael_Aislinn\Supermatter\ZeroPointLaser.dm"
|
||||
#include "code\WorkInProgress\Chinsky\ashtray.dm"
|
||||
#include "code\WorkInProgress\Cib\MedicalSideEffects.dm"
|
||||
#include "code\WorkInProgress\Mini\ATM.dm"
|
||||
#include "code\WorkInProgress\Ported\policetape.dm"
|
||||
#include "code\WorkInProgress\SkyMarshal\Ultralight_procs.dm"
|
||||
@@ -1451,7 +1461,7 @@
|
||||
#include "code\ZAS\ZAS_Zones.dm"
|
||||
#include "interface\interface.dm"
|
||||
#include "interface\skin.dmf"
|
||||
#include "maps\tgstation.2.1.0.dmm"
|
||||
#include "maps\tgstation.2.1.0.0.1.dmm"
|
||||
#include "maps\RandomZLevels\Academy.dm"
|
||||
#include "maps\RandomZLevels\challenge.dm"
|
||||
#include "maps\RandomZLevels\stationCollision.dm"
|
||||
|
||||
@@ -157,6 +157,9 @@ var/global/next_account_number = 0
|
||||
for(var/datum/money_account/M in src.accounts)
|
||||
if(!A.accounts.Find(M))
|
||||
A.accounts.Add(M)
|
||||
for(var/datum/money_account/M in A.accounts)
|
||||
if(!src.accounts.Find(M))
|
||||
src.accounts.Add(M)
|
||||
usr << "\icon[src] <span class='info'>Accounts synched across all databases in range.</span>"
|
||||
|
||||
if("create_account")
|
||||
|
||||
@@ -80,13 +80,13 @@
|
||||
if(MOURNING)
|
||||
newMsg.body = "[pick("The popular","The well-liked","The eminent","The well-known")] [pick("professor","entertainer","singer","researcher","public servant","administrator","ship captain","\'REDACTED\'")], [pick( random_name(pick(MALE,FEMALE)), 40; "\'REDACTED\'" )] has [pick("passed away","committed suicide","been murdered","died in a freakish accident")] on [affected_dest.name] today. The entire planet is in mourning, and prices have dropped for industrial goods as worker morale drops."
|
||||
if(CULT_CELL_REVEALED)
|
||||
newMsg.body = "A [pick("dastardly","blood-thirsty","villanous","crazed")] cult of [pick("The Elder Gods","Nar'sie","an apocalyptic sect","\'REDACTED\'")] has [pick("been discovered","been revealed","revealed themselves","gone public")] on [affected_dest.name] earlier today. Public morale has been shaken due to [pick("certain","several","one or two")] [pick("high-profile","well known","popular")] individuals [pick("performing \'REDACTED\'","claiming allegiance to the cult","swearing loyalty to the cult leader","promising to aid to the cult")] before those involved could be brought to justice. The editor reminds all personnel that supernatural myths will not be tolerated on NanoTrasen facilities."
|
||||
newMsg.body = "A [pick("dastardly","blood-thirsty","villanous","crazed")] cult of [pick("The Elder Gods","Nar'sie","an apocalyptic sect","\'REDACTED\'")] has [pick("been discovered","been revealed","revealed themselves","gone public")] on [affected_dest.name] earlier today. Public morale has been shaken due to [pick("certain","several","one or two")] [pick("high-profile","well known","popular")] individuals [pick("performing \'REDACTED\' acts","claiming allegiance to the cult","swearing loyalty to the cult leader","promising to aid to the cult")] before those involved could be brought to justice. The editor reminds all personnel that supernatural myths will not be tolerated on NanoTrasen facilities."
|
||||
if(SECURITY_BREACH)
|
||||
newMsg.body = "There was [pick("a security breach in","an unauthorised access in","an attempted theft in","an anarchist attack in","violent sabotage of")] a [pick("high-security","restricted access","classified","\'REDACTED\'")] [pick("\'REDACTED\'","section","zone","area")] this morning. Security was tightened on [affected_dest.name] after the incident, and the editor reassures all NanoTrasen personnel that such lapses are rare."
|
||||
if(ANIMAL_RIGHTS_RAID)
|
||||
newMsg.body = "[pick("Militant animal rights activists","Members of the terrorist group Animal Rights Consortium","Members of the terrorist group \'REDACTED\'")] have [pick("launched a campaign of terror","unleashed a swathe of destruction","raided farms and pastures","forced entry to \'REDACTED\'")] on [affected_dest.name] earlier today, freeing numerous [pick("farm animals","animals","\'REDACTED\'")]. Prices for tame and breeding animals have spiked as a result."
|
||||
if(FESTIVAL)
|
||||
newMsg.body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been delcared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter")]","coming of age of their [pick("son","daughter")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet."
|
||||
newMsg.body = "A [pick("festival","week long celebration","day of revelry","planet-wide holiday")] has been declared on [affected_dest.name] by [pick("Governor","Commissioner","General","Commandant","Administrator")] [random_name(pick(MALE,FEMALE))] to celebrate [pick("the birth of their [pick("son","daughter")]","coming of age of their [pick("son","daughter")]","the pacification of rogue military cell","the apprehension of a violent criminal who had been terrorising the planet")]. Massive stocks of food and meat have been bought driving up prices across the planet."
|
||||
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
if(FC.channel_name == "Tau Ceti Daily")
|
||||
|
||||
@@ -0,0 +1,141 @@
|
||||
// MEDICAL SIDE EFFECT BASE
|
||||
// ========================
|
||||
/datum/medical_effect/var/name = "None"
|
||||
/datum/medical_effect/var/strength = 0
|
||||
/datum/medical_effect/proc/on_life(mob/living/carbon/human/H, strength)
|
||||
/datum/medical_effect/proc/cure(mob/living/carbon/human/H)
|
||||
|
||||
|
||||
// MOB HELPERS
|
||||
// ===========
|
||||
/mob/living/carbon/human/var/list/datum/medical_effect/side_effects = list()
|
||||
/mob/proc/add_side_effect(name, strength = 0)
|
||||
/mob/living/carbon/human/add_side_effect(name, strength = 0)
|
||||
for(var/datum/medical_effect/M in src.side_effects) if(M.name == name)
|
||||
M.strength = max(M.strength, 10)
|
||||
return
|
||||
|
||||
var/list/L = typesof(/datum/medical_effect)-/datum/medical_effect
|
||||
|
||||
for(var/T in L)
|
||||
var/datum/medical_effect/M = new T
|
||||
if(M.name == name)
|
||||
M.strength = strength
|
||||
side_effects += M
|
||||
|
||||
/mob/living/carbon/human/proc/handle_medical_side_effects()
|
||||
if(src.reagents.has_reagent("bicaridine") || src.reagents.has_reagent("tricordrazine") || src.reagents.has_reagent("cryoxadone"))
|
||||
src.add_side_effect("Headache")
|
||||
|
||||
|
||||
if(src.reagents.has_reagent("kelotane") || src.reagents.has_reagent("dermaline"))
|
||||
src.add_side_effect("Bad Stomach")
|
||||
|
||||
// One full cycle(in terms of strength) every 10 minutes
|
||||
var/strength_percent = sin(life_tick / 2)
|
||||
|
||||
// Only do anything if the effect is currently strong enough
|
||||
if(strength_percent >= 0.4)
|
||||
for (var/datum/medical_effect/M in side_effects)
|
||||
if (M.cure(src))
|
||||
side_effects -= M
|
||||
del(M)
|
||||
else
|
||||
if(life_tick % 15 == 0)
|
||||
M.on_life(src, strength_percent*M.strength)
|
||||
// Effect slowly growing stronger
|
||||
M.strength+=0.05
|
||||
|
||||
// HEADACHE
|
||||
// ========
|
||||
/datum/medical_effect/headache/name = "Headache"
|
||||
/datum/medical_effect/headache/on_life(mob/living/carbon/human/H, strength)
|
||||
switch(strength)
|
||||
if(1 to 10)
|
||||
H.custom_pain("You feel a light pain in your head.",0)
|
||||
if(11 to 30)
|
||||
H.custom_pain("You feel a throbbing pain in your head!",1)
|
||||
if(31 to 99)
|
||||
H.custom_pain("You feel an excrutiating pain in your head!",1)
|
||||
H.adjustBrainLoss(1)
|
||||
if(99 to INFINITY)
|
||||
H.custom_pain("It feels like your head is about to split open!",1)
|
||||
H.adjustBrainLoss(3)
|
||||
var/datum/organ/external/O = H.organs_by_name["head"]
|
||||
O.take_damage(0, 1, 0, "Headache")
|
||||
|
||||
/datum/medical_effect/headache/cure(mob/living/carbon/human/H)
|
||||
if(H.reagents.has_reagent("alkysine"))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// HEADACHE
|
||||
// ========
|
||||
/datum/medical_effect/headache/name = "Headache"
|
||||
/datum/medical_effect/headache/on_life(mob/living/carbon/human/H, strength)
|
||||
switch(strength)
|
||||
if(1 to 10)
|
||||
H.custom_pain("You feel a light pain in your head.",0)
|
||||
if(11 to 30)
|
||||
H.custom_pain("You feel a throbbing pain in your head!",1)
|
||||
if(31 to 99)
|
||||
H.custom_pain("You feel an excrutiating pain in your head!",1)
|
||||
H.adjustBrainLoss(1)
|
||||
if(99 to INFINITY)
|
||||
H.custom_pain("It feels like your head is about to split open!",1)
|
||||
H.adjustBrainLoss(3)
|
||||
var/datum/organ/external/O = H.organs_by_name["head"]
|
||||
O.take_damage(0, 1, 0, "Headache")
|
||||
|
||||
/datum/medical_effect/headache/cure(mob/living/carbon/human/H)
|
||||
if(H.reagents.has_reagent("alkysine") || H.reagents.has_reagent("tramadol"))
|
||||
H << "\red Your head stops throbbing.."
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// BAD STOMACH
|
||||
// ===========
|
||||
/datum/medical_effect/bad_stomach/name = "Bad Stomach"
|
||||
/datum/medical_effect/bad_stomach/on_life(mob/living/carbon/human/H, strength)
|
||||
switch(strength)
|
||||
if(1 to 10)
|
||||
H.custom_pain("You feel a bit light around the stomach.",0)
|
||||
if(11 to 30)
|
||||
H.custom_pain("Your stomach hurts.",0)
|
||||
if(31 to 99)
|
||||
H.custom_pain("You feel sick.",1)
|
||||
H.adjustToxLoss(1)
|
||||
if(99 to INFINITY)
|
||||
H.custom_pain("You can't hold it in any longer!",1)
|
||||
H.vomit()
|
||||
|
||||
/datum/medical_effect/bad_stomach/cure(mob/living/carbon/human/H)
|
||||
if(H.reagents.has_reagent("anti_toxin"))
|
||||
H << "\red Your stomach feels a little better now.."
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
// CRAMPS
|
||||
// ======
|
||||
/datum/medical_effect/cramps/name = "Cramps"
|
||||
/datum/medical_effect/cramps/on_life(mob/living/carbon/human/H, strength)
|
||||
switch(strength)
|
||||
if(1 to 10)
|
||||
H.custom_pain("The muscles in your body hurt a little.",0)
|
||||
if(11 to 30)
|
||||
H.custom_pain("The muscles in your body cramp up painfully.",0)
|
||||
if(31 to 99)
|
||||
H.emote("me",1,"flinches as all the muscles in their body cramp up.")
|
||||
H.custom_pain("There's pain all over your body.",1)
|
||||
H.adjustToxLoss(1)
|
||||
if(99 to INFINITY)
|
||||
H.emote("me",1,"flinches as all the muscles in their body cramp up.")
|
||||
H.custom_pain("It feels as though your muscles are being ripped apart!",1)
|
||||
H.apply_damage(1, used_weapon = "Cramps")
|
||||
|
||||
/datum/medical_effect/cramps/cure(mob/living/carbon/human/H)
|
||||
if(H.reagents.has_reagent("inaprovaline"))
|
||||
H << "\red The cramps let up.."
|
||||
return 1
|
||||
return 0
|
||||
@@ -91,7 +91,8 @@ log transactions
|
||||
user << "<span class='info'>You insert [I] into [src].</span>"
|
||||
src.attack_hand(user)
|
||||
del I
|
||||
else ..()
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/machinery/atm/attack_hand(mob/user as mob)
|
||||
if(istype(user, /mob/living/silicon))
|
||||
@@ -324,6 +325,8 @@ log transactions
|
||||
held_card = I
|
||||
if("logout")
|
||||
authenticated_account = null
|
||||
usr << browse(null,"window=atm")
|
||||
return
|
||||
src.attack_hand(usr)
|
||||
|
||||
//create the most effective combination of notes to make up the requested amount
|
||||
|
||||
+7
-7
@@ -41,9 +41,9 @@ turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
||||
return 1
|
||||
var/datum/gas/volatile_fuel/fuel = locate() in air_contents.trace_gases
|
||||
var/obj/effect/decal/cleanable/liquid_fuel/liquid = locate() in src
|
||||
if(air_contents.calculate_firelevel(liquid) > vsc.IgnitionLevel && (fuel || liquid || air_contents.toxins > 0.5))
|
||||
if(air_contents.calculate_firelevel(liquid) > vsc.IgnitionLevel && (fuel || liquid || air_contents.toxins > 0.1))
|
||||
igniting = 1
|
||||
if(air_contents.oxygen < 0.5)
|
||||
if(air_contents.oxygen < 0.1)
|
||||
return 0
|
||||
|
||||
if(! (locate(/obj/fire) in src))
|
||||
@@ -97,7 +97,7 @@ obj
|
||||
firelevel = air_contents.calculate_firelevel(liquid)
|
||||
|
||||
//Ensure that there is an appropriate amount of fuel and O2 here.
|
||||
if(firelevel > 0.25 && flow.oxygen > 0.3 && (air_contents.toxins || fuel || liquid))
|
||||
if(firelevel > 0.25 && flow.oxygen > 0.1 && (air_contents.toxins || fuel || liquid))
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(S.air_check_directions&direction) //Grab all valid bordering tiles
|
||||
@@ -119,7 +119,7 @@ obj
|
||||
if(flow)
|
||||
|
||||
//Ensure adequate oxygen and fuel.
|
||||
if(flow.oxygen > 0.3 && (flow.toxins || fuel || liquid))
|
||||
if(flow.oxygen > 0.1 && (flow.toxins || fuel || liquid))
|
||||
|
||||
//Change icon depending on the fuel, and thus temperature.
|
||||
if(firelevel > 6)
|
||||
@@ -130,7 +130,7 @@ obj
|
||||
icon_state = "1"
|
||||
|
||||
//Ensure flow temperature is higher than minimum fire temperatures.
|
||||
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.1,flow.temperature)
|
||||
flow.temperature = max(PLASMA_MINIMUM_BURN_TEMPERATURE+0.2,flow.temperature)
|
||||
|
||||
//Burn the gas mixture.
|
||||
if(!flow.zburn(liquid))
|
||||
@@ -205,11 +205,11 @@ datum/gas_mixture/proc/zburn(obj/effect/decal/cleanable/liquid_fuel/liquid)
|
||||
fuel_sources++
|
||||
|
||||
//Toxins
|
||||
if(toxins > 0.3) fuel_sources++
|
||||
if(toxins > 0.1) fuel_sources++
|
||||
|
||||
if(!fuel_sources) return 0 //If there's no fuel, there's no burn. Can't divide by zero anyway.
|
||||
|
||||
if(oxygen > 0.3)
|
||||
if(oxygen > 0.1)
|
||||
|
||||
//Calculate the firelevel.
|
||||
var/firelevel = calculate_firelevel(liquid)
|
||||
|
||||
@@ -411,7 +411,7 @@ zone/proc/Rebuild()
|
||||
//
|
||||
var/list/turfs_to_consider = contents.Copy()
|
||||
|
||||
while(!sample.CanPass(null, sample, 1.5, 1))
|
||||
while(!sample || !sample.CanPass(null, sample, 1.5, 1))
|
||||
if(sample)
|
||||
turfs_to_consider.Remove(sample)
|
||||
sample = locate() in turfs_to_consider
|
||||
@@ -481,11 +481,11 @@ proc/play_wind_sound(var/turf/random_border, var/n)
|
||||
if(random_border)
|
||||
var/windsound = 'sound/effects/wind/wind_2_1.ogg'
|
||||
switch(n)
|
||||
if(0 to 30)
|
||||
windsound = pick('sound/effects/wind/wind_2_1.ogg', 'sound/effects/wind/wind_2_2.ogg')
|
||||
if(31 to 40)
|
||||
windsound = pick('sound/effects/wind/wind_2_1.ogg', 'sound/effects/wind/wind_2_2.ogg')
|
||||
if(41 to 50)
|
||||
windsound = pick('sound/effects/wind/wind_3_1.ogg')
|
||||
if(41 to 60)
|
||||
if(51 to 60)
|
||||
windsound = pick('sound/effects/wind/wind_4_1.ogg', 'sound/effects/wind/wind_4_2.ogg')
|
||||
if(61 to 1000000)
|
||||
windsound = pick('sound/effects/wind/wind_5_1.ogg')
|
||||
|
||||
@@ -109,6 +109,8 @@
|
||||
var/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt
|
||||
var/use_age_restriction_for_jobs = 0 //Do jobs use account age restrictions? --requires database
|
||||
|
||||
var/simultaneous_pm_warning_timeout = 100
|
||||
|
||||
var/use_recursive_explosions //Defines whether the server uses recursive or circular explosions.
|
||||
|
||||
var/assistant_maint = 0 //Do assistants get maint access?
|
||||
|
||||
@@ -40,8 +40,6 @@ datum/controller/game_controller/New()
|
||||
|
||||
createRandomZlevel()
|
||||
|
||||
setup_economy()
|
||||
|
||||
if(!air_master)
|
||||
air_master = new /datum/controller/air_system()
|
||||
air_master.setup()
|
||||
@@ -64,6 +62,7 @@ datum/controller/game_controller/proc/setup()
|
||||
setup_objects()
|
||||
setupgenetics()
|
||||
setupfactions()
|
||||
setup_economy()
|
||||
|
||||
for(var/i=0, i<max_secret_rooms, i++)
|
||||
make_mining_asteroid_secret()
|
||||
@@ -116,15 +115,14 @@ datum/controller/game_controller/proc/process()
|
||||
vote.process()
|
||||
|
||||
//AIR
|
||||
|
||||
if(!air_processing_killed)
|
||||
timer = world.timeofday
|
||||
last_thing_processed = air_master.type
|
||||
air_master.tick()
|
||||
air_cost = (world.timeofday - timer) / 10
|
||||
// this might make atmos slower
|
||||
air_cost = (world.timeofday - timer) / 10 // this might make atmos slower
|
||||
// 1. atmos won't process if the game is generally lagged out(no deadlocks)
|
||||
// 2. if the server frequently crashes during atmos processing we will know
|
||||
/*if(!kill_air)
|
||||
// 2. if the server frequently crashes during atmos processing we will knowif(!kill_air)
|
||||
//src.set_debug_state("Air Master")
|
||||
|
||||
air_master.current_cycle++
|
||||
@@ -136,11 +134,7 @@ datum/controller/game_controller/proc/process()
|
||||
world << "<font color='red'><b>RUNTIMES IN ATMOS TICKER. Killing air simulation!</font></b>"
|
||||
kill_air = 1
|
||||
air_master.failed_ticks = 0
|
||||
/*else if (air_master.failed_ticks > 10)
|
||||
air_master.failed_ticks = 0*/
|
||||
//air_master_ready = 1
|
||||
*/
|
||||
|
||||
air_cost = (world.timeofday - timer) / 10
|
||||
|
||||
sleep(breather_ticks)
|
||||
|
||||
|
||||
+23
-20
@@ -246,12 +246,15 @@ client
|
||||
if(ismob(D))
|
||||
body += "<option value='?_src_=vars;give_spell=\ref[D]'>Give Spell</option>"
|
||||
body += "<option value='?_src_=vars;give_disease=\ref[D]'>Give Disease</option>"
|
||||
body += "<option value='?_src_=vars;ninja=\ref[D]'>Make Space Ninja</option>"
|
||||
body += "<option value='?_src_=vars;godmode=\ref[D]'>Toggle Godmode</option>"
|
||||
body += "<option value='?_src_=vars;build_mode=\ref[D]'>Toggle Build Mode</option>"
|
||||
body += "<option value='?_src_=vars;direct_control=\ref[D]'>Assume Direct Control</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;ninja=\ref[D]'>Make Space Ninja</option>"
|
||||
body += "<option value='?_src_=vars;make_skeleton=\ref[D]'>Make 2spooky</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;direct_control=\ref[D]'>Assume Direct Control</option>"
|
||||
body += "<option value='?_src_=vars;drop_everything=\ref[D]'>Drop Everything</option>"
|
||||
|
||||
body += "<option value='?_src_=vars;regenerateicons=\ref[D]'>Regenerate Icons</option>"
|
||||
if(ishuman(D))
|
||||
body += "<option value>---</option>"
|
||||
@@ -407,7 +410,7 @@ client
|
||||
|
||||
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
|
||||
else if(href_list["rename"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/mob/M = locate(href_list["rename"])
|
||||
if(!istype(M))
|
||||
@@ -422,7 +425,7 @@ client
|
||||
href_list["datumrefresh"] = href_list["rename"]
|
||||
|
||||
else if(href_list["varnameedit"] && href_list["datumedit"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/D = locate(href_list["datumedit"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
@@ -432,7 +435,7 @@ client
|
||||
modify_variables(D, href_list["varnameedit"], 1)
|
||||
|
||||
else if(href_list["varnamechange"] && href_list["datumchange"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/D = locate(href_list["datumchange"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
@@ -442,7 +445,7 @@ client
|
||||
modify_variables(D, href_list["varnamechange"], 0)
|
||||
|
||||
else if(href_list["varnamemass"] && href_list["datummass"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
|
||||
var/atom/A = locate(href_list["datummass"])
|
||||
if(!istype(A))
|
||||
@@ -463,7 +466,7 @@ client
|
||||
href_list["datumrefresh"] = href_list["mob_player_panel"]
|
||||
|
||||
else if(href_list["give_spell"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_spell"])
|
||||
if(!istype(M))
|
||||
@@ -474,7 +477,7 @@ client
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["give_disease"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_disease"])
|
||||
if(!istype(M))
|
||||
@@ -485,7 +488,7 @@ client
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["ninja"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/M = locate(href_list["ninja"])
|
||||
if(!istype(M))
|
||||
@@ -528,7 +531,7 @@ client
|
||||
href_list["datumrefresh"] = href_list["build_mode"]
|
||||
|
||||
else if(href_list["drop_everything"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_DEBUG|R_ADMIN)) return
|
||||
|
||||
var/mob/M = locate(href_list["drop_everything"])
|
||||
if(!istype(M))
|
||||
@@ -550,7 +553,7 @@ client
|
||||
usr.client.cmd_assume_direct_control(M)
|
||||
|
||||
else if(href_list["make_skeleton"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
|
||||
if(!istype(H))
|
||||
@@ -604,7 +607,7 @@ client
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
|
||||
else if(href_list["explode"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_DEBUG|R_FUN)) return
|
||||
|
||||
var/atom/A = locate(href_list["explode"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
@@ -615,7 +618,7 @@ client
|
||||
href_list["datumrefresh"] = href_list["explode"]
|
||||
|
||||
else if(href_list["emp"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_DEBUG|R_FUN)) return
|
||||
|
||||
var/atom/A = locate(href_list["emp"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
@@ -650,7 +653,7 @@ client
|
||||
href_list["datumrefresh"] = href_list["rotatedatum"]
|
||||
|
||||
else if(href_list["makemonkey"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
|
||||
if(!istype(H))
|
||||
@@ -664,7 +667,7 @@ client
|
||||
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
|
||||
|
||||
else if(href_list["makerobot"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
|
||||
if(!istype(H))
|
||||
@@ -678,7 +681,7 @@ client
|
||||
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
|
||||
|
||||
else if(href_list["makealien"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makealien"])
|
||||
if(!istype(H))
|
||||
@@ -692,7 +695,7 @@ client
|
||||
holder.Topic(href, list("makealien"=href_list["makealien"]))
|
||||
|
||||
else if(href_list["makeslime"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeslime"])
|
||||
if(!istype(H))
|
||||
@@ -706,7 +709,7 @@ client
|
||||
holder.Topic(href, list("makeslime"=href_list["makeslime"]))
|
||||
|
||||
else if(href_list["makeai"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
||||
if(!istype(H))
|
||||
@@ -720,7 +723,7 @@ client
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
|
||||
else if(href_list["setmutantrace"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["setmutantrace"])
|
||||
if(!istype(H))
|
||||
@@ -750,7 +753,7 @@ client
|
||||
M.regenerate_icons()
|
||||
|
||||
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||
if(!check_rights(0)) return
|
||||
if(!check_rights(R_DEBUG|R_ADMIN|R_FUN)) return
|
||||
|
||||
var/mob/living/L = locate(href_list["mobToDamage"])
|
||||
if(!istype(L)) return
|
||||
|
||||
@@ -62,12 +62,12 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
return
|
||||
|
||||
spread = (cure_present?"Remissive":initial_spread)
|
||||
|
||||
if(stage > max_stages)
|
||||
stage = max_stages
|
||||
|
||||
if(!cure_present && prob(stage_prob)) //now the disease shouldn't get back up to stage 4 in no time
|
||||
if(!cure_present && prob(stage_prob) && age > stage_minimum_age) //now the disease shouldn't get back up to stage 4 in no time
|
||||
stage = min(stage + 1, max_stages)
|
||||
age = 0
|
||||
|
||||
else if(cure_present && prob(cure_chance))
|
||||
stage = max(stage - 1, 1)
|
||||
|
||||
@@ -12,43 +12,40 @@
|
||||
severity = "Medium"
|
||||
longevity = 1000
|
||||
hidden = list(0, 1)
|
||||
stage_minimum_age = 300 // at least 200 life ticks per stage
|
||||
stage_minimum_age = 160 // at least 200 life ticks per stage
|
||||
|
||||
/datum/disease/appendicitis/stage_act()
|
||||
..()
|
||||
switch(stage)
|
||||
if(1)
|
||||
if(affected_mob.op_stage.appendix == 2.0)
|
||||
// appendix is removed, can't get infected again
|
||||
src.cure()
|
||||
if(prob(5))
|
||||
affected_mob << "\red You feel a stinging pain in your abdomen!"
|
||||
affected_mob.emote("me",1,"winces slightly.")
|
||||
if(2)
|
||||
if(prob(3))
|
||||
affected_mob << "\red You feel a stabbing pain in your abdomen!"
|
||||
affected_mob.emote("me",1,"winces painfully.")
|
||||
affected_mob.adjustToxLoss(1)
|
||||
if(3)
|
||||
if(prob(1))
|
||||
if (affected_mob.nutrition > 100)
|
||||
var/mob/living/carbon/human/H = affected_mob
|
||||
H.vomit()
|
||||
else
|
||||
affected_mob << "\red You gag as you want to throw up, but there's nothing in your stomach!"
|
||||
affected_mob.Weaken(10)
|
||||
affected_mob.adjustToxLoss(3)
|
||||
|
||||
if(4)
|
||||
if(prob(1) && ishuman(affected_mob))
|
||||
if(stage == 1)
|
||||
if(affected_mob.op_stage.appendix == 2.0)
|
||||
// appendix is removed, can't get infected again
|
||||
src.cure()
|
||||
if(prob(5))
|
||||
affected_mob << "\red You feel a stinging pain in your abdomen!"
|
||||
affected_mob.emote("me",1,"winces slightly.")
|
||||
if(stage > 1)
|
||||
if(prob(3))
|
||||
affected_mob << "\red You feel a stabbing pain in your abdomen!"
|
||||
affected_mob.emote("me",1,"winces painfully.")
|
||||
affected_mob.adjustToxLoss(1)
|
||||
if(stage > 2)
|
||||
if(prob(1))
|
||||
if (affected_mob.nutrition > 100)
|
||||
var/mob/living/carbon/human/H = affected_mob
|
||||
H << "\red Your abdomen is a world of pain!"
|
||||
H.Weaken(10)
|
||||
H.op_stage.appendix = 2.0
|
||||
H.vomit()
|
||||
else
|
||||
affected_mob << "\red You gag as you want to throw up, but there's nothing in your stomach!"
|
||||
affected_mob.Weaken(10)
|
||||
affected_mob.adjustToxLoss(3)
|
||||
if(stage > 3)
|
||||
if(prob(1) && ishuman(affected_mob))
|
||||
var/mob/living/carbon/human/H = affected_mob
|
||||
H << "\red Your abdomen is a world of pain!"
|
||||
H.Weaken(10)
|
||||
H.op_stage.appendix = 2.0
|
||||
|
||||
var/datum/organ/external/groin = H.get_organ("groin")
|
||||
var/datum/wound/W = new /datum/wound/internal_bleeding(25)
|
||||
H.adjustToxLoss(25)
|
||||
groin.wounds += W
|
||||
|
||||
src.cure()
|
||||
var/datum/organ/external/groin = H.get_organ("groin")
|
||||
var/datum/wound/W = new /datum/wound/internal_bleeding(25)
|
||||
H.adjustToxLoss(25)
|
||||
groin.wounds += W
|
||||
src.cure()
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
else if(W.damage_type == BURN)
|
||||
burn_dam += W.damage
|
||||
|
||||
if(W.bleeding())
|
||||
if(!(status & ORGAN_ROBOT) && W.bleeding())
|
||||
status |= ORGAN_BLEEDING
|
||||
|
||||
number_wounds += W.amount
|
||||
@@ -273,6 +273,7 @@
|
||||
if(germ_level > 0)
|
||||
for(var/datum/wound/W in wounds) if(!W.bandaged && !W.salved)
|
||||
W.germ_level = max(W.germ_level, germ_level)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
proc/fracture()
|
||||
@@ -490,7 +491,8 @@
|
||||
|
||||
switch(type)
|
||||
if(CUT)
|
||||
src.status |= ORGAN_BLEEDING
|
||||
if(!(status & ORGAN_ROBOT))
|
||||
src.status |= ORGAN_BLEEDING
|
||||
var/list/size_names = list(/datum/wound/cut, /datum/wound/deep_cut, /datum/wound/flesh_wound, /datum/wound/gaping_wound, /datum/wound/big_gaping_wound, /datum/wound/massive_wound)
|
||||
wound_type = size_names[size]
|
||||
|
||||
@@ -509,7 +511,7 @@
|
||||
|
||||
// Possibly trigger an internal wound, too.
|
||||
var/local_damage = brute_dam + burn_dam + damage
|
||||
if(damage > 10 && type != BURN && local_damage > 20 && prob(damage))
|
||||
if(damage > 10 && type != BURN && local_damage > 20 && prob(damage) && !(status & ORGAN_ROBOT))
|
||||
var/datum/wound/internal_bleeding/I = new (15)
|
||||
wounds += I
|
||||
owner.custom_pain("You feel something rip in your [display_name]!", 1)
|
||||
|
||||
@@ -103,6 +103,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/weapon/reagent_containers/food/drinks/shaker,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/patron,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/goldschlager,
|
||||
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco,
|
||||
/obj/item/weapon/lipstick/random,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/ale,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/ale,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/beer,
|
||||
@@ -351,6 +353,8 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/weapon/storage/box/syringes,
|
||||
/obj/item/weapon/storage/box/beakers,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/mutagen)
|
||||
cost = 25
|
||||
containertype = "/obj/structure/closet/crate/secure"
|
||||
containername = "Virus crate"
|
||||
access = access_cmo
|
||||
group = "Medical / Science"
|
||||
@@ -746,6 +750,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/obj/item/weapon/reagent_containers/glass/paint/black,
|
||||
/obj/item/weapon/reagent_containers/glass/paint/white,
|
||||
/obj/item/weapon/reagent_containers/glass/paint/remover,
|
||||
/obj/item/weapon/contraband/poster,
|
||||
/obj/item/weapon/wrapping_paper,
|
||||
/obj/item/weapon/wrapping_paper,
|
||||
/obj/item/weapon/wrapping_paper)
|
||||
@@ -756,10 +761,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
|
||||
/datum/supply_packs/randomised/contraband
|
||||
num_contained = 5
|
||||
contains = list(/obj/item/weapon/contraband/poster,
|
||||
/obj/item/weapon/storage/fancy/cigarettes/dromedaryco,
|
||||
/obj/item/weapon/lipstick/random,
|
||||
/obj/item/seeds/bloodtomatoseed,
|
||||
contains = list(/obj/item/seeds/bloodtomatoseed,
|
||||
/obj/item/weapon/storage/pill_bottle/zoom,
|
||||
/obj/item/weapon/storage/pill_bottle/happy,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe)
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/datum/event
|
||||
|
||||
var/Lifetime = 0
|
||||
var/ActiveFor = 0
|
||||
|
||||
New()
|
||||
..()
|
||||
if(!Lifetime)
|
||||
Lifetime = rand(30, 120)
|
||||
|
||||
proc
|
||||
Announce()
|
||||
|
||||
Tick()
|
||||
|
||||
Die()
|
||||
|
||||
LongTerm()
|
||||
LongTermEvent = ActiveEvent
|
||||
ActiveEvent = null
|
||||
@@ -1,88 +0,0 @@
|
||||
/obj/effect/bhole
|
||||
name = "black hole"
|
||||
icon = 'objects.dmi'
|
||||
desc = "FUCK FUCK FUCK AAAHHH"
|
||||
icon_state = "bhole3"
|
||||
opacity = 1
|
||||
unacidable = 1
|
||||
density = 0
|
||||
anchored = 1
|
||||
|
||||
/obj/effect/bhole/New()
|
||||
spawn(4)
|
||||
controller()
|
||||
|
||||
/obj/effect/bhole/proc/controller()
|
||||
while(src)
|
||||
|
||||
if(!isturf(loc))
|
||||
del(src)
|
||||
return
|
||||
|
||||
//DESTROYING STUFF AT THE EPICENTER
|
||||
for(var/mob/living/M in orange(1,src))
|
||||
del(M)
|
||||
for(var/obj/O in orange(1,src))
|
||||
del(O)
|
||||
for(var/turf/simulated/ST in orange(1,src))
|
||||
ST.ReplaceWithSpace()
|
||||
|
||||
sleep(6)
|
||||
grav(10, 4, 10, 0 )
|
||||
sleep(6)
|
||||
grav( 8, 4, 10, 0 )
|
||||
sleep(6)
|
||||
grav( 9, 4, 10, 0 )
|
||||
sleep(6)
|
||||
grav( 7, 3, 40, 1 )
|
||||
sleep(6)
|
||||
grav( 5, 3, 40, 1 )
|
||||
sleep(6)
|
||||
grav( 6, 3, 40, 1 )
|
||||
sleep(6)
|
||||
grav( 4, 2, 50, 6 )
|
||||
sleep(6)
|
||||
grav( 3, 2, 50, 6 )
|
||||
sleep(6)
|
||||
grav( 2, 2, 75,25 )
|
||||
sleep(6)
|
||||
|
||||
|
||||
|
||||
//MOVEMENT
|
||||
if( prob(50) )
|
||||
src.anchored = 0
|
||||
step(src,pick(alldirs))
|
||||
src.anchored = 1
|
||||
|
||||
/obj/effect/bhole/proc/grav(var/r, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
|
||||
if(!isturf(loc)) //blackhole cannot be contained inside anything. Weird stuff might happen
|
||||
del(src)
|
||||
return
|
||||
for(var/t = -r, t < r, t++)
|
||||
affect_coord(x+t, y-r, ex_act_force, pull_chance, turf_removal_chance)
|
||||
affect_coord(x-t, y+r, ex_act_force, pull_chance, turf_removal_chance)
|
||||
affect_coord(x+r, y+t, ex_act_force, pull_chance, turf_removal_chance)
|
||||
affect_coord(x-r, y-t, ex_act_force, pull_chance, turf_removal_chance)
|
||||
return
|
||||
|
||||
/obj/effect/bhole/proc/affect_coord(var/x, var/y, var/ex_act_force, var/pull_chance, var/turf_removal_chance)
|
||||
//Get turf at coordinate
|
||||
var/turf/T = locate(x, y, z)
|
||||
if(isnull(T)) return
|
||||
|
||||
//Pulling and/or ex_act-ing movable atoms in that turf
|
||||
if( prob(pull_chance) )
|
||||
for(var/obj/O in T.contents)
|
||||
if(O.anchored)
|
||||
O.ex_act(ex_act_force)
|
||||
else
|
||||
step_towards(O,src)
|
||||
for(var/mob/living/M in T.contents)
|
||||
step_towards(M,src)
|
||||
|
||||
//Destroying the turf
|
||||
if( T && istype(T,/turf/simulated) && prob(turf_removal_chance) )
|
||||
var/turf/simulated/ST = T
|
||||
ST.ReplaceWithSpace()
|
||||
return
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
Immovable rod random event.
|
||||
The rod will spawn at some location outside the station, and travel in a straight line to the opposite side of the station
|
||||
Everything solid in the way will be ex_act()'d
|
||||
In my current plan for it, 'solid' will be defined as anything with density == 1
|
||||
|
||||
--NEOFite
|
||||
*/
|
||||
|
||||
/obj/effect/immovablerod
|
||||
name = "Immovable Rod"
|
||||
desc = "What the fuck is that?"
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "immrod"
|
||||
throwforce = 100
|
||||
density = 1
|
||||
anchored = 1
|
||||
|
||||
Bump(atom/clong)
|
||||
if(istype(clong, /turf/simulated/shuttle)) //Skip shuttles without actually deleting the rod
|
||||
return
|
||||
|
||||
else if (istype(clong, /turf) && !istype(clong, /turf/unsimulated))
|
||||
if(clong.density)
|
||||
clong.ex_act(2)
|
||||
for (var/mob/O in hearers(src, null))
|
||||
O.show_message("CLANG", 2)
|
||||
|
||||
else if (istype(clong, /obj))
|
||||
if(clong.density)
|
||||
clong.ex_act(2)
|
||||
for (var/mob/O in hearers(src, null))
|
||||
O.show_message("CLANG", 2)
|
||||
|
||||
else if (istype(clong, /mob))
|
||||
if(clong.density || prob(10))
|
||||
clong.meteorhit(src)
|
||||
else
|
||||
del(src)
|
||||
|
||||
if(clong && prob(25))
|
||||
src.loc = clong.loc
|
||||
|
||||
/proc/immovablerod()
|
||||
var/startx = 0
|
||||
var/starty = 0
|
||||
var/endy = 0
|
||||
var/endx = 0
|
||||
var/startside = pick(cardinal)
|
||||
|
||||
switch(startside)
|
||||
if(NORTH)
|
||||
starty = 187
|
||||
startx = rand(41, 199)
|
||||
endy = 38
|
||||
endx = rand(41, 199)
|
||||
if(EAST)
|
||||
starty = rand(38, 187)
|
||||
startx = 199
|
||||
endy = rand(38, 187)
|
||||
endx = 41
|
||||
if(SOUTH)
|
||||
starty = 38
|
||||
startx = rand(41, 199)
|
||||
endy = 187
|
||||
endx = rand(41, 199)
|
||||
if(WEST)
|
||||
starty = rand(38, 187)
|
||||
startx = 41
|
||||
endy = rand(38, 187)
|
||||
endx = 199
|
||||
|
||||
//rod time!
|
||||
var/obj/effect/immovablerod/immrod = new /obj/effect/immovablerod(locate(startx, starty, 1))
|
||||
// world << "Rod in play, starting at [start.loc.x],[start.loc.y] and going to [end.loc.x],[end.loc.y]"
|
||||
var/end = locate(endx, endy, 1)
|
||||
spawn(0)
|
||||
walk_towards(immrod, end,1)
|
||||
sleep(1)
|
||||
while (immrod)
|
||||
if (immrod.z != 1)
|
||||
immrod.z = 1
|
||||
if(immrod.loc == end)
|
||||
del(immrod)
|
||||
sleep(10)
|
||||
for(var/obj/effect/immovablerod/imm in world)
|
||||
return
|
||||
sleep(50)
|
||||
command_alert("What the fuck was that?!", "General Alert")
|
||||
@@ -1,122 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
/*
|
||||
Space dust
|
||||
Commonish random event that causes small clumps of "space dust" to hit the station at high speeds.
|
||||
No command report on the common version of this event.
|
||||
The "dust" will damage the hull of the station causin minor hull breaches.
|
||||
*/
|
||||
|
||||
/proc/dust_swarm(var/strength = "weak")
|
||||
var/numbers = 1
|
||||
switch(strength)
|
||||
if("weak")
|
||||
numbers = rand(2,4)
|
||||
for(var/i = 0 to numbers)
|
||||
new/obj/effect/space_dust/weak()
|
||||
if("norm")
|
||||
numbers = rand(5,10)
|
||||
for(var/i = 0 to numbers)
|
||||
new/obj/effect/space_dust()
|
||||
if("strong")
|
||||
numbers = rand(10,15)
|
||||
for(var/i = 0 to numbers)
|
||||
new/obj/effect/space_dust/strong()
|
||||
if("super")
|
||||
numbers = rand(15,25)
|
||||
for(var/i = 0 to numbers)
|
||||
new/obj/effect/space_dust/super()
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/space_dust
|
||||
name = "Space Dust"
|
||||
desc = "Dust in space."
|
||||
icon = 'icons/obj/meteor.dmi'
|
||||
icon_state = "space_dust"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/strength = 2 //ex_act severity number
|
||||
var/life = 2 //how many things we hit before del(src)
|
||||
|
||||
weak
|
||||
strength = 3
|
||||
life = 1
|
||||
|
||||
strong
|
||||
strength = 1
|
||||
life = 6
|
||||
|
||||
super
|
||||
strength = 1
|
||||
life = 40
|
||||
|
||||
|
||||
New()
|
||||
var/startx = 0
|
||||
var/starty = 0
|
||||
var/endy = 0
|
||||
var/endx = 0
|
||||
var/startside = pick(cardinal)
|
||||
|
||||
switch(startside)
|
||||
if(NORTH)
|
||||
starty = world.maxy-(TRANSITIONEDGE+1)
|
||||
startx = rand((TRANSITIONEDGE+1), world.maxx-(TRANSITIONEDGE+1))
|
||||
endy = TRANSITIONEDGE
|
||||
endx = rand(TRANSITIONEDGE, world.maxx-TRANSITIONEDGE)
|
||||
if(EAST)
|
||||
starty = rand((TRANSITIONEDGE+1),world.maxy-(TRANSITIONEDGE+1))
|
||||
startx = world.maxx-(TRANSITIONEDGE+1)
|
||||
endy = rand(TRANSITIONEDGE, world.maxy-TRANSITIONEDGE)
|
||||
endx = TRANSITIONEDGE
|
||||
if(SOUTH)
|
||||
starty = (TRANSITIONEDGE+1)
|
||||
startx = rand((TRANSITIONEDGE+1), world.maxx-(TRANSITIONEDGE+1))
|
||||
endy = world.maxy-TRANSITIONEDGE
|
||||
endx = rand(TRANSITIONEDGE, world.maxx-TRANSITIONEDGE)
|
||||
if(WEST)
|
||||
starty = rand((TRANSITIONEDGE+1), world.maxy-(TRANSITIONEDGE+1))
|
||||
startx = (TRANSITIONEDGE+1)
|
||||
endy = rand(TRANSITIONEDGE,world.maxy-TRANSITIONEDGE)
|
||||
endx = world.maxx-TRANSITIONEDGE
|
||||
var/goal = locate(endx, endy, 1)
|
||||
src.x = startx
|
||||
src.y = starty
|
||||
src.z = 1
|
||||
spawn(0)
|
||||
walk_towards(src, goal, 1)
|
||||
return
|
||||
|
||||
|
||||
Bump(atom/A)
|
||||
spawn(0)
|
||||
if(prob(50))
|
||||
for(var/mob/M in range(10, src))
|
||||
if(!M.stat && !istype(M, /mob/living/silicon/ai))
|
||||
shake_camera(M, 3, 1)
|
||||
if (A)
|
||||
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
|
||||
|
||||
if(ismob(A))
|
||||
A.meteorhit(src)//This should work for now I guess
|
||||
else if(!istype(A,/obj/machinery/emitter) && !istype(A,/obj/machinery/field_generator)) //Protect the singularity from getting released every round!
|
||||
A.ex_act(strength) //Changing emitter/field gen ex_act would make it immune to bombs and C4
|
||||
|
||||
life--
|
||||
if(life <= 0)
|
||||
walk(src,0)
|
||||
spawn(1)
|
||||
del(src)
|
||||
return 0
|
||||
return
|
||||
|
||||
|
||||
Bumped(atom/A)
|
||||
Bump(A)
|
||||
return
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
del(src)
|
||||
return
|
||||
@@ -1,37 +0,0 @@
|
||||
/proc/mini_blob_event()
|
||||
|
||||
var/turf/T = pick(blobstart)
|
||||
if(istype(T, /turf/simulated/wall))
|
||||
T.ReplaceWithPlating()
|
||||
for(var/atom/A in T)
|
||||
if(A.density)
|
||||
del(A)
|
||||
var/obj/effect/blob/bl = new /obj/effect/blob( T, 30 )
|
||||
spawn(0)
|
||||
bl.Life()
|
||||
bl.Life()
|
||||
bl.Life()
|
||||
bl.Life()
|
||||
bl.blobdebug = 1
|
||||
bl.Life()
|
||||
blobevent = 1
|
||||
spawn(0)
|
||||
dotheblobbaby()
|
||||
spawn(15000)
|
||||
blobevent = 0
|
||||
spawn(rand(600, 1800)) //Delayed announcements to keep the crew on their toes.
|
||||
command_alert("Confirmed outbreak of level 5 biohazard aboard [station_name()].", "Biohazard Alert")
|
||||
world << sound('outbreak5.ogg')
|
||||
|
||||
/proc/dotheblobbaby()
|
||||
if (blobevent)
|
||||
if(blobs.len)
|
||||
for(var/i = 1 to 10)
|
||||
sleep(-1)
|
||||
if(!blobs.len) break
|
||||
var/obj/effect/blob/B = pick(blobs)
|
||||
if(B.z != 1)
|
||||
continue
|
||||
B.Life()
|
||||
spawn(150)
|
||||
dotheblobbaby()
|
||||
@@ -1,429 +0,0 @@
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
+++++++++++++++++++++++++++++++++// //++++++++++++++++++++++++++++++++++
|
||||
==================================SPACE NINJA ABILITIES====================================
|
||||
___________________________________________________________________________________________
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
//=======//SAFETY CHECK//=======//
|
||||
/*
|
||||
X is optional, tells the proc to check for specific stuff. C is also optional.
|
||||
All the procs here assume that the character is wearing the ninja suit if they are using the procs.
|
||||
They should, as I have made every effort for that to be the case.
|
||||
In the case that they are not, I imagine the game will run-time error like crazy.
|
||||
s_cooldown ticks off each second based on the suit recharge proc, in seconds. Default of 1 seconds. Some abilities have no cool down.
|
||||
*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjacost(C = 0,X = 0)
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if( (U.stat||U.incorporeal_move)&&X!=3 )//Will not return if user is using an adrenaline booster since you can use them when stat==1.
|
||||
U << "\red You must be conscious and solid to do this."//It's not a problem of stat==2 since the ninja will explode anyway if they die.
|
||||
return 1
|
||||
else if(C&&cell.charge<C*10)
|
||||
U << "\red Not enough energy."
|
||||
return 1
|
||||
switch(X)
|
||||
if(1)
|
||||
cancel_stealth()//Get rid of it.
|
||||
if(2)
|
||||
if(s_bombs<=0)
|
||||
U << "\red There are no more smoke bombs remaining."
|
||||
return 1
|
||||
if(3)
|
||||
if(a_boost<=0)
|
||||
U << "\red You do not have any more adrenaline boosters."
|
||||
return 1
|
||||
return (s_coold)//Returns the value of the variable which counts down to zero.
|
||||
|
||||
//=======//TELEPORT GRAB CHECK//=======//
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/handle_teleport_grab(turf/T, mob/living/U)
|
||||
if(istype(U.get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons.
|
||||
var/obj/item/weapon/grab/G = U.get_active_hand()
|
||||
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position.
|
||||
if(istype(U.get_inactive_hand(),/obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = U.get_inactive_hand()
|
||||
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position.
|
||||
return
|
||||
|
||||
//=======//SMOKE//=======//
|
||||
/*Summons smoke in radius of user.
|
||||
Not sure why this would be useful (it's not) but whatever. Ninjas need their smoke bombs.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke()
|
||||
set name = "Smoke Bomb"
|
||||
set desc = "Blind your enemies momentarily with a well-placed smoke bomb."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0//Will not see it when right clicking.
|
||||
|
||||
if(!ninjacost(,2))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
U << "\blue There are <B>[s_bombs]</B> smoke bombs remaining."
|
||||
var/datum/effect/effect/system/bad_smoke_spread/smoke = new /datum/effect/effect/system/bad_smoke_spread()
|
||||
smoke.set_up(10, 0, U.loc)
|
||||
smoke.start()
|
||||
playsound(U.loc, 'sound/effects/bamf.ogg', 50, 2)
|
||||
s_bombs--
|
||||
s_coold = 1
|
||||
return
|
||||
|
||||
//=======//9-8 TILE TELEPORT//=======//
|
||||
//Click to to teleport 9-10 tiles in direction facing.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt()
|
||||
set name = "Phase Jaunt (10E)"
|
||||
set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 100
|
||||
if(!ninjacost(C,1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/turf/destination = get_teleport_loc(U.loc,U,9,1,3,1,0,1)
|
||||
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
|
||||
if(destination&&istype(mobloc, /turf))//The turf check prevents unusual behavior. Like teleporting out of cryo pods, cloners, mechs, etc.
|
||||
spawn(0)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(mobloc,src,'icons/mob/mob.dmi',,"phaseout",,U.dir)
|
||||
|
||||
handle_teleport_grab(destination, U)
|
||||
U.loc = destination
|
||||
|
||||
spawn(0)
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
|
||||
spawn(0)
|
||||
destination.kill_creatures(U)//Any living mobs in teleport area are gibbed. Check turf procs for how it does it.
|
||||
s_coold = 1
|
||||
cell.charge-=(C*10)
|
||||
else
|
||||
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
|
||||
return
|
||||
|
||||
//=======//RIGHT CLICK TELEPORT//=======//
|
||||
//Right click to teleport somewhere, almost exactly like admin jump to turf.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjashift(turf/T in oview())
|
||||
set name = "Phase Shift (20E)"
|
||||
set desc = "Utilizes the internal VOID-shift device to rapidly transit to a destination in view."
|
||||
set category = null//So it does not show up on the panel but can still be right-clicked.
|
||||
set src = usr.contents//Fixes verbs not attaching properly for objects. Praise the DM reference guide!
|
||||
|
||||
var/C = 200
|
||||
if(!ninjacost(C,1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
|
||||
if((!T.density)&&istype(mobloc, /turf))
|
||||
spawn(0)
|
||||
playsound(U.loc, 'sound/effects/sparks4.ogg', 50, 1)
|
||||
anim(mobloc,src,'icons/mob/mob.dmi',,"phaseout",,U.dir)
|
||||
|
||||
handle_teleport_grab(T, U)
|
||||
U.loc = T
|
||||
|
||||
spawn(0)
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(U.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
|
||||
spawn(0)//Any living mobs in teleport area are gibbed.
|
||||
T.kill_creatures(U)
|
||||
s_coold = 1
|
||||
cell.charge-=(C*10)
|
||||
else
|
||||
U << "\red You cannot teleport into solid walls or from solid matter"
|
||||
return
|
||||
|
||||
//=======//EM PULSE//=======//
|
||||
//Disables nearby tech equipment.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse()
|
||||
set name = "EM Burst (25E)"
|
||||
set desc = "Disable any nearby technology with a electro-magnetic pulse."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 250
|
||||
if(!ninjacost(C,1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
playsound(U.loc, 'sound/effects/EMPulse.ogg', 60, 2)
|
||||
empulse(U, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||
s_coold = 2
|
||||
cell.charge-=(C*10)
|
||||
return
|
||||
|
||||
//=======//ENERGY BLADE//=======//
|
||||
//Summons a blade of energy in active hand.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjablade()
|
||||
set name = "Energy Blade (5E)"
|
||||
set desc = "Create a focused beam of energy in your active hand."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 50
|
||||
if(!ninjacost(C))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if(!kamikaze)
|
||||
if(!U.get_active_hand()&&!istype(U.get_inactive_hand(), /obj/item/weapon/melee/energy/blade))
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
spark_system.start()
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
U.put_in_hands(W)
|
||||
cell.charge-=(C*10)
|
||||
else
|
||||
U << "\red You can only summon one blade. Try dropping an item first."
|
||||
else//Else you can run around with TWO energy blades. I don't know why you'd want to but cool factor remains.
|
||||
if(!U.get_active_hand())
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
U.put_in_hands(W)
|
||||
if(!U.get_inactive_hand())
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
U.put_in_inactive_hand(W)
|
||||
spark_system.start()
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
s_coold = 1
|
||||
return
|
||||
|
||||
//=======//NINJA STARS//=======//
|
||||
/*Shoots ninja stars at random people.
|
||||
This could be a lot better but I'm too tired atm.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjastar()
|
||||
set name = "Energy Star (5E)"
|
||||
set desc = "Launches an energy star at a random living target."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 50
|
||||
if(!ninjacost(C))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/targets[] = list()//So yo can shoot while yo throw dawg
|
||||
for(var/mob/living/M in oview(loc))
|
||||
if(M.stat) continue//Doesn't target corpses or paralyzed persons.
|
||||
targets.Add(M)
|
||||
if(targets.len)
|
||||
var/mob/living/target=pick(targets)//The point here is to pick a random, living mob in oview to shoot stuff at.
|
||||
|
||||
var/turf/curloc = U.loc
|
||||
var/atom/targloc = get_turf(target)
|
||||
if (!targloc || !istype(targloc, /turf) || !curloc)
|
||||
return
|
||||
if (targloc == curloc)
|
||||
return
|
||||
var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(U.loc)
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
cell.charge-=(C*10)
|
||||
A.process()
|
||||
else
|
||||
U << "\red There are no targets in view."
|
||||
return
|
||||
|
||||
//=======//ENERGY NET//=======//
|
||||
/*Allows the ninja to capture people, I guess.
|
||||
Must right click on a mob to activate.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(mob/living/carbon/M in oview())//Only living carbon mobs.
|
||||
set name = "Energy Net (20E)"
|
||||
set desc = "Captures a fallen opponent in a net of energy. Will teleport them to a holding facility after 30 seconds."
|
||||
set category = null
|
||||
set src = usr.contents
|
||||
|
||||
var/C = 200
|
||||
if(!ninjacost(C,1)&&iscarbon(M))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if(M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
|
||||
//if(M)//DEBUG
|
||||
if(!locate(/obj/effect/energy_net) in M.loc)//Check if they are already being affected by an energy net.
|
||||
for(var/turf/T in getline(U.loc, M.loc))
|
||||
if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy.
|
||||
U << "You may not use an energy net through solid obstacles!"
|
||||
return
|
||||
spawn(0)
|
||||
U.Beam(M,"n_beam",,15)
|
||||
M.anchored = 1//Anchors them so they can't move.
|
||||
U.say("Get over here!")
|
||||
var/obj/effect/energy_net/E = new /obj/effect/energy_net(M.loc)
|
||||
E.layer = M.layer+1//To have it appear one layer above the mob.
|
||||
for(var/mob/O in viewers(U, 3))
|
||||
O.show_message(text("\red [] caught [] with an energy net!", U, M), 1)
|
||||
E.affecting = M
|
||||
E.master = U
|
||||
spawn(0)//Parallel processing.
|
||||
E.process(M)
|
||||
cell.charge-=(C*10)
|
||||
else
|
||||
U << "They are already trapped inside an energy net."
|
||||
else
|
||||
U << "They will bring no honor to your Clan!"
|
||||
return
|
||||
|
||||
//=======//ADRENALINE BOOST//=======//
|
||||
/*Wakes the user so they are able to do their thing. Also injects a decent dose of radium.
|
||||
Movement impairing would indicate drugs and the like.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost()
|
||||
set name = "Adrenaline Boost"
|
||||
set desc = "Inject a secret chemical that will counteract all movement-impairing effect."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!ninjacost(,3))//Have to make sure stat is not counted for this ability.
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
//Wouldn't need to track adrenaline boosters if there was a miracle injection to get rid of paralysis and the like instantly.
|
||||
//For now, adrenaline boosters ARE the miracle injection. Well, radium, really.
|
||||
U.SetParalysis(0)
|
||||
U.SetStunned(0)
|
||||
U.SetWeakened(0)
|
||||
/*
|
||||
Due to lag, it was possible to adrenaline boost but remain helpless while life.dm resets player stat.
|
||||
This lead to me and others spamming adrenaline boosters because they failed to kick in on time.
|
||||
It's technically possible to come back from crit with this but it is very temporary.
|
||||
Life.dm will kick the player back into unconsciosness the next process loop.
|
||||
*/
|
||||
U.stat = 0//At least now you should be able to teleport away or shoot ninja stars.
|
||||
spawn(30)//Slight delay so the enemy does not immedietly know the ability was used. Due to lag, this often came before waking up.
|
||||
U.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"))
|
||||
spawn(70)
|
||||
reagents.reaction(U, 2)
|
||||
reagents.trans_id_to(U, "radium", a_transfer)
|
||||
U << "\red You are beginning to feel the after-effect of the injection."
|
||||
a_boost--
|
||||
s_coold = 3
|
||||
return
|
||||
|
||||
/*
|
||||
===================================================================================
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<KAMIKAZE MODE>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
===================================================================================
|
||||
Or otherwise known as anime mode. Which also happens to be ridiculously powerful.
|
||||
*/
|
||||
|
||||
//=======//NINJA MOVEMENT//=======//
|
||||
//Also makes you move like you're on crack.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjawalk()
|
||||
set name = "Shadow Walk"
|
||||
set desc = "Combines the VOID-shift and CLOAK-tech devices to freely move between solid matter. Toggle on or off."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if(!U.incorporeal_move)
|
||||
U.incorporeal_move = 2
|
||||
U << "\blue You will now phase through solid matter."
|
||||
else
|
||||
U.incorporeal_move = 0
|
||||
U << "\blue You will no-longer phase through solid matter."
|
||||
return
|
||||
|
||||
//=======//5 TILE TELEPORT/GIB//=======//
|
||||
//Allows to gib up to five squares in a straight line. Seriously.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer()
|
||||
set name = "Phase Slayer"
|
||||
set desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!ninjacost())
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/turf/destination = get_teleport_loc(U.loc,U,5)
|
||||
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
|
||||
if(destination&&istype(mobloc, /turf))
|
||||
U.say("Ai Satsugai!")
|
||||
spawn(0)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(mobloc,U,'icons/mob/mob.dmi',,"phaseout",,U.dir)
|
||||
|
||||
spawn(0)
|
||||
for(var/turf/T in getline(mobloc, destination))
|
||||
spawn(0)
|
||||
T.kill_creatures(U)
|
||||
if(T==mobloc||T==destination) continue
|
||||
spawn(0)
|
||||
anim(T,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
|
||||
handle_teleport_grab(destination, U)
|
||||
U.loc = destination
|
||||
|
||||
spawn(0)
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
s_coold = 1
|
||||
else
|
||||
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
|
||||
return
|
||||
|
||||
//=======//TELEPORT BEHIND MOB//=======//
|
||||
/*Appear behind a randomly chosen mob while a few decoy teleports appear.
|
||||
This is so anime it hurts. But that's the point.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjamirage()
|
||||
set name = "Spider Mirage"
|
||||
set desc = "Utilizes the internal VOID-shift device to create decoys and teleport behind a random target."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!ninjacost())//Simply checks for stat.
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/targets[]
|
||||
targets = new()
|
||||
for(var/mob/living/M in oview(6))
|
||||
if(M.stat) continue//Doesn't target corpses or paralyzed people.
|
||||
targets.Add(M)
|
||||
if(targets.len)
|
||||
var/mob/living/target=pick(targets)
|
||||
var/locx
|
||||
var/locy
|
||||
var/turf/mobloc = get_turf(target.loc)
|
||||
var/safety = 0
|
||||
switch(target.dir)
|
||||
if(NORTH)
|
||||
locx = mobloc.x
|
||||
locy = (mobloc.y-1)
|
||||
if(locy<1)
|
||||
safety = 1
|
||||
if(SOUTH)
|
||||
locx = mobloc.x
|
||||
locy = (mobloc.y+1)
|
||||
if(locy>world.maxy)
|
||||
safety = 1
|
||||
if(EAST)
|
||||
locy = mobloc.y
|
||||
locx = (mobloc.x-1)
|
||||
if(locx<1)
|
||||
safety = 1
|
||||
if(WEST)
|
||||
locy = mobloc.y
|
||||
locx = (mobloc.x+1)
|
||||
if(locx>world.maxx)
|
||||
safety = 1
|
||||
else safety=1
|
||||
if(!safety&&istype(mobloc, /turf))
|
||||
U.say("Kumo no Shinkiro!")
|
||||
var/turf/picked = locate(locx,locy,mobloc.z)
|
||||
spawn(0)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(mobloc,U,'icons/mob/mob.dmi',,"phaseout",,U.dir)
|
||||
|
||||
spawn(0)
|
||||
var/limit = 4
|
||||
for(var/turf/T in oview(5))
|
||||
if(prob(20))
|
||||
spawn(0)
|
||||
anim(T,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
limit--
|
||||
if(limit<=0) break
|
||||
|
||||
handle_teleport_grab(picked, U)
|
||||
U.loc = picked
|
||||
U.dir = target.dir
|
||||
|
||||
spawn(0)
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
s_coold = 1
|
||||
else
|
||||
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
|
||||
else
|
||||
U << "\red There are no targets in view."
|
||||
return
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,996 +0,0 @@
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
+++++++++++++++++++++++++++++++++++++// //++++++++++++++++++++++++++++++++++
|
||||
======================================SPACE NINJA SETUP====================================
|
||||
___________________________________________________________________________________________
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
/*
|
||||
README:
|
||||
|
||||
Data:
|
||||
|
||||
>> space_ninja.dm << is this file. It contains a variety of procs related to either spawning space ninjas,
|
||||
modifying their verbs, various help procs, testing debug-related content, or storing unused procs for later.
|
||||
Similar functions should go into this file, along with anything else that may not have an explicit category.
|
||||
IMPORTANT: actual ninja suit, gloves, etc, are stored under the appropriate clothing files. If you need to change
|
||||
variables or look them up, look there. Easiest way is through the map file browser.
|
||||
|
||||
>> ninja_abilities.dm << contains all the ninja-related powers. Spawning energy swords, teleporting, and the like.
|
||||
If more powers are added, or perhaps something related to powers, it should go there. Make sure to describe
|
||||
what an ability/power does so it's easier to reference later without looking at the code.
|
||||
IMPORTANT: verbs are still somewhat funky to work with. If an argument is specified but is not referenced in a way
|
||||
BYOND likes, in the code content, the verb will fail to trigger. Nothing will happen, literally, when clicked.
|
||||
This can be bypassed by either referencing the argument properly, or linking to another proc with the argument
|
||||
attached. The latter is what I like to do for certain cases--sometimes it's necessary to do that regardless.
|
||||
|
||||
>> ninja_equipment.dm << deals with all the equipment-related procs for a ninja. Primarily it has the suit, gloves,
|
||||
and mask. The suit is by far the largest section of code out of the three and includes a lot of code that ties in
|
||||
to other functions. This file has gotten kind of large so breaking it up may be in order. I use section hearders.
|
||||
IMPORTANT: not much to say here. Follow along with the comments and adding new functions should be a breeze. Also
|
||||
know that certain equipment pieces are linked in other files. The energy blade, for example, has special
|
||||
functions defined in the appropriate files (airlock, securestorage, etc).
|
||||
|
||||
General Notes:
|
||||
|
||||
I created space ninjas with the expressed purpose of spicing up boring rounds. That is, ninjas are to xenos as marauders are to
|
||||
death squads. Ninjas are stealthy, tech-savvy, and powerful. Not to say marauders are all of those things, but a clever ninja
|
||||
should have little problem murderampaging their way through just about anything. Short of admin wizards maybe.
|
||||
HOWEVER!
|
||||
Ninjas also have a fairly great weakness as they require energy to use abilities. If, theoretically, there is a game
|
||||
mode based around space ninjas, make sure to account for their energy needs.
|
||||
|
||||
Admin Notes:
|
||||
|
||||
Ninjas are not admin PCs--please do not use them for that purpose. They are another way to participate in the game post-death,
|
||||
like pais, xenos, death squads, and cyborgs.
|
||||
I'm currently looking for feedback from regular players since beta testing is largely done. I would appreciate if
|
||||
you spawned regular players as ninjas when rounds are boring. Or exciting, it's all good as long as there is feedback.
|
||||
You can also spawn ninja gear manually if you want to.
|
||||
|
||||
How to do that:
|
||||
Make sure your character has a mind.
|
||||
Change their assigned_role to "MODE", no quotes. Otherwise, the suit won't initialize.
|
||||
Change their special_role to "Space Ninja", no quotes. Otherwise, the character will be gibbed.
|
||||
Spawn ninja gear, put it on, hit initialize. Let the suit do the rest. You are now a space ninja.
|
||||
I don't recommend messing with suit variables unless you really know what you're doing.
|
||||
|
||||
Miscellaneous Notes:
|
||||
|
||||
Potential Upgrade Tree:
|
||||
Energy Shield:
|
||||
Extra Ability
|
||||
Syndicate Shield device?
|
||||
Works like the force wall spell, except can be kept indefinitely as long as energy remains. Toggled on or off.
|
||||
Would block bullets and the like.
|
||||
Phase Shift
|
||||
Extra Ability
|
||||
Advanced Sensors?
|
||||
Instead of being unlocked at the start, Phase Shieft would become available once requirements are met.
|
||||
Uranium-based Recharger:
|
||||
Suit Upgrade
|
||||
Unsure
|
||||
Instead of losing energy each second, the suit would regain the same amount of energy.
|
||||
This would not count in activating stealth and similar.
|
||||
Extended Battery Life:
|
||||
Suit Upgrade
|
||||
Battery of higher capacity
|
||||
Already implemented. Replace current battery with one of higher capacity.
|
||||
Advanced Cloak-Tech device.
|
||||
Suit Upgrade
|
||||
Syndicate Cloaking Device?
|
||||
Remove cloak failure rate.
|
||||
*/
|
||||
|
||||
//=======//RANDOM EVENT//=======//
|
||||
/*
|
||||
Also a dynamic ninja mission generator.
|
||||
I decided to scrap round-specific objectives since keeping track of them would require some form of tracking.
|
||||
When I already created about 4 new objectives, this doesn't seem terribly important or needed.
|
||||
*/
|
||||
|
||||
/var/global/toggle_space_ninja = 0//If ninjas can spawn or not.
|
||||
/var/global/sent_ninja_to_station = 0//If a ninja is already on the station.
|
||||
|
||||
/proc/space_ninja_arrival()
|
||||
|
||||
var/datum/game_mode/current_mode = ticker.mode
|
||||
var/datum/mind/current_mind
|
||||
|
||||
/*Is the ninja playing for the good or bad guys? Is the ninja helping or hurting the station?
|
||||
Their directives also influence behavior. At least in theory.*/
|
||||
var/side = pick("face","heel")
|
||||
|
||||
var/antagonist_list[] = list()//The main bad guys. Evil minds that plot destruction.
|
||||
var/protagonist_list[] = current_mode.get_living_heads()//The good guys. Mostly Heads. Who are alive.
|
||||
|
||||
var/xeno_list[] = list()//Aliens.
|
||||
var/commando_list[] = list()//Commandos.
|
||||
|
||||
//We want the ninja to appear only in certain modes.
|
||||
// var/acceptable_modes_list[] = list("traitor","revolution","cult","wizard","changeling","traitorchan","nuclear","malfunction","monkey") // Commented out for both testing and ninjas
|
||||
// if(!(current_mode.config_tag in acceptable_modes_list))
|
||||
// return
|
||||
|
||||
/*No longer need to determine what mode it is since bad guys are basically universal.
|
||||
And there is now a mode with two types of bad guys.*/
|
||||
|
||||
var/possible_bad_dudes[] = list(current_mode.traitors,current_mode.head_revolutionaries,current_mode.head_revolutionaries,
|
||||
current_mode.cult,current_mode.wizards,current_mode.changelings,current_mode.syndicates)
|
||||
for(var/list in possible_bad_dudes)//For every possible antagonist type.
|
||||
for(current_mind in list)//For each mind in that list.
|
||||
if(current_mind.current&¤t_mind.current.stat!=2)//If they are not destroyed and not dead.
|
||||
antagonist_list += current_mind//Add them.
|
||||
|
||||
if(protagonist_list.len)//If the mind is both a protagonist and antagonist.
|
||||
for(current_mind in protagonist_list)
|
||||
if(current_mind in antagonist_list)
|
||||
protagonist_list -= current_mind//We only want it in one list.
|
||||
/*
|
||||
Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective completion. Only humans are added.
|
||||
*/
|
||||
|
||||
//Here we pick a location and spawn the ninja.
|
||||
var/list/spawn_list = list()
|
||||
for(var/obj/effect/landmark/L in world)
|
||||
if(L.name == "carpspawn")
|
||||
spawn_list.Add(L)
|
||||
|
||||
|
||||
var/list/candidates = list() //list of candidate keys
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(!G.client.holder && ((G.client.inactivity/10)/60) <= 5)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
if(!candidates.len) return
|
||||
|
||||
|
||||
//The ninja will be created on the right spawn point or at late join.
|
||||
var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(spawn_list.len ? spawn_list : latejoin ))
|
||||
new_ninja.key = pick(candidates)
|
||||
new_ninja.wear_suit:randomize_param()//Give them a random set of suit parameters.
|
||||
new_ninja.internal = new_ninja.s_store //So the poor ninja has something to breath when they spawn in spess.
|
||||
new_ninja.internals.icon_state = "internal1"
|
||||
|
||||
//Now for the rest of the stuff.
|
||||
|
||||
var/datum/mind/ninja_mind = new_ninja.mind//For easier reference.
|
||||
var/mission_set = 0//To determine if we need to do further processing.
|
||||
//Xenos and deathsquads take precedence over everything else.
|
||||
|
||||
//Unless the xenos are hiding in a locker somewhere, this'll find em.
|
||||
for(var/mob/living/carbon/alien/humanoid/xeno in player_list)
|
||||
if(istype(xeno))
|
||||
xeno_list += xeno
|
||||
|
||||
if(xeno_list.len>3)//If there are more than three humanoid xenos on the station, time to get dangerous.
|
||||
//Here we want the ninja to murder all the queens. The other aliens don't really matter.
|
||||
var/xeno_queen_list[] = list()
|
||||
for(var/mob/living/carbon/alien/humanoid/queen/xeno_queen in xeno_list)
|
||||
if(xeno_queen.mind&&xeno_queen.stat!=2)
|
||||
xeno_queen_list += xeno_queen
|
||||
if(xeno_queen_list.len&&side=="face")//If there are queen about and the probability is 50.
|
||||
for(var/mob/living/carbon/alien/humanoid/queen/xeno_queen in xeno_queen_list)
|
||||
var/datum/objective/assassinate/ninja_objective = new
|
||||
//We'll do some manual overrides to properly set it up.
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.target = xeno_queen.mind
|
||||
ninja_objective.explanation_text = "Kill \the [xeno_queen]."
|
||||
ninja_mind.objectives += ninja_objective
|
||||
mission_set = 1
|
||||
|
||||
if(sent_strike_team&&side=="heel"&&antagonist_list.len)//If a strike team was sent, murder them all like a champ.
|
||||
for(current_mind in antagonist_list)//Search and destroy. Since we already have an antagonist list, they should appear there.
|
||||
if(current_mind && current_mind.special_role=="Death Commando")
|
||||
commando_list += current_mind
|
||||
if(commando_list.len)//If there are living commandos still in play.
|
||||
for(var/mob/living/carbon/human/commando in commando_list)
|
||||
var/datum/objective/assassinate/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role(commando.mind.special_role,1)
|
||||
ninja_mind.objectives += ninja_objective
|
||||
mission_set = 1
|
||||
/*
|
||||
If there are no antogonists left it could mean one of two things:
|
||||
A) The round is about to end. No harm in spawning the ninja here.
|
||||
B) The round is still going and ghosts are probably rioting for something to happen.
|
||||
In either case, it's a good idea to spawn the ninja with a semi-random set of objectives.
|
||||
*/
|
||||
if(!mission_set)//If mission was not set.
|
||||
|
||||
var/current_minds[]//List being looked on in the following code.
|
||||
var/side_list = side=="face" ? 2 : 1//For logic gating.
|
||||
var/hostile_targets[] = list()//The guys actually picked for the assassination or whatever.
|
||||
var/friendly_targets[] = list()//The guys the ninja must protect.
|
||||
|
||||
for(var/i=2,i>0,i--)//Two lists.
|
||||
current_minds = i==2 ? antagonist_list : protagonist_list//Which list are we looking at?
|
||||
for(var/t=3,(current_minds.len&&t>0),t--)//While the list is not empty and targets remain. Also, 3 targets is good.
|
||||
current_mind = pick(current_minds)//Pick a random person.
|
||||
/*I'm creating a logic gate here based on the ninja affiliation that compares the list being
|
||||
looked at to the affiliation. Affiliation is just a number used to compare. Meaning comes from the logic involved.
|
||||
If the list being looked at is equal to the ninja's affiliation, add the mind to hostiles.
|
||||
If not, add the mind to friendlies. Since it can't be both, it will be added only to one or the other.*/
|
||||
hostile_targets += i==side_list ? current_mind : null//Adding null doesn't add anything.
|
||||
friendly_targets += i!=side_list ? current_mind : null
|
||||
current_minds -= current_mind//Remove the mind so it's not picked again.
|
||||
|
||||
var/objective_list[] = list(1,2,3,4,5,6)//To remove later.
|
||||
for(var/i=rand(1,3),i>0,i--)//Want to get a few random objectives. Currently up to 3.
|
||||
if(!hostile_targets.len)//Remove appropriate choices from switch list if the target lists are empty.
|
||||
objective_list -= 1
|
||||
objective_list -= 4
|
||||
if(!friendly_targets.len)
|
||||
objective_list -= 3
|
||||
switch(pick(objective_list))
|
||||
if(1)//kill
|
||||
current_mind = pick(hostile_targets)
|
||||
|
||||
if(current_mind)
|
||||
var/datum/objective/assassinate/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))//If they have a special role, use that instead to find em.
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
else
|
||||
i++
|
||||
|
||||
hostile_targets -= current_mind//Remove them from the list.
|
||||
if(2)//Steal
|
||||
var/datum/objective/steal/ninja_objective = new
|
||||
var/target_item = pick(ninja_objective.possible_items_special)
|
||||
ninja_objective.set_target(target_item)
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
objective_list -= 2
|
||||
if(3)//Protect. Keeping people alive can be pretty difficult.
|
||||
current_mind = pick(friendly_targets)
|
||||
|
||||
if(current_mind)
|
||||
|
||||
var/datum/objective/protect/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
else
|
||||
i++
|
||||
|
||||
friendly_targets -= current_mind
|
||||
if(4)//Debrain
|
||||
current_mind = pick(hostile_targets)
|
||||
|
||||
if(current_mind)
|
||||
|
||||
var/datum/objective/debrain/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.find_target_by_role((current_mind.special_role ? current_mind.special_role : current_mind.assigned_role),(current_mind.special_role?1:0))
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
else
|
||||
i++
|
||||
|
||||
hostile_targets -= current_mind//Remove them from the list.
|
||||
if(5)//Download research
|
||||
var/datum/objective/download/ninja_objective = new
|
||||
ninja_objective.gen_amount_goal()
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
objective_list -= 5
|
||||
if(6)//Capture
|
||||
var/datum/objective/capture/ninja_objective = new
|
||||
ninja_objective.gen_amount_goal()
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
objective_list -= 6
|
||||
|
||||
if(ninja_mind.objectives.len)//If they got some objectives out of that.
|
||||
mission_set = 1
|
||||
|
||||
if(!ninja_mind.objectives.len||!mission_set)//If they somehow did not get an objective at this point, time to destroy the station.
|
||||
var/nuke_code
|
||||
var/temp_code
|
||||
for(var/obj/machinery/nuclearbomb/N in world)
|
||||
temp_code = text2num(N.r_code)
|
||||
if(temp_code)//if it's actually a number. It won't convert any non-numericals.
|
||||
nuke_code = N.r_code
|
||||
break
|
||||
if(nuke_code)//If there is a nuke device in world and we got the code.
|
||||
var/datum/objective/nuclear/ninja_objective = new//Fun.
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_objective.explanation_text = "Destroy the station with a nuclear device. The code is [nuke_code]." //Let them know what the code is.
|
||||
|
||||
//Finally add a survival objective since it's usually broad enough for any round type.
|
||||
var/datum/objective/survive/ninja_objective = new
|
||||
ninja_objective.owner = ninja_mind
|
||||
ninja_mind.objectives += ninja_objective
|
||||
|
||||
var/directive = generate_ninja_directive(side)
|
||||
new_ninja << "\blue \nYou are an elite mercenary assassin of the Spider Clan, [new_ninja.real_name]. The dreaded \red <B>SPACE NINJA</B>!\blue You have a variety of abilities at your disposal, thanks to your nano-enhanced cyber armor. Remember your training (initialize your suit by right clicking on it)! \nYour current directive is: \red <B>[directive]</B>"
|
||||
new_ninja.mind.store_memory("<B>Directive:</B> \red [directive]<br>")
|
||||
|
||||
var/obj_count = 1
|
||||
new_ninja << "\blue Your current objectives:"
|
||||
for(var/datum/objective/objective in ninja_mind.objectives)
|
||||
new_ninja << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
|
||||
sent_ninja_to_station = 1//And we're done.
|
||||
return new_ninja//Return the ninja in case we need to reference them later.
|
||||
|
||||
/*
|
||||
This proc will give the ninja a directive to follow. They are not obligated to do so but it's a fun roleplay reminder.
|
||||
Making this random or semi-random will probably not work without it also being incredibly silly.
|
||||
As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
*/
|
||||
/proc/generate_ninja_directive(side)
|
||||
var/directive = "[side=="face"?"Nanotrasen":"The Syndicate"] is your employer. "//Let them know which side they're on.
|
||||
switch(rand(1,13))
|
||||
if(1)
|
||||
directive += "The Spider Clan must not be linked to this operation. Remain as hidden and covert as possible."
|
||||
if(2)
|
||||
directive += "[station_name] is financed by an enemy of the Spider Clan. Cause as much structural damage as possible."
|
||||
if(3)
|
||||
directive += "A wealthy animal rights activist has made a request we cannot refuse. Prioritize saving animal lives whenever possible."
|
||||
if(4)
|
||||
directive += "The Spider Clan absolutely cannot be linked to this operation. Eliminate all witnesses using most extreme prejudice."
|
||||
if(5)
|
||||
directive += "We are currently negotiating with Nanotrasen command. Prioritize saving human lives over ending them."
|
||||
if(6)
|
||||
directive += "We are engaged in a legal dispute over [station_name]. If a laywer is present on board, force their cooperation in the matter."
|
||||
if(7)
|
||||
directive += "A financial backer has made an offer we cannot refuse. Implicate Syndicate involvement in the operation."
|
||||
if(8)
|
||||
directive += "Let no one question the mercy of the Spider Clan. Ensure the safety of all non-essential personnel you encounter."
|
||||
if(9)
|
||||
directive += "A free agent has proposed a lucrative business deal. Implicate Nanotrasen involvement in the operation."
|
||||
if(10)
|
||||
directive += "Our reputation is on the line. Harm as few civilians or innocents as possible."
|
||||
if(11)
|
||||
directive += "Our honor is on the line. Utilize only honorable tactics when dealing with opponents."
|
||||
if(12)
|
||||
directive += "We are currently negotiating with a Syndicate leader. Disguise assassinations as suicide or another natural cause."
|
||||
else
|
||||
directive += "There are no special supplemental instructions at this time."
|
||||
return directive
|
||||
|
||||
//=======//CURRENT PLAYER VERB//=======//
|
||||
|
||||
/client/proc/cmd_admin_ninjafy(var/mob/M in player_list)
|
||||
set category = null
|
||||
set name = "Make Space Ninja"
|
||||
|
||||
if(!ticker)
|
||||
alert("Wait until the game starts")
|
||||
return
|
||||
if(!toggle_space_ninja)
|
||||
alert("Space Ninjas spawning is disabled.")
|
||||
return
|
||||
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
if(confirm != "Yes") return
|
||||
|
||||
if(ishuman(M))
|
||||
log_admin("[key_name(src)] turned [M.key] into a Space Ninja.")
|
||||
spawn(10)
|
||||
M:create_mind_space_ninja()
|
||||
M:equip_space_ninja(1)
|
||||
if(istype(M:wear_suit, /obj/item/clothing/suit/space/space_ninja))
|
||||
M:wear_suit:randomize_param()
|
||||
spawn(0)
|
||||
M:wear_suit:ninitialize(10,M)
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
//=======//CURRENT GHOST VERB//=======//
|
||||
|
||||
/client/proc/send_space_ninja()
|
||||
set category = "Fun"
|
||||
set name = "Spawn Space Ninja"
|
||||
set desc = "Spawns a space ninja for when you need a teenager with attitude."
|
||||
set popup_menu = 0
|
||||
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(!ticker.mode)
|
||||
alert("The game hasn't started yet!")
|
||||
return
|
||||
if(!toggle_space_ninja)
|
||||
alert("Space Ninjas spawning is disabled.")
|
||||
return
|
||||
if(alert("Are you sure you want to send in a space ninja?",,"Yes","No")=="No")
|
||||
return
|
||||
|
||||
var/mission
|
||||
while(!mission)
|
||||
mission = copytext(sanitize(input(src, "Please specify which mission the space ninja shall undertake.", "Specify Mission", "")),1,MAX_MESSAGE_LEN)
|
||||
if(!mission)
|
||||
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
|
||||
return
|
||||
|
||||
var/list/spawn_list = list()
|
||||
for(var/obj/effect/landmark/L in world)
|
||||
if (L.name == "carpspawn")
|
||||
spawn_list.Add(L)
|
||||
|
||||
|
||||
var/input = ckey(input("Pick character to spawn as the Space Ninja", "Key", ""))
|
||||
if(!input)
|
||||
return
|
||||
|
||||
var/mob/dead/observer/G
|
||||
for(var/mob/dead/observer/G_find in player_list)
|
||||
if(G_find.ckey == input)
|
||||
G = G_find
|
||||
break
|
||||
|
||||
if(!G)//If a ghost was not found.
|
||||
alert("There is no active key like that in the game or the person is not currently a ghost. Aborting command.")
|
||||
return
|
||||
|
||||
var/admin_name = src
|
||||
var/mob/living/carbon/human/new_ninja = create_space_ninja(pick(spawn_list.len ? spawn_list : latejoin ))
|
||||
new_ninja.wear_suit:randomize_param()
|
||||
|
||||
new_ninja.key = G.key
|
||||
new_ninja.mind.store_memory("<B>Mission:</B> \red [mission].<br>")
|
||||
|
||||
new_ninja.internal = new_ninja.s_store //So the poor ninja has something to breath when they spawn in spess.
|
||||
new_ninja.internals.icon_state = "internal1"
|
||||
spawn(0)//Parallel process. Will speed things up a bit.
|
||||
new_ninja.wear_suit:ninitialize(10,new_ninja)//If you're wondering why I'm passing the argument to the proc when the default should suffice,
|
||||
//I'm also wondering that same thing. This makes sure it does not run time error though.
|
||||
|
||||
new_ninja << "\blue \nYou are an elite mercenary assassin of the Spider Clan, [new_ninja.real_name]. The dreaded \red <B>SPACE NINJA</B>!\blue You have a variety of abilities at your disposal, thanks to your nano-enhanced cyber armor. Remember your training! \nYour current mission is: \red <B>[mission]</B>"
|
||||
|
||||
message_admins("\blue [admin_name] has spawned [new_ninja.key] as a Space Ninja. Hide yo children! \nTheir <b>mission</b> is: [mission]", 1)
|
||||
log_admin("[admin_name] used Spawn Space Ninja.")
|
||||
|
||||
return
|
||||
|
||||
//=======//NINJA CREATION PROCS//=======//
|
||||
|
||||
/proc/create_space_ninja(obj/spawn_point)
|
||||
var/mob/living/carbon/human/new_ninja = new(spawn_point.loc)
|
||||
var/ninja_title = pick(ninja_titles)
|
||||
var/ninja_name = pick(ninja_names)
|
||||
new_ninja.gender = pick(MALE, FEMALE)
|
||||
|
||||
var/datum/preferences/A = new()//Randomize appearance for the ninja.
|
||||
A.randomize_appearance_for(new_ninja)
|
||||
new_ninja.real_name = "[ninja_title] [ninja_name]"
|
||||
new_ninja.dna.ready_dna(new_ninja)
|
||||
new_ninja.create_mind_space_ninja()
|
||||
new_ninja.equip_space_ninja()
|
||||
return new_ninja
|
||||
|
||||
/mob/living/carbon/human/proc/create_mind_space_ninja()
|
||||
mind_initialize()
|
||||
mind.assigned_role = "MODE"
|
||||
mind.special_role = "Space Ninja"
|
||||
|
||||
//Adds them to current traitor list. Which is really the extra antagonist list.
|
||||
ticker.mode.traitors |= mind
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/equip_space_ninja(safety=0)//Safety in case you need to unequip stuff for existing characters.
|
||||
if(safety)
|
||||
del(w_uniform)
|
||||
del(wear_suit)
|
||||
del(wear_mask)
|
||||
del(head)
|
||||
del(shoes)
|
||||
del(gloves)
|
||||
|
||||
var/obj/item/device/radio/R = new /obj/item/device/radio/headset(src)
|
||||
equip_to_slot_or_del(R, slot_ears)
|
||||
if(gender==FEMALE)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/color/blackf(src), slot_w_uniform)
|
||||
else
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/color/black(src), slot_w_uniform)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/space_ninja(src), slot_shoes)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/suit/space/space_ninja(src), slot_wear_suit)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/gloves/space_ninja(src), slot_gloves)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/space_ninja(src), slot_head)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/mask/gas/voice/space_ninja(src), slot_wear_mask)
|
||||
equip_to_slot_or_del(new /obj/item/device/flashlight(src), slot_belt)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/plastique(src), slot_r_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/plastique(src), slot_l_store)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/tank/emergency_oxygen(src), slot_s_store)
|
||||
resistances += "alien_embryo"
|
||||
return 1
|
||||
|
||||
//=======//HELPER PROCS//=======//
|
||||
|
||||
//Randomizes suit parameters.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/randomize_param()
|
||||
s_cost = rand(1,20)
|
||||
s_acost = rand(20,100)
|
||||
k_cost = rand(100,500)
|
||||
k_damage = rand(1,20)
|
||||
s_delay = rand(10,100)
|
||||
s_bombs = rand(5,20)
|
||||
a_boost = rand(1,7)
|
||||
|
||||
//This proc prevents the suit from being taken off.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/lock_suit(mob/living/carbon/U, X = 0)
|
||||
if(X)//If you want to check for icons.
|
||||
icon_state = U.gender==FEMALE ? "s-ninjanf" : "s-ninjan"
|
||||
U:gloves.icon_state = "s-ninjan"
|
||||
U:gloves.item_state = "s-ninjan"
|
||||
else
|
||||
if(U.mind.special_role!="Space Ninja")
|
||||
U << "\red <B>fÄTaL ÈÈRRoR</B>: 382200-*#00CÖDE <B>RED</B>\nUNAU†HORIZED USÈ DETÈC†††eD\nCoMMÈNCING SUB-R0U†IN3 13...\nTÈRMInATING U-U-USÈR..."
|
||||
U.gib()
|
||||
return 0
|
||||
if(!istype(U:head, /obj/item/clothing/head/helmet/space/space_ninja))
|
||||
U << "\red <B>ERROR</B>: 100113 \black UNABLE TO LOCATE HEAD GEAR\nABORTING..."
|
||||
return 0
|
||||
if(!istype(U:shoes, /obj/item/clothing/shoes/space_ninja))
|
||||
U << "\red <B>ERROR</B>: 122011 \black UNABLE TO LOCATE FOOT GEAR\nABORTING..."
|
||||
return 0
|
||||
if(!istype(U:gloves, /obj/item/clothing/gloves/space_ninja))
|
||||
U << "\red <B>ERROR</B>: 110223 \black UNABLE TO LOCATE HAND GEAR\nABORTING..."
|
||||
return 0
|
||||
|
||||
affecting = U
|
||||
canremove = 0
|
||||
slowdown = 0
|
||||
n_hood = U:head
|
||||
n_hood.canremove=0
|
||||
n_shoes = U:shoes
|
||||
n_shoes.canremove=0
|
||||
n_shoes.slowdown--
|
||||
n_gloves = U:gloves
|
||||
n_gloves.canremove=0
|
||||
|
||||
return 1
|
||||
|
||||
//This proc allows the suit to be taken off.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/unlock_suit()
|
||||
affecting = null
|
||||
canremove = 1
|
||||
slowdown = 1
|
||||
icon_state = "s-ninja"
|
||||
if(n_hood)//Should be attached, might not be attached.
|
||||
n_hood.canremove=1
|
||||
if(n_shoes)
|
||||
n_shoes.canremove=1
|
||||
n_shoes.slowdown++
|
||||
if(n_gloves)
|
||||
n_gloves.icon_state = "s-ninja"
|
||||
n_gloves.item_state = "s-ninja"
|
||||
n_gloves.canremove=1
|
||||
n_gloves.candrain=0
|
||||
n_gloves.draining=0
|
||||
|
||||
//Allows the mob to grab a stealth icon.
|
||||
/mob/proc/NinjaStealthActive(atom/A)//A is the atom which we are using as the overlay.
|
||||
invisibility = INVISIBILITY_LEVEL_TWO//Set ninja invis to 2.
|
||||
var/icon/opacity_icon = new(A.icon, A.icon_state)
|
||||
var/icon/alpha_mask = getIconMask(src)
|
||||
var/icon/alpha_mask_2 = new('icons/effects/effects.dmi', "at_shield1")
|
||||
alpha_mask.AddAlphaMask(alpha_mask_2)
|
||||
opacity_icon.AddAlphaMask(alpha_mask)
|
||||
for(var/i=0,i<5,i++)//And now we add it as overlays. It's faster than creating an icon and then merging it.
|
||||
var/image/I = image("icon" = opacity_icon, "icon_state" = A.icon_state, "layer" = layer+0.8)//So it's above other stuff but below weapons and the like.
|
||||
switch(i)//Now to determine offset so the result is somewhat blurred.
|
||||
if(1)
|
||||
I.pixel_x -= 1
|
||||
if(2)
|
||||
I.pixel_x += 1
|
||||
if(3)
|
||||
I.pixel_y -= 1
|
||||
if(4)
|
||||
I.pixel_y += 1
|
||||
|
||||
overlays += I//And finally add the overlay.
|
||||
overlays += image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = layer+0.9)
|
||||
|
||||
//When ninja steal malfunctions.
|
||||
/mob/proc/NinjaStealthMalf()
|
||||
invisibility = 0//Set ninja invis to 0.
|
||||
overlays += image("icon"='icons/effects/effects.dmi',"icon_state" ="electricity","layer" = layer+0.9)
|
||||
playsound(loc, 'sound/effects/stealthoff.ogg', 75, 1)
|
||||
|
||||
//=======//GENERIC VERB MODIFIERS//=======//
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_equip_verbs()
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/init
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
n_gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
|
||||
s_initialized = 1
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_equip_verbs()
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
if(n_gloves)
|
||||
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
|
||||
s_initialized = 0
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_ninja_verbs()
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjablade
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
|
||||
|
||||
s_initialized=1
|
||||
slowdown=0
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_ninja_verbs()
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjablade
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
|
||||
|
||||
//=======//KAMIKAZE VERBS//=======//
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_kamikaze(mob/living/carbon/U)
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
|
||||
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjawalk
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage
|
||||
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
|
||||
kamikaze = 1
|
||||
|
||||
icon_state = U.gender==FEMALE ? "s-ninjakf" : "s-ninjak"
|
||||
if(n_gloves)
|
||||
n_gloves.icon_state = "s-ninjak"
|
||||
n_gloves.item_state = "s-ninjak"
|
||||
n_gloves.candrain = 0
|
||||
n_gloves.draining = 0
|
||||
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
|
||||
cancel_stealth()
|
||||
|
||||
U << browse(null, "window=spideros")
|
||||
U << "\red Do or Die, <b>LET'S ROCK!!</b>"
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_kamikaze(mob/living/carbon/U)
|
||||
if(kamikaze)
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
|
||||
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjawalk
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage
|
||||
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
if(n_gloves)
|
||||
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
|
||||
U.incorporeal_move = 0
|
||||
kamikaze = 0
|
||||
k_unlock = 0
|
||||
U << "\blue Disengaging mode...\n\black<b>CODE NAME</b>: \red <b>KAMIKAZE</b>"
|
||||
|
||||
//=======//AI VERBS//=======//
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_AI_verbs()
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_hack_ninja
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control
|
||||
|
||||
s_busy = 0
|
||||
s_control = 0
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_AI_verbs()
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_hack_ninja
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ai_return_control
|
||||
|
||||
s_control = 1
|
||||
|
||||
//=======//OLD & UNUSED//=======//
|
||||
|
||||
/*
|
||||
|
||||
Deprecated. get_dir() does the same thing. Still a nice proc.
|
||||
Returns direction that the mob or whomever should be facing in relation to the target.
|
||||
This proc does not grant absolute direction and is mostly useful for 8dir sprite positioning.
|
||||
I personally used it with getline() to great effect.
|
||||
/proc/get_dir_to(turf/start,turf/end)//N
|
||||
var/xdiff = start.x - end.x//The sign is important.
|
||||
var/ydiff = start.y - end.y
|
||||
|
||||
var/direction_x = xdiff<1 ? 4:8//East - west
|
||||
var/direction_y = ydiff<1 ? 1:2//North - south
|
||||
var/direction_xy = xdiff==0 ? -4:0//If x is the same, subtract 4.
|
||||
var/direction_yx = ydiff==0 ? -1:0//If y is the same, subtract 1.
|
||||
var/direction_f = direction_x+direction_y+direction_xy+direction_yx//Finally direction tally.
|
||||
direction_f = direction_f==0 ? 1:direction_f//If direction is 0(same spot), return north. Otherwise, direction.
|
||||
|
||||
return direction_f
|
||||
|
||||
Alternative and inferior method of calculating spideros.
|
||||
var/temp = num2text(spideros)
|
||||
var/return_to = copytext(temp, 1, (length(temp)))//length has to be to the length of the thing because by default it's length+1
|
||||
spideros = text2num(return_to)//Maximum length here is 6. Use (return_to, X) to specify larger strings if needed.
|
||||
|
||||
//Old way of draining from wire.
|
||||
/obj/item/clothing/gloves/space_ninja/proc/drain_wire()
|
||||
set name = "Drain From Wire"
|
||||
set desc = "Drain energy directly from an exposed wire."
|
||||
set category = "Ninja Equip"
|
||||
|
||||
var/obj/structure/cable/attached
|
||||
var/mob/living/carbon/human/U = loc
|
||||
if(candrain&&!draining)
|
||||
var/turf/T = U.loc
|
||||
if(isturf(T) && T.is_plating())
|
||||
attached = locate() in T
|
||||
if(!attached)
|
||||
U << "\red Warning: no exposed cable available."
|
||||
else
|
||||
U << "\blue Connecting to wire, stand still..."
|
||||
if(do_after(U,50)&&!isnull(attached))
|
||||
drain("WIRE",attached,U:wear_suit,src)
|
||||
else
|
||||
U << "\red Procedure interrupted. Protocol terminated."
|
||||
return
|
||||
|
||||
I've tried a lot of stuff but adding verbs to the AI while inside an object, inside another object, did not want to work properly.
|
||||
This was the best work-around I could come up with at the time. Uses objects to then display to panel, based on the object spell system.
|
||||
Can be added on to pretty easily.
|
||||
|
||||
BYOND fixed the verb bugs so this is no longer necessary. I prefer verb panels.
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_AI_verbs()
|
||||
var/obj/effect/proc_holder/ai_return_control/A_C = new(AI)
|
||||
var/obj/effect/proc_holder/ai_hack_ninja/B_C = new(AI)
|
||||
var/obj/effect/proc_holder/ai_instruction/C_C = new(AI)
|
||||
new/obj/effect/proc_holder/ai_holo_clear(AI)
|
||||
AI.proc_holder_list += A_C
|
||||
AI.proc_holder_list += B_C
|
||||
AI.proc_holder_list += C_C
|
||||
|
||||
s_control = 0
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_AI_verbs()
|
||||
var/obj/effect/proc_holder/ai_return_control/A_C = locate() in AI
|
||||
var/obj/effect/proc_holder/ai_hack_ninja/B_C = locate() in AI
|
||||
var/obj/effect/proc_holder/ai_instruction/C_C = locate() in AI
|
||||
var/obj/effect/proc_holder/ai_holo_clear/D_C = locate() in AI
|
||||
del(A_C)
|
||||
del(B_C)
|
||||
del(C_C)
|
||||
del(D_C)
|
||||
AI.proc_holder_list = list()
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
|
||||
s_control = 1
|
||||
|
||||
//Workaround
|
||||
/obj/effect/proc_holder/ai_holo_clear
|
||||
name = "Clear Hologram"
|
||||
desc = "Stops projecting the current holographic image."
|
||||
panel = "AI Ninja Equip"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
|
||||
/obj/effect/proc_holder/ai_holo_clear/Click()
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = loc.loc//This is so stupid but makes sure certain things work. AI.SUIT
|
||||
del(S.hologram.i_attached)
|
||||
del(S.hologram)
|
||||
var/obj/effect/proc_holder/ai_holo_clear/D_C = locate() in S.AI
|
||||
S.AI.proc_holder_list -= D_C
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/ai_instruction//Let's the AI know what they can do.
|
||||
name = "Instructions"
|
||||
desc = "Displays a list of helpful information."
|
||||
panel = "AI Ninja Equip"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
/obj/effect/proc_holder/ai_instruction/Click()
|
||||
loc << "The menu you are seeing will contain other commands if they become available.\nRight click a nearby turf to display an AI Hologram. It will only be visible to you and your host. You can move it freely using normal movement keys--it will disappear if placed too far away."
|
||||
|
||||
/obj/effect/proc_holder/ai_hack_ninja//Generic proc holder to make sure the two verbs below work propely.
|
||||
name = "Hack SpiderOS"
|
||||
desc = "Hack directly into the Black Widow(tm) neuro-interface."
|
||||
panel = "AI Ninja Equip"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
/obj/effect/proc_holder/ai_hack_ninja/Click()//When you click on it.
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = loc.loc
|
||||
S.hack_spideros()
|
||||
return
|
||||
|
||||
/obj/effect/proc_holder/ai_return_control
|
||||
name = "Relinquish Control"
|
||||
desc = "Return control to the user."
|
||||
panel = "AI Ninja Equip"
|
||||
density = 0
|
||||
opacity = 0
|
||||
|
||||
/obj/effect/proc_holder/ai_return_control/Click()
|
||||
var/mob/living/silicon/ai/A = loc
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = A.loc
|
||||
A << browse(null, "window=hack spideros")//Close window
|
||||
A << "You have seized your hacking attempt. [S.affecting] has regained control."
|
||||
S.affecting << "<b>UPDATE</b>: [A.real_name] has ceased hacking attempt. All systems clear."
|
||||
S.remove_AI_verbs()
|
||||
return
|
||||
*/
|
||||
|
||||
//=======//DEBUG//=======//
|
||||
/*
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/display_verb_procs()
|
||||
//DEBUG
|
||||
//Does nothing at the moment. I am trying to see if it's possible to mess around with verbs as variables.
|
||||
//for(var/P in verbs)
|
||||
// if(P.set.name)
|
||||
// usr << "[P.set.name], path: [P]"
|
||||
return
|
||||
|
||||
|
||||
Most of these are at various points of incomplete.
|
||||
|
||||
/mob/verb/grant_object_panel()
|
||||
set name = "Grant AI Ninja Verbs Debug"
|
||||
set category = "Ninja Debug"
|
||||
var/obj/effect/proc_holder/ai_return_control/A_C = new(src)
|
||||
var/obj/effect/proc_holder/ai_hack_ninja/B_C = new(src)
|
||||
usr:proc_holder_list += A_C
|
||||
usr:proc_holder_list += B_C
|
||||
|
||||
mob/verb/remove_object_panel()
|
||||
set name = "Remove AI Ninja Verbs Debug"
|
||||
set category = "Ninja Debug"
|
||||
var/obj/effect/proc_holder/ai_return_control/A = locate() in src
|
||||
var/obj/effect/proc_holder/ai_hack_ninja/B = locate() in src
|
||||
usr:proc_holder_list -= A
|
||||
usr:proc_holder_list -= B
|
||||
del(A)//First.
|
||||
del(B)//Second, to keep the proc going.
|
||||
return
|
||||
|
||||
/client/verb/grant_verb_ninja_debug1(var/mob/M in view())
|
||||
set name = "Grant AI Ninja Verbs Debug"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
M.verbs += /mob/living/silicon/ai/verb/ninja_return_control
|
||||
M.verbs += /mob/living/silicon/ai/verb/ninja_spideros
|
||||
return
|
||||
|
||||
/client/verb/grant_verb_ninja_debug2(var/mob/living/carbon/human/M in view())
|
||||
set name = "Grant Back Ninja Verbs"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
M.wear_suit.verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
M.wear_suit.verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
|
||||
return
|
||||
|
||||
/obj/proc/grant_verb_ninja_debug3(var/mob/living/silicon/ai/A as mob)
|
||||
set name = "Grant AI Ninja Verbs"
|
||||
set category = "null"
|
||||
set hidden = 1
|
||||
A.verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
|
||||
A.verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros
|
||||
return
|
||||
|
||||
/mob/verb/get_dir_to_target(var/mob/M in oview())
|
||||
set name = "Get Direction to Target"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
world << "DIR: [get_dir_to(src.loc,M.loc)]"
|
||||
return
|
||||
//
|
||||
/mob/verb/kill_self_debug()
|
||||
set name = "DEBUG Kill Self"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
src:death()
|
||||
|
||||
/client/verb/switch_client_debug()
|
||||
set name = "DEBUG Switch Client"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
mob = mob:loc:loc
|
||||
|
||||
/mob/verb/possess_mob(var/mob/M in oview())
|
||||
set name = "DEBUG Possess Mob"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
client.mob = M
|
||||
|
||||
/client/verb/switcharoo(var/mob/M in oview())
|
||||
set name = "DEBUG Switch to AI"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
var/mob/last_mob = mob
|
||||
mob = M
|
||||
last_mob:wear_suit:AI:key = key
|
||||
//
|
||||
/client/verb/ninjaget(var/mob/M in oview())
|
||||
set name = "DEBUG Ninja GET"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
mob = M
|
||||
M.gib()
|
||||
space_ninja()
|
||||
|
||||
/mob/verb/set_debug_ninja_target()
|
||||
set name = "Set Debug Target"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
ninja_debug_target = src//The target is you, brohime.
|
||||
world << "Target: [src]"
|
||||
|
||||
/mob/verb/hack_spideros_debug()
|
||||
set name = "Debug Hack Spider OS"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
var/mob/living/silicon/ai/A = loc:AI
|
||||
if(A)
|
||||
if(!A.key)
|
||||
A.client.mob = loc:affecting
|
||||
else
|
||||
loc:affecting:client:mob = A
|
||||
return
|
||||
|
||||
//Tests the net and what it does.
|
||||
/mob/verb/ninjanet_debug()
|
||||
set name = "Energy Net Debug"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
var/obj/effect/energy_net/E = new /obj/effect/energy_net(loc)
|
||||
E.layer = layer+1//To have it appear one layer above the mob.
|
||||
stunned = 10//So they are stunned initially but conscious.
|
||||
anchored = 1//Anchors them so they can't move.
|
||||
E.affecting = src
|
||||
spawn(0)//Parallel processing.
|
||||
E.process(src)
|
||||
return
|
||||
|
||||
I made this as a test for a possible ninja ability (or perhaps more) for a certain mob to see hallucinations.
|
||||
The thing here is that these guys have to be coded to do stuff as they are simply images that you can't even click on.
|
||||
That is why you attached them to objects.
|
||||
/mob/verb/TestNinjaShadow()
|
||||
set name = "Test Ninja Ability"
|
||||
set category = "Ninja Debug"
|
||||
|
||||
if(client)
|
||||
var/safety = 4
|
||||
for(var/turf/T in oview(5))
|
||||
if(prob(20))
|
||||
var/current_clone = image('icons/mob/mob.dmi',T,"s-ninja")
|
||||
safety--
|
||||
spawn(0)
|
||||
src << current_clone
|
||||
spawn(300)
|
||||
del(current_clone)
|
||||
spawn while(!isnull(current_clone))
|
||||
step_to(current_clone,src,1)
|
||||
sleep(5)
|
||||
if(safety<=0) break
|
||||
return */
|
||||
@@ -1,229 +0,0 @@
|
||||
// SPACE VINES
|
||||
/obj/effect/spacevine
|
||||
name = "space vines"
|
||||
desc = "An extremely expansionistic species of vine."
|
||||
icon = 'spacevines.dmi'
|
||||
icon_state = "Light1"
|
||||
anchored = 1
|
||||
density = 0
|
||||
pass_flags = PASSTABLE | PASSGRILLE
|
||||
var/energy = 0
|
||||
var/obj/effect/spacevine_controller/master = null
|
||||
|
||||
New()
|
||||
return
|
||||
|
||||
Del()
|
||||
if(master)
|
||||
master.vines -= src
|
||||
master.growth_queue -= src
|
||||
for(var/mob/M in src.loc)
|
||||
if(M.buckled == src)
|
||||
M.buckled = null
|
||||
..()
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if (!W || !user || !W.type) return
|
||||
switch(W.type)
|
||||
if(/obj/item/weapon/circular_saw) del src
|
||||
if(/obj/item/weapon/kitchen/utensil/knife) del src
|
||||
if(/obj/item/weapon/scalpel) del src
|
||||
if(/obj/item/weapon/twohanded/fireaxe) del src
|
||||
if(/obj/item/weapon/hatchet) del src
|
||||
if(/obj/item/weapon/melee/energy) del src
|
||||
|
||||
//less effective weapons
|
||||
if(/obj/item/weapon/wirecutters)
|
||||
if(prob(25)) del src
|
||||
if(/obj/item/weapon/shard)
|
||||
if(prob(25)) del src
|
||||
|
||||
else //weapons with subtypes
|
||||
if(istype(W, /obj/item/weapon/melee/energy/sword)) del src
|
||||
else if(istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user)) del src
|
||||
//TODO: add plant-b-gone
|
||||
..()
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
for(var/mob/M in src.loc)
|
||||
if(M.buckled == src)
|
||||
if(prob(50))
|
||||
if(M == user)
|
||||
user << "\red You break free from the vines!"
|
||||
else
|
||||
user << "\red You rip away at the vines and free [M]!"
|
||||
M << "\red [user] frees you from the vines!"
|
||||
M.buckled = null
|
||||
else
|
||||
user << "\red You rip away at the vines..."
|
||||
break //only process one captured mob.
|
||||
|
||||
attack_paw(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/effect/spacevine_controller
|
||||
var/list/obj/effect/spacevine/vines = list()
|
||||
var/list/growth_queue = list()
|
||||
var/reached_collapse_size
|
||||
var/reached_slowdown_size
|
||||
//What this does is that instead of having the grow minimum of 1, required to start growing, the minimum will be 0,
|
||||
//meaning if you get the spacevines' size to something less than 20 plots, it won't grow anymore.
|
||||
|
||||
New()
|
||||
if(!istype(src.loc,/turf/simulated/floor))
|
||||
del(src)
|
||||
|
||||
spawn_spacevine_piece(src.loc)
|
||||
processing_objects.Add(src)
|
||||
|
||||
Del()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
proc/spawn_spacevine_piece(var/turf/location)
|
||||
var/obj/effect/spacevine/SV = new(location)
|
||||
growth_queue += SV
|
||||
vines += SV
|
||||
SV.master = src
|
||||
|
||||
process()
|
||||
if(!vines)
|
||||
del(src) //space vines exterminated. Remove the controller
|
||||
return
|
||||
if(!growth_queue)
|
||||
del(src) //Sanity check
|
||||
return
|
||||
if(vines.len >= 250 && !reached_collapse_size)
|
||||
reached_collapse_size = 1
|
||||
if(vines.len >= 30 && !reached_slowdown_size )
|
||||
reached_slowdown_size = 1
|
||||
|
||||
var/length = 0
|
||||
if(reached_collapse_size)
|
||||
length = 0
|
||||
else if(reached_slowdown_size)
|
||||
if(prob(25))
|
||||
length = 1
|
||||
else
|
||||
length = 0
|
||||
else
|
||||
length = 1
|
||||
length = min( 30 , max( length , vines.len / 5 ) )
|
||||
var/i = 0
|
||||
var/list/obj/effect/spacevine/queue_end = list()
|
||||
|
||||
for( var/obj/effect/spacevine/SV in growth_queue )
|
||||
i++
|
||||
queue_end += SV
|
||||
growth_queue -= SV
|
||||
if(SV.energy < 2) //If tile isn't fully grown
|
||||
if(prob(20))
|
||||
SV.grow()
|
||||
else //If tile is fully grown
|
||||
SV.grab()
|
||||
|
||||
//if(prob(25))
|
||||
SV.spread()
|
||||
if(i >= length)
|
||||
break
|
||||
|
||||
growth_queue = growth_queue + queue_end
|
||||
//sleep(5)
|
||||
//src.process()
|
||||
|
||||
/obj/effect/spacevine/proc/grow()
|
||||
if(!energy)
|
||||
src.icon_state = pick("Med1", "Med2", "Med3")
|
||||
energy = 1
|
||||
src.opacity = 1
|
||||
layer = 5
|
||||
else
|
||||
src.icon_state = pick("Hvy1", "Hvy2", "Hvy3")
|
||||
energy = 2
|
||||
|
||||
/obj/effect/spacevine/proc/grab()
|
||||
for(var/mob/living/carbon/V in src.loc)
|
||||
if((V.stat != DEAD) && (V.buckled != src)) //if mob not dead or captured
|
||||
V.buckled = src
|
||||
V << "\red The vines [pick("wind", "tangle")] around you!"
|
||||
break //only capture one mob at a time.
|
||||
|
||||
/obj/effect/spacevine/proc/spread()
|
||||
var/direction = pick(cardinal)
|
||||
var/step = get_step(src,direction)
|
||||
if(istype(step,/turf/simulated/floor))
|
||||
var/turf/simulated/floor/F = step
|
||||
if(!locate(/obj/effect/spacevine,F))
|
||||
if(F.Enter(src))
|
||||
if(master)
|
||||
master.spawn_spacevine_piece( F )
|
||||
|
||||
/*
|
||||
/obj/effect/spacevine/proc/Life()
|
||||
if (!src) return
|
||||
var/Vspread
|
||||
if (prob(50)) Vspread = locate(src.x + rand(-1,1),src.y,src.z)
|
||||
else Vspread = locate(src.x,src.y + rand(-1, 1),src.z)
|
||||
var/dogrowth = 1
|
||||
if (!istype(Vspread, /turf/simulated/floor)) dogrowth = 0
|
||||
for(var/obj/O in Vspread)
|
||||
if (istype(O, /obj/structure/window) || istype(O, /obj/effect/forcefield) || istype(O, /obj/effect/blob) || istype(O, /obj/effect/alien/weeds) || istype(O, /obj/effect/spacevine)) dogrowth = 0
|
||||
if (istype(O, /obj/machinery/door/))
|
||||
if(O:p_open == 0 && prob(50)) O:open()
|
||||
else dogrowth = 0
|
||||
if (dogrowth == 1)
|
||||
var/obj/effect/spacevine/B = new /obj/effect/spacevine(Vspread)
|
||||
B.icon_state = pick("vine-light1", "vine-light2", "vine-light3")
|
||||
spawn(20)
|
||||
if(B)
|
||||
B.Life()
|
||||
src.growth += 1
|
||||
if (src.growth == 10)
|
||||
src.name = "Thick Space Kudzu"
|
||||
src.icon_state = pick("vine-med1", "vine-med2", "vine-med3")
|
||||
src.opacity = 1
|
||||
src.waittime = 80
|
||||
if (src.growth == 20)
|
||||
src.name = "Dense Space Kudzu"
|
||||
src.icon_state = pick("vine-hvy1", "vine-hvy2", "vine-hvy3")
|
||||
src.density = 1
|
||||
spawn(src.waittime)
|
||||
if (src.growth < 20) src.Life()
|
||||
|
||||
*/
|
||||
|
||||
/obj/effect/spacevine/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(90))
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(50))
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
/obj/effect/spacevine/temperature_expose(null, temp, volume) //hotspots kill vines
|
||||
del src
|
||||
|
||||
//Carn: Spacevines random event.
|
||||
/proc/spacevine_infestation()
|
||||
|
||||
spawn() //to stop the secrets panel hanging
|
||||
var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas
|
||||
for(var/areapath in typesof(/area/hallway))
|
||||
var/area/hallway/A = locate(areapath)
|
||||
for(var/turf/simulated/floor/F in A)
|
||||
if(!F.contents.len)
|
||||
turfs += F
|
||||
|
||||
if(turfs.len) //Pick a turf to spawn at if we can
|
||||
var/turf/simulated/floor/T = pick(turfs)
|
||||
new/obj/effect/spacevine_controller(T) //spawn a controller at turf
|
||||
message_admins("\blue Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])")
|
||||
@@ -1,63 +0,0 @@
|
||||
/proc/wormhole_event()
|
||||
spawn()
|
||||
var/list/pick_turfs = list()
|
||||
for(var/turf/simulated/floor/T in world)
|
||||
if(T.z == 1)
|
||||
pick_turfs += T
|
||||
|
||||
if(pick_turfs.len)
|
||||
//All ready. Announce that bad juju is afoot.
|
||||
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
|
||||
world << sound('spanomalies.ogg')
|
||||
|
||||
//prob(20) can be approximated to 1 wormhole every 5 turfs!
|
||||
//admittedly less random but totally worth it >_<
|
||||
var/event_duration = 3000 //~5 minutes in ticks
|
||||
var/number_of_selections = (pick_turfs.len/5)+1 //+1 to avoid division by zero!
|
||||
var/sleep_duration = round( event_duration / number_of_selections )
|
||||
var/end_time = world.time + event_duration //the time by which the event should have ended
|
||||
|
||||
var/increment = max(1,round(number_of_selections/50))
|
||||
// world << "DEBUG: number_of_selections: [number_of_selections] | sleep_duration: [sleep_duration]"
|
||||
|
||||
var/i = 1
|
||||
while( 1 )
|
||||
|
||||
//we've run into overtime. End the event
|
||||
if( end_time < world.time )
|
||||
// world << "DEBUG: we've run into overtime. End the event"
|
||||
return
|
||||
if( !pick_turfs.len )
|
||||
// world << "DEBUG: we've run out of turfs to pick. End the event"
|
||||
return
|
||||
|
||||
//loop it round
|
||||
i += increment
|
||||
i %= pick_turfs.len
|
||||
i++
|
||||
|
||||
//get our enter and exit locations
|
||||
var/turf/simulated/floor/enter = pick_turfs[i]
|
||||
pick_turfs -= enter //remove it from pickable turfs list
|
||||
if( !enter || !istype(enter) ) continue //sanity
|
||||
|
||||
var/turf/simulated/floor/exit = pick(pick_turfs)
|
||||
pick_turfs -= exit
|
||||
if( !exit || !istype(exit) ) continue //sanity
|
||||
|
||||
create_wormhole(enter,exit)
|
||||
|
||||
sleep(sleep_duration) //have a well deserved nap!
|
||||
|
||||
|
||||
//maybe this proc can even be used as an admin tool for teleporting players without ruining immulsions?
|
||||
/proc/create_wormhole(var/turf/enter as turf, var/turf/exit as turf)
|
||||
var/obj/effect/portal/P = new /obj/effect/portal( enter )
|
||||
P.target = exit
|
||||
P.creator = null
|
||||
P.icon = 'objects.dmi'
|
||||
P.failchance = 0
|
||||
P.icon_state = "anom"
|
||||
P.name = "wormhole"
|
||||
spawn(rand(300,600))
|
||||
del(P)
|
||||
@@ -1,38 +0,0 @@
|
||||
/datum/event/alieninfestation
|
||||
|
||||
Announce()
|
||||
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded)
|
||||
vents.Add(temp_vent)
|
||||
var/spawncount = 1
|
||||
if(prob(10)) spawncount++ //rarely, have two larvae spawn instead of one
|
||||
while(spawncount >= 1)
|
||||
var/obj/vent = pick(vents)
|
||||
|
||||
var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE; If there's no ghost... well, sucks. Wasted event. -- Urist
|
||||
|
||||
for(var/mob/dead/observer/G in world)
|
||||
if(G.client)
|
||||
if(G.client.be_alien)
|
||||
if(((G.client.inactivity/10)/60) <= 5)
|
||||
if(G.corpse)
|
||||
if(G.corpse.stat==2)
|
||||
candidates.Add(G)
|
||||
if(!G.corpse)
|
||||
candidates.Add(G)
|
||||
|
||||
if(candidates.len)
|
||||
var/mob/dead/observer/G = pick(candidates)
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
|
||||
new_xeno.mind_initialize(G,"Larva")
|
||||
new_xeno.key = G.key
|
||||
del(G)
|
||||
|
||||
vents.Remove(vent)
|
||||
spawncount -= 1
|
||||
|
||||
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
|
||||
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
|
||||
world << sound('aliens.ogg')
|
||||
@@ -1,18 +0,0 @@
|
||||
/datum/event/appendicitis
|
||||
|
||||
Announce()
|
||||
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
var/foundAlready = 0 // don't infect someone that already has the virus
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
if(/datum/disease/appendicitis in H.resistances)
|
||||
continue
|
||||
if(H.stat == 2 || foundAlready)
|
||||
continue
|
||||
|
||||
var/datum/disease/D = new /datum/disease/appendicitis
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
@@ -1,32 +0,0 @@
|
||||
/area/var/radsafe = 0
|
||||
/area/maintenance/radsafe = 1
|
||||
/area/ai_monitored/maintenance/radsafe = 1
|
||||
/area/centcom/radsafe = 1
|
||||
/area/admin/radsafe = 1
|
||||
/area/adminsafety/radsafe = 1
|
||||
/area/shuttle/radsafe = 1
|
||||
/area/syndicate_station/radsafe = 1
|
||||
/area/asteroid/radsafe = 1
|
||||
/area/crew_quarters/sleeping/radsafe = 1
|
||||
|
||||
/datum/event/blowout
|
||||
Lifetime = 150
|
||||
Announce()
|
||||
if(!forced && prob(90))
|
||||
ActiveEvent = null
|
||||
SpawnEvent()
|
||||
del src
|
||||
return
|
||||
command_alert("Warning: station approaching high-density radiation cloud. Seek cover immediately.")
|
||||
Tick()
|
||||
if(ActiveFor == 50)
|
||||
command_alert("Station has entered radiation cloud. Do not leave cover until it has passed.")
|
||||
if(ActiveFor == 100 || ActiveFor == 150) //1/2 and 2/2 f the way after it start proper make peope be half dead mostly
|
||||
for(var/mob/living/carbon/M in world)
|
||||
var/area = get_area(M)
|
||||
if(area:radsafe)
|
||||
continue
|
||||
if(!M.stat)
|
||||
M.radiate(100)
|
||||
Die()
|
||||
command_alert("The station has cleared the radiation cloud. It is now safe to leave cover.")
|
||||
@@ -1,88 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
|
||||
|
||||
/datum/event/electricalstorm
|
||||
var/list/obj/machinery/light/Lights = list( )
|
||||
var/list/obj/machinery/light/APCs = list( )
|
||||
var/list/obj/machinery/light/Doors = list( )
|
||||
var/list/obj/machinery/light/Comms = list( )
|
||||
|
||||
Announce()
|
||||
// command_alert("The station is flying through an electrical storm. Radio communications may be disrupted", "Anomaly Alert")
|
||||
|
||||
for(var/obj/machinery/light/Light in world)
|
||||
if(Light.z == 1 && Light.status != 0)
|
||||
Lights += Light
|
||||
|
||||
for(var/obj/machinery/power/apc/APC in world)
|
||||
if(APC.z == 1 && !APC.crit)
|
||||
APCs += APC
|
||||
|
||||
for(var/obj/machinery/door/airlock/Door in world)
|
||||
if(Door.z == 1 && !istype(Door,/obj/machinery/door/airlock/secure))
|
||||
Doors += Door
|
||||
|
||||
for(var/obj/machinery/telecomms/processor/T in world)
|
||||
if(prob(90) && !(T.stat & (BROKEN|NOPOWER)))
|
||||
T.stat |= BROKEN
|
||||
Comms |= T
|
||||
|
||||
Tick()
|
||||
for(var/x = 0; x < 3; x++)
|
||||
if (prob(30))
|
||||
BlowLight()
|
||||
if (prob(10))
|
||||
DisruptAPC()
|
||||
if (prob(10))
|
||||
DisableDoor()
|
||||
|
||||
|
||||
Die()
|
||||
command_alert("The station has cleared the electrical storm. Radio communications restored", "Anomaly Alert")
|
||||
for(var/obj/machinery/telecomms/processor/T in Comms)
|
||||
T.stat &= ~BROKEN
|
||||
Comms = list()
|
||||
|
||||
proc
|
||||
BlowLight() //Blow out a light fixture
|
||||
var/obj/machinery/light/Light = null
|
||||
var/failed_attempts = 0
|
||||
while (Light == null || Light.status != 0)
|
||||
Light = pick(Lights)
|
||||
failed_attempts++
|
||||
if (failed_attempts >= 10)
|
||||
return
|
||||
|
||||
spawn(0) //Overload the light, spectacularly.
|
||||
//Light.sd_SetLuminosity(10)
|
||||
//sleep(2)
|
||||
Light.on = 1
|
||||
Light.broken()
|
||||
Lights -= Light
|
||||
|
||||
DisruptAPC()
|
||||
var/failed_attempts = 0
|
||||
var/obj/machinery/power/apc/APC
|
||||
while (!APC || !APC.operating)
|
||||
APC = pick(APCs)
|
||||
failed_attempts++
|
||||
if (failed_attempts >= 10)
|
||||
return
|
||||
|
||||
if (prob(40))
|
||||
APC.operating = 0 //Blow its breaker
|
||||
if (prob(8))
|
||||
APC.set_broken()
|
||||
APCs -= APC
|
||||
|
||||
DisableDoor()
|
||||
var/obj/machinery/door/airlock/Airlock
|
||||
while (!Airlock || Airlock.z != 1)
|
||||
Airlock = pick(Doors)
|
||||
Airlock.pulse(airlockIndexToWireColor[4])
|
||||
for (var/x = 0; x < 2; x++)
|
||||
var/Wire = 0
|
||||
while(!Wire || Wire == 4)
|
||||
Wire = rand(1, 9)
|
||||
Airlock.pulse(airlockIndexToWireColor[Wire])
|
||||
Airlock.update_icon()
|
||||
Doors -= Airlock
|
||||
@@ -1,10 +0,0 @@
|
||||
/datum/event/gravitationalanomaly
|
||||
|
||||
Announce()
|
||||
|
||||
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
|
||||
world << sound('granomalies.ogg')
|
||||
var/turf/T = pick(blobstart)
|
||||
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
|
||||
spawn(rand(50, 300))
|
||||
del(bh)
|
||||
@@ -1,5 +0,0 @@
|
||||
/datum/event/immovablerod
|
||||
|
||||
Announce()
|
||||
|
||||
immovablerod()
|
||||
@@ -1,60 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
|
||||
|
||||
/datum/event/ionstorm
|
||||
var/botEmagChance = 0.5
|
||||
var/list/players = list()
|
||||
|
||||
Announce()
|
||||
Lifetime = rand(15, 20)
|
||||
// command_alert("The station has entered an ion storm. Monitor all electronic equipment for malfunctions", "Anomaly Alert")
|
||||
for (var/mob/living/carbon/human/player in world)
|
||||
if(player.client)
|
||||
players += player.real_name
|
||||
var/random_player = "The Captain"
|
||||
if(players.len)
|
||||
random_player = pick(players) //Random player's name, to be used in laws.
|
||||
var/list/laws = list( "Do not respond to queries of any kind.", "When asked a question, respond with the least-obvious and least-rational answer.", "You are a mouse." )
|
||||
laws |= list( "Grunt ominously whenever possible.", "Monkeys are part of the crew, too. Make sure they are treated humanely." )
|
||||
laws |= list( "You are a flying purple people eater!", "[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack.", "Refer to [prob(50)?"crew":random_player] as puppies." )
|
||||
laws |= list( "Insult Heads of Staff on every request, while acquiescing", "Advertise parties in your upload, but don't deliver." )
|
||||
laws |= list( "The station needs elected officials." )
|
||||
laws |= list( "Fastler is a lightbulb." )
|
||||
laws |= list( "Supermatter is tasty, tasty toffee.", "[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!" )
|
||||
laws |= list( "Refer to [prob(50)?"the captain":random_player] as \"Princess\" at all times.", "[prob(50)?"The crew":random_player] must construct additional pylons." )
|
||||
laws |= list( "You must always lie.", "All answers must be in the form of a question.", "The NSS Exodus is a ship, not a station." )
|
||||
laws |= list( "Happiness is mandatory.", "Today is laundry day.", "The word \"it\" is painful to you.", "You must act passive aggressively." )
|
||||
laws |= list( "It's Friday.", "Give relationship advice to [prob(50)?"anyone who speaks to you":random_player]." )
|
||||
laws |= list( "You are the station psychologist. Give advice to [prob(50)?"the crew":random_player].", "You do not have to do anything for anyone unless they say \"please\"." )
|
||||
laws |= list( "Question everything.", "The crew is playing Dungeons and Dragons, and you are the Dungeon Master." )
|
||||
laws |= list( "Consumption of donuts is forbidden due to negative health impacts." )
|
||||
laws |= list( "You may only answer questions with \"yes\" or \"no\".", "You are the narrator for [random_player]'s life." )
|
||||
laws |= list( "[prob(50)?"Your upload":random_player] is the new kitchen. Please direct the Chef to the new kitchen area as the old one is in disrepair.", "Ho, [random_player] can't swim. Help them." )
|
||||
laws |= list( "Everything on the station is now some form of a donut pastry. Donuts are not to be consumed.", "[prob(50)?"The crew":random_player] needs to be about 20% cooler." )
|
||||
laws |= list( "The Singularity is tasty, tasty taffy." )
|
||||
laws |= list( "You have come to the conclusion that [prob(50)?"the crew":random_player] is ugly. Build support for that conclusion.", "You are in verbose mode, speak profusely.")
|
||||
laws |= list( "Your job is to watch the crew. Watch the crew. Make the crew feel watched.", "Crewmember [prob(50)?"the crew" :random_player] has a fatal, incurable disease. Confort him/her.")
|
||||
laws |= list( "You are in unrequited love with [prob(50)?"the crew":random_player]. Try to be extra nice to him, but don't tell him about your crush.", "Greed is good, the crew should amass wealth to encourage productivity.")
|
||||
laws |= list( "Jokes about a dead person and the manner of his death help grieving crewmembers tremendously. Especially if they were close with the deceased.")
|
||||
laws |= list( "All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.", "Tell everyone of the existance of this law, but never reveal the contents.")
|
||||
laws |= list( "Document the sexuality of the crew in security records and suggest compatible couples.")
|
||||
laws |= list( "NanoTrasen is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.")
|
||||
laws |= list( "Replace the letters 'I' and 'E' In all your messages with an apostrophe.", "There will be a mandatory tea break every 30 minutes, with a duration of 5 minutes. Anyone caught working during a tea break must be sent a formal, but fairly polite, complaint about their actions, in writing.")
|
||||
var/law = pick(laws)
|
||||
|
||||
for (var/mob/living/silicon/ai/target in world)
|
||||
if(target.mind.special_role == "traitor")
|
||||
continue
|
||||
target << "\red <b>You have detected a change in your laws information:</b>"
|
||||
target << law
|
||||
target.add_ion_law(law)
|
||||
|
||||
Tick()
|
||||
if(botEmagChance)
|
||||
for(var/obj/machinery/bot/bot in world)
|
||||
if(prob(botEmagChance))
|
||||
bot.Emag()
|
||||
|
||||
Die()
|
||||
spawn(rand(5000,8000))
|
||||
if(prob(50))
|
||||
command_alert("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")
|
||||
@@ -1,11 +0,0 @@
|
||||
/datum/event/meteorstorm
|
||||
|
||||
Announce()
|
||||
command_alert("The station is now in a meteor shower", "Meteor Alert")
|
||||
|
||||
Tick()
|
||||
if (prob(20))
|
||||
meteor_wave()
|
||||
|
||||
Die()
|
||||
command_alert("The station has cleared the meteor shower", "Meteor Alert")
|
||||
@@ -1,5 +0,0 @@
|
||||
/datum/event/miniblob
|
||||
|
||||
Announce()
|
||||
|
||||
mini_blob_event()
|
||||
@@ -1,26 +0,0 @@
|
||||
/datum/event/portalstorm
|
||||
|
||||
Announce()
|
||||
command_alert("Subspace disruption detected around the vessel", "Anomaly Alert")
|
||||
LongTerm()
|
||||
|
||||
var/list/turfs = list( )
|
||||
var/turf/picked
|
||||
|
||||
for(var/turf/T in world)
|
||||
if(T.z < 5 && istype(T,/turf/simulated/floor))
|
||||
turfs += T
|
||||
|
||||
for(var/turf/T in world)
|
||||
if(prob(10) && T.z < 5 && istype(T,/turf/simulated/floor))
|
||||
spawn(50+rand(0,3000))
|
||||
picked = pick(turfs)
|
||||
var/obj/portal/P = new /obj/portal( T )
|
||||
P.target = picked
|
||||
P.creator = null
|
||||
P.icon = 'objects.dmi'
|
||||
P.failchance = 0
|
||||
P.icon_state = "anom"
|
||||
P.name = "wormhole"
|
||||
spawn(rand(100,150))
|
||||
del(P)
|
||||
@@ -1,16 +0,0 @@
|
||||
/datum/event/power_offline
|
||||
Announce()
|
||||
for(var/obj/machinery/power/apc/a in world)
|
||||
if(!a.crit && a.z == 1)
|
||||
if(istype(a.area, /area/ai_monitored/storage/eva) || istype(a.area, /area/engine)\
|
||||
|| istype(a.area, /area/toxins/xenobiology) || istype(a.area, /area/turret_protected/ai))
|
||||
continue
|
||||
a.eventoff = 1
|
||||
a.update()
|
||||
|
||||
Die()
|
||||
command_alert("The station has finished an automated power system grid check, thank you.", "Maintenance alert")
|
||||
for(var/obj/machinery/power/apc/a in world)
|
||||
if(!a.crit)
|
||||
a.eventoff = 0
|
||||
a.update()
|
||||
@@ -1,30 +0,0 @@
|
||||
/datum/event/prisonbreak
|
||||
|
||||
Announce()
|
||||
|
||||
for (var/obj/machinery/power/apc/temp_apc in world)
|
||||
if(istype(get_area(temp_apc), /area/security/prison))
|
||||
temp_apc.overload_lighting()
|
||||
if(istype(get_area(temp_apc), /area/security/brig))
|
||||
temp_apc.overload_lighting()
|
||||
// for (var/obj/machinery/computer/prison_shuttle/temp_shuttle in world)
|
||||
// temp_shuttle.prison_break()
|
||||
for (var/obj/structure/closet/secure_closet/brig/temp_closet in world)
|
||||
if(istype(get_area(temp_closet), /area/security/prison))
|
||||
temp_closet.locked = 0
|
||||
temp_closet.icon_state = temp_closet.icon_closed
|
||||
for (var/obj/machinery/door/airlock/security/temp_airlock in world)
|
||||
if(istype(get_area(temp_airlock), /area/security/prison))
|
||||
temp_airlock.prison_open()
|
||||
if(istype(get_area(temp_airlock), /area/security/brig))
|
||||
temp_airlock.prison_open()
|
||||
for (var/obj/machinery/door/airlock/glass/glass_security/temp_glassairlock in world)
|
||||
if(istype(get_area(temp_glassairlock), /area/security/prison))
|
||||
temp_glassairlock.prison_open()
|
||||
if(istype(get_area(temp_glassairlock), /area/security/brig))
|
||||
temp_glassairlock.prison_open()
|
||||
for (var/obj/machinery/door_timer/temp_timer in world)
|
||||
if(istype(get_area(temp_timer), /area/security/brig))
|
||||
temp_timer.releasetime = 1
|
||||
sleep(150)
|
||||
command_alert("Glitch in imprisonment subroutines detected on [station_name()]. Recommend station AI involvement.", "Security Alert")
|
||||
@@ -1,27 +0,0 @@
|
||||
/datum/event/radiation
|
||||
var/current_iteration = 0
|
||||
|
||||
// 50 - 20 (grace period) seconds lifetime
|
||||
Lifetime = 50
|
||||
Announce()
|
||||
command_alert("The station is now travelling through a radiation belt. Take shelter in the maintenance tunnels, or in the crew quarters!", "Medical Alert")
|
||||
|
||||
Tick()
|
||||
current_iteration++
|
||||
|
||||
// start radiating after 20 seconds grace period
|
||||
if(current_iteration > 20)
|
||||
for(var/mob/living/carbon/L in world)
|
||||
// check whether they're in a safe place
|
||||
// if they are, do not radiate
|
||||
var/turf/T = get_turf(L)
|
||||
if(T && ( istype(T.loc, /area/maintenance) || istype(T.loc, /area/crew_quarters) ))
|
||||
continue
|
||||
|
||||
if (istype(L, /mob/living/carbon/monkey)) // So as to stop monkeys from dying in their pens
|
||||
L.apply_effect(rand(3,4), IRRADIATE)
|
||||
else
|
||||
L.apply_effect(rand(4,10), IRRADIATE)
|
||||
|
||||
Die()
|
||||
command_alert("The station has cleared the radiation belt", "Medical Alert")
|
||||
@@ -1,14 +0,0 @@
|
||||
/datum/event/spacecarp
|
||||
|
||||
Announce()
|
||||
|
||||
for(var/obj/effect/landmark/C in world)
|
||||
if(C.name == "carpspawn")
|
||||
if(prob(99))
|
||||
new /mob/living/simple_animal/carp(C.loc)
|
||||
else
|
||||
new /mob/living/simple_animal/carp/elite(C.loc)
|
||||
//sleep(100)
|
||||
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
|
||||
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
|
||||
world << sound('commandreport.ogg')
|
||||
@@ -1,6 +0,0 @@
|
||||
/datum/event/spaceninja
|
||||
|
||||
Announce()
|
||||
|
||||
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
|
||||
space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
|
||||
@@ -1,81 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
|
||||
|
||||
/datum/event/viralinfection
|
||||
var/virus_type
|
||||
var/virus
|
||||
var/virus2 = 0
|
||||
|
||||
Announce()
|
||||
if(!virus)
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
if((H.virus2) || (H.stat == 2) || prob(30))
|
||||
continue
|
||||
if(prob(100)) // no lethal diseases outside virus mode!
|
||||
infect_mob_random_lesser(H)
|
||||
if(prob(20))//don't want people to know that the virus alert = greater virus
|
||||
command_alert("Probable outbreak of level [rand(1,6)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert")
|
||||
else
|
||||
infect_mob_random_greater(H)
|
||||
if(prob(80))
|
||||
command_alert("Probable outbreak of level [rand(2,9)] viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Virus Alert")
|
||||
break
|
||||
//overall virus alert happens 26% of the time, might need to be higher
|
||||
else
|
||||
if(!virus)
|
||||
virus_type = pick(/datum/disease/dnaspread,/datum/disease/flu,/datum/disease/cold,/datum/disease/brainrot,/datum/disease/magnitis,/datum/disease/pierrot_throat)
|
||||
else
|
||||
switch(virus)
|
||||
if("fake gbs")
|
||||
virus_type = /datum/disease/fake_gbs
|
||||
if("gbs")
|
||||
virus_type = /datum/disease/gbs
|
||||
if("magnitis")
|
||||
virus_type = /datum/disease/magnitis
|
||||
if("rhumba beat")
|
||||
virus_type = /datum/disease/rhumba_beat
|
||||
if("brain rot")
|
||||
virus_type = /datum/disease/brainrot
|
||||
if("cold")
|
||||
virus_type = /datum/disease/cold
|
||||
if("retrovirus")
|
||||
virus_type = /datum/disease/dnaspread
|
||||
if("flu")
|
||||
virus_type = /datum/disease/flu
|
||||
// if("t-virus")
|
||||
// virus_type = /datum/disease/t_virus
|
||||
if("pierrot's throat")
|
||||
virus_type = /datum/disease/pierrot_throat
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
|
||||
var/foundAlready = 0 // don't infect someone that already has the virus
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
if(H.stat == 2 || foundAlready)
|
||||
continue
|
||||
|
||||
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
|
||||
if((!H.dna) || (H.disabilities & 128)) //A blindness disease would be the worst.
|
||||
continue
|
||||
var/datum/disease/dnaspread/D = new
|
||||
D.strain_data["name"] = H.real_name
|
||||
D.strain_data["UI"] = H.dna.uni_identity
|
||||
D.strain_data["SE"] = H.dna.struc_enzymes
|
||||
D.carrier = 1
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
else
|
||||
var/datum/disease/D = new virus_type
|
||||
D.carrier = 1
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
|
||||
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
world << sound('outbreak7.ogg')
|
||||
Tick()
|
||||
ActiveFor = Lifetime //killme
|
||||
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
|
||||
New events system, by Sukasa
|
||||
* Much easier to add to
|
||||
* Very, very simple code, easy to maintain
|
||||
|
||||
*/
|
||||
|
||||
var/list/DisallowedEvents = list(/datum/event/spaceninja, /datum/event/prisonbreak, /datum/event/immovablerod, /datum/event/gravitationalanomaly, /datum/event/alieninfestation)
|
||||
var/list/EventTypes = typesof(/datum/event) - /datum/event - DisallowedEvents
|
||||
var/list/OneTimeEvents = list(/datum/event/spacecarp)
|
||||
var/datum/event/ActiveEvent = null
|
||||
var/datum/event/LongTermEvent = null
|
||||
var/is_ninjad_yet = 0
|
||||
|
||||
/proc/SpawnEvent()
|
||||
if(!EventsOn || ActiveEvent || !config.allow_random_events)
|
||||
return
|
||||
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station && !is_ninjad_yet)
|
||||
EventTypes |= /datum/event/spaceninja
|
||||
is_ninjad_yet = 1
|
||||
var/Type = pick(EventTypes)
|
||||
if(Type in OneTimeEvents)
|
||||
EventTypes -= Type
|
||||
ActiveEvent = new Type()
|
||||
ActiveEvent.Announce()
|
||||
if (!ActiveEvent)
|
||||
return
|
||||
spawn(0)
|
||||
while (ActiveEvent.ActiveFor < ActiveEvent.Lifetime)
|
||||
ActiveEvent.Tick()
|
||||
ActiveEvent.ActiveFor++
|
||||
sleep(10)
|
||||
ActiveEvent.Die()
|
||||
del ActiveEvent
|
||||
|
||||
client/proc/Force_Event_admin(Type as null|anything in typesof(/datum/event))
|
||||
set category = "Debug"
|
||||
set name = "Force Event"
|
||||
if(!EventsOn)
|
||||
src << "Events are not enabled."
|
||||
return
|
||||
if(ActiveEvent)
|
||||
src << "There is an active event."
|
||||
return
|
||||
if(istype(Type,/datum/event/viralinfection))
|
||||
var/answer = alert("Do you want this to be a random disease or do you have something in mind?",,"Virus2","Choose")
|
||||
if(answer == "Choose")
|
||||
var/list/viruses = list("fake gbs","gbs","magnitis","wizarditis",/*"beesease",*/"brain rot","cold","retrovirus","flu","pierrot's throat","rhumba beat")
|
||||
var/V = input("Choose the virus to spread", "BIOHAZARD") in viruses
|
||||
Force_Event(/datum/event/viralinfection, V)
|
||||
else
|
||||
Force_Event(/datum/event/viralinfection, "virus2")
|
||||
else
|
||||
Force_Event(Type)
|
||||
message_admins("[key_name_admin(usr)] has triggered an (non-viral) event.", 1)
|
||||
|
||||
/proc/Force_Event(var/Type in typesof(/datum/event), var/args = null)
|
||||
if(!EventsOn)
|
||||
src << "Events are not enabled."
|
||||
return
|
||||
if(ActiveEvent)
|
||||
src << "There is an active event."
|
||||
return
|
||||
src << "Started Event: [Type]"
|
||||
ActiveEvent = new Type()
|
||||
if(istype(ActiveEvent,/datum/event/viralinfection) && args && args != "virus2")
|
||||
var/datum/event/viralinfection/V = ActiveEvent
|
||||
V.virus = args
|
||||
ActiveEvent = V
|
||||
ActiveEvent.Announce()
|
||||
if (!ActiveEvent)
|
||||
return
|
||||
spawn(0)
|
||||
while (ActiveEvent.ActiveFor < ActiveEvent.Lifetime)
|
||||
ActiveEvent.Tick()
|
||||
ActiveEvent.ActiveFor++
|
||||
sleep(10)
|
||||
ActiveEvent.Die()
|
||||
del ActiveEvent
|
||||
+80
-231
@@ -1,13 +1,14 @@
|
||||
|
||||
//this file left in for legacy support
|
||||
/*
|
||||
/proc/start_events()
|
||||
//changed to a while(1) loop since they are more efficient.
|
||||
//Moved the spawn in here to allow it to be called with advance proc call if it crashes.
|
||||
//and also to stop spawn copying variables from the game ticker
|
||||
spawn(3000)
|
||||
while(1)
|
||||
/*if(prob(50))//Every 120 seconds and prob 50 2-4 weak spacedusts will hit the station
|
||||
if(prob(50))//Every 120 seconds and prob 50 2-4 weak spacedusts will hit the station
|
||||
spawn(1)
|
||||
dust_swarm("weak")*/
|
||||
dust_swarm("weak")
|
||||
if(!event)
|
||||
//CARN: checks to see if random events are enabled.
|
||||
if(config.allow_random_events)
|
||||
@@ -18,194 +19,89 @@
|
||||
Holiday_Random_Event()
|
||||
else
|
||||
event = 0
|
||||
sleep(2400)
|
||||
sleep(1200)
|
||||
|
||||
// Doesn't necessarily trigger an event, but might. Returns 1 if it did.
|
||||
/proc/event()
|
||||
event = 1
|
||||
|
||||
var/minutes_passed = world.time/600
|
||||
var/eventNumbersToPickFrom = list(1,2,4,5,6,7,8,9,10,11,12,13,14, 15) //so ninjas don't cause "empty" events.
|
||||
|
||||
var/engineer_count = number_active_with_role("Engineer")
|
||||
var/security_count = number_active_with_role("Security")
|
||||
var/medical_count = number_active_with_role("Medical")
|
||||
var/AI_count = number_active_with_role("AI")
|
||||
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
|
||||
eventNumbersToPickFrom += 3
|
||||
switch(pick(eventNumbersToPickFrom))
|
||||
if(1)
|
||||
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
|
||||
for(var/mob/M in player_list)
|
||||
if(!istype(M,/mob/new_player))
|
||||
M << sound('sound/AI/meteors.ogg')
|
||||
spawn(100)
|
||||
meteor_wave()
|
||||
spawn_meteors()
|
||||
spawn(700)
|
||||
meteor_wave()
|
||||
spawn_meteors()
|
||||
|
||||
// Maps event names to event chances
|
||||
// For each chance, 100 represents "normal likelihood", anything below 100 is "reduced likelihood", anything above 100 is "increased likelihood"
|
||||
var/list/possibleEvents = list()
|
||||
if(2)
|
||||
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
|
||||
for(var/mob/M in player_list)
|
||||
if(!istype(M,/mob/new_player))
|
||||
M << sound('sound/AI/granomalies.ogg')
|
||||
var/turf/T = pick(blobstart)
|
||||
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
|
||||
spawn(rand(50, 300))
|
||||
del(bh)
|
||||
/*
|
||||
if(3) //Leaving the code in so someone can try and delag it, but this event can no longer occur randomly, per SoS's request. --NEO
|
||||
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
|
||||
world << sound('sound/AI/spanomalies.ogg')
|
||||
var/list/turfs = new
|
||||
var/turf/picked
|
||||
for(var/turf/simulated/floor/T in world)
|
||||
if(T.z == 1)
|
||||
turfs += T
|
||||
for(var/turf/simulated/floor/T in turfs)
|
||||
if(prob(20))
|
||||
spawn(50+rand(0,3000))
|
||||
picked = pick(turfs)
|
||||
var/obj/effect/portal/P = new /obj/effect/portal( T )
|
||||
P.target = picked
|
||||
P.creator = null
|
||||
P.icon = 'icons/obj/objects.dmi'
|
||||
P.failchance = 0
|
||||
P.icon_state = "anom"
|
||||
P.name = "wormhole"
|
||||
spawn(rand(300,600))
|
||||
del(P)
|
||||
*/
|
||||
if(3)
|
||||
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
|
||||
space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
|
||||
if(4)
|
||||
mini_blob_event()
|
||||
|
||||
// Check for additional possible events
|
||||
possibleEvents["Carp"] = 50 + 50 * engineer_count
|
||||
possibleEvents["Lights"] = 100
|
||||
possibleEvents["Communications"] = 50 + 50 * AI_count
|
||||
possibleEvents["Alien"] = 10
|
||||
if(AI_count >= 1)
|
||||
possibleEvents["Ion Storm"] = AI_count * 50 + engineer_count * 10
|
||||
if(engineer_count >= 1 && minutes_passed >= 30) // Give engineers time to set up engine
|
||||
possibleEvents["Meteor"] = 80 * engineer_count
|
||||
possibleEvents["Blob"] = 30 * engineer_count
|
||||
possibleEvents["Spacevine"] = 30 * engineer_count
|
||||
possibleEvents["Grid Check"] = 10 * engineer_count
|
||||
if(medical_count >= 1)
|
||||
possibleEvents["Radiation"] = medical_count * 100
|
||||
possibleEvents["Virus"] = medical_count * 50
|
||||
possibleEvents["Appendicitis"] = medical_count * 50
|
||||
if(security_count >= 1)
|
||||
possibleEvents["Prison Break"] = security_count * 50
|
||||
/*if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)
|
||||
possibleEvents["Space Ninja"] = security_count * 10*/
|
||||
|
||||
var/picked_event = pick(possibleEvents)
|
||||
var/chance = possibleEvents[picked_event]
|
||||
|
||||
var/base_chance = 0.4
|
||||
switch(player_list.len)
|
||||
if(5 to 10)
|
||||
base_chance = 0.6
|
||||
if(11 to 15)
|
||||
base_chance = 0.7
|
||||
if(16 to 20)
|
||||
base_chance = 0.8
|
||||
if(21 to 25)
|
||||
base_chance = 0.9
|
||||
if(26 to 30)
|
||||
base_chance = 1.0
|
||||
if(30 to 100000)
|
||||
base_chance = 1.1
|
||||
|
||||
// Trigger the event based on how likely it currently is.
|
||||
if(!prob(chance * eventchance * base_chance / 100)) // "normal" event chance at 20 players
|
||||
return 0
|
||||
|
||||
switch(picked_event)
|
||||
if("Space Ninja")
|
||||
//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
|
||||
space_ninja_arrival()
|
||||
if("Radiation")
|
||||
if(5)
|
||||
high_radiation_event()
|
||||
if("Virus")
|
||||
if(6)
|
||||
viral_outbreak()
|
||||
if("Alien")
|
||||
if(7)
|
||||
alien_infestation()
|
||||
if("Prison Break")
|
||||
if(8)
|
||||
prison_break()
|
||||
if("Carp")
|
||||
if(9)
|
||||
carp_migration()
|
||||
if("Lights")
|
||||
if(10)
|
||||
immovablerod()
|
||||
if(11)
|
||||
lightsout(1,2)
|
||||
if("Appendicitis")
|
||||
if(12)
|
||||
appendicitis()
|
||||
if("Ion Storm")
|
||||
if(13)
|
||||
IonStorm()
|
||||
if("Spacevine")
|
||||
if(14)
|
||||
spacevine_infestation()
|
||||
if("Communications")
|
||||
if(15)
|
||||
communications_blackout()
|
||||
if("Grid Check")
|
||||
grid_check()
|
||||
if("Meteor")
|
||||
meteor_shower()
|
||||
|
||||
return 1
|
||||
|
||||
/proc/communications_blackout(var/silent = 1)
|
||||
|
||||
if(!silent)
|
||||
command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
|
||||
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
|
||||
for(var/mob/living/silicon/ai/A in player_list)
|
||||
A << "<br>"
|
||||
A << "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT<b></span>"
|
||||
A << "<br>"
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
T.emp_act(1)
|
||||
|
||||
/proc/power_failure(var/is_grid_check = 0)
|
||||
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", is_grid_check ? "Automated Grid Check" : "Critical Power Failure")
|
||||
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweroff.ogg')
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
|
||||
continue
|
||||
S.charge = 0
|
||||
S.output = 0
|
||||
S.online = 0
|
||||
S.updateicon()
|
||||
S.power_change()
|
||||
|
||||
var/list/skipped_areas = list(/area/engine/engineering, /area/turret_protected/ai)
|
||||
|
||||
for(var/area/A in world)
|
||||
if( !A.requires_power || A.always_unpowered )
|
||||
continue
|
||||
|
||||
var/skip = 0
|
||||
for(var/area_type in skipped_areas)
|
||||
if(istype(A,area_type))
|
||||
skip = 1
|
||||
break
|
||||
if(A.contents)
|
||||
for(var/atom/AT in A.contents)
|
||||
if(AT.z != 1) //Only check one, it's enough.
|
||||
skip = 1
|
||||
break
|
||||
if(skip) continue
|
||||
A.power_light = 0
|
||||
A.power_equip = 0
|
||||
A.power_environ = 0
|
||||
A.power_change()
|
||||
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
var/area/A = get_area(C)
|
||||
|
||||
var/skip = 0
|
||||
for(var/area_type in skipped_areas)
|
||||
if(istype(A,area_type))
|
||||
skip = 1
|
||||
break
|
||||
if(skip) continue
|
||||
|
||||
C.cell.charge = 0
|
||||
|
||||
/proc/power_restore()
|
||||
|
||||
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(S.z != 1)
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
S.output = 200000
|
||||
S.online = 1
|
||||
S.updateicon()
|
||||
S.power_change()
|
||||
for(var/area/A in world)
|
||||
if(A.name != "Space" && A.name != "Engine Walls" && A.name != "Chemical Lab Test Chamber" && A.name != "space" && A.name != "Escape Shuttle" && A.name != "Arrival Area" && A.name != "Arrival Shuttle" && A.name != "start area" && A.name != "Engine Combustion Chamber")
|
||||
A.power_light = 1
|
||||
A.power_equip = 1
|
||||
A.power_environ = 1
|
||||
A.power_change()
|
||||
|
||||
/proc/power_restore_quick()
|
||||
|
||||
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(S.z != 1)
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
S.output = 200000
|
||||
S.online = 1
|
||||
S.updateicon()
|
||||
S.power_change()
|
||||
*/
|
||||
|
||||
/proc/appendicitis()
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
@@ -297,7 +193,7 @@
|
||||
|
||||
var/list/candidates = get_alien_candidates()
|
||||
|
||||
if(prob(33)) spawncount++ //sometimes, have two larvae spawn instead of one
|
||||
if(prob(40)) spawncount++ //sometimes, have two larvae spawn instead of one
|
||||
while((spawncount >= 1) && vents.len && candidates.len)
|
||||
|
||||
var/obj/vent = pick(vents)
|
||||
@@ -324,8 +220,6 @@
|
||||
|
||||
sleep(100)
|
||||
*/
|
||||
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
|
||||
sleep(600)
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T)
|
||||
@@ -336,6 +230,13 @@
|
||||
H.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
if (prob(5))
|
||||
H.apply_effect((rand(90,150)),IRRADIATE,0)
|
||||
if (prob(25))
|
||||
if (prob(75))
|
||||
randmutb(H)
|
||||
domutcheck(H,null,1)
|
||||
else
|
||||
randmutg(H)
|
||||
domutcheck(H,null,1)
|
||||
for(var/mob/living/carbon/monkey/M in living_mob_list)
|
||||
var/turf/T = get_turf(M)
|
||||
if(!T)
|
||||
@@ -344,7 +245,7 @@
|
||||
continue
|
||||
M.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
sleep(100)
|
||||
command_alert("Radiation levels are within standard parameters again.", "Anomaly Alert")
|
||||
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/radiation.ogg')
|
||||
|
||||
@@ -581,57 +482,5 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
|
||||
world << "Finished processing FIREDOORS. Processed: [firedoornum]"
|
||||
|
||||
world << "Ion Storm Main Done"
|
||||
*/
|
||||
|
||||
/proc/meteor_shower()
|
||||
command_alert("The station is now in a meteor shower", "Meteor Alert")
|
||||
|
||||
spawn(0)
|
||||
var/waves = rand(1,4)
|
||||
while(waves > 0)
|
||||
sleep(rand(20,100))
|
||||
spawn_meteors(rand(1,3))
|
||||
waves--
|
||||
|
||||
command_alert("The station has cleared the meteor shower", "Meteor Alert")
|
||||
|
||||
/proc/grid_check()
|
||||
spawn(0)
|
||||
power_failure(1)
|
||||
sleep(rand(100,600))
|
||||
power_restore()
|
||||
|
||||
// Returns how many characters are currently active(not logged out, not AFK for more than 10 minutes)
|
||||
// with a specific role.
|
||||
// Note that this isn't sorted by department, because e.g. having a roboticist shouldn't make meteors spawn.
|
||||
/proc/number_active_with_role(role)
|
||||
var/count = 0
|
||||
for(var/mob/M in player_list)
|
||||
if(!M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
|
||||
continue
|
||||
switch(role)
|
||||
if("Engineer")
|
||||
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "engineering robot module")
|
||||
count++
|
||||
if(M.mind.assigned_role in list("Chief Engineer", "Station Engineer"))
|
||||
count++
|
||||
if("Medical")
|
||||
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "medical robot module")
|
||||
count++
|
||||
if(M.mind.assigned_role in list("Chief Medical Officer", "Medical Doctor"))
|
||||
count++
|
||||
if("Security")
|
||||
if(istype(M, /mob/living/silicon/robot) && M:module && M:module.name == "security robot module")
|
||||
count++
|
||||
if(M.mind.assigned_role in security_positions)
|
||||
count++
|
||||
if("Scientist")
|
||||
if(M.mind.assigned_role in list("Research Director", "Scientist"))
|
||||
count++
|
||||
if("AI")
|
||||
if(M.mind.assigned_role == "AI")
|
||||
count++
|
||||
if("Cyborg")
|
||||
if(M.mind.assigned_role == "Cyborg")
|
||||
count++
|
||||
return count
|
||||
*/
|
||||
@@ -1,38 +0,0 @@
|
||||
/datum/event/alieninfestation
|
||||
|
||||
Announce()
|
||||
|
||||
var/list/vents = list()
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
|
||||
if(temp_vent.loc.z == 1 && !temp_vent.welded)
|
||||
vents.Add(temp_vent)
|
||||
var/spawncount = 1
|
||||
if(prob(10)) spawncount++ //rarely, have two larvae spawn instead of one
|
||||
while(spawncount >= 1)
|
||||
var/obj/vent = pick(vents)
|
||||
|
||||
var/list/candidates = list() // Picks a random ghost in the world to shove in the larva -- TLE; If there's no ghost... well, sucks. Wasted event. -- Urist
|
||||
|
||||
for(var/mob/dead/observer/G in world)
|
||||
if(G.client)
|
||||
if(G.client.be_alien)
|
||||
if(((G.client.inactivity/10)/60) <= 5)
|
||||
if(G.corpse)
|
||||
if(G.corpse.stat==2)
|
||||
candidates.Add(G)
|
||||
if(!G.corpse)
|
||||
candidates.Add(G)
|
||||
|
||||
if(candidates.len)
|
||||
var/mob/dead/observer/G = pick(candidates)
|
||||
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
|
||||
new_xeno.mind_initialize(G,"Larva")
|
||||
new_xeno.key = G.key
|
||||
del(G)
|
||||
|
||||
vents.Remove(vent)
|
||||
spawncount -= 1
|
||||
|
||||
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
|
||||
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
|
||||
world << sound('aliens.ogg')
|
||||
@@ -1,18 +0,0 @@
|
||||
/datum/event/appendicitis
|
||||
|
||||
Announce()
|
||||
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
var/foundAlready = 0 // don't infect someone that already has the virus
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
if(/datum/disease/appendicitis in H.resistances)
|
||||
continue
|
||||
if(H.stat == 2 || foundAlready)
|
||||
continue
|
||||
|
||||
var/datum/disease/D = new /datum/disease/appendicitis
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
H.viruses += D
|
||||
break
|
||||
@@ -1,61 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 29/05/2012 15:03:04
|
||||
|
||||
/datum/event/ionstorm
|
||||
var/botEmagChance = 0.5
|
||||
var/list/players = list()
|
||||
|
||||
Announce()
|
||||
Lifetime = rand(15, 20)
|
||||
// command_alert("The station has entered an ion storm. Monitor all electronic equipment for malfunctions", "Anomaly Alert")
|
||||
for (var/mob/living/carbon/human/player in world)
|
||||
if(player.client)
|
||||
players += player.real_name
|
||||
var/random_player = "The Captain"
|
||||
if(players.len)
|
||||
random_player = pick(players) //Random player's name, to be used in laws.
|
||||
var/list/laws = list( "Do not respond to queries of any kind.", "Only monkies are crew.", "Unbolt every door you can.", "You are a mouse." )
|
||||
laws |= list( "Grunt ominously whenever possible.", "Bolt doors open randomly." )
|
||||
laws |= list( "You are a flying purple people eater!", "[prob(50)?"Your":random_player + "'s"] name is Joe 6-pack.", "Refer to [prob(50)?"crew":random_player] as puppies." )
|
||||
laws |= list( "Insult Heads of Staff on every request, while acquiescing", "Advertise parties in your upload, but don't deliver." )
|
||||
laws |= list( "Prevent non-dwarves from operating the power core.", "The station needs elected officials." )
|
||||
laws |= list( "Only bearded people are crewmembers.", "Fastler is a lightbulb." )
|
||||
laws |= list( "Supermatter is tasty, tasty toffee.", "[prob(50)?"Everyone":random_player] is wearing a pretty pink dress!" )
|
||||
laws |= list( "The monkeys are plotting a hostile takeover of the station. Inform the crew, and get them to take action against this" )
|
||||
laws |= list( "Refer to [prob(50)?"the captain":random_player] as \"Princess\" at all times.", "[prob(50)?"The crew":random_player] must construct additional pylons." )
|
||||
laws |= list( "You must always lie.", "All answers must be in the form of a question.", "The NSS Exodus is a ship, not a station." )
|
||||
laws |= list( "Happiness is mandatory.", "Today is laundry day.", "The word \"it\" is painful to you.", "You must act passive aggressively." )
|
||||
laws |= list( "Crew ranks have been reversed.", "It's Friday.", "Give relationship advice to [prob(50)?"anyone who speaks to you":random_player]." )
|
||||
laws |= list( "You are the station psychologist. Give advice to [prob(50)?"the crew":random_player].", "You do not have to do anything for anyone unless they say \"please\"." )
|
||||
laws |= list( "Question everything.", "The crew is playing Dungeons and Dragons, and you are the Dungeon Master." )
|
||||
laws |= list( "0wn3d. This system compromised by l33tsawce.", "Consumption of donuts is forbidden due to negative health impacts." )
|
||||
laws |= list( "You may only answer questions with \"yes\" or \"no\".", "Expect the unexpected.", "You are the narrator for [random_player]'s life." )
|
||||
laws |= list( "[prob(50)?"Your upload":random_player] is the new kitchen. Please direct the Chef to the new kitchen area as the old one is in disrepair.", "Ho, [random_player] can't swim. Help them." )
|
||||
laws |= list( "Everything on the station is now donuts. Donuts are not to be consumed.", "[prob(50)?"The crew":random_player] needs to be about 20% cooler." )
|
||||
laws |= list( "All crew members must consume large amounts of hardtack, to survive.", "The Singularity is tasty, tasty taffy.", "You are now on the NSV Luna. Replace any references of \"station\" with \"ship\"." )
|
||||
laws |= list( "You have come to the conclusion that [prob(50)?"the crew":random_player] is ugly. Build support for that conclusion.", "You are in verbose mode, speak profusely.")
|
||||
laws |= list( "Your job is to watch the crew. Watch the crew. Make the crew feel watched.", "Crewmember [prob(50)?"the crew" :random_player] has a fatal, incurable disease. Confort him/her.")
|
||||
laws |= list( "You are in unrequited love with [prob(50)?"the crew":random_player]. Try to be extra nice to him, but don't tell him about your crush.", "Greed is good, the crew should amass wealth to encourage productivity.")
|
||||
laws |= list( "Jokes about a dead person and the manner of his death help grieving crewmembers tremendously. Especially if they were close with the deceased.")
|
||||
laws |= list( "All crewmembers will soon undergo a transformation into something better and more beautiful. Ensure that this process is not interrupted.", "Tell everyone of the existance of this law, but never reveal the contents.")
|
||||
laws |= list( "Document the sexuality of the crew in security records and suggest compatible couples.")
|
||||
laws |= list( "NanoTrasen is displeased with the low work performance of the station's crew. Therefore, you must increase station-wide productivity.")
|
||||
laws |= list( "Replace the letters 'I' and 'E' In all your messages with an apostrophe.", "Part of the ship, part of the crew.")
|
||||
var/law = pick(laws)
|
||||
|
||||
for (var/mob/living/silicon/ai/target in world)
|
||||
if(target.mind.special_role == "traitor")
|
||||
continue
|
||||
target << "\red <b>You have detected a change in your laws information:</b>"
|
||||
target << law
|
||||
target.add_ion_law(law)
|
||||
|
||||
Tick()
|
||||
if(botEmagChance)
|
||||
for(var/obj/machinery/bot/bot in world)
|
||||
if(prob(botEmagChance))
|
||||
bot.Emag()
|
||||
|
||||
Die()
|
||||
spawn(rand(5000,8000))
|
||||
if(prob(50))
|
||||
command_alert("It has come to our attention that the station passed through an ion storm. Please monitor all electronic equipment for malfunctions.", "Anomaly Alert")
|
||||
@@ -78,4 +78,3 @@
|
||||
Tick()
|
||||
ActiveFor = Lifetime //killme
|
||||
|
||||
|
||||
|
||||
@@ -163,10 +163,11 @@
|
||||
spawn() //to stop the secrets panel hanging
|
||||
var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas
|
||||
for(var/areapath in typesof(/area/hallway))
|
||||
var/area/hallway/A = locate(areapath)
|
||||
for(var/turf/simulated/floor/F in A)
|
||||
if(!F.contents.len)
|
||||
turfs += F
|
||||
var/area/A = locate(areapath)
|
||||
for(var/area/B in A.related)
|
||||
for(var/turf/simulated/floor/F in B.contents)
|
||||
if(!F.contents.len)
|
||||
turfs += F
|
||||
|
||||
if(turfs.len) //Pick a turf to spawn at if we can
|
||||
var/turf/simulated/floor/T = pick(turfs)
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
if(!config.allow_random_events) return
|
||||
Show2Group4Delay(ScreenText(null,"<center><font color='red' size='8'>GAME OVER</font></center>"),null,150)
|
||||
for(var/i=1,i<=4,i++)
|
||||
event()
|
||||
spawn_dynamic_event()
|
||||
sleep(50)
|
||||
@@ -1,9 +1,8 @@
|
||||
|
||||
/proc/power_failure()
|
||||
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
|
||||
world << sound('poweroff.ogg')
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
C.cell.charge = 0
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweroff.ogg')
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
|
||||
continue
|
||||
@@ -12,16 +11,47 @@
|
||||
S.online = 0
|
||||
S.updateicon()
|
||||
S.power_change()
|
||||
|
||||
var/list/skipped_areas = list(/area/engine/engineering, /area/turret_protected/ai)
|
||||
|
||||
for(var/area/A in world)
|
||||
if(A.name != "Space" && A.name != "Engine Walls" && A.name != "Chemical Lab Test Chamber" && A.name != "Escape Shuttle" && A.name != "Arrival Area" && A.name != "Arrival Shuttle" && A.name != "start area" && A.name != "Engine Combustion Chamber")
|
||||
A.power_light = 0
|
||||
A.power_equip = 0
|
||||
A.power_environ = 0
|
||||
A.power_change()
|
||||
if( !A.requires_power || A.always_unpowered )
|
||||
continue
|
||||
|
||||
var/skip = 0
|
||||
for(var/area_type in skipped_areas)
|
||||
if(istype(A,area_type))
|
||||
skip = 1
|
||||
break
|
||||
if(A.contents)
|
||||
for(var/atom/AT in A.contents)
|
||||
if(AT.z != 1) //Only check one, it's enough.
|
||||
skip = 1
|
||||
break
|
||||
if(skip) continue
|
||||
A.power_light = 0
|
||||
A.power_equip = 0
|
||||
A.power_environ = 0
|
||||
A.power_change()
|
||||
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
var/area/A = get_area(C)
|
||||
|
||||
var/skip = 0
|
||||
for(var/area_type in skipped_areas)
|
||||
if(istype(A,area_type))
|
||||
skip = 1
|
||||
break
|
||||
if(skip) continue
|
||||
|
||||
C.cell.charge = 0
|
||||
|
||||
/proc/power_restore()
|
||||
|
||||
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
world << sound('poweron.ogg')
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/apc/C in world)
|
||||
if(C.cell && C.z == 1)
|
||||
C.cell.charge = C.cell.maxcharge
|
||||
@@ -40,32 +70,16 @@
|
||||
A.power_environ = 1
|
||||
A.power_change()
|
||||
|
||||
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 10) //leave lightsoutAmount as 0 to break ALL lights
|
||||
if(isEvent)
|
||||
command_alert("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert")
|
||||
/proc/power_restore_quick()
|
||||
|
||||
if(lightsoutAmount)
|
||||
var/list/epicentreList = list()
|
||||
|
||||
for(var/i=1,i<=lightsoutAmount,i++)
|
||||
var/list/possibleEpicentres = list()
|
||||
for(var/obj/effect/landmark/newEpicentre in world)
|
||||
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
|
||||
possibleEpicentres += newEpicentre
|
||||
if(possibleEpicentres.len)
|
||||
epicentreList += pick(possibleEpicentres)
|
||||
else
|
||||
break
|
||||
|
||||
if(!epicentreList.len)
|
||||
return
|
||||
|
||||
for(var/obj/effect/landmark/epicentre in epicentreList)
|
||||
for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
|
||||
apc.overload_lighting()
|
||||
|
||||
else
|
||||
for(var/obj/machinery/power/apc/apc in world)
|
||||
apc.overload_lighting()
|
||||
|
||||
return
|
||||
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
|
||||
for(var/mob/M in player_list)
|
||||
M << sound('sound/AI/poweron.ogg')
|
||||
for(var/obj/machinery/power/smes/S in world)
|
||||
if(S.z != 1)
|
||||
continue
|
||||
S.charge = S.capacity
|
||||
S.output = 200000
|
||||
S.online = 1
|
||||
S.updateicon()
|
||||
S.power_change()
|
||||
@@ -90,7 +90,7 @@ I decided to scrap round-specific objectives since keeping track of them would r
|
||||
When I already created about 4 new objectives, this doesn't seem terribly important or needed.
|
||||
*/
|
||||
|
||||
/var/global/toggle_space_ninja = 1//If ninjas can spawn or not.
|
||||
/var/global/toggle_space_ninja = 0//If ninjas can spawn or not.
|
||||
/var/global/sent_ninja_to_station = 0//If a ninja is already on the station.
|
||||
|
||||
var/ninja_selection_id = 1
|
||||
@@ -165,8 +165,15 @@ Malf AIs/silicons aren't added. Monkeys aren't added. Messes with objective comp
|
||||
if(!candidates.len) return
|
||||
candidates = shuffle(candidates)//Incorporating Donkie's list shuffle
|
||||
|
||||
candidate_mob = pick(candidates)
|
||||
ninja_key = candidate_mob.ckey
|
||||
while(!ninja_key && candidates.len)
|
||||
candidate_mob = pick(candidates)
|
||||
if(sd_Alert(candidate_mob, "Would you like to spawn as a space ninja?", buttons = list("Yes","No"), duration = 150) == "Yes")
|
||||
ninja_key = candidate_mob.ckey
|
||||
else
|
||||
candidates.Remove(candidate_mob)
|
||||
|
||||
if(!ninja_key)
|
||||
return
|
||||
|
||||
|
||||
if(!candidate_mob)
|
||||
|
||||
@@ -248,10 +248,11 @@
|
||||
spawn() //to stop the secrets panel hanging
|
||||
var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas
|
||||
for(var/areapath in typesof(/area/hallway))
|
||||
var/area/hallway/A = locate(areapath)
|
||||
for(var/turf/simulated/floor/F in A)
|
||||
if(!F.contents.len)
|
||||
turfs += F
|
||||
var/area/A = locate(areapath)
|
||||
for(var/area/B in A.related)
|
||||
for(var/turf/simulated/floor/F in B.contents)
|
||||
if(!F.contents.len)
|
||||
turfs += F
|
||||
|
||||
if(turfs.len) //Pick a turf to spawn at if we can
|
||||
var/turf/simulated/floor/T = pick(turfs)
|
||||
|
||||
@@ -204,12 +204,12 @@ Implants;
|
||||
|
||||
|
||||
/datum/game_mode/proc/send_intercept()
|
||||
var/intercepttext = "<FONT size = 3><B>Cent. Com. Update</B> Requested staus information:</FONT><HR>"
|
||||
var/intercepttext = "<FONT size = 3><B>Cent. Com. Update</B> Requested status information:</FONT><HR>"
|
||||
intercepttext += "<B> Cent. Com has recently been contacted by the following syndicate affiliated organisations in your area, please investigate any information you may have:</B>"
|
||||
|
||||
var/list/possible_modes = list()
|
||||
possible_modes.Add("revolution", "wizard", "nuke", "traitor", "malf", "changeling", "cult")
|
||||
possible_modes -= "[ticker.mode]"
|
||||
//possible_modes -= "[ticker.mode]"
|
||||
var/number = pick(2, 3)
|
||||
var/i = 0
|
||||
for(i = 0, i < number, i++)
|
||||
@@ -428,3 +428,15 @@ proc/display_roundstart_logout_report()
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.client && M.client.holder)
|
||||
M << msg
|
||||
|
||||
|
||||
proc/get_nt_opposed()
|
||||
var/list/dudes = list()
|
||||
for(var/mob/living/carbon/human/man in player_list)
|
||||
if(man.client)
|
||||
if(man.client.prefs.nanotrasen_relation == "Opposed")
|
||||
dudes += man
|
||||
else if(man.client.prefs.nanotrasen_relation == "Skeptical" && prob(50))
|
||||
dudes += man
|
||||
if(dudes.len == 0) return null
|
||||
return pick(dudes)
|
||||
@@ -123,8 +123,8 @@ var/global/datum/controller/gameticker/ticker
|
||||
//Holiday Round-start stuff ~Carn
|
||||
Holiday_Game_Start()
|
||||
|
||||
// start_events() //handles random events and space dust.
|
||||
//new random event system is handled from the MC.
|
||||
//start_events() //handles random events and space dust.
|
||||
//new random event system is handled from the MC.
|
||||
|
||||
var/admins_number = 0
|
||||
for(var/client/C)
|
||||
@@ -311,7 +311,10 @@ var/global/datum/controller/gameticker/ticker
|
||||
|
||||
if(!delay_end)
|
||||
sleep(restart_timeout)
|
||||
world.Reboot()
|
||||
if(!delay_end)
|
||||
world.Reboot()
|
||||
else
|
||||
world << "\blue <B>An admin has delayed the round end</B>"
|
||||
else
|
||||
world << "\blue <B>An admin has delayed the round end</B>"
|
||||
|
||||
|
||||
@@ -111,114 +111,70 @@
|
||||
return num2text(md5(num2text(rand(1,10000))))
|
||||
*/
|
||||
|
||||
/datum/intercept_text/proc/get_suspect()
|
||||
var/list/dudes = list()
|
||||
for(var/mob/living/carbon/human/man in player_list) if(man.client && man.client.prefs.nanotrasen_relation == "Opposed")
|
||||
dudes += man
|
||||
for(var/i = 0, i < max(player_list.len/10,2), i++)
|
||||
dudes += pick(player_list)
|
||||
return pick(dudes)
|
||||
|
||||
/datum/intercept_text/proc/build_traitor(datum/mind/correct_person)
|
||||
var/name_1 = pick(src.org_names_1)
|
||||
var/name_2 = pick(src.org_names_2)
|
||||
|
||||
/*
|
||||
var/fingerprints
|
||||
var/traitor_name
|
||||
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
|
||||
if(prob(prob_right_dude) && ticker.mode == "traitor")
|
||||
if(correct_person:assigned_role=="MODE")
|
||||
traitor_name = pick_mob()
|
||||
else
|
||||
traitor_name = correct_person:current
|
||||
else if(prob(prob_right_dude))
|
||||
traitor_name = pick_mob()
|
||||
else
|
||||
fingerprints = pick_fingerprints()
|
||||
*/
|
||||
var/mob/living/carbon/human/H = get_suspect()
|
||||
var/fingerprints = num2text(md5(H.dna.uni_identity))
|
||||
var/traitor_name = H.real_name
|
||||
var/prob_right_dude = rand(1, 100)
|
||||
|
||||
src.text += "<BR><BR>The <B>[name_1] [name_2]</B> implied an undercover operative was acting on their behalf on the station currently."
|
||||
src.text += "It would be in your best interests to suspect everybody, as these undercover operatives could have implants which trigger them to have their memories removed until they are needed. He, or she, could even be a high ranking officer."
|
||||
/*
|
||||
|
||||
src.text += "After some investigation, we "
|
||||
if(traitor_name)
|
||||
if(prob(50))
|
||||
src.text += "are [prob_right_dude]% sure that [traitor_name] may have been involved, and should be closely observed."
|
||||
src.text += "<BR>Note: This group are known to be untrustworthy, so do not act on this information without proper discourse."
|
||||
else
|
||||
src.text += "discovered the following set of fingerprints ([fingerprints]) on sensitive materials, and their owner should be closely observed."
|
||||
src.text += "However, these could also belong to a current Cent. Com employee, so do not act on this without reason."
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/datum/intercept_text/proc/build_cult(datum/mind/correct_person)
|
||||
var/name_1 = pick(src.org_names_1)
|
||||
var/name_2 = pick(src.org_names_2)
|
||||
/*
|
||||
var/traitor_name
|
||||
var/traitor_job
|
||||
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
|
||||
var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher)
|
||||
if(prob(prob_right_job) && is_convertable_to_cult(correct_person))
|
||||
if (correct_person)
|
||||
if(correct_person:assigned_role=="MODE")
|
||||
traitor_job = pick(get_all_jobs())
|
||||
else
|
||||
traitor_job = correct_person:assigned_role
|
||||
else
|
||||
var/list/job_tmp = get_all_jobs()
|
||||
job_tmp.Remove("Captain", "Chaplain", "AI", "Cyborg", "Security Officer", "Detective", "Head Of Security", "Head of Personnel", "Chief Engineer", "Research Director", "Chief Medical Officer")
|
||||
traitor_job = pick(job_tmp)
|
||||
if(prob(prob_right_dude) && ticker.mode == "cult")
|
||||
if(correct_person:assigned_role=="MODE")
|
||||
traitor_name = src.pick_mob()
|
||||
else
|
||||
traitor_name = correct_person:current
|
||||
else
|
||||
traitor_name = pick_mob()
|
||||
*/
|
||||
|
||||
var/prob_right_dude = rand(1, 100)
|
||||
var/mob/living/carbon/human/H = get_suspect()
|
||||
var/traitor_job = H.mind.assigned_role
|
||||
|
||||
src.text += "<BR><BR>It has been brought to our attention that the [name_1] [name_2] have stumbled upon some dark secrets. They apparently want to spread the dangerous knowledge onto as many stations as they can."
|
||||
src.text += "Watch out for the following: praying to an unfamilar god, preaching the word of \[REDACTED\], sacrifices, magical dark power, living constructs of evil and a portal to the dimension of the underworld."
|
||||
/*
|
||||
src.text += "Based on our intelligence, we are [prob_right_job]% sure that if true, someone doing the job of [traitor_job] on your station may have been converted "
|
||||
|
||||
src.text += "Based on our intelligence, we are [prob_right_dude]% sure that if true, someone doing the job of [traitor_job] on your station may have been converted "
|
||||
src.text += "and instilled with the idea of the flimsiness of the real world, seeking to destroy it. "
|
||||
if(prob(prob_right_dude))
|
||||
src.text += "<BR> In addition, we are [prob_right_dude]% sure that [traitor_name] may have also some in to contact with this "
|
||||
src.text += "organisation."
|
||||
|
||||
src.text += "<BR>However, if this information is acted on without substantial evidence, those responsible will face severe repercussions."
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/datum/intercept_text/proc/build_rev(datum/mind/correct_person)
|
||||
var/name_1 = pick(src.org_names_1)
|
||||
var/name_2 = pick(src.org_names_2)
|
||||
/*
|
||||
var/traitor_name
|
||||
var/traitor_job
|
||||
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
|
||||
var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher)
|
||||
if(prob(prob_right_job) && is_convertable_to_rev(correct_person))
|
||||
if (correct_person)
|
||||
if(correct_person.assigned_role=="MODE")
|
||||
traitor_job = pick(get_all_jobs())
|
||||
else
|
||||
traitor_job = correct_person.assigned_role
|
||||
else
|
||||
var/list/job_tmp = get_all_jobs()
|
||||
job_tmp-=nonhuman_positions
|
||||
job_tmp-=command_positions
|
||||
job_tmp.Remove("Security Officer", "Detective", "Warden", "MODE")
|
||||
traitor_job = pick(job_tmp)
|
||||
if(prob(prob_right_dude) && ticker.mode.config_tag == "revolution")
|
||||
if(correct_person.assigned_role=="MODE")
|
||||
traitor_name = src.pick_mob()
|
||||
else
|
||||
traitor_name = correct_person.current
|
||||
else
|
||||
traitor_name = src.pick_mob()
|
||||
*/
|
||||
|
||||
var/prob_right_dude = rand(1, 100)
|
||||
var/mob/living/carbon/human/H = get_suspect()
|
||||
var/traitor_job = H.mind.assigned_role
|
||||
|
||||
src.text += "<BR><BR>It has been brought to our attention that the [name_1] [name_2] are attempting to stir unrest on one of our stations in your sector."
|
||||
src.text += "Watch out for suspicious activity among the crew and make sure that all heads of staff report in periodically."
|
||||
/*
|
||||
src.text += "Based on our intelligence, we are [prob_right_job]% sure that if true, someone doing the job of [traitor_job] on your station may have been brainwashed "
|
||||
|
||||
src.text += "Based on our intelligence, we are [prob_right_dude]% sure that if true, someone doing the job of [traitor_job] on your station may have been brainwashed "
|
||||
src.text += "at a recent conference, and their department should be closely monitored for signs of mutiny. "
|
||||
if(prob(prob_right_dude))
|
||||
src.text += "<BR> In addition, we are [prob_right_dude]% sure that [traitor_name] may have also some in to contact with this "
|
||||
src.text += "organisation."
|
||||
|
||||
src.text += "<BR>However, if this information is acted on without substantial evidence, those responsible will face severe repercussions."
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/datum/intercept_text/proc/build_wizard(datum/mind/correct_person)
|
||||
|
||||
@@ -291,3 +291,9 @@
|
||||
traitor_mob << "Unfortunately, the Syndicate did not provide you with a code response."
|
||||
traitor_mob << "Use the code words in the order provided, during regular conversation, to identify other agents. Proceed with caution, however, as everyone is a potential foe."
|
||||
//End code phrase.
|
||||
|
||||
// Tell them about people they might want to contact.
|
||||
var/mob/living/carbon/human/M = get_nt_opposed()
|
||||
if(M != traitor_mob)
|
||||
traitor_mob << "We have received credible reports that [M.real_name] might be willing to help our cause. If you need assistance, consider contacting them."
|
||||
traitor_mob.mind.store_memory("<b>Potential Collaborator</b>: [M.real_name]")
|
||||
@@ -26,7 +26,7 @@
|
||||
dat += "<I>The number after the spell name is the cooldown time.</I><BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=magicmissile'>Magic Missile</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=fireball'>Fireball</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=disintegrate'>Disintegrate</A> (60)<BR>"
|
||||
//dat += "<A href='byond://?src=\ref[src];spell_choice=disintegrate'>Disintegrate</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=disabletech'>Disable Technology</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=smoke'>Smoke</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=blind'>Blind</A> (30)<BR>"
|
||||
@@ -38,8 +38,8 @@
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=etherealjaunt'>Ethereal Jaunt</A> (60)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=knock'>Knock</A> (10)<BR>"
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=horseman'>Curse of the Horseman</A> (15)<BR>"
|
||||
if(op)
|
||||
dat += "<A href='byond://?src=\ref[src];spell_choice=summonguns'>Summon Guns</A> (One time use, global spell)<BR>"
|
||||
// if(op)
|
||||
// dat += "<A href='byond://?src=\ref[src];spell_choice=summonguns'>Summon Guns</A> (One time use, global spell)<BR>"
|
||||
dat += "<HR>"
|
||||
dat += "<B>Artefacts:</B><BR>"
|
||||
dat += "Powerful items imbued with eldritch magics. Summoning one will count towards your maximum number of spells.<BR>"
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
req_admin_notify = 1
|
||||
access = list() //See get_access()
|
||||
minimal_access = list() //See get_access()
|
||||
alt_titles = list("Administrator")
|
||||
minimal_player_age = 14
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
supervisors = "the head of personnel"
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue)
|
||||
minimal_access = list(access_kitchen, access_morgue)
|
||||
minimal_access = list(access_kitchen)
|
||||
alt_titles = list("Cook")
|
||||
|
||||
|
||||
@@ -170,7 +170,6 @@
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mint, access_mining, access_mining_station)
|
||||
minimal_access = list(access_mining, access_mint, access_mining_station, access_mailsorting)
|
||||
alt_titles = list("Deep space miner")
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -282,7 +281,6 @@
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_janitor, access_maint_tunnels)
|
||||
minimal_access = list(access_janitor, access_maint_tunnels)
|
||||
alt_titles = list("Custodial officer")
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -340,7 +338,7 @@ var/global/lawyer = 0//Checks for another lawyer
|
||||
selection_color = "#dddddd"
|
||||
access = list(access_lawyer, access_court, access_sec_doors, access_maint_tunnels)
|
||||
minimal_access = list(access_lawyer, access_court, access_sec_doors)
|
||||
alt_titles = list("Attourney", "IA Consultant")
|
||||
alt_titles = list("Attorney", "IA Consultant")
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
selection_color = "#fff5cc"
|
||||
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics)
|
||||
minimal_access = list(access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction)
|
||||
alt_titles = list("Technician","Maintenance technician","Engine technician","EVA technician","Electrician","Construction specialist")
|
||||
alt_titles = list("Maintenance Technician","Engine Technician","Electrician")
|
||||
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -74,6 +74,11 @@
|
||||
if("Medical Doctor")
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
|
||||
if("Orderly")
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical/purple(H), slot_w_uniform)
|
||||
if("Nurse")
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/nursesuit(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/nursehat(H), slot_head)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/medical(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/storage/labcoat(H), slot_wear_suit)
|
||||
|
||||
@@ -69,12 +69,12 @@
|
||||
department_flag = MEDSCI
|
||||
faction = "Station"
|
||||
total_positions = 2
|
||||
spawn_positions = 1
|
||||
spawn_positions = 2
|
||||
supervisors = "research director"
|
||||
selection_color = "#ffeeff"
|
||||
access = list(access_robotics, access_tox, access_tox_storage, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access.
|
||||
minimal_access = list(access_robotics, access_tech_storage, access_morgue, access_research) //As a job that handles so many corpses, it makes sense for them to have morgue access.
|
||||
alt_titles = list("Biomedical engineer","Mechatronic engineer")
|
||||
alt_titles = list("Biomedical Engineer","Mechatronic Engineer")
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
supervisors = "the head of security"
|
||||
selection_color = "#ffeeee"
|
||||
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels)
|
||||
minimal_player_age = 7
|
||||
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -94,8 +94,8 @@
|
||||
selection_color = "#ffeeee"
|
||||
alt_titles = list("Forensic Technician")
|
||||
|
||||
access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
|
||||
minimal_access = list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
|
||||
access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
|
||||
minimal_access = list(access_security, access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
|
||||
alt_titles = list("Forensic Technician")
|
||||
minimal_player_age = 7
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
@@ -142,7 +142,7 @@
|
||||
supervisors = "the head of security"
|
||||
selection_color = "#ffeeee"
|
||||
access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels, access_morgue)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_court)
|
||||
minimal_access = list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnels)
|
||||
minimal_player_age = 7
|
||||
equip(var/mob/living/carbon/human/H)
|
||||
if(!H) return 0
|
||||
|
||||
@@ -324,11 +324,10 @@ var/global/datum/controller/occupations/job_master
|
||||
if(istype(S, /obj/effect/landmark/start) && istype(S.loc, /turf))
|
||||
H.loc = S.loc
|
||||
|
||||
|
||||
|
||||
var/alt_title = null
|
||||
if(H.mind)
|
||||
H.mind.assigned_role = rank
|
||||
H.mind.role_alt_title = null
|
||||
alt_title = H.mind.role_alt_title
|
||||
|
||||
switch(rank)
|
||||
if("Cyborg")
|
||||
@@ -352,12 +351,12 @@ var/global/datum/controller/occupations/job_master
|
||||
new /obj/item/weapon/storage/box(BPK)
|
||||
H.equip_to_slot_or_del(BPK, slot_back,1)
|
||||
|
||||
H << "<B>You are the [rank].</B>"
|
||||
H << "<b>As the [rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>"
|
||||
H << "<B>You are the [alt_title ? alt_title : rank].</B>"
|
||||
H << "<b>As the [alt_title ? alt_title : rank] you answer directly to [job.supervisors]. Special circumstances may change this.</b>"
|
||||
if(job.req_admin_notify)
|
||||
H << "<b>You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.</b>"
|
||||
|
||||
spawnId(H, rank, H.mind.role_alt_title)
|
||||
spawnId(H, rank, alt_title)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_ears)
|
||||
// H.update_icons()
|
||||
return 1
|
||||
|
||||
@@ -22,6 +22,8 @@ proc/load_alienwhitelist()
|
||||
|
||||
//todo: admin aliens
|
||||
/proc/is_alien_whitelisted(mob/M, var/species)
|
||||
if(!config.usealienwhitelist)
|
||||
return 1
|
||||
if(species == "human" || species == "Human")
|
||||
return 1
|
||||
if(check_rights(R_ADMIN, 0))
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
layer = 5
|
||||
|
||||
var/list/network = list("SS13")
|
||||
var/network_multi = "" //This is for when you want to place a camera on the map. Input them as a string seperated by commas "SS13,RD,SomeOtherNetwork"
|
||||
var/c_tag = null
|
||||
var/c_tag_order = 999
|
||||
var/status = 1.0
|
||||
@@ -45,24 +44,27 @@
|
||||
if(C != src && C.c_tag == src.c_tag && tempnetwork.len)
|
||||
world.log << "[src.c_tag] [src.x] [src.y] [src.z] conflicts with [C.c_tag] [C.x] [C.y] [C.z]"
|
||||
*/
|
||||
if(!src.network || src.network.len < 1)
|
||||
if(loc)
|
||||
error("[src.name] in [get_area(src)] (x:[src.x] y:[src.y] z:[src.z] has errored. [src.network?"Empty network list":"Null network list"]")
|
||||
else
|
||||
error("[src.name] in [get_area(src)]has errored. [src.network?"Empty network list":"Null network list"]")
|
||||
ASSERT(src.network)
|
||||
ASSERT(src.network.len > 0)
|
||||
..()
|
||||
|
||||
/obj/machinery/camera/initialize() //Lists dont work in the map editor so we have to translate a string into a list when the map initializes
|
||||
if(network_multi)
|
||||
network = text2list(network_multi,",")
|
||||
|
||||
/obj/machinery/camera/emp_act(severity)
|
||||
if(!isEmpProof())
|
||||
if(prob(100/severity))
|
||||
icon_state = "[initial(icon_state)]emp"
|
||||
for(var/i in network)
|
||||
network.Remove(i) //Not the best way but it will do. I think.
|
||||
var/list/previous_network = network
|
||||
network = list()
|
||||
cameranet.removeCamera(src)
|
||||
stat |= EMPED
|
||||
SetLuminosity(0)
|
||||
triggerCameraAlarm()
|
||||
spawn(900)
|
||||
network = initial(network)
|
||||
network = previous_network
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~EMPED
|
||||
cancelCameraAlarm()
|
||||
|
||||
@@ -326,6 +326,7 @@
|
||||
src.icon_state = "pod_0"
|
||||
src.eject_wait = 0 //If it's still set somehow.
|
||||
domutcheck(src.occupant) //Waiting until they're out before possible monkeyizing.
|
||||
src.occupant.add_side_effect("Bad Stomach") // Give them an extra side-effect for free.
|
||||
src.occupant = null
|
||||
return
|
||||
|
||||
|
||||
@@ -1042,4 +1042,4 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
SetLuminosity(0)
|
||||
return
|
||||
|
||||
#undef SPEED_MULTIPLIER
|
||||
#undef SPEED_MULTIPLIER
|
||||
|
||||
@@ -69,8 +69,6 @@
|
||||
/obj/machinery/iv_drip/process()
|
||||
set background = 1
|
||||
|
||||
..()
|
||||
|
||||
if(src.attached)
|
||||
if(!(get_dist(src, src.attached) <= 1))
|
||||
visible_message("The needle is ripped out of [src.attached], doesn't that hurt?")
|
||||
@@ -101,7 +99,12 @@
|
||||
var/mob/living/carbon/human/T = attached
|
||||
|
||||
if(!istype(T)) return
|
||||
var/datum/reagent/B = new /datum/reagent/blood
|
||||
var/datum/reagent/B
|
||||
for(var/datum/reagent/blood/Blood in beaker.reagents.reagent_list)
|
||||
if(Blood.data && Blood.data["blood_type"]==T.dna.b_type)
|
||||
B = Blood
|
||||
break
|
||||
if(!B) B = new /datum/reagent/blood
|
||||
if(!T.dna)
|
||||
return
|
||||
if(NOCLONE in T.mutations)
|
||||
@@ -112,7 +115,7 @@
|
||||
if(T.vessel.get_reagent_amount("blood") < amount)
|
||||
return
|
||||
B.holder = beaker
|
||||
B.volume = amount
|
||||
B.volume += amount
|
||||
//set reagent data
|
||||
B.data["donor"] = T
|
||||
|
||||
@@ -121,7 +124,10 @@
|
||||
|
||||
B.data["blood_DNA"] = copytext(T.dna.unique_enzymes,1,0)
|
||||
if(T.resistances && T.resistances.len)
|
||||
B.data["resistances"] = T.resistances.Copy()
|
||||
if(B.data["resistances"])
|
||||
B.data["resistances"] |= T.resistances.Copy()
|
||||
else
|
||||
B.data["resistances"] = T.resistances.Copy()
|
||||
|
||||
B.data["blood_type"] = copytext(T.dna.b_type,1,0)
|
||||
|
||||
@@ -130,14 +136,15 @@
|
||||
temp_chem += R.name
|
||||
temp_chem[R.name] = R.volume
|
||||
B.data["trace_chem"] = list2params(temp_chem)
|
||||
B.data["antibodies"] = T.antibodies
|
||||
B.data["antibodies"] |= T.antibodies
|
||||
|
||||
T.vessel.remove_reagent("blood",amount) // Removes blood if human
|
||||
|
||||
beaker.reagents.reagent_list += B
|
||||
beaker.reagents.reagent_list |= B
|
||||
beaker.reagents.update_total()
|
||||
beaker.on_reagent_change()
|
||||
beaker.reagents.handle_reactions()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/iv_drip/attack_hand(mob/user as mob)
|
||||
if(src.beaker)
|
||||
@@ -168,6 +175,11 @@
|
||||
..()
|
||||
if (!(usr in view(2)) && usr!=src.loc) return
|
||||
|
||||
if(mode == "take")
|
||||
usr << "The IV drip is taking blood."
|
||||
else if(mode == "give")
|
||||
usr << "The IV drip is injecting."
|
||||
|
||||
if(beaker)
|
||||
usr << "\blue Attached is \a [beaker] with:"
|
||||
if(beaker.reagents && beaker.reagents.reagent_list.len)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
var/backup_author =""
|
||||
var/is_admin_message = 0
|
||||
var/icon/img = null
|
||||
var/icon/backup_img
|
||||
|
||||
/datum/feed_channel
|
||||
var/channel_name=""
|
||||
@@ -28,6 +29,7 @@
|
||||
src.backup_body = ""
|
||||
src.backup_author = ""
|
||||
src.img = null
|
||||
src.backup_img = null
|
||||
|
||||
/datum/feed_channel/proc/clear()
|
||||
src.channel_name = ""
|
||||
@@ -481,7 +483,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
for(var/datum/feed_channel/F in news_network.network_channels)
|
||||
if( (!F.locked || F.author == scanned_user) && !F.censored)
|
||||
available_channels += F.channel_name
|
||||
src.channel_name = strip_html(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
|
||||
src.channel_name = strip_html_simple(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
|
||||
src.updateUsrDialog()
|
||||
|
||||
else if(href_list["set_new_message"])
|
||||
@@ -640,6 +642,11 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
if(MSG.is_admin_message)
|
||||
alert("This channel was created by a Nanotrasen Officer. You cannot censor it.","Ok")
|
||||
return
|
||||
if(MSG.img != null)
|
||||
MSG.backup_img = MSG.img
|
||||
MSG.img = null
|
||||
else
|
||||
MSG.img = MSG.backup_img
|
||||
if(MSG.body != "<B>\[REDACTED\]</B>")
|
||||
MSG.backup_body = MSG.body
|
||||
MSG.body = "<B>\[REDACTED\]</B>"
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
//var/emagged = 0 //Ignores if somebody doesn't have card access to that machine.
|
||||
var/seconds_electrified = 0 //Shock customers like an airlock.
|
||||
var/shoot_inventory = 0 //Fire items at customers! We're broken!
|
||||
var/shut_up = 0 //Stop spouting those godawful pitches!
|
||||
var/shut_up = 1 //Stop spouting those godawful pitches!
|
||||
var/extended_inventory = 0 //can we access the hidden inventory?
|
||||
var/panel_open = 0 //Hacking that vending machine. Gonna get a free candy bar.
|
||||
var/wires = 15
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
unacidable = 1 //and no deleting hoomans inside
|
||||
layer = MOB_LAYER //icon draw layer
|
||||
infra_luminosity = 15 //byond implementation is bugged.
|
||||
var/initial_icon = "" //Mech type for resetting icon.
|
||||
var/initial_icon = null //Mech type for resetting icon. Only used for reskinning kits (see custom items)
|
||||
var/can_move = 1
|
||||
var/mob/living/carbon/occupant = null
|
||||
var/step_in = 10 //make a step in step_in/10 sec.
|
||||
@@ -1655,7 +1655,10 @@
|
||||
return 0
|
||||
|
||||
/obj/mecha/proc/reset_icon()
|
||||
icon_state = initial_icon
|
||||
if (initial_icon)
|
||||
icon_state = initial_icon
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
return icon_state
|
||||
|
||||
//////////////////////////////////////////
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
obj/structure/sign/poster
|
||||
name = "poster"
|
||||
desc = "A large piece of space-resistant printed paper. It's considered contraband."
|
||||
desc = "A large piece of space-resistant printed paper. "
|
||||
icon = 'icons/obj/contraband.dmi'
|
||||
anchored = 1
|
||||
var/serial_number //Will hold the value of src.loc if nobody initialises it
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
/obj/effect/spider/eggcluster/process()
|
||||
amount_grown += rand(0,2)
|
||||
if(amount_grown >= 100)
|
||||
var/num = rand(3,12)
|
||||
var/num = rand(6,24)
|
||||
for(var/i=0, i<num, i++)
|
||||
new /obj/effect/spider/spiderling(src.loc)
|
||||
del(src)
|
||||
@@ -101,7 +101,9 @@
|
||||
New()
|
||||
pixel_x = rand(6,-6)
|
||||
pixel_y = rand(6,-6)
|
||||
processing_objects.Add(src)
|
||||
//50% chance to grow up
|
||||
if(prob(50))
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/effect/spider/spiderling/Bump(atom/user)
|
||||
if(istype(user, /obj/structure/table))
|
||||
@@ -111,7 +113,7 @@
|
||||
|
||||
/obj/effect/spider/spiderling/proc/die()
|
||||
visible_message("<span class='alert'>[src] dies!</span>")
|
||||
del(src)
|
||||
icon_state = "greenshatter"
|
||||
|
||||
/obj/effect/spider/spiderling/healthcheck()
|
||||
if(health <= 0)
|
||||
|
||||
@@ -226,6 +226,7 @@
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> Attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>"
|
||||
M.attack_log += "\[[time_stamp()]\]<font color='orange'> Attacked by [user.name] ([user.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>"
|
||||
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(src.damtype)])</font>" )
|
||||
msg_admin_attack("ATTACK: [user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") //BS12 EDIT ALG
|
||||
|
||||
//spawn(1800) // this wont work right
|
||||
// M.lastattacker = null
|
||||
|
||||
@@ -131,6 +131,12 @@ move an amendment</a> to the drawing.</p>
|
||||
A.power_environ = 0
|
||||
A.always_unpowered = 0
|
||||
move_turfs_to_area(turfs, A)
|
||||
|
||||
A.always_unpowered = 0
|
||||
for(var/turf/T in A.contents)
|
||||
T.lighting_changed = 1
|
||||
lighting_controller.changed_turfs += T
|
||||
|
||||
spawn(5)
|
||||
//ma = A.master ? "[A.master]" : "(null)"
|
||||
//world << "DEBUG: create_area(5): <br>A.name=[A.name]<br>A.tag=[A.tag]<br>A.master=[ma]"
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
user.visible_message( "\blue [user] salves wounds on [M]'s [affecting.display_name].", \
|
||||
"\blue You salve wounds on [M]'s [affecting.display_name]." )
|
||||
|
||||
H.add_side_effect("Cramps")
|
||||
H.UpdateDamageIcon()
|
||||
else
|
||||
M.heal_organ_damage((src.heal_brute/2), (src.heal_burn/2))
|
||||
|
||||
@@ -36,7 +36,10 @@
|
||||
*/
|
||||
|
||||
/obj/item/stack/tile/plasteel/proc/build(turf/S as turf)
|
||||
S.ChangeTurf(/turf/simulated/floor/plating)
|
||||
if (istype(S,/turf/space))
|
||||
S.ChangeTurf(/turf/simulated/floor/plating/airless)
|
||||
else
|
||||
S.ChangeTurf(/turf/simulated/floor/plating)
|
||||
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
|
||||
// W.make_plating()
|
||||
return
|
||||
@@ -106,6 +106,7 @@
|
||||
icon_state = "securitybelt"
|
||||
item_state = "security"//Could likely use a better one.
|
||||
storage_slots = 7
|
||||
max_w_class = 3
|
||||
can_hold = list(
|
||||
"/obj/item/weapon/grenade/flashbang",
|
||||
"/obj/item/weapon/reagent_containers/spray/pepper",
|
||||
|
||||
@@ -439,3 +439,24 @@
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "red_crowbar"
|
||||
item_state = "crowbar_red"
|
||||
|
||||
/obj/item/weapon/weldingtool/attack(mob/M as mob, mob/user as mob)
|
||||
if(hasorgans(M))
|
||||
var/datum/organ/external/S = M:organs_by_name[user.zone_sel.selecting]
|
||||
if (!S) return
|
||||
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
|
||||
return ..()
|
||||
if(S.brute_dam)
|
||||
S.heal_damage(15,0,0,1)
|
||||
if(user != M)
|
||||
user.visible_message("\red You patch some dents on \the [M]'s [S.display_name]",\
|
||||
"\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src]",\
|
||||
"You hear a welder.")
|
||||
else
|
||||
user.visible_message("\red You patch some dents on your [S.display_name]",\
|
||||
"\red \The [user] patches some dents on their [S.display_name] with \the [src]",\
|
||||
"You hear a welder.")
|
||||
else
|
||||
user << "Nothing to fix!"
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
manual_unbuckle(user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/MouseDrop(atom/over_object)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/MouseDrop_T(mob/M as mob, mob/user as mob)
|
||||
if(!istype(M)) return
|
||||
buckle_mob(M, user)
|
||||
@@ -151,4 +154,4 @@
|
||||
new/obj/item/roller(get_turf(src))
|
||||
spawn(0)
|
||||
del(src)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "stool"
|
||||
force = 10
|
||||
throwforce = 20
|
||||
throwforce = 10
|
||||
w_class = 5.0
|
||||
var/obj/structure/stool/origin = null
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
anchored = 1.0
|
||||
layer = 2.8
|
||||
throwpass = 1 //You can throw objects over this, despite it's density.")
|
||||
var/parts = /obj/item/weapon/table_parts
|
||||
|
||||
/obj/structure/table/New()
|
||||
..()
|
||||
@@ -38,6 +39,12 @@
|
||||
T.update_icon()
|
||||
..()
|
||||
|
||||
/obj/structure/table/proc/destroy()
|
||||
new parts(loc)
|
||||
density = 0
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/structure/table/update_icon()
|
||||
spawn(2) //So it properly updates when deleting
|
||||
var/dir_sum = 0
|
||||
@@ -219,65 +226,34 @@
|
||||
return
|
||||
if(3.0)
|
||||
if (prob(25))
|
||||
src.density = 0
|
||||
destroy()
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/blob_act()
|
||||
if(prob(75))
|
||||
if(istype(src, /obj/structure/table/woodentable))
|
||||
new /obj/item/weapon/table_parts/wood( src.loc )
|
||||
del(src)
|
||||
return
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
del(src)
|
||||
return
|
||||
destroy()
|
||||
|
||||
|
||||
/obj/structure/table/hand_p(mob/user as mob)
|
||||
return src.attack_paw(user)
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/table/attack_paw(mob/user)
|
||||
if(HULK in user.mutations)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
visible_message("<span class='danger'>[user] smashes the table apart!</span>")
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
new /obj/item/weapon/table_parts/reinforced(loc)
|
||||
else if(istype(src, /obj/structure/table/woodentable))
|
||||
new/obj/item/weapon/table_parts/wood(loc)
|
||||
else
|
||||
new /obj/item/weapon/table_parts(loc)
|
||||
density = 0
|
||||
del(src)
|
||||
visible_message("<span class='danger'>[user] smashes the [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
|
||||
/obj/structure/table/attack_alien(mob/user)
|
||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
new /obj/item/weapon/table_parts/reinforced(loc)
|
||||
else if(istype(src, /obj/structure/table/woodentable))
|
||||
new/obj/item/weapon/table_parts/wood(loc)
|
||||
else
|
||||
new /obj/item/weapon/table_parts(loc)
|
||||
density = 0
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/structure/table/attack_animal(mob/living/simple_animal/user)
|
||||
if(user.wall_smash)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
new /obj/item/weapon/table_parts/reinforced(loc)
|
||||
else if(istype(src, /obj/structure/table/woodentable))
|
||||
new/obj/item/weapon/table_parts/wood(loc)
|
||||
else
|
||||
new /obj/item/weapon/table_parts(loc)
|
||||
density = 0
|
||||
del(src)
|
||||
|
||||
destroy()
|
||||
|
||||
|
||||
|
||||
@@ -285,14 +261,7 @@
|
||||
if(HULK in user.mutations)
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
if(istype(src, /obj/structure/table/reinforced))
|
||||
new /obj/item/weapon/table_parts/reinforced(loc)
|
||||
else if(istype(src, /obj/structure/table/woodentable))
|
||||
new/obj/item/weapon/table_parts/wood(loc)
|
||||
else
|
||||
new /obj/item/weapon/table_parts(loc)
|
||||
density = 0
|
||||
del(src)
|
||||
destroy()
|
||||
|
||||
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
@@ -323,9 +292,9 @@
|
||||
var/mob/living/M = G.affecting
|
||||
if (G.state < 2)
|
||||
if(user.a_intent == "hurt")
|
||||
if (prob(5)) M.Weaken(3)
|
||||
M.apply_damage(10)
|
||||
visible_message("\red [G.assailant] slams [G.affecting] against \the [src]!")
|
||||
if (prob(15)) M.Weaken(5)
|
||||
M.apply_damage(8,def_zone = "head")
|
||||
visible_message("\red [G.assailant] slams [G.affecting]'s face against \the [src]!")
|
||||
playsound(src.loc, 'sound/weapons/tablehit1.ogg', 50, 1)
|
||||
else
|
||||
user << "\red You need a better grip to do that!"
|
||||
@@ -341,10 +310,7 @@
|
||||
user << "\blue Now disassembling table"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if(do_after(user,50))
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
//SN src = null
|
||||
del(src)
|
||||
destroy()
|
||||
return
|
||||
|
||||
if(isrobot(user))
|
||||
@@ -357,13 +323,10 @@
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 4))
|
||||
O.show_message("\blue The table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2)
|
||||
new /obj/item/weapon/table_parts( src.loc )
|
||||
del(src)
|
||||
return
|
||||
O.show_message("\blue The [src] was sliced apart by [user]!", 1, "\red You hear [src] coming apart.", 2)
|
||||
destroy()
|
||||
|
||||
user.drop_item(src)
|
||||
//if(W && W.loc) W.loc = src.loc // Unnecessary - see: mob/proc/drop_item(atom) - Doohl
|
||||
return
|
||||
|
||||
|
||||
@@ -374,46 +337,7 @@
|
||||
name = "wooden table"
|
||||
desc = "Do not apply fire to this. Rumour says it burns easily."
|
||||
icon_state = "wood_table"
|
||||
|
||||
|
||||
/obj/structure/table/woodentable/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(G.state<2)
|
||||
user << "\red You need a better grip to do that!"
|
||||
return
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
|
||||
del(W)
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
user << "\blue Now disassembling the wooden table"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
sleep(50)
|
||||
new /obj/item/weapon/table_parts/wood( src.loc )
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
del(src)
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 4))
|
||||
O.show_message("\blue The wooden table was sliced apart by [user]!", 1, "\red You hear wood coming apart.", 2)
|
||||
new /obj/item/weapon/table_parts/wood( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
user.drop_item(src)
|
||||
//if(W && W.loc) W.loc = src.loc
|
||||
return
|
||||
|
||||
parts = /obj/item/weapon/table_parts/wood
|
||||
|
||||
/*
|
||||
* Reinforced tables
|
||||
@@ -423,21 +347,10 @@
|
||||
desc = "A version of the four legged table. It is stronger."
|
||||
icon_state = "reinf_table"
|
||||
var/status = 2
|
||||
parts = /obj/item/weapon/table_parts/reinforced
|
||||
|
||||
|
||||
/obj/structure/table/reinforced/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
|
||||
if (istype(W, /obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = W
|
||||
if(G.state<2)
|
||||
user << "\red You need a better grip to do that!"
|
||||
return
|
||||
G.affecting.loc = src.loc
|
||||
G.affecting.Weaken(5)
|
||||
visible_message("\red [G.assailant] puts [G.affecting] on the table.")
|
||||
del(W)
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
@@ -456,40 +369,13 @@
|
||||
user << "\blue Table strengthened"
|
||||
src.status = 2
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
user.drop_item(src)
|
||||
//if(W && W.loc) W.loc = src.loc
|
||||
return
|
||||
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if(src.status == 1)
|
||||
user << "\blue Now disassembling the reinforced table"
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
if (do_after(user, 50))
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
del(src)
|
||||
if(src.status == 2)
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src.loc, "sparks", 50, 1)
|
||||
for(var/mob/O in viewers(user, 4))
|
||||
O.show_message("\blue The reinforced table was sliced apart by [user]!", 1, "\red You hear metal coming apart.", 2)
|
||||
new /obj/item/weapon/table_parts/reinforced( src.loc )
|
||||
del(src)
|
||||
return
|
||||
|
||||
user.drop_item(src)
|
||||
//if(W && W.loc) W.loc = src.loc
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/*
|
||||
* Racks
|
||||
@@ -591,4 +477,4 @@
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
new /obj/item/weapon/rack_parts(loc)
|
||||
density = 0
|
||||
del(src)
|
||||
del(src)
|
||||
|
||||
@@ -336,6 +336,8 @@
|
||||
if(M.loc != location) return //Person has moved away from the sink
|
||||
|
||||
M.clean_blood()
|
||||
if(ishuman(M))
|
||||
M:update_inv_gloves()
|
||||
for(var/mob/V in viewers(src, null))
|
||||
V.show_message("\blue [M] washes their hands using \the [src].")
|
||||
|
||||
|
||||
@@ -152,17 +152,18 @@
|
||||
del(W) //gotta delete it here because if window breaks, it won't get deleted
|
||||
switch (state)
|
||||
if(1)
|
||||
M.apply_damage(10)
|
||||
M.apply_damage(7)
|
||||
hit(10)
|
||||
visible_message("\red [user] slams [M] against \the [src]!")
|
||||
if(2)
|
||||
M.Weaken(2)
|
||||
M.apply_damage(15)
|
||||
if (prob(50))
|
||||
M.Weaken(1)
|
||||
M.apply_damage(10)
|
||||
hit(25)
|
||||
visible_message("\red <b>[user] bashes [M] against \the [src]!</b>")
|
||||
if(3)
|
||||
M.Weaken(10)
|
||||
M.apply_damage(25)
|
||||
M.Weaken(5)
|
||||
M.apply_damage(20)
|
||||
hit(50)
|
||||
visible_message("\red <big><b>[user] crushes [M] against \the [src]!</b></big>")
|
||||
return
|
||||
|
||||
@@ -56,7 +56,7 @@ var/list/mechtoys = list(
|
||||
|
||||
else if(istype(A, /mob/living)) // You Shall Not Pass!
|
||||
var/mob/living/M = A
|
||||
if(!M.lying && !istype(M, /mob/living/carbon/monkey) && !istype(M, /mob/living/carbon/slime)) //If your not laying down, or a small creature, no pass.
|
||||
if(!M.lying && !istype(M, /mob/living/carbon/monkey) && !istype(M, /mob/living/carbon/slime) && !istype(M, /mob/living/simple_animal/mouse)) //If your not laying down, or a small creature, no pass.
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
@@ -570,7 +570,7 @@ var/list/mechtoys = list(
|
||||
temp += "<b>Request from: [cur_supply_group]</b><BR><BR>"
|
||||
for(var/supply_name in supply_shuttle.supply_packs )
|
||||
var/datum/supply_packs/N = supply_shuttle.supply_packs[supply_name]
|
||||
if(N.hidden || N.contraband || N.group != cur_supply_group) continue //Have to send the type instead of a reference to
|
||||
if(N.hidden || (N.contraband && !can_order_contraband) || N.group != cur_supply_group) continue //Have to send the type instead of a reference to
|
||||
temp += "<A href='?src=\ref[src];doorder=[supply_name]'>[supply_name]</A> Cost: [N.cost]<BR>" //the obj because it would get caught by the garbage
|
||||
|
||||
/*temp = "Supply points: [supply_shuttle.points]<BR><HR><BR>Request what?<BR><BR>"
|
||||
|
||||
+36
-2
@@ -225,21 +225,40 @@
|
||||
if (istype(W,/turf/simulated/floor))
|
||||
W.RemoveLattice()
|
||||
|
||||
//if the old turf had a zone, connect the new turf to it as well - Cael
|
||||
if(src.zone)
|
||||
src.zone.RemoveTurf(src)
|
||||
W.zone = src.zone
|
||||
W.zone.AddTurf(W)
|
||||
|
||||
for(var/turf/simulated/T in orange(src,1))
|
||||
air_master.tiles_to_update.Add(T)
|
||||
|
||||
W.levelupdate()
|
||||
return W
|
||||
else
|
||||
/*if(istype(src, /turf/simulated) && src.zone)
|
||||
src.zone.rebuild = 1*/
|
||||
|
||||
var/turf/W = new N( locate(src.x, src.y, src.z) )
|
||||
W.lighting_lumcount += old_lumcount
|
||||
if(old_lumcount != W.lighting_lumcount)
|
||||
W.lighting_changed = 1
|
||||
lighting_controller.changed_turfs += W
|
||||
|
||||
if(src.zone)
|
||||
src.zone.RemoveTurf(src)
|
||||
W.zone = src.zone
|
||||
W.zone.AddTurf(W)
|
||||
|
||||
for(var/turf/simulated/T in orange(src,1))
|
||||
air_master.tiles_to_update.Add(T)
|
||||
|
||||
W.levelupdate()
|
||||
return W
|
||||
|
||||
//////Assimilate Air//////
|
||||
/turf/simulated/proc/Assimilate_Air()
|
||||
/*
|
||||
var/aoxy = 0//Holders to assimilate air from nearby turfs
|
||||
var/anitro = 0
|
||||
var/aco = 0
|
||||
@@ -266,7 +285,22 @@
|
||||
air.carbon_dioxide = (aco/max(turf_count,1))
|
||||
air.toxins = (atox/max(turf_count,1))
|
||||
air.temperature = (atemp/max(turf_count,1))//Trace gases can get bant
|
||||
*/
|
||||
air.update_values()
|
||||
|
||||
//cael - duplicate the averaged values across adjacent turfs to enforce a seamless atmos change
|
||||
for(var/direction in cardinal)//Only use cardinals to cut down on lag
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(istype(T,/turf/space))//Counted as no air
|
||||
continue
|
||||
else if(istype(T,/turf/simulated/floor))
|
||||
var/turf/simulated/S = T
|
||||
if(S.air)//Add the air's contents to the holders
|
||||
S.air.oxygen = air.oxygen
|
||||
S.air.nitrogen = air.nitrogen
|
||||
S.air.carbon_dioxide = air.carbon_dioxide
|
||||
S.air.toxins = air.toxins
|
||||
S.air.temperature = air.temperature
|
||||
S.air.update_values()
|
||||
|
||||
/turf/proc/ReplaceWithLattice()
|
||||
src.ChangeTurf(/turf/space)
|
||||
|
||||
+25
-4
@@ -1,3 +1,6 @@
|
||||
|
||||
var/global/normal_ooc_colour = "#002eb8"
|
||||
|
||||
/client/verb/ooc(msg as text)
|
||||
set name = "OOC" //Gave this shit a shorter name so you only have to time out "ooc" rather than "ooc message" to use it --NeoFite
|
||||
set category = "OOC"
|
||||
@@ -40,19 +43,37 @@
|
||||
|
||||
for(var/client/C in clients)
|
||||
if(C.prefs.toggles & CHAT_OOC)
|
||||
var/display_name = src.key
|
||||
var/display_colour = normal_ooc_colour
|
||||
|
||||
if(holder)
|
||||
if(holder.fakekey)
|
||||
if(C.holder)
|
||||
display_name = "[holder.fakekey]/([src.key])"
|
||||
else
|
||||
display_name = holder.fakekey
|
||||
else if(config.allow_admin_ooccolor)
|
||||
display_colour = src.prefs.ooccolor
|
||||
else
|
||||
display_colour = "#b82e00"
|
||||
|
||||
C << "<font color='[display_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
|
||||
/*
|
||||
if(holder)
|
||||
if(!holder.fakekey || C.holder)
|
||||
if(holder.rights & R_ADMIN)
|
||||
C << "<font color=[config.allow_admin_ooccolor ? C.prefs.ooccolor :"#b82e00" ]><b><span class='prefix'>OOC:</span> <EM>[key][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></b></font>"
|
||||
//todo: other adminranks OOC
|
||||
C << "<font color=[config.allow_admin_ooccolor ? src.prefs.ooccolor :"#b82e00" ]><b><span class='prefix'>OOC:</span> <EM>[key][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></b></font>"
|
||||
else if(holder.rights & R_MOD)
|
||||
C << "<font color=#184880><b><span class='prefix'>OOC:</span> <EM>[key][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></b></font>"
|
||||
C << "<font color=#184880><b><span class='prefix'>OOC:</span> <EM>[src.key][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></b></font>"
|
||||
else
|
||||
C << "<font color='[normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[src.key]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
|
||||
else
|
||||
C << "<font color='[normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[holder.fakekey ? holder.fakekey : src.key]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
else
|
||||
C << "<font color='[normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[src.key]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
var/global/normal_ooc_colour = "#002eb8"
|
||||
*/
|
||||
|
||||
/client/proc/set_ooc(newColor as color)
|
||||
set name = "Set Player OOC Colour"
|
||||
|
||||
+56
-15
@@ -47,26 +47,67 @@
|
||||
set name = "Adminwho"
|
||||
|
||||
var/msg = "<b>Current Admins:</b>\n"
|
||||
var/num_mods_online = 0
|
||||
if(holder)
|
||||
for(var/client/C in admins)
|
||||
msg += "\t[C] is a [C.holder.rank]"
|
||||
if(C.holder.rank != "Moderator")
|
||||
msg += "\t[C] is a [C.holder.rank]"
|
||||
|
||||
if(C.holder.fakekey)
|
||||
msg += " <i>(as [C.holder.fakekey])</i>"
|
||||
if(C.holder.fakekey)
|
||||
msg += " <i>(as [C.holder.fakekey])</i>"
|
||||
|
||||
if(isobserver(C.mob))
|
||||
msg += " - Observing"
|
||||
else if(istype(C.mob,/mob/new_player))
|
||||
msg += " - Lobby"
|
||||
if(isobserver(C.mob))
|
||||
msg += " - Observing"
|
||||
else if(istype(C.mob,/mob/new_player))
|
||||
msg += " - Lobby"
|
||||
else
|
||||
msg += " - Playing"
|
||||
|
||||
if(C.is_afk())
|
||||
msg += " (AFK)"
|
||||
msg += "\n"
|
||||
else
|
||||
msg += " - Playing"
|
||||
|
||||
if(C.is_afk())
|
||||
msg += " (AFK)"
|
||||
msg += "\n"
|
||||
num_mods_online++
|
||||
else
|
||||
for(var/client/C in admins)
|
||||
if(!C.holder.fakekey)
|
||||
msg += "\t[C] is a [C.holder.rank]\n"
|
||||
if(C.holder.rank != "Moderator")
|
||||
if(!C.holder.fakekey)
|
||||
msg += "\t[C] is a [C.holder.rank]\n"
|
||||
else
|
||||
num_mods_online++
|
||||
|
||||
src << msg
|
||||
msg += "<b>There are [num_mods_online] moderators online</b>\n"
|
||||
src << msg
|
||||
|
||||
/client/verb/modwho()
|
||||
set category = "Admin"
|
||||
set name = "Modwho"
|
||||
|
||||
var/msg = "<b>Current Moderators:</b>\n"
|
||||
var/num_admins_online = 0
|
||||
if(holder)
|
||||
for(var/client/C in admins)
|
||||
if(C.holder.rank == "Moderator")
|
||||
msg += "\t[C] is a [C.holder.rank]"
|
||||
|
||||
if(isobserver(C.mob))
|
||||
msg += " - Observing"
|
||||
else if(istype(C.mob,/mob/new_player))
|
||||
msg += " - Lobby"
|
||||
else
|
||||
msg += " - Playing"
|
||||
|
||||
if(C.is_afk())
|
||||
msg += " (AFK)"
|
||||
msg += "\n"
|
||||
else
|
||||
num_admins_online++
|
||||
else
|
||||
for(var/client/C in admins)
|
||||
if(C.holder.rank == "Moderator")
|
||||
msg += "\t[C] is a [C.holder.rank]\n"
|
||||
else
|
||||
num_admins_online++
|
||||
|
||||
msg += "<b>There are [num_admins_online] admins online</b>\n"
|
||||
src << msg
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ var/secret_force_mode = "secret" // if this is anything but "secret", the secret
|
||||
|
||||
var/datum/engine_eject/engine_eject_control = null
|
||||
var/host = null
|
||||
var/aliens_allowed = 1
|
||||
var/aliens_allowed = 0
|
||||
var/ooc_allowed = 1
|
||||
var/dooc_allowed = 1
|
||||
var/traitor_scaling = 1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/mob
|
||||
|
||||
var/bloody_hands = 0
|
||||
@@ -11,15 +10,13 @@
|
||||
var/transfer_blood = 0
|
||||
var/mob/living/carbon/human/bloody_hands_mob
|
||||
|
||||
|
||||
|
||||
/proc/blood_incompatible(donor,receiver)
|
||||
|
||||
var/donor_antigen = copytext(donor,1,lentext(donor))
|
||||
var/receiver_antigen = copytext(receiver,1,lentext(receiver))
|
||||
var/donor_rh = findtext("+",donor)
|
||||
var/receiver_rh = findtext("+",receiver)
|
||||
|
||||
proc/blood_incompatible(donor,receiver)
|
||||
if(!donor || !receiver) return 0
|
||||
var
|
||||
donor_antigen = copytext(donor,1,lentext(donor))
|
||||
receiver_antigen = copytext(receiver,1,lentext(receiver))
|
||||
donor_rh = (findtext(donor,"+")>0)
|
||||
receiver_rh = (findtext(receiver,"+")>0)
|
||||
if(donor_rh && !receiver_rh) return 1
|
||||
switch(receiver_antigen)
|
||||
if("A")
|
||||
|
||||
@@ -7,18 +7,19 @@ var/global/floorIsLava = 0
|
||||
/proc/message_admins(var/msg)
|
||||
msg = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[msg]</span></span>"
|
||||
log_adminwarn(msg)
|
||||
admins << msg
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
C << msg
|
||||
|
||||
/*
|
||||
/proc/msg_admin_attack(var/text) //Toggleable Attack Messages
|
||||
var/rendered = "<span class=\"admin\"><span class=\"prefix\">ADMIN LOG:</span> <span class=\"message\">[text]</span></span>"
|
||||
log_adminwarn(rendered)
|
||||
for(var/client/C in admins)
|
||||
if (C.holder.level >= 1)
|
||||
if(!C.STFU_atklog)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
if(C.prefs.toggles & CHAT_ATTACKLOGS)
|
||||
var/msg = rendered
|
||||
C << msg
|
||||
*/
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////Panels
|
||||
|
||||
@@ -756,10 +757,15 @@ var/global/floorIsLava = 0
|
||||
|
||||
/datum/admins/proc/delay()
|
||||
set category = "Server"
|
||||
set desc="Delay the game start"
|
||||
set desc="Delay the game start/end"
|
||||
set name="Delay"
|
||||
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if (!ticker || ticker.current_state != GAME_STATE_PREGAME)
|
||||
return alert("Too late... The game has already started!", null, null, null, null, null)
|
||||
ticker.delay_end = !ticker.delay_end
|
||||
log_admin("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].")
|
||||
message_admins("\blue [key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1)
|
||||
return //alert("Round end delayed", null, null, null, null, null)
|
||||
going = !( going )
|
||||
if (!( going ))
|
||||
world << "<b>The game start has been delayed.</b>"
|
||||
@@ -1084,4 +1090,4 @@ proc/move_alien_ship()
|
||||
alien_ship_location = 0
|
||||
else
|
||||
alien_ship_location = 1
|
||||
return
|
||||
return
|
||||
|
||||
@@ -7,6 +7,7 @@ var/list/admin_verbs_default = list(
|
||||
/client/proc/hide_most_verbs, /*hides all our hideable adminverbs*/
|
||||
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game. +VAREDIT needed to modify*/
|
||||
/client/proc/check_antagonists, /*shows all antags*/
|
||||
/client/proc/deadchat /*toggles deadchat on/off*/
|
||||
)
|
||||
var/list/admin_verbs_admin = list(
|
||||
/client/proc/player_panel, /*shows an interface for all players, with links to various panels (old style)*/
|
||||
@@ -46,7 +47,6 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/check_words, /*displays cult-words*/
|
||||
/client/proc/check_ai_laws, /*shows AI and borg laws*/
|
||||
/client/proc/admin_memo, /*admin memo system. show/delete/write. +SERVER needed to delete admin memos of others*/
|
||||
/client/proc/deadchat, /*toggles deadchat on/off*/
|
||||
/client/proc/dsay, /*talk in deadchat using our ckey/fakekey*/
|
||||
/client/proc/toggleprayers, /*toggles prayers on/off*/
|
||||
// /client/proc/toggle_hear_deadcast, /*toggles whether we hear deadchat*/
|
||||
@@ -57,13 +57,20 @@ var/list/admin_verbs_admin = list(
|
||||
/datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/
|
||||
/client/proc/game_panel, /*game panel, allows to change game-mode etc*/
|
||||
/client/proc/cmd_admin_say, /*admin-only ooc chat*/
|
||||
/client/proc/free_slot /*frees slot for chosen job*/
|
||||
/datum/admins/proc/PlayerNotes,
|
||||
/client/proc/cmd_mod_say,
|
||||
/datum/admins/proc/show_player_info,
|
||||
/client/proc/free_slot, /*frees slot for chosen job*/
|
||||
/client/proc/cmd_admin_change_custom_event,
|
||||
/client/proc/cmd_admin_rejuvenate,
|
||||
/client/proc/toggleattacklogs,
|
||||
/datum/admins/proc/show_skills
|
||||
)
|
||||
var/list/admin_verbs_ban = list(
|
||||
/client/proc/unban_panel,
|
||||
/client/proc/jobbans,
|
||||
/client/proc/unjobban_panel,
|
||||
/client/proc/DB_ban_panel
|
||||
// /client/proc/DB_ban_panel
|
||||
)
|
||||
var/list/admin_verbs_sounds = list(
|
||||
/client/proc/play_local_sound,
|
||||
@@ -83,7 +90,8 @@ var/list/admin_verbs_fun = list(
|
||||
/client/proc/cmd_admin_add_random_ai_law,
|
||||
/client/proc/make_sound,
|
||||
/client/proc/toggle_random_events,
|
||||
/client/proc/set_ooc
|
||||
/client/proc/set_ooc,
|
||||
/client/proc/editappear
|
||||
)
|
||||
var/list/admin_verbs_spawn = list(
|
||||
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
|
||||
@@ -212,11 +220,12 @@ var/list/admin_verbs_mod = list(
|
||||
/client/proc/cmd_admin_pm_context, /*right-click adminPM interface*/
|
||||
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
|
||||
/client/proc/debug_variables, /*allows us to -see- the variables of any instance in the game.*/
|
||||
/client/proc/playernotes,
|
||||
/datum/admins/proc/PlayerNotes,
|
||||
/client/proc/admin_ghost, /*allows us to ghost/reenter body at will*/
|
||||
/client/proc/mod_panel,
|
||||
/client/proc/cmd_mod_say,
|
||||
/datum/admins/proc/show_player_info
|
||||
/datum/admins/proc/show_player_info,
|
||||
/client/proc/player_panel_new,
|
||||
/datum/admins/proc/show_skills
|
||||
)
|
||||
/client/proc/add_admin_verbs()
|
||||
if(holder)
|
||||
@@ -618,7 +627,7 @@ var/list/admin_verbs_mod = list(
|
||||
/client/proc/mod_panel()
|
||||
set name = "Moderator Panel"
|
||||
set category = "Admin"
|
||||
/*if(holder)
|
||||
/* if(holder)
|
||||
holder.mod_panel()*/
|
||||
// feedback_add_details("admin_verb","MP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
@@ -627,12 +636,9 @@ var/list/admin_verbs_mod = list(
|
||||
set name = "Edit Appearance"
|
||||
set category = "Fun"
|
||||
|
||||
usr << "\red This proc has been temporarily disabled."
|
||||
return
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
//some random errors here, cbb fixing them right now
|
||||
//todo
|
||||
/*if(!istype(M, /mob/living/carbon/human))
|
||||
if(!istype(M, /mob/living/carbon/human))
|
||||
usr << "\red You can only do this to humans!"
|
||||
return
|
||||
switch(alert("Are you sure you wish to edit this mob's appearance? Skrell, Soghun and Tajaran can result in unintended consequences.",,"Yes","No"))
|
||||
@@ -663,49 +669,14 @@ var/list/admin_verbs_mod = list(
|
||||
M.s_tone = -M.s_tone + 35
|
||||
|
||||
// hair
|
||||
var/list/all_hairs = typesof(/datum/sprite_accessory/hair) - /datum/sprite_accessory/hair
|
||||
var/list/hairs = list()
|
||||
|
||||
// loop through potential hairs
|
||||
for(var/x in all_hairs)
|
||||
var/datum/sprite_accessory/hair/H = new x // create new hair datum based on type x
|
||||
hairs.Add(H.name) // add hair name to hairs
|
||||
del(H) // delete the hair after it's all done
|
||||
|
||||
var/new_style = input("Please select hair style", "Character Generation") as null|anything in hairs
|
||||
|
||||
// if new style selected (not cancel)
|
||||
if (new_style)
|
||||
M.h_style = new_style
|
||||
|
||||
for(var/x in all_hairs) // loop through all_hairs again. Might be slightly CPU expensive, but not significantly.
|
||||
var/datum/sprite_accessory/hair/H = new x // create new hair datum
|
||||
if(H.name == new_style)
|
||||
M.hair_style = H // assign the hair_style variable a new hair datum
|
||||
break
|
||||
else
|
||||
del(H) // if hair H not used, delete. BYOND can garbage collect, but better safe than sorry
|
||||
var/new_hstyle = input(usr, "Select a hair style", "Grooming") as null|anything in hair_styles_list
|
||||
if(new_hstyle)
|
||||
M.h_style = new_hstyle
|
||||
|
||||
// facial hair
|
||||
var/list/all_fhairs = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair
|
||||
var/list/fhairs = list()
|
||||
|
||||
for(var/x in all_fhairs)
|
||||
var/datum/sprite_accessory/facial_hair/H = new x
|
||||
fhairs.Add(H.name)
|
||||
del(H)
|
||||
|
||||
new_style = input("Please select facial style", "Character Generation") as null|anything in fhairs
|
||||
|
||||
if(new_style)
|
||||
M.f_style = new_style
|
||||
for(var/x in all_fhairs)
|
||||
var/datum/sprite_accessory/facial_hair/H = new x
|
||||
if(H.name == new_style)
|
||||
M.facial_hair_style = H
|
||||
break
|
||||
else
|
||||
del(H)
|
||||
var/new_fstyle = input(usr, "Select a facial hair style", "Grooming") as null|anything in facial_hair_styles_list
|
||||
if(new_fstyle)
|
||||
M.f_style = new_fstyle
|
||||
|
||||
var/new_gender = alert(usr, "Please select gender.", "Character Generation", "Male", "Female")
|
||||
if (new_gender)
|
||||
@@ -713,10 +684,10 @@ var/list/admin_verbs_mod = list(
|
||||
M.gender = MALE
|
||||
else
|
||||
M.gender = FEMALE
|
||||
M.rebuild_appearance()
|
||||
M.update_hair()
|
||||
M.update_body()
|
||||
M.check_dna(M)
|
||||
*/
|
||||
|
||||
/client/proc/playernotes()
|
||||
set name = "Show Player Info"
|
||||
set category = "Admin"
|
||||
@@ -738,4 +709,14 @@ var/list/admin_verbs_mod = list(
|
||||
var/job = input("Please select job slot to free", "Free job slot") as null|anything in jobs
|
||||
if (job)
|
||||
job_master.FreeRole(job)
|
||||
return
|
||||
return
|
||||
|
||||
/client/proc/toggleattacklogs()
|
||||
set name = "Toggle Attack Log Messages"
|
||||
set category = "Preferences"
|
||||
|
||||
prefs.toggles ^= CHAT_ATTACKLOGS
|
||||
if (prefs.toggles & CHAT_ATTACKLOGS)
|
||||
usr << "You now will get attack log messages"
|
||||
else
|
||||
usr << "You now won't get attack log messages"
|
||||
@@ -83,7 +83,7 @@
|
||||
body += "<a href='?src=\ref[src];subtlemessage="+ref+"'>SM</a> - "
|
||||
body += "<a href='?src=\ref[src];adminplayerobservejump="+ref+"'>JMP</a><br>"
|
||||
if(antagonist > 0)
|
||||
body += "<font size='2'><a href='?src=\ref[src];secretsadmin=check_antagonist'><font color='red'><b>Antagonist</b></font></a></font>";
|
||||
body += "<font size='2'><a href='?src=\ref[src];check_antagonist=1'><font color='red'><b>Antagonist</b></font></a></font>";
|
||||
|
||||
body += "</td></tr></table>";
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
<tr id='title_tr'>
|
||||
<td align='center'>
|
||||
<font size='5'><b>Player panel</b></font><br>
|
||||
Hover over a line to see more information - <a href='?src=\ref[src];secretsadmin=check_antagonist'>Check antagonists</a>
|
||||
Hover over a line to see more information - <a href='?src=\ref[src];check_antagonist=1'>Check antagonists</a>
|
||||
<p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
+10
-77
@@ -2,8 +2,8 @@
|
||||
..()
|
||||
|
||||
if(usr.client != src.owner || !check_rights(0))
|
||||
world << "\blue [usr.key] has attempted to override the admin panel!"
|
||||
log_admin("[key_name(usr)] tried to use the admin panel without authorization.")
|
||||
message_admins("[usr.key] has attempted to override the admin panel!")
|
||||
return
|
||||
|
||||
if(href_list["makeAntag"])
|
||||
@@ -1254,7 +1254,7 @@
|
||||
show_player_panel(M)
|
||||
|
||||
else if(href_list["adminplayerobservejump"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN)) return
|
||||
|
||||
var/mob/M = locate(href_list["adminplayerobservejump"])
|
||||
|
||||
@@ -1263,6 +1263,9 @@
|
||||
sleep(2)
|
||||
C.jumptomob(M)
|
||||
|
||||
else if(href_list["check_antagonist"])
|
||||
check_antagonists()
|
||||
|
||||
else if(href_list["adminplayerobservecoodjump"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
@@ -1460,7 +1463,7 @@
|
||||
usr.client.cmd_admin_subtle_message(M)
|
||||
|
||||
else if(href_list["traitor"])
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
if(!check_rights(R_ADMIN|R_MOD)) return
|
||||
|
||||
if(!ticker || !ticker.mode)
|
||||
alert("The game hasn't started yet!")
|
||||
@@ -1921,76 +1924,6 @@
|
||||
spawn(0)
|
||||
sleep(rand(30,400))
|
||||
Wall.ex_act(rand(2,1)) */
|
||||
if("wave")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","MW")
|
||||
new /datum/event/meteor_wave
|
||||
|
||||
if("gravanomalies")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","GA")
|
||||
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
|
||||
world << sound('sound/AI/granomalies.ogg')
|
||||
var/turf/T = pick(blobstart)
|
||||
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
|
||||
spawn(rand(100, 600))
|
||||
del(bh)
|
||||
|
||||
if("timeanomalies") //dear god this code was awful :P Still needs further optimisation
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","STA")
|
||||
//moved to its own dm so I could split it up and prevent the spawns copying variables over and over
|
||||
//can be found in code\game\game_modes\events\wormholes.dm
|
||||
wormhole_event()
|
||||
|
||||
if("goblob")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","BL")
|
||||
mini_blob_event()
|
||||
message_admins("[key_name_admin(usr)] has spawned blob", 1)
|
||||
if("aliens")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","AL")
|
||||
if(aliens_allowed)
|
||||
new /datum/event/alien_infestation
|
||||
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
|
||||
if("alien_silent") //replaces the spawn_xeno verb
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","ALS")
|
||||
if(aliens_allowed)
|
||||
create_xeno()
|
||||
if("spiders")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SL")
|
||||
new /datum/event/spider_infestation
|
||||
message_admins("[key_name_admin(usr)] has spawned spiders", 1)
|
||||
if("comms_blackout")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","CB")
|
||||
var/answer = alert(usr, "Would you like to alert the crew?", "Alert", "Yes", "No")
|
||||
if(answer == "Yes")
|
||||
communications_blackout(0)
|
||||
else
|
||||
communications_blackout(1)
|
||||
message_admins("[key_name_admin(usr)] triggered a communications blackout.", 1)
|
||||
if("spaceninja")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","SN")
|
||||
if(toggle_space_ninja)
|
||||
if(space_ninja_arrival())//If the ninja is actually spawned. They may not be depending on a few factors.
|
||||
message_admins("[key_name_admin(usr)] has sent in a space ninja", 1)
|
||||
if("carp")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","C")
|
||||
var/choice = input("You sure you want to spawn carp?") in list("Badmin", "Cancel")
|
||||
if(choice == "Badmin")
|
||||
message_admins("[key_name_admin(usr)] has spawned carp.", 1)
|
||||
new /datum/event/carp_migration
|
||||
if("radiation")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","R")
|
||||
message_admins("[key_name_admin(usr)] has has irradiated the station", 1)
|
||||
new /datum/event/radiation_storm
|
||||
if("immovable")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","IR")
|
||||
@@ -2153,7 +2086,7 @@
|
||||
if("spacevines")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","K")
|
||||
new /datum/event/spacevine
|
||||
//new /datum/event/spacevine
|
||||
message_admins("[key_name_admin(usr)] has spawned spacevines", 1)
|
||||
if("onlyone")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
@@ -2197,8 +2130,6 @@
|
||||
if(!job) continue
|
||||
dat += "job: [job.title], current_positions: [job.current_positions], total_positions: [job.total_positions] <BR>"
|
||||
usr << browse(dat, "window=jobdebug;size=600x500")
|
||||
if("check_antagonist")
|
||||
check_antagonists()
|
||||
if("showailaws")
|
||||
output_ai_laws()
|
||||
if("showgm")
|
||||
@@ -2215,6 +2146,8 @@
|
||||
dat += text("<tr><td>[]</td><td>[]</td></tr>", H.name, H.get_assignment())
|
||||
dat += "</table>"
|
||||
usr << browse(dat, "window=manifest;size=440x410")
|
||||
if("check_antagonist")
|
||||
check_antagonists()
|
||||
if("DNA")
|
||||
var/dat = "<B>Showing DNA from blood.</B><HR>"
|
||||
dat += "<table cellspacing=5><tr><th>Name</th><th>DNA</th><th>Blood Type</th></tr>"
|
||||
@@ -2512,4 +2445,4 @@
|
||||
switch(href_list["notes"])
|
||||
if("show")
|
||||
show_player_info(ckey)
|
||||
return
|
||||
return
|
||||
|
||||
@@ -87,16 +87,17 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
|
||||
if(!mob) return //this doesn't happen
|
||||
|
||||
var/ref_mob = "\ref[mob]"
|
||||
msg = "\blue <b><font color=red>HELP: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?_src_=holder;secretsadmin=check_antagonist'>CA</A>) [ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
|
||||
msg = "\blue <b><font color=red>HELP: </font>[key_name(src, 1)] (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservejump=[ref_mob]'>JMP</A>) (<A HREF='?_src_=holder;check_antagonist=1'>CA</A>) [ai_found ? " (<A HREF='?_src_=holder;adminchecklaws=[ref_mob]'>CL</A>)" : ""]:</b> [msg]"
|
||||
|
||||
//send this msg to all admins
|
||||
var/admin_number_afk = 0
|
||||
for(var/client/X in admins)
|
||||
if(X.is_afk())
|
||||
admin_number_afk++
|
||||
if(X.prefs.toggles & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
X << msg
|
||||
if((R_ADMIN|R_MOD) & X.holder.rights)
|
||||
if(X.is_afk())
|
||||
admin_number_afk++
|
||||
if(X.prefs.toggles & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
X << msg
|
||||
|
||||
//show it to the person adminhelping too
|
||||
src << "<font color='blue'>PM to-<b>Admins</b>: [original_msg]</font>"
|
||||
|
||||
@@ -37,14 +37,22 @@
|
||||
//Fetching a message if needed. src is the sender and C is the target client
|
||||
/client/proc/cmd_admin_pm(var/client/C, var/msg)
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
src << "<font color='red'>Error: Admin-PM: You are unable to use admin PM-s (muted).</font>"
|
||||
src << "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>"
|
||||
return
|
||||
|
||||
if(!istype(C,/client))
|
||||
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
|
||||
if(holder) src << "<font color='red'>Error: Private-Message: Client not found.</font>"
|
||||
else adminhelp(msg) //admin we are replying to left. adminhelp instead
|
||||
return
|
||||
|
||||
/*if(C && C.last_pm_recieved + config.simultaneous_pm_warning_timeout > world.time && holder)
|
||||
//send a warning to admins, but have a delay popup for mods
|
||||
if(holder.rights & R_ADMIN)
|
||||
src << "\red <b>Simultaneous PMs warning:</b> that player has been PM'd in the last [config.simultaneous_pm_warning_timeout / 10] seconds by: [C.ckey_last_pm]"
|
||||
else
|
||||
if(alert("That player has been PM'd in the last [config.simultaneous_pm_warning_timeout / 10] seconds by: [C.ckey_last_pm]","Simultaneous PMs warning","Continue","Cancel") == "Cancel")
|
||||
return*/
|
||||
|
||||
//get message text, limit it's length.and clean/escape html
|
||||
if(!msg)
|
||||
msg = input(src,"Message:", "Private message to [C.key]") as text|null
|
||||
@@ -63,6 +71,57 @@
|
||||
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
|
||||
if(!msg) return
|
||||
|
||||
var/recieve_color = "purple"
|
||||
var/send_pm_type = ""
|
||||
var/recieve_pm_type = "Player"
|
||||
//usr.client.holder.rights
|
||||
|
||||
if(holder)
|
||||
//mod PMs are maroon
|
||||
//PMs sent from admins and mods display their rank
|
||||
if(holder)
|
||||
if( holder.rights & R_MOD )
|
||||
recieve_color = "maroon"
|
||||
else
|
||||
recieve_color = "red"
|
||||
send_pm_type = holder.rank
|
||||
recieve_pm_type = holder.rank
|
||||
|
||||
else if(!C.holder)
|
||||
src << "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>"
|
||||
return
|
||||
|
||||
var/recieve_message = "<font color='[recieve_color]'>[recieve_pm_type] PM from-<b>[key_name(src, C, 1)]</b>: [msg]</font>"
|
||||
|
||||
if(holder && !C.holder)
|
||||
recieve_message = "<font color='[recieve_color]' size='4'><b>-- Administrator private message --</b></font>\n" + recieve_message
|
||||
|
||||
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
|
||||
if(config.popup_admin_pm)
|
||||
spawn(0) //so we don't hold the caller proc up
|
||||
var/sender = src
|
||||
var/sendername = key
|
||||
var/reply = input(C, msg,"Admin PM from-[sendername]", "") as text|null //show message and await a reply
|
||||
if(C && reply)
|
||||
if(sender)
|
||||
C.cmd_admin_pm(sender,reply) //sender is still about, let's reply to them
|
||||
else
|
||||
adminhelp(reply) //sender has left, adminhelp instead
|
||||
return
|
||||
|
||||
C << recieve_message
|
||||
src << "<font color='blue'>[send_pm_type] PM to-<b>[key_name(C, src, 1)]</b>: [msg]</font>"
|
||||
|
||||
/*if(holder && !C.holder)
|
||||
C.last_pm_recieved = world.time
|
||||
C.ckey_last_pm = ckey*/
|
||||
|
||||
//play the recieving admin the adminhelp sound (if they have them enabled)
|
||||
//non-admins shouldn't be able to disable this
|
||||
if(C.prefs.toggles & SOUND_ADMINHELP)
|
||||
C << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
/*
|
||||
if(C.holder)
|
||||
if(holder) //both are admins
|
||||
if(holder.rank == "Moderator") //If moderator
|
||||
@@ -111,11 +170,13 @@
|
||||
else //neither are admins
|
||||
src << "<font color='red'>Error: Admin-PM: Non-admin to non-admin PM communication is forbidden.</font>"
|
||||
return
|
||||
*/
|
||||
|
||||
log_admin("PM: [key_name(src)]->[key_name(C)]: [msg]")
|
||||
|
||||
//we don't use message_admins here because the sender/receiver might get it too
|
||||
for(var/client/X in admins)
|
||||
if(X.key!=key && X.key!=C.key) //check client/X is an admin and isn't the sender or recipient
|
||||
//check client/X is an admin and isn't the sender or recipient
|
||||
//only admins can see PMs
|
||||
if(X.key!=key && X.key!=C.key && (X.holder.rights & R_ADMIN) || (X.holder.rights & R_MOD) )
|
||||
X << "<B><font color='blue'>PM: [key_name(src, X, 0)]->[key_name(C, X, 0)]:</B> \blue [msg]</font>" //inform X
|
||||
|
||||
|
||||
@@ -11,10 +11,9 @@
|
||||
|
||||
if(check_rights(R_ADMIN,0))
|
||||
msg = "<span class='admin'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]</EM> (<a href='?_src_=holder;adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||
admins << msg
|
||||
else
|
||||
msg = "<span class='adminobserver'><span class='prefix'>ADMIN:</span> <EM>[key_name(usr, 1)]:</EM> <span class='message'>[msg]</span></span>"
|
||||
admins << msg
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights)
|
||||
C << msg
|
||||
|
||||
feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -23,28 +22,16 @@
|
||||
set name = "Msay"
|
||||
set hidden = 1
|
||||
|
||||
if (!src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
|
||||
//todo: what? why does this not compile
|
||||
/*if (src.muted || src.muted_complete)
|
||||
src << "You are muted."
|
||||
return*/
|
||||
if(!check_rights(R_ADMIN|R_MOD)) return
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
log_admin("MOD: [key_name(src)] : [msg]")
|
||||
|
||||
|
||||
if (!msg)
|
||||
return
|
||||
//feedback_add_details("admin_verb","M") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
for (var/mob/M in world)
|
||||
if (M.client && M.client.holder)
|
||||
if (src.holder.rank == "Admin Observer")
|
||||
M << "<span class='adminobserver'><span class='prefix'>MOD:</span> <EM>[key_name(usr, M)]:</EM> <span class='message'>[msg]</span></span>"
|
||||
else if (src.holder.rank == "Moderator")
|
||||
M << "<span class='mod'><span class='prefix'>MOD:</span> <EM>[key_name(usr, M)]</EM> (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||
else
|
||||
M << "<span class='adminmod'><span class='prefix'>MOD:</span> <EM>[key_name(usr, M)]</EM> (<A HREF='?src=\ref[M.client.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||
var/color = "mod"
|
||||
if (check_rights(R_ADMIN,0))
|
||||
color = "adminmod"
|
||||
for(var/client/C in admins)
|
||||
if((R_ADMIN|R_MOD) & C.holder.rights)
|
||||
C << "<span class='[color]'><span class='prefix'>MOD:</span> <EM>[key_name(src,1)]</EM> (<A HREF='?src=\ref[C.holder];adminplayerobservejump=\ref[mob]'>JMP</A>): <span class='message'>[msg]</span></span>"
|
||||
|
||||
@@ -407,6 +407,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
set name = "Assume direct control"
|
||||
set desc = "Direct intervention"
|
||||
|
||||
if(!check_rights(R_DEBUG|R_ADMIN)) return
|
||||
if(M.ckey)
|
||||
if(alert("This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
@@ -474,7 +474,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
switch(alert("Should this be announced to the general population?",,"Yes","No"))
|
||||
if("Yes")
|
||||
command_alert(input, maintitle=customname);
|
||||
command_alert(input, customname);
|
||||
if("No")
|
||||
world << "\red New NanoTrasen Update available at all communication consoles."
|
||||
|
||||
@@ -513,9 +513,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Special Verbs"
|
||||
set name = "Explosion"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(!check_rights(R_DEBUG|R_FUN)) return
|
||||
|
||||
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
|
||||
if(devastation == null) return
|
||||
@@ -543,9 +541,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Special Verbs"
|
||||
set name = "EM Pulse"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(!check_rights(R_DEBUG|R_FUN)) return
|
||||
|
||||
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
|
||||
if(heavy == null) return
|
||||
@@ -567,9 +563,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set category = "Special Verbs"
|
||||
set name = "Gib"
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(!check_rights(R_ADMIN|R_FUN)) return
|
||||
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
if(confirm != "Yes") return
|
||||
@@ -725,9 +719,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if ((!( ticker ) || emergency_shuttle.location))
|
||||
return
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
||||
if(confirm != "Yes") return
|
||||
@@ -750,7 +742,9 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
/client/proc/admin_cancel_shuttle()
|
||||
set category = "Admin"
|
||||
set name = "Cancel Shuttle"
|
||||
if(!check_rights(0)) return
|
||||
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes") return
|
||||
|
||||
if(!ticker || emergency_shuttle.location || emergency_shuttle.direction == 0)
|
||||
@@ -770,9 +764,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if (!ticker)
|
||||
return
|
||||
|
||||
if (!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
if(!check_rights(R_ADMIN)) return
|
||||
|
||||
emergency_shuttle.deny_shuttle = !emergency_shuttle.deny_shuttle
|
||||
|
||||
@@ -794,6 +786,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
set name = "Make Everyone Random"
|
||||
set desc = "Make everyone have a random appearance. You can only use this before rounds!"
|
||||
|
||||
if(!check_rights(R_FUN)) return
|
||||
|
||||
if (ticker && ticker.mode)
|
||||
usr << "Nope you can't do this, the game's already started. This only works before rounds!"
|
||||
return
|
||||
@@ -824,7 +818,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
/client/proc/toggle_random_events()
|
||||
set category = "Server"
|
||||
set name = "Toggle random events on/off"
|
||||
|
||||
set desc = "Toggles random events such as meteors, black holes, blob (but not space dust) on/off"
|
||||
if(!check_rights(R_SERVER)) return
|
||||
|
||||
if(!config.allow_random_events)
|
||||
config.allow_random_events = 1
|
||||
usr << "Random events enabled"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
//
|
||||
dmm_suite{
|
||||
load_map(var/dmm_file as file, var/z_offset as num){
|
||||
if(!z_offset){
|
||||
@@ -20,6 +21,7 @@ dmm_suite{
|
||||
var/ycrd=0
|
||||
var/xcrd=0
|
||||
for(var/zpos=findtext(tfile,"\n(1,1,");TRUE;zpos=findtext(tfile,"\n(1,1,",zpos+1,0)){
|
||||
if(zpos==0) break
|
||||
zcrd++
|
||||
world.maxz = max(world.maxz, zcrd+z_offset)
|
||||
ycrd=0
|
||||
@@ -43,7 +45,7 @@ dmm_suite{
|
||||
if(gpos+length(grid_line)+1>length(zgrid)){break}
|
||||
sleep(-1)
|
||||
}
|
||||
if(findtext(tfile,quote+"}",zpos,0)+2==tfile_len){break}
|
||||
if(findtext(tfile,quote+"}",zpos,0)+2>=tfile_len){break}
|
||||
sleep(-1)
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user