mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
Merge branch 'incremental_tg' r5200 into bs12_with_tgport
Conflicts: baystation12.dme code/__HELPERS/global_lists.dm code/__HELPERS/type2type.dm code/__HELPERS/unsorted.dm code/datums/datumvars.dm code/datums/disease.dm code/datums/organs/organ_external.dm code/datums/supplypacks.dm code/defines/obj.dm code/game/area/areas.dm code/game/atoms.dm code/game/gamemodes/cult/cult_structures.dm code/game/gamemodes/cult/runes.dm code/game/gamemodes/events.dm code/game/gamemodes/events/ninja_equipment.dm code/game/gamemodes/events/space_ninja.dm code/game/gamemodes/game_mode.dm code/game/gamemodes/gameticker.dm code/game/hud.dm code/game/jobs/access.dm code/game/jobs/job/civilian.dm code/game/machinery/alarm.dm code/game/machinery/cloning.dm code/game/machinery/computer/cloning.dm code/game/machinery/computer/medical.dm code/game/machinery/computer/syndicate_shuttle.dm code/game/machinery/telecomms/broadcaster.dm code/game/machinery/telecomms/machine_interactions.dm code/game/objects/effects/decals/contraband.dm code/game/objects/effects/signs.dm code/game/objects/items/devices/PDA/PDA.dm code/game/objects/items/devices/PDA/cart.dm code/game/objects/items/weapons/photography.dm code/game/objects/structures/door_assembly.dm code/game/objects/structures/window.dm code/game/sound.dm code/game/verbs/ooc.dm code/global.dm code/modules/DetectiveWork/detective_work.dm code/modules/DetectiveWork/evidence.dm code/modules/DetectiveWork/footprints_and_rag.dm code/modules/DetectiveWork/scanner.dm code/modules/admin/player_panel.dm code/modules/admin/verbs/adminhelp.dm code/modules/admin/verbs/adminpm.dm code/modules/awaymissions/gateway.dm code/modules/client/client defines.dm code/modules/client/client procs.dm code/modules/client/preferences.dm code/modules/clothing/spacesuits/rig.dm code/modules/mining/machine_processing.dm code/modules/mining/machine_stacking.dm code/modules/mining/mint.dm code/modules/mining/ores_coins.dm code/modules/mining/satchel_ore_boxdm.dm code/modules/mob/living/carbon/alien/alien.dm code/modules/mob/living/carbon/carbon.dm code/modules/mob/living/carbon/carbon_defines.dm code/modules/mob/living/carbon/human/human_damage.dm code/modules/mob/living/carbon/human/life.dm code/modules/mob/living/carbon/human/update_icons.dm code/modules/mob/living/living.dm code/modules/mob/living/say.dm code/modules/mob/mob.dm code/modules/mob/mob_cleanup.dm code/modules/mob/mob_defines.dm code/modules/mob/mob_transformation_simple.dm code/modules/mob/new_player/login.dm code/modules/mob/new_player/new_player.dm code/modules/mob/new_player/preferences_setup.dm code/modules/mob/new_player/savefile.dm code/modules/mob/new_player/sprite_accessories.dm code/modules/paperwork/folders.dm code/modules/paperwork/paper.dm code/modules/paperwork/photocopier.dm code/modules/projectiles/guns/energy/special.dm code/modules/projectiles/guns/projectile/automatic.dm code/setup.dm code/unused/mining/datum_processing_recipe.dm code/unused/powerarmor/powerarmor.dm code/world.dm html/changelog.html icons/effects/96x96.dmi icons/mob/head.dmi icons/mob/items_lefthand.dmi icons/mob/items_righthand.dmi icons/mob/suit.dmi icons/obj/clothing/hats.dmi icons/obj/clothing/suits.dmi icons/obj/hydroponics.dmi icons/obj/items.dmi icons/turf/areas.dmi icons/turf/walls.dmi maps/RandomZLevels/fileList.txt maps/RandomZLevels/spacebattle.dmm Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#define FILE_DIR "icons/obj/atmospherics"
|
||||
#define FILE_DIR "icons/obj/clothing"
|
||||
#define FILE_DIR "icons/obj/doors"
|
||||
#define FILE_DIR "icons/obj/flora"
|
||||
#define FILE_DIR "icons/obj/machines"
|
||||
#define FILE_DIR "icons/obj/pipes"
|
||||
#define FILE_DIR "icons/pda_icons"
|
||||
@@ -67,7 +68,10 @@
|
||||
#include "code\__HELPERS\icons.dm"
|
||||
#include "code\__HELPERS\lists.dm"
|
||||
#include "code\__HELPERS\logging.dm"
|
||||
#include "code\__HELPERS\maths.dm"
|
||||
#include "code\__HELPERS\mobs.dm"
|
||||
#include "code\__HELPERS\names.dm"
|
||||
#include "code\__HELPERS\sanitize_values.dm"
|
||||
#include "code\__HELPERS\text.dm"
|
||||
#include "code\__HELPERS\time.dm"
|
||||
#include "code\__HELPERS\type2type.dm"
|
||||
@@ -140,8 +144,7 @@
|
||||
#include "code\datums\diseases\wizarditis.dm"
|
||||
#include "code\datums\diseases\xeno_transformation.dm"
|
||||
#include "code\datums\diseases\advance\advance.dm"
|
||||
#include "code\datums\diseases\advance\cold.dm"
|
||||
#include "code\datums\diseases\advance\flu.dm"
|
||||
#include "code\datums\diseases\advance\presets.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\confusion.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\cough.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\damage_converter.dm"
|
||||
@@ -149,10 +152,12 @@
|
||||
#include "code\datums\diseases\advance\symptoms\fever.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\hallucigen.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\headache.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\heal.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\itching.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\shivering.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\sneeze.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\symptoms.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\voice_change.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\vomit.dm"
|
||||
#include "code\datums\diseases\advance\symptoms\weight.dm"
|
||||
#include "code\datums\helper_datums\construction_datum.dm"
|
||||
@@ -374,6 +379,7 @@
|
||||
#include "code\game\machinery\computer\syndicate_specops_shuttle.dm"
|
||||
#include "code\game\machinery\doors\airlock.dm"
|
||||
#include "code\game\machinery\doors\airlock_electronics.dm"
|
||||
#include "code\game\machinery\doors\alarmlock.dm"
|
||||
#include "code\game\machinery\doors\brigdoors.dm"
|
||||
#include "code\game\machinery\doors\checkForMultipleDoors.dm"
|
||||
#include "code\game\machinery\doors\door.dm"
|
||||
@@ -443,7 +449,6 @@
|
||||
#include "code\game\objects\effects\misc.dm"
|
||||
#include "code\game\objects\effects\overlays.dm"
|
||||
#include "code\game\objects\effects\portals.dm"
|
||||
#include "code\game\objects\effects\signs.dm"
|
||||
#include "code\game\objects\effects\step_triggers.dm"
|
||||
#include "code\game\objects\effects\decals\cleanable.dm"
|
||||
#include "code\game\objects\effects\decals\contraband.dm"
|
||||
@@ -526,7 +531,6 @@
|
||||
#include "code\game\objects\items\weapons\mop.dm"
|
||||
#include "code\game\objects\items\weapons\paint.dm"
|
||||
#include "code\game\objects\items\weapons\paiwire.dm"
|
||||
#include "code\game\objects\items\weapons\photography.dm"
|
||||
#include "code\game\objects\items\weapons\RCD.dm"
|
||||
#include "code\game\objects\items\weapons\RSF.dm"
|
||||
#include "code\game\objects\items\weapons\scrolls.dm"
|
||||
@@ -578,6 +582,7 @@
|
||||
#include "code\game\objects\structures\electricchair.dm"
|
||||
#include "code\game\objects\structures\extinguisher.dm"
|
||||
#include "code\game\objects\structures\false_walls.dm"
|
||||
#include "code\game\objects\structures\flora.dm"
|
||||
#include "code\game\objects\structures\girders.dm"
|
||||
#include "code\game\objects\structures\grille.dm"
|
||||
#include "code\game\objects\structures\kitchen_spike.dm"
|
||||
@@ -590,7 +595,7 @@
|
||||
#include "code\game\objects\structures\morgue.dm"
|
||||
#include "code\game\objects\structures\musician.dm"
|
||||
#include "code\game\objects\structures\noticeboard.dm"
|
||||
#include "code\game\objects\structures\shuttle_engines.dm"
|
||||
#include "code\game\objects\structures\signs.dm"
|
||||
#include "code\game\objects\structures\tables_racks.dm"
|
||||
#include "code\game\objects\structures\tank_dispenser.dm"
|
||||
#include "code\game\objects\structures\target_stake.dm"
|
||||
@@ -628,8 +633,6 @@
|
||||
#include "code\game\turfs\simulated.dm"
|
||||
#include "code\game\turfs\turf.dm"
|
||||
#include "code\game\turfs\unsimulated.dm"
|
||||
#include "code\game\turfs\simulated\asteroid.dm"
|
||||
#include "code\game\turfs\simulated\beach.dm"
|
||||
#include "code\game\turfs\simulated\floor.dm"
|
||||
#include "code\game\turfs\simulated\floor_types.dm"
|
||||
#include "code\game\turfs\simulated\walls.dm"
|
||||
@@ -647,7 +650,6 @@
|
||||
#include "code\game\vehicles\airtight\space.dm"
|
||||
#include "code\game\verbs\atom_verbs.dm"
|
||||
#include "code\game\verbs\ooc.dm"
|
||||
#include "code\game\verbs\sound.dm"
|
||||
#include "code\game\verbs\suicide.dm"
|
||||
#include "code\game\verbs\who.dm"
|
||||
#include "code\js\byjax.dm"
|
||||
@@ -710,6 +712,7 @@
|
||||
#include "code\modules\assembly\timer.dm"
|
||||
#include "code\modules\awaymissions\bluespaceartillery.dm"
|
||||
#include "code\modules\awaymissions\corpse.dm"
|
||||
#include "code\modules\awaymissions\exile.dm"
|
||||
#include "code\modules\awaymissions\gateway.dm"
|
||||
#include "code\modules\awaymissions\loot.dm"
|
||||
#include "code\modules\awaymissions\pamphlet.dm"
|
||||
@@ -721,6 +724,9 @@
|
||||
#include "code\modules\awaymissions\maploader\writer.dm"
|
||||
#include "code\modules\client\client defines.dm"
|
||||
#include "code\modules\client\client procs.dm"
|
||||
#include "code\modules\client\preferences.dm"
|
||||
#include "code\modules\client\preferences_savefile.dm"
|
||||
#include "code\modules\client\preferences_toggles.dm"
|
||||
#include "code\modules\clothing\clothing.dm"
|
||||
#include "code\modules\clothing\glasses\glasses.dm"
|
||||
#include "code\modules\clothing\glasses\hud.dm"
|
||||
@@ -770,7 +776,6 @@
|
||||
#include "code\modules\critters\critter_AI.dm"
|
||||
#include "code\modules\critters\critter_defenses.dm"
|
||||
#include "code\modules\critters\critters.dm"
|
||||
#include "code\modules\critters\hivebots\hivebot.dm"
|
||||
#include "code\modules\customitems\item_defines.dm"
|
||||
#include "code\modules\customitems\item_spawning.dm"
|
||||
#include "code\modules\DetectiveWork\detective_work.dm"
|
||||
@@ -795,7 +800,7 @@
|
||||
#include "code\modules\mining\mine_turfs.dm"
|
||||
#include "code\modules\mining\mint.dm"
|
||||
#include "code\modules\mining\money_bag.dm"
|
||||
#include "code\modules\mining\ores_materials_coins.dm"
|
||||
#include "code\modules\mining\ores_coins.dm"
|
||||
#include "code\modules\mining\satchel_ore_boxdm.dm"
|
||||
#include "code\modules\mob\death.dm"
|
||||
#include "code\modules\mob\inventory.dm"
|
||||
@@ -950,11 +955,8 @@
|
||||
#include "code\modules\mob\living\silicon\robot\wires.dm"
|
||||
#include "code\modules\mob\living\simple_animal\clown.dm"
|
||||
#include "code\modules\mob\living\simple_animal\constructs.dm"
|
||||
#include "code\modules\mob\living\simple_animal\kobold.dm"
|
||||
#include "code\modules\mob\living\simple_animal\parrot.dm"
|
||||
#include "code\modules\mob\living\simple_animal\shade.dm"
|
||||
#include "code\modules\mob\living\simple_animal\simple_animal.dm"
|
||||
#include "code\modules\mob\living\simple_animal\syndicate.dm"
|
||||
#include "code\modules\mob\living\simple_animal\worm.dm"
|
||||
#include "code\modules\mob\living\simple_animal\friendly\cat.dm"
|
||||
#include "code\modules\mob\living\simple_animal\friendly\corgi.dm"
|
||||
@@ -964,15 +966,18 @@
|
||||
#include "code\modules\mob\living\simple_animal\friendly\tomato.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\bear.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\carp.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\faithless.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\hivebot.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\hostile.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\pirate.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\russian.dm"
|
||||
#include "code\modules\mob\living\simple_animal\hostile\syndicate.dm"
|
||||
#include "code\modules\mob\new_player\hud.dm"
|
||||
#include "code\modules\mob\new_player\login.dm"
|
||||
#include "code\modules\mob\new_player\logout.dm"
|
||||
#include "code\modules\mob\new_player\new_player.dm"
|
||||
#include "code\modules\mob\new_player\poll.dm"
|
||||
#include "code\modules\mob\new_player\preferences.dm"
|
||||
#include "code\modules\mob\new_player\preferences_setup.dm"
|
||||
#include "code\modules\mob\new_player\savefile.dm"
|
||||
#include "code\modules\mob\new_player\skill.dm"
|
||||
#include "code\modules\mob\new_player\sprite_accessories.dm"
|
||||
#include "code\modules\mob\simple_animal\head.dm"
|
||||
@@ -984,6 +989,7 @@
|
||||
#include "code\modules\paperwork\paperbin.dm"
|
||||
#include "code\modules\paperwork\pen.dm"
|
||||
#include "code\modules\paperwork\photocopier.dm"
|
||||
#include "code\modules\paperwork\photography.dm"
|
||||
#include "code\modules\paperwork\stamps.dm"
|
||||
#include "code\modules\power\apc.dm"
|
||||
#include "code\modules\power\cable.dm"
|
||||
@@ -1177,5 +1183,7 @@
|
||||
#include "interface\skin.dmf"
|
||||
#include "maps\tgstation.2.0.9.1.dmm"
|
||||
#include "maps\RandomZLevels\Academy.dm"
|
||||
#include "maps\RandomZLevels\challenge.dm"
|
||||
#include "maps\RandomZLevels\stationCollision.dm"
|
||||
#include "maps\RandomZLevels\wildwest.dm"
|
||||
// END_INCLUDE
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
return text
|
||||
|
||||
//Sends resource files to client cache
|
||||
/mob/proc/getFiles()
|
||||
/client/proc/getFiles()
|
||||
for(var/file in args)
|
||||
src << browse_rsc(file)
|
||||
@@ -187,28 +187,23 @@
|
||||
return hear
|
||||
|
||||
|
||||
/proc/get_mobs_in_radio_ranges(var/list/obj/item/device/radio/radios, var/level = 0)
|
||||
/proc/get_mobs_in_radio_ranges(var/list/obj/item/device/radio/radios)
|
||||
. = list()
|
||||
|
||||
// Returns a list of mobs who can hear any of the radios given in @radios
|
||||
var/list/speaker_coverage = list()
|
||||
for(var/obj/item/device/radio/R in radios)
|
||||
// This is usually for headsets, which only the wearer can hear.
|
||||
if(R.canhear_range == 0)
|
||||
if(ismob(R.loc))
|
||||
. |= R.loc
|
||||
continue
|
||||
|
||||
var/turf/speaker = get_turf(R)
|
||||
if(speaker)
|
||||
for(var/turf/T in hear(R.canhear_range,speaker))
|
||||
speaker_coverage += T
|
||||
speaker_coverage[T] = T
|
||||
|
||||
// Try to find all the players who can hear the message
|
||||
for(var/mob/M in player_list)
|
||||
var/turf/ear = get_turf(M)
|
||||
if(ear && (level == 0 || level == ear.z))
|
||||
if(ear in speaker_coverage)
|
||||
if(ear)
|
||||
if(speaker_coverage[ear])
|
||||
. |= M
|
||||
|
||||
return .
|
||||
@@ -342,7 +337,7 @@ var/list/DummyCache = list()
|
||||
var/i = 0
|
||||
while(candidates.len <= 0 && i < 5)
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.client.be_alien)
|
||||
if(G.client.prefs.be_special & BE_ALIEN)
|
||||
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
|
||||
@@ -11,12 +11,24 @@ var/global/list/living_mob_list = list() //List of all alive mobs, including c
|
||||
var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player
|
||||
|
||||
var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time
|
||||
var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name
|
||||
var/global/list/facial_hair_styles_list = list() //stores /datum/sprite_accessory/facial_hair indexed by name
|
||||
var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions
|
||||
var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
|
||||
var/global/list/landmarks_list = list() //list of all landmarks created
|
||||
var/global/list/surgery_steps = list() //list of all surgery steps |BS12
|
||||
//Preferences stuff
|
||||
//Hairstyles
|
||||
var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name
|
||||
var/global/list/hair_styles_male_list = list()
|
||||
var/global/list/hair_styles_female_list = list()
|
||||
var/global/list/facial_hair_styles_list = list() //stores /datum/sprite_accessory/facial_hair indexed by name
|
||||
var/global/list/facial_hair_styles_male_list = list()
|
||||
var/global/list/facial_hair_styles_female_list = list()
|
||||
//Underwear
|
||||
var/global/list/underwear_m = list("White", "Grey", "Green", "Blue", "Black", "Mankini", "Love-Hearts", "Black2", "Grey2", "Stripey", "Kinky", "None") //Curse whoever made male/female underwear diffrent colours
|
||||
var/global/list/underwear_f = list("Red", "White", "Yellow", "Blue", "Black", "Thong", "Babydoll", "Baby-Blue", "Green", "Pink", "Kinky", "None")
|
||||
//Backpacks
|
||||
var/global/list/backbaglist = list("Nothing", "Backpack", "Satchel")
|
||||
|
||||
//////////////////////////
|
||||
/////Initial Building/////
|
||||
//////////////////////////
|
||||
@@ -28,15 +40,27 @@ var/global/list/surgery_steps = list() //list of all surgery steps |BS12
|
||||
for(var/path in paths)
|
||||
var/datum/sprite_accessory/hair/H = new path()
|
||||
hair_styles_list[H.name] = H
|
||||
switch(H.gender)
|
||||
if(MALE) hair_styles_male_list += H.name
|
||||
if(FEMALE) hair_styles_female_list += H.name
|
||||
else
|
||||
hair_styles_male_list += H.name
|
||||
hair_styles_female_list += H.name
|
||||
//Facial Hair - Initialise all /datum/sprite_accessory/facial_hair into an list indexed by facialhair-style name
|
||||
paths = typesof(/datum/sprite_accessory/facial_hair) - /datum/sprite_accessory/facial_hair
|
||||
for(var/path in paths)
|
||||
var/datum/sprite_accessory/facial_hair/H = new path()
|
||||
facial_hair_styles_list[H.name] = H
|
||||
switch(H.gender)
|
||||
if(MALE) facial_hair_styles_male_list += H.name
|
||||
if(FEMALE) facial_hair_styles_female_list += H.name
|
||||
else
|
||||
facial_hair_styles_male_list += H.name
|
||||
facial_hair_styles_female_list += H.name
|
||||
|
||||
//Surgery Steps - Initialize all /datum/surgery_step into a list
|
||||
paths = typesof(/datum/surgery_step)-/datum/surgery_step
|
||||
for(var/T in paths)
|
||||
var/datum/surgery_step/S = new T
|
||||
surgery_steps += S
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
|
||||
//Returns a list in plain english as a string
|
||||
/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "," )
|
||||
/proc/english_list(var/list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" )
|
||||
var/total = input.len
|
||||
if (!total)
|
||||
return "[nothing_text]"
|
||||
@@ -304,4 +304,13 @@ proc/listclearnulls(list/list)
|
||||
if(bitfield & bit)
|
||||
r += bit
|
||||
|
||||
return r
|
||||
return r
|
||||
|
||||
// Returns the key based on the index
|
||||
/proc/get_key_by_index(var/list/L, var/index)
|
||||
var/i = 1
|
||||
for(var/key in L)
|
||||
if(index == i)
|
||||
return key
|
||||
i++
|
||||
return null
|
||||
114
code/__HELPERS/maths.dm
Normal file
114
code/__HELPERS/maths.dm
Normal file
@@ -0,0 +1,114 @@
|
||||
// Credits to Nickr5 for the useful procs I've taken from his library resource.
|
||||
|
||||
var/const/E = 2.71828183
|
||||
var/const/Sqrt2 = 1.41421356
|
||||
|
||||
|
||||
/proc/Atan2(x, y)
|
||||
if(!x && !y) return 0
|
||||
var/a = arccos(x / sqrt(x*x + y*y))
|
||||
return y >= 0 ? a : -a
|
||||
|
||||
/proc/Ceiling(x)
|
||||
return -round(-x)
|
||||
|
||||
/proc/Clamp(val, min, max)
|
||||
return max(min, min(val, max))
|
||||
|
||||
// cotangent
|
||||
/proc/Cot(x)
|
||||
return 1 / Tan(x)
|
||||
|
||||
// cosecant
|
||||
/proc/Csc(x)
|
||||
return 1 / sin(x)
|
||||
|
||||
/proc/Default(a, b)
|
||||
return a ? a : b
|
||||
|
||||
/proc/Floor(x)
|
||||
return round(x)
|
||||
|
||||
// Greatest Common Divisor - Euclid's algorithm
|
||||
/proc/Gcd(a, b)
|
||||
return b ? Gcd(b, a % b) : a
|
||||
|
||||
/proc/Inverse(x)
|
||||
return 1 / x
|
||||
|
||||
/proc/IsAboutEqual(a, b, deviation = 0.1)
|
||||
return abs(a - b) <= deviation
|
||||
|
||||
/proc/IsEven(x)
|
||||
return x % 2 == 0
|
||||
|
||||
// Returns true if val is from min to max, inclusive.
|
||||
/proc/IsInRange(val, min, max)
|
||||
return min <= val && val <= max
|
||||
|
||||
/proc/IsInteger(x)
|
||||
return Floor(x) == x
|
||||
|
||||
/proc/IsOdd(x)
|
||||
return !IsEven(x)
|
||||
|
||||
/proc/IsMultiple(x, y)
|
||||
return x % y == 0
|
||||
|
||||
// Least Common Multiple
|
||||
/proc/Lcm(a, b)
|
||||
return abs(a) / Gcd(a, b) * abs(b)
|
||||
|
||||
// Performs a linear interpolation between a and b.
|
||||
// Note that amount=0 returns a, amount=1 returns b, and
|
||||
// amount=0.5 returns the mean of a and b.
|
||||
/proc/Lerp(a, b, amount = 0.5)
|
||||
return a + (b - a) * amount
|
||||
|
||||
/proc/Mean(...)
|
||||
var/values = 0
|
||||
var/sum = 0
|
||||
for(var/val in args)
|
||||
values++
|
||||
sum += val
|
||||
return sum / values
|
||||
|
||||
|
||||
// Returns the nth root of x.
|
||||
/proc/Root(n, x)
|
||||
return x ** (1 / n)
|
||||
|
||||
// secant
|
||||
/proc/Sec(x)
|
||||
return 1 / cos(x)
|
||||
|
||||
// The quadratic formula. Returns a list with the solutions, or an empty list
|
||||
// if they are imaginary.
|
||||
/proc/SolveQuadratic(a, b, c)
|
||||
ASSERT(a)
|
||||
. = list()
|
||||
var/d = b*b - 4 * a * c
|
||||
var/bottom = 2 * a
|
||||
if(d < 0) return
|
||||
var/root = sqrt(d)
|
||||
. += (-b + root) / bottom
|
||||
if(!d) return
|
||||
. += (-b - root) / bottom
|
||||
|
||||
// tangent
|
||||
/proc/Tan(x)
|
||||
return sin(x) / cos(x)
|
||||
|
||||
/proc/ToDegrees(radians)
|
||||
// 180 / Pi
|
||||
return radians * 57.2957795
|
||||
|
||||
/proc/ToRadians(degrees)
|
||||
// Pi / 180
|
||||
return degrees * 0.0174532925
|
||||
|
||||
// min is inclusive, max is exclusive
|
||||
/proc/Wrap(val, min, max)
|
||||
var/d = max - min
|
||||
var/t = Floor((val - min) / d)
|
||||
return val - (t * d)
|
||||
50
code/__HELPERS/mobs.dm
Normal file
50
code/__HELPERS/mobs.dm
Normal file
@@ -0,0 +1,50 @@
|
||||
proc/random_hair_style(gender)
|
||||
switch(gender)
|
||||
if(MALE) return pick(hair_styles_male_list)
|
||||
if(FEMALE) return pick(hair_styles_female_list)
|
||||
else return pick(hair_styles_list)
|
||||
|
||||
proc/random_facial_hair_style(gender)
|
||||
switch(gender)
|
||||
if(MALE) return pick(facial_hair_styles_male_list)
|
||||
if(FEMALE) return pick(facial_hair_styles_female_list)
|
||||
else return pick(facial_hair_styles_list)
|
||||
|
||||
proc/random_name(gender)
|
||||
if(gender==FEMALE) return capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
|
||||
else return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
|
||||
|
||||
proc/random_skin_tone()
|
||||
switch(pick(55;"caucasian", 15;"afroamerican", 10;"african", 10;"latino", 5;"albino", 5;"weird"))
|
||||
if("caucasian") . = -10
|
||||
if("afroamerican") . = -115
|
||||
if("african") . = -165
|
||||
if("latino") . = -55
|
||||
if("albino") . = 34
|
||||
else . = rand(-185,34)
|
||||
return min(max( .+rand(-25, 25), -185),34)
|
||||
|
||||
proc/skintone2racedescription(tone)
|
||||
switch (tone)
|
||||
if(30 to INFINITY) return "albino"
|
||||
if(20 to 30) return "pale"
|
||||
if(5 to 15) return "light skinned"
|
||||
if(-10 to 5) return "white"
|
||||
if(-25 to -10) return "tan"
|
||||
if(-45 to -25) return "darker skinned"
|
||||
if(-65 to -45) return "brown"
|
||||
if(-INFINITY to -65) return "black"
|
||||
else return "unknown"
|
||||
|
||||
proc/age2agedescription(age)
|
||||
switch(age)
|
||||
if(0 to 1) return "infant"
|
||||
if(1 to 3) return "toddler"
|
||||
if(3 to 13) return "child"
|
||||
if(13 to 19) return "teenager"
|
||||
if(19 to 30) return "young adult"
|
||||
if(30 to 45) return "adult"
|
||||
if(45 to 60) return "middle-aged"
|
||||
if(60 to 70) return "aging"
|
||||
if(70 to INFINITY) return "elderly"
|
||||
else return "unknown"
|
||||
46
code/__HELPERS/sanitize_values.dm
Normal file
46
code/__HELPERS/sanitize_values.dm
Normal file
@@ -0,0 +1,46 @@
|
||||
//general stuff
|
||||
/proc/sanitize_integer(number, min=0, max=1, default=0)
|
||||
if(isnum(number))
|
||||
number = round(number)
|
||||
if(min <= number && number <= max)
|
||||
return number
|
||||
return default
|
||||
|
||||
/proc/sanitize_text(text, default="")
|
||||
if(istext(text))
|
||||
return text
|
||||
return default
|
||||
|
||||
/proc/sanitize_inlist(value, list/List, default)
|
||||
if(value in List) return value
|
||||
if(default) return default
|
||||
if(List && List.len)return List[1]
|
||||
|
||||
|
||||
|
||||
//more specialised stuff
|
||||
/proc/sanitize_gender(gender,neuter=0,plural=0, default="male")
|
||||
switch(gender)
|
||||
if(MALE, FEMALE)return gender
|
||||
if(NEUTER)
|
||||
if(neuter) return gender
|
||||
else return default
|
||||
if(PLURAL)
|
||||
if(plural) return gender
|
||||
else return default
|
||||
return default
|
||||
|
||||
/proc/sanitize_hexcolor(color, default="#000000")
|
||||
if(!istext(color)) return default
|
||||
var/len = length(color)
|
||||
if(len != 7 && len !=4) return default
|
||||
if(text2ascii(color,1) != 35) return default //35 is the ascii code for "#"
|
||||
. = "#"
|
||||
for(var/i=2,i<=len,i++)
|
||||
var/ascii = text2ascii(color,i)
|
||||
switch(ascii)
|
||||
if(48 to 57) . += ascii2text(ascii) //numbers 0 to 9
|
||||
if(97 to 102) . += ascii2text(ascii) //letters a to f
|
||||
if(65 to 70) . += ascii2text(ascii+32) //letters A to F - translates to lowercase
|
||||
else return default
|
||||
return .
|
||||
@@ -323,4 +323,10 @@
|
||||
var/a = copytext(text,i,i+1)
|
||||
if(a == character)
|
||||
count++
|
||||
return count
|
||||
return count
|
||||
|
||||
/proc/reverse_text(var/text = "")
|
||||
var/new_text = ""
|
||||
for(var/i = length(text); i > 0; i--)
|
||||
new_text += copytext(text, i, i+1)
|
||||
return new_text
|
||||
@@ -238,19 +238,26 @@ proc/tg_list2text(list/list, glue=",")
|
||||
/proc/angle2text(var/degree)
|
||||
return dir2text(angle2dir(degree))
|
||||
|
||||
|
||||
//Converts a rights bitfield into a string
|
||||
/proc/rights2text(rights)
|
||||
if(rights & R_BUILDMODE) . += "+BUILDMODE"
|
||||
if(rights & R_ADMIN) . += "+ADMIN"
|
||||
if(rights & R_BAN) . += "+BAN"
|
||||
if(rights & R_FUN) . += "+FUN"
|
||||
if(rights & R_SERVER) . += "+SERVER"
|
||||
if(rights & R_DEBUG) . += "+DEBUG"
|
||||
if(rights & R_POSSESS) . += "+POSSESS"
|
||||
if(rights & R_PERMISSIONS) . += "+PERMISSIONS"
|
||||
if(rights & R_STEALTH) . += "+STEALTH"
|
||||
if(rights & R_REJUVINATE) . += "+REJUVINATE"
|
||||
if(rights & R_VAREDIT) . += "+VAREDIT"
|
||||
if(rights & R_SOUNDS) . += "+SOUND"
|
||||
if(rights & R_SPAWN) . += "+SPAWN"
|
||||
/proc/rights2text(rights,seperator="")
|
||||
if(rights & R_BUILDMODE) . += "[seperator]+BUILDMODE"
|
||||
if(rights & R_ADMIN) . += "[seperator]+ADMIN"
|
||||
if(rights & R_BAN) . += "[seperator]+BAN"
|
||||
if(rights & R_FUN) . += "[seperator]+FUN"
|
||||
if(rights & R_SERVER) . += "[seperator]+SERVER"
|
||||
if(rights & R_DEBUG) . += "[seperator]+DEBUG"
|
||||
if(rights & R_POSSESS) . += "[seperator]+POSSESS"
|
||||
if(rights & R_PERMISSIONS) . += "[seperator]+PERMISSIONS"
|
||||
if(rights & R_STEALTH) . += "[seperator]+STEALTH"
|
||||
if(rights & R_REJUVINATE) . += "[seperator]+REJUVINATE"
|
||||
if(rights & R_VAREDIT) . += "[seperator]+VAREDIT"
|
||||
if(rights & R_SOUNDS) . += "[seperator]+SOUND"
|
||||
if(rights & R_SPAWN) . += "[seperator]+SPAWN"
|
||||
return .
|
||||
|
||||
/proc/ui_style2icon(ui_style)
|
||||
switch(ui_style)
|
||||
if("old") return 'icons/mob/screen1_old.dmi'
|
||||
if("Orange") return 'icons/mob/screen1_Orange.dmi'
|
||||
else return 'icons/mob/screen1_Midnight.dmi'
|
||||
|
||||
@@ -503,68 +503,52 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
|
||||
/proc/key_name(var/whom, var/include_link = null, var/include_name = 1)
|
||||
var/mob/the_mob = null
|
||||
var/client/the_client = null
|
||||
var/the_key = ""
|
||||
var/mob/M
|
||||
var/client/C
|
||||
var/key
|
||||
|
||||
if (isnull(whom))
|
||||
return "*null*"
|
||||
else if (istype(whom, /client))
|
||||
the_client = whom
|
||||
the_mob = the_client.mob
|
||||
the_key = the_client.key
|
||||
else if (ismob(whom))
|
||||
the_mob = whom
|
||||
the_client = the_mob.client
|
||||
the_key = the_mob.key
|
||||
else if (istype(whom, /datum))
|
||||
var/datum/the_datum = whom
|
||||
return "*invalid:[the_datum.type]*"
|
||||
if(!whom) return "*null*"
|
||||
if(istype(whom, /client))
|
||||
C = whom
|
||||
M = C.mob
|
||||
key = C.key
|
||||
else if(ismob(whom))
|
||||
M = whom
|
||||
C = M.client
|
||||
key = M.key
|
||||
else if(istype(whom, /datum))
|
||||
var/datum/D = whom
|
||||
return "*invalid:[D.type]*"
|
||||
else
|
||||
return "*invalid*"
|
||||
|
||||
var/text = ""
|
||||
. = ""
|
||||
|
||||
if (!the_key)
|
||||
text += "*no client*"
|
||||
else
|
||||
var/linked = 1
|
||||
if (include_link && !isnull(the_mob))
|
||||
if (istext(include_link))
|
||||
text += "<a href=\"byond://?src=[include_link];priv_msg=\ref[the_client]\">"
|
||||
else
|
||||
if(ismob(include_link))
|
||||
var/mob/MM = include_link
|
||||
if(MM.client)
|
||||
text += "<a href=\"byond://?src=\ref[MM.client];priv_msg=\ref[the_client]\">"
|
||||
else
|
||||
linked = 0
|
||||
else if (istype(include_link, /client))
|
||||
text += "<a href=\"byond://?src=\ref[include_link];priv_msg=\ref[the_client]\">"
|
||||
else
|
||||
linked = 0
|
||||
if(key)
|
||||
if(include_link && C)
|
||||
. += "<a href='?priv_msg=\ref[C]'>"
|
||||
|
||||
if (the_client && the_client.holder && the_client.holder.fakekey && !include_name)
|
||||
text += "Administrator"
|
||||
if(C && C.holder && C.holder.fakekey && !include_name)
|
||||
. += "Administrator"
|
||||
else
|
||||
text += "[the_key]"
|
||||
. += key
|
||||
|
||||
if (!isnull(include_link) && !isnull(the_mob))
|
||||
if(linked)
|
||||
text += "</a>"
|
||||
else
|
||||
text += " (DC)"
|
||||
if(include_link)
|
||||
if(C) . += "</a>"
|
||||
else . += " (DC)"
|
||||
else
|
||||
. += "*no key*"
|
||||
|
||||
if (include_name && !isnull(the_mob))
|
||||
if (the_mob.real_name)
|
||||
text += "/([the_mob.real_name])"
|
||||
else if (the_mob.name)
|
||||
text += "/([the_mob.name])"
|
||||
if(include_name && M)
|
||||
if(M.real_name)
|
||||
. += "/([M.real_name])"
|
||||
else if(M.name)
|
||||
. += "/([M.name])"
|
||||
|
||||
return text
|
||||
return .
|
||||
|
||||
/proc/key_name_admin(var/whom, var/include_name = 1)
|
||||
return key_name(whom, "%admin_ref%", include_name)
|
||||
return key_name(whom, 1, include_name)
|
||||
|
||||
|
||||
// Registers the on-close verb for a browse window (client/verb/.windowclose)
|
||||
@@ -1353,6 +1337,7 @@ proc/is_hot(obj/item/W as obj)
|
||||
istype(W, /obj/item/weapon/kitchen/utensil/fork) && W.icon_state != "forkloaded" || \
|
||||
istype(W, /obj/item/weapon/twohanded/fireaxe) \
|
||||
)
|
||||
|
||||
/proc/is_surgery_tool(obj/item/W as obj)
|
||||
return ( \
|
||||
istype(W, /obj/item/weapon/scalpel) || \
|
||||
@@ -1389,3 +1374,47 @@ proc/is_hot(obj/item/W as obj)
|
||||
return EAST
|
||||
if(NORTHWEST)
|
||||
return SOUTHEAST
|
||||
|
||||
/*
|
||||
Checks if that loc and dir has a item on the wall
|
||||
*/
|
||||
var/list/WALLITEMS = list(
|
||||
"/obj/machinery/power/apc", "/obj/machinery/alarm", "/obj/item/device/radio/intercom",
|
||||
"/obj/structure/extinguisher_cabinet", "/obj/structure/reagent_dispensers/peppertank",
|
||||
"/obj/machinery/status_display", "/obj/machinery/requests_console", "/obj/machinery/light_switch", "/obj/effect/sign",
|
||||
"/obj/machinery/newscaster", "/obj/machinery/firealarm", "/obj/structure/noticeboard", "/obj/machinery/door_control",
|
||||
"/obj/machinery/computer/security/telescreen", "/obj/machinery/embedded_controller/radio/simple_vent_controller",
|
||||
"/obj/item/weapon/secstorage/ssafe", "/obj/machinery/door_timer", "/obj/machinery/flasher", "/obj/machinery/keycard_auth",
|
||||
"/obj/structure/mirror", "/obj/structure/closet/fireaxecabinet", "/obj/machinery/computer/security/telescreen/entertainment"
|
||||
)
|
||||
/proc/gotwallitem(loc, dir)
|
||||
for(var/obj/O in loc)
|
||||
for(var/item in WALLITEMS)
|
||||
if(istype(O, text2path(item)))
|
||||
//Direction works sometimes
|
||||
if(O.dir == dir)
|
||||
return 1
|
||||
|
||||
//Some stuff doesn't use dir properly, so we need to check pixel instead
|
||||
switch(dir)
|
||||
if(SOUTH)
|
||||
if(O.pixel_y > 10)
|
||||
return 1
|
||||
if(NORTH)
|
||||
if(O.pixel_y < -10)
|
||||
return 1
|
||||
if(WEST)
|
||||
if(O.pixel_x > 10)
|
||||
return 1
|
||||
if(EAST)
|
||||
if(O.pixel_x < -10)
|
||||
return 1
|
||||
|
||||
|
||||
//Some stuff is placed directly on the wallturf (signs)
|
||||
for(var/obj/O in get_step(loc, dir))
|
||||
for(var/item in WALLITEMS)
|
||||
if(istype(O, text2path(item)))
|
||||
if(O.pixel_x == 0 && O.pixel_y == 0)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -42,9 +42,9 @@ datum/controller/game_controller/New()
|
||||
|
||||
if(!job_master)
|
||||
job_master = new /datum/controller/occupations()
|
||||
if(job_master.SetupOccupations())
|
||||
world << "\red \b Job setup complete"
|
||||
job_master.LoadJobs("config/jobs.txt")
|
||||
job_master.SetupOccupations()
|
||||
job_master.LoadJobs("config/jobs.txt")
|
||||
world << "\red \b Job setup complete"
|
||||
|
||||
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
|
||||
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
if("Supply Shuttle")
|
||||
supply_shuttle.process()
|
||||
feedback_add_details("admin_verb","RSupply")
|
||||
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.", 1)
|
||||
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.")
|
||||
return
|
||||
|
||||
|
||||
@@ -74,5 +74,5 @@
|
||||
if("Cameras")
|
||||
debug_variables(cameranet)
|
||||
feedback_add_details("admin_verb","DCameras")
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.", 1)
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
|
||||
return
|
||||
|
||||
@@ -173,27 +173,27 @@ client
|
||||
if(istype(D,/atom))
|
||||
var/atom/A = D
|
||||
if(isliving(A))
|
||||
body += "<a href='byond://?src=\ref[src];rename=\ref[D]'><b>[D]</b></a>"
|
||||
body += "<a href='?_src_=vars;rename=\ref[D]'><b>[D]</b></a>"
|
||||
if(A.dir)
|
||||
body += "<br><font size='1'><a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
var/mob/living/M = A
|
||||
body += "<br><font size='1'><a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
|
||||
body += "<br><font size='1'><a href='?_src_=vars;datumedit=\ref[D];varnameedit=ckey'>[M.ckey ? M.ckey : "No ckey"]</a> / <a href='?_src_=vars;datumedit=\ref[D];varnameedit=real_name'>[M.real_name ? M.real_name : "No real name"]</a></font>"
|
||||
body += {"
|
||||
<br><font size='1'>
|
||||
BRUTE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=brute'>[M.getBruteLoss()]</a>
|
||||
FIRE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=fire'>[M.getFireLoss()]</a>
|
||||
TOXIN:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=toxin'>[M.getToxLoss()]</a>
|
||||
OXY:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=oxygen'>[M.getOxyLoss()]</a>
|
||||
CLONE:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=clone'>[M.getCloneLoss()]</a>
|
||||
BRAIN:<font size='1'><a href='byond://?src=\ref[src];mobToDamage=\ref[D];adjustDamage=brain'>[M.getBrainLoss()]</a>
|
||||
BRUTE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brute'>[M.getBruteLoss()]</a>
|
||||
FIRE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=fire'>[M.getFireLoss()]</a>
|
||||
TOXIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=toxin'>[M.getToxLoss()]</a>
|
||||
OXY:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=oxygen'>[M.getOxyLoss()]</a>
|
||||
CLONE:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=clone'>[M.getCloneLoss()]</a>
|
||||
BRAIN:<font size='1'><a href='?_src_=vars;mobToDamage=\ref[D];adjustDamage=brain'>[M.getBrainLoss()]</a>
|
||||
</font>
|
||||
|
||||
|
||||
"}
|
||||
else
|
||||
body += "<a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=name'><b>[D]</b></a>"
|
||||
body += "<a href='?_src_=vars;datumedit=\ref[D];varnameedit=name'><b>[D]</b></a>"
|
||||
if(A.dir)
|
||||
body += "<br><font size='1'><a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='byond://?src=\ref[src];datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='byond://?src=\ref[src];rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
body += "<br><font size='1'><a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=left'><<</a> <a href='?_src_=vars;datumedit=\ref[D];varnameedit=dir'>[dir2text(A.dir)]</a> <a href='?_src_=vars;rotatedatum=\ref[D];rotatedir=right'>>></a></font>"
|
||||
else
|
||||
body += "<b>[D]</b>"
|
||||
|
||||
@@ -219,10 +219,10 @@ client
|
||||
|
||||
body += "</div></td>"
|
||||
|
||||
body += "<td width='50%'><div align='center'><a href='byond://?src=\ref[src];datumrefresh=\ref[D]'>Refresh</a>"
|
||||
body += "<td width='50%'><div align='center'><a href='?_src_=vars;datumrefresh=\ref[D]'>Refresh</a>"
|
||||
|
||||
//if(ismob(D))
|
||||
// body += "<br><a href='byond://?src=\ref[src];mob_player_panel=\ref[D]'>Show player panel</a></div></td></tr></table></div><hr>"
|
||||
// body += "<br><a href='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</a></div></td></tr></table></div><hr>"
|
||||
|
||||
body += {" <form>
|
||||
<select name="file" size="1"
|
||||
@@ -237,37 +237,37 @@ client
|
||||
"}
|
||||
|
||||
|
||||
body += "<option value='byond://?src=\ref[src];mark_object=\ref[D]'>Mark Object</option>"
|
||||
body += "<option value='?_src_=vars;mark_object=\ref[D]'>Mark Object</option>"
|
||||
if(ismob(D))
|
||||
body += "<option value='byond://?src=\ref[src];mob_player_panel=\ref[D]'>Show player panel</option>"
|
||||
body += "<option value='?_src_=vars;mob_player_panel=\ref[D]'>Show player panel</option>"
|
||||
|
||||
body += "<option value>---</option>"
|
||||
|
||||
if(ismob(D))
|
||||
body += "<option value='byond://?src=\ref[src];give_spell=\ref[D]'>Give Spell</option>"
|
||||
body += "<option value='byond://?src=\ref[src];give_disease=\ref[D]'>Give Disease</option>"
|
||||
body += "<option value='byond://?src=\ref[src];ninja=\ref[D]'>Make Space Ninja</option>"
|
||||
body += "<option value='byond://?src=\ref[src];godmode=\ref[D]'>Toggle Godmode</option>"
|
||||
body += "<option value='byond://?src=\ref[src];build_mode=\ref[D]'>Toggle Build Mode</option>"
|
||||
body += "<option value='byond://?src=\ref[src];direct_control=\ref[D]'>Assume Direct Control</option>"
|
||||
body += "<option value='byond://?src=\ref[src];make_skeleton=\ref[D]'>Make 2spooky</option>"
|
||||
body += "<option value='byond://?src=\ref[src];drop_everything=\ref[D]'>Drop Everything</option>"
|
||||
body += "<option value='byond://?src=\ref[src];regenerateicons=\ref[D]'>Regenerate Icons</option>"
|
||||
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;make_skeleton=\ref[D]'>Make 2spooky</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>"
|
||||
body += "<option value='byond://?src=\ref[src];setmutantrace=\ref[D]'>Set Mutantrace</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makeai=\ref[D]'>Make AI</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makerobot=\ref[D]'>Make cyborg</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makemonkey=\ref[D]'>Make monkey</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makealien=\ref[D]'>Make alien</option>"
|
||||
body += "<option value='byond://?src=\ref[src];makemetroid=\ref[D]'>Make metroid</option>"
|
||||
body += "<option value='?_src_=vars;setmutantrace=\ref[D]'>Set Mutantrace</option>"
|
||||
body += "<option value='?_src_=vars;makeai=\ref[D]'>Make AI</option>"
|
||||
body += "<option value='?_src_=vars;makerobot=\ref[D]'>Make cyborg</option>"
|
||||
body += "<option value='?_src_=vars;makemonkey=\ref[D]'>Make monkey</option>"
|
||||
body += "<option value='?_src_=vars;makealien=\ref[D]'>Make alien</option>"
|
||||
body += "<option value='?_src_=vars;makemetroid=\ref[D]'>Make metroid</option>"
|
||||
body += "<option value>---</option>"
|
||||
body += "<option value='byond://?src=\ref[src];gib=\ref[D]'>Gib</option>"
|
||||
body += "<option value='?_src_=vars;gib=\ref[D]'>Gib</option>"
|
||||
if(isobj(D))
|
||||
body += "<option value='byond://?src=\ref[src];delall=\ref[D]'>Delete all of type</option>"
|
||||
body += "<option value='?_src_=vars;delall=\ref[D]'>Delete all of type</option>"
|
||||
if(isobj(D) || ismob(D) || isturf(D))
|
||||
body += "<option value='byond://?src=\ref[src];explode=\ref[D]'>Trigger explosion</option>"
|
||||
body += "<option value='byond://?src=\ref[src];emp=\ref[D]'>Trigger EM pulse</option>"
|
||||
body += "<option value='?_src_=vars;explode=\ref[D]'>Trigger explosion</option>"
|
||||
body += "<option value='?_src_=vars;emp=\ref[D]'>Trigger EM pulse</option>"
|
||||
|
||||
body += "</select></form>"
|
||||
|
||||
@@ -327,7 +327,7 @@ client
|
||||
var/html = ""
|
||||
|
||||
if(DA)
|
||||
html += "<li style='backgroundColor:white'>(<a href='byond://?src=\ref[src];datumedit=\ref[DA];varnameedit=[name]'>E</a>) (<a href='byond://?src=\ref[src];datumchange=\ref[DA];varnamechange=[name]'>C</a>) (<a href='byond://?src=\ref[src];datummass=\ref[DA];varnamemass=[name]'>M</a>) "
|
||||
html += "<li style='backgroundColor:white'>(<a href='?_src_=vars;datumedit=\ref[DA];varnameedit=[name]'>E</a>) (<a href='?_src_=vars;datumchange=\ref[DA];varnamechange=[name]'>C</a>) (<a href='?_src_=vars;datummass=\ref[DA];varnamemass=[name]'>M</a>) "
|
||||
else
|
||||
html += "<li>"
|
||||
|
||||
@@ -364,11 +364,11 @@ client
|
||||
|
||||
else if (istype(value, /datum))
|
||||
var/datum/D = value
|
||||
html += "<a href='byond://?src=\ref[src];Vars=\ref[value]'>[name] \ref[value]</a> = [D.type]"
|
||||
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [D.type]"
|
||||
|
||||
else if (istype(value, /client))
|
||||
var/client/C = value
|
||||
html += "<a href='byond://?src=\ref[src];Vars=\ref[value]'>[name] \ref[value]</a> = [C] [C.type]"
|
||||
html += "<a href='?_src_=vars;Vars=\ref[value]'>[name] \ref[value]</a> = [C] [C.type]"
|
||||
//
|
||||
else if (istype(value, /list))
|
||||
var/list/L = value
|
||||
@@ -398,393 +398,390 @@ client
|
||||
|
||||
return html
|
||||
|
||||
/client/proc/view_var_Topic(href,href_list,hsrc)
|
||||
/client/proc/view_var_Topic(href, href_list, hsrc)
|
||||
//This should all be moved over to datum/admins/Topic() or something ~Carn
|
||||
if( (usr.client == src) && src.holder )
|
||||
. = 1 //default return
|
||||
if(href_list["Vars"])
|
||||
debug_variables(locate(href_list["Vars"]))
|
||||
|
||||
//~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
|
||||
|
||||
var/mob/M = locate(href_list["rename"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null),1,MAX_NAME_LEN)
|
||||
if( !new_name || !M ) return
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].", 1)
|
||||
M.fully_replace_character_name(M.real_name,new_name)
|
||||
href_list["datumrefresh"] = href_list["rename"]
|
||||
|
||||
else if(href_list["varnameedit"] && href_list["datumedit"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/D = locate(href_list["datumedit"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnameedit"], 1)
|
||||
|
||||
else if(href_list["varnamechange"] && href_list["datumchange"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/D = locate(href_list["datumchange"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnamechange"], 0)
|
||||
|
||||
else if(href_list["varnamemass"] && href_list["datummass"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["datummass"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be used on instances of type /atom"
|
||||
return
|
||||
|
||||
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
|
||||
|
||||
else if(href_list["mob_player_panel"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["mob_player_panel"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.holder.show_player_panel(M)
|
||||
href_list["datumrefresh"] = href_list["mob_player_panel"]
|
||||
|
||||
else if(href_list["give_spell"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_spell"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_spell(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["give_disease"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_disease"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_disease(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["ninja"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["ninja"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_ninjafy(M)
|
||||
href_list["datumrefresh"] = href_list["ninja"]
|
||||
|
||||
else if(href_list["godmode"])
|
||||
if(!check_rights(R_REJUVINATE)) return
|
||||
|
||||
var/mob/M = locate(href_list["godmode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_godmode(M)
|
||||
href_list["datumrefresh"] = href_list["godmode"]
|
||||
|
||||
else if(href_list["gib"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["gib"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_gib(M)
|
||||
|
||||
else if(href_list["build_mode"])
|
||||
if(!check_rights(R_BUILDMODE)) return
|
||||
|
||||
var/mob/M = locate(href_list["build_mode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
togglebuildmode(M)
|
||||
href_list["datumrefresh"] = href_list["build_mode"]
|
||||
|
||||
else if(href_list["drop_everything"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["drop_everything"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_admin_drop_everything(M)
|
||||
|
||||
else if(href_list["direct_control"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["direct_control"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_assume_direct_control(M)
|
||||
|
||||
else if(href_list["make_skeleton"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
H.makeSkeleton()
|
||||
href_list["datumrefresh"] = href_list["make_skeleton"]
|
||||
|
||||
else if(href_list["delall"])
|
||||
if(!check_rights(R_DEBUG|R_SERVER)) return
|
||||
|
||||
var/obj/O = locate(href_list["delall"])
|
||||
if(!isobj(O))
|
||||
usr << "This can only be used on instances of type /obj"
|
||||
return
|
||||
|
||||
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
|
||||
if(action_type == "Cancel" || !action_type)
|
||||
return
|
||||
|
||||
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
var/O_type = O.type
|
||||
switch(action_type)
|
||||
if("Strict type")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(Obj.type == O_type)
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ", 1)
|
||||
if("Type and subtypes")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(istype(Obj,O_type))
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ", 1)
|
||||
|
||||
else if(href_list["explode"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["explode"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_explosion(A)
|
||||
href_list["datumrefresh"] = href_list["explode"]
|
||||
|
||||
else if(href_list["emp"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["emp"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_emp(A)
|
||||
href_list["datumrefresh"] = href_list["emp"]
|
||||
|
||||
else if(href_list["mark_object"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/datum/D = locate(href_list["mark_object"])
|
||||
if(!istype(D))
|
||||
usr << "This can only be done to instances of type /datum"
|
||||
return
|
||||
|
||||
src.holder.marked_datum = D
|
||||
href_list["datumrefresh"] = href_list["mark_object"]
|
||||
|
||||
else if(href_list["rotatedatum"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["rotatedatum"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be done to instances of type /atom"
|
||||
return
|
||||
|
||||
switch(href_list["rotatedir"])
|
||||
if("right") A.dir = turn(A.dir, -45)
|
||||
if("left") A.dir = turn(A.dir, 45)
|
||||
href_list["datumrefresh"] = href_list["rotatedatum"]
|
||||
|
||||
else if(href_list["makemonkey"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
|
||||
|
||||
else if(href_list["makerobot"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
|
||||
|
||||
else if(href_list["makealien"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makealien"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makealien"=href_list["makealien"]))
|
||||
|
||||
else if(href_list["makemetroid"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemetroid"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makemetroid"=href_list["makemetroid"]))
|
||||
|
||||
else if(href_list["makeai"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
|
||||
else if(href_list["setmutantrace"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["setmutantrace"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","metroid","plant","tajaran","skrell") //BS12 EDIT TAJ EDIT SKR
|
||||
switch(new_mutantrace)
|
||||
if(null) return
|
||||
if("NONE") new_mutantrace = ""
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
if(H.dna)
|
||||
H.dna.mutantrace = new_mutantrace
|
||||
H.update_mutantrace()
|
||||
|
||||
else if(href_list["regenerateicons"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["regenerateicons"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
M.regenerate_icons()
|
||||
|
||||
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/L = locate(href_list["mobToDamage"])
|
||||
if(!istype(L)) return
|
||||
|
||||
var/Text = href_list["adjustDamage"]
|
||||
|
||||
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
|
||||
|
||||
if(!L)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
switch(Text)
|
||||
if("brute") L.adjustBruteLoss(amount)
|
||||
if("fire") L.adjustFireLoss(amount)
|
||||
if("toxin") L.adjustToxLoss(amount)
|
||||
if("oxygen")L.adjustOxyLoss(amount)
|
||||
if("brain") L.adjustBrainLoss(amount)
|
||||
if("clone") L.adjustCloneLoss(amount)
|
||||
else
|
||||
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
|
||||
return
|
||||
|
||||
if(amount != 0)
|
||||
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ", 1)
|
||||
href_list["datumrefresh"] = href_list["mobToDamage"]
|
||||
else
|
||||
. = 0
|
||||
|
||||
if(href_list["datumrefresh"])
|
||||
var/datum/DAT = locate(href_list["datumrefresh"])
|
||||
if(!istype(DAT, /datum))
|
||||
return
|
||||
src.debug_variables(DAT)
|
||||
. = 1
|
||||
|
||||
if( (usr.client != src) || !src.holder )
|
||||
return
|
||||
if(href_list["Vars"])
|
||||
debug_variables(locate(href_list["Vars"]))
|
||||
|
||||
//~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
|
||||
|
||||
var/mob/M = locate(href_list["rename"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
var/new_name = copytext(sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null),1,MAX_NAME_LEN)
|
||||
if( !new_name || !M ) return
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
|
||||
M.fully_replace_character_name(M.real_name,new_name)
|
||||
href_list["datumrefresh"] = href_list["rename"]
|
||||
|
||||
else if(href_list["varnameedit"] && href_list["datumedit"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/D = locate(href_list["datumedit"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnameedit"], 1)
|
||||
|
||||
else if(href_list["varnamechange"] && href_list["datumchange"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/D = locate(href_list["datumchange"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
usr << "This can only be used on instances of types /client or /datum"
|
||||
return
|
||||
|
||||
modify_variables(D, href_list["varnamechange"], 0)
|
||||
|
||||
else if(href_list["varnamemass"] && href_list["datummass"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["datummass"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be used on instances of type /atom"
|
||||
return
|
||||
|
||||
cmd_mass_modify_object_variables(A, href_list["varnamemass"])
|
||||
|
||||
else if(href_list["mob_player_panel"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["mob_player_panel"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.holder.show_player_panel(M)
|
||||
href_list["datumrefresh"] = href_list["mob_player_panel"]
|
||||
|
||||
else if(href_list["give_spell"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_spell"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_spell(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["give_disease"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["give_disease"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.give_disease(M)
|
||||
href_list["datumrefresh"] = href_list["give_spell"]
|
||||
|
||||
else if(href_list["ninja"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["ninja"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_ninjafy(M)
|
||||
href_list["datumrefresh"] = href_list["ninja"]
|
||||
|
||||
else if(href_list["godmode"])
|
||||
if(!check_rights(R_REJUVINATE)) return
|
||||
|
||||
var/mob/M = locate(href_list["godmode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_godmode(M)
|
||||
href_list["datumrefresh"] = href_list["godmode"]
|
||||
|
||||
else if(href_list["gib"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["gib"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
src.cmd_admin_gib(M)
|
||||
|
||||
else if(href_list["build_mode"])
|
||||
if(!check_rights(R_BUILDMODE)) return
|
||||
|
||||
var/mob/M = locate(href_list["build_mode"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
togglebuildmode(M)
|
||||
href_list["datumrefresh"] = href_list["build_mode"]
|
||||
|
||||
else if(href_list["drop_everything"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["drop_everything"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_admin_drop_everything(M)
|
||||
|
||||
else if(href_list["direct_control"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["direct_control"])
|
||||
if(!istype(M))
|
||||
usr << "This can only be used on instances of type /mob"
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
usr.client.cmd_assume_direct_control(M)
|
||||
|
||||
else if(href_list["make_skeleton"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["make_skeleton"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be used on instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
H.makeSkeleton()
|
||||
href_list["datumrefresh"] = href_list["make_skeleton"]
|
||||
|
||||
else if(href_list["delall"])
|
||||
if(!check_rights(R_DEBUG|R_SERVER)) return
|
||||
|
||||
var/obj/O = locate(href_list["delall"])
|
||||
if(!isobj(O))
|
||||
usr << "This can only be used on instances of type /obj"
|
||||
return
|
||||
|
||||
var/action_type = alert("Strict type ([O.type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
|
||||
if(action_type == "Cancel" || !action_type)
|
||||
return
|
||||
|
||||
if(alert("Are you really sure you want to delete all objects of type [O.type]?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
if(alert("Second confirmation required. Delete?",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
var/O_type = O.type
|
||||
switch(action_type)
|
||||
if("Strict type")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(Obj.type == O_type)
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
message_admins("\blue [key_name(usr)] deleted all objects of type [O_type] ([i] objects deleted) ")
|
||||
if("Type and subtypes")
|
||||
var/i = 0
|
||||
for(var/obj/Obj in world)
|
||||
if(istype(Obj,O_type))
|
||||
i++
|
||||
del(Obj)
|
||||
if(!i)
|
||||
usr << "No objects of this type exist"
|
||||
return
|
||||
log_admin("[key_name(usr)] deleted all objects of type or subtype of [O_type] ([i] objects deleted) ")
|
||||
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
|
||||
|
||||
var/atom/A = locate(href_list["explode"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_explosion(A)
|
||||
href_list["datumrefresh"] = href_list["explode"]
|
||||
|
||||
else if(href_list["emp"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["emp"])
|
||||
if(!isobj(A) && !ismob(A) && !isturf(A))
|
||||
usr << "This can only be done to instances of type /obj, /mob and /turf"
|
||||
return
|
||||
|
||||
src.cmd_admin_emp(A)
|
||||
href_list["datumrefresh"] = href_list["emp"]
|
||||
|
||||
else if(href_list["mark_object"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/datum/D = locate(href_list["mark_object"])
|
||||
if(!istype(D))
|
||||
usr << "This can only be done to instances of type /datum"
|
||||
return
|
||||
|
||||
src.holder.marked_datum = D
|
||||
href_list["datumrefresh"] = href_list["mark_object"]
|
||||
|
||||
else if(href_list["rotatedatum"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/atom/A = locate(href_list["rotatedatum"])
|
||||
if(!istype(A))
|
||||
usr << "This can only be done to instances of type /atom"
|
||||
return
|
||||
|
||||
switch(href_list["rotatedir"])
|
||||
if("right") A.dir = turn(A.dir, -45)
|
||||
if("left") A.dir = turn(A.dir, 45)
|
||||
href_list["datumrefresh"] = href_list["rotatedatum"]
|
||||
|
||||
else if(href_list["makemonkey"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemonkey"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("monkeyone"=href_list["makemonkey"]))
|
||||
|
||||
else if(href_list["makerobot"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makerobot"=href_list["makerobot"]))
|
||||
|
||||
else if(href_list["makealien"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makealien"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makealien"=href_list["makealien"]))
|
||||
|
||||
else if(href_list["makemetroid"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makemetroid"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makemetroid"=href_list["makemetroid"]))
|
||||
|
||||
else if(href_list["makeai"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["makeai"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
if(alert("Confirm mob type change?",,"Transform","Cancel") != "Transform") return
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
holder.Topic(href, list("makeai"=href_list["makeai"]))
|
||||
|
||||
else if(href_list["setmutantrace"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/carbon/human/H = locate(href_list["setmutantrace"])
|
||||
if(!istype(H))
|
||||
usr << "This can only be done to instances of type /mob/living/carbon/human"
|
||||
return
|
||||
|
||||
var/new_mutantrace = input("Please choose a new mutantrace","Mutantrace",null) as null|anything in list("NONE","golem","lizard","metroid","plant","shadow","tajaran","skrell")
|
||||
switch(new_mutantrace)
|
||||
if(null) return
|
||||
if("NONE") new_mutantrace = ""
|
||||
if(!H)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
if(H.dna)
|
||||
H.dna.mutantrace = new_mutantrace
|
||||
H.update_mutantrace()
|
||||
|
||||
else if(href_list["regenerateicons"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/M = locate(href_list["regenerateicons"])
|
||||
if(!ismob(M))
|
||||
usr << "This can only be done to instances of type /mob"
|
||||
return
|
||||
M.regenerate_icons()
|
||||
|
||||
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
|
||||
if(!check_rights(0)) return
|
||||
|
||||
var/mob/living/L = locate(href_list["mobToDamage"])
|
||||
if(!istype(L)) return
|
||||
|
||||
var/Text = href_list["adjustDamage"]
|
||||
|
||||
var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num
|
||||
|
||||
if(!L)
|
||||
usr << "Mob doesn't exist anymore"
|
||||
return
|
||||
|
||||
switch(Text)
|
||||
if("brute") L.adjustBruteLoss(amount)
|
||||
if("fire") L.adjustFireLoss(amount)
|
||||
if("toxin") L.adjustToxLoss(amount)
|
||||
if("oxygen")L.adjustOxyLoss(amount)
|
||||
if("brain") L.adjustBrainLoss(amount)
|
||||
if("clone") L.adjustCloneLoss(amount)
|
||||
else
|
||||
usr << "You caused an error. DEBUG: Text:[Text] Mob:[L]"
|
||||
return
|
||||
|
||||
if(amount != 0)
|
||||
log_admin("[key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
message_admins("\blue [key_name(usr)] dealt [amount] amount of [Text] damage to [L] ")
|
||||
href_list["datumrefresh"] = href_list["mobToDamage"]
|
||||
|
||||
if(href_list["datumrefresh"])
|
||||
var/datum/DAT = locate(href_list["datumrefresh"])
|
||||
if(!istype(DAT, /datum))
|
||||
return
|
||||
src.debug_variables(DAT)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -65,11 +65,14 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
|
||||
if(stage > max_stages)
|
||||
stage = max_stages
|
||||
if(stage_prob != 0 && prob(stage_prob) && stage != max_stages && !cure_present && age > stage_minimum_age * stage) //now the disease shouldn't get back up to stage 4 in no time
|
||||
stage++
|
||||
if(stage != 1 && (prob(1) || (cure_present && prob(cure_chance))))
|
||||
|
||||
if(stage < max_stages && prob(stage_prob) && !cure_present) //now the disease shouldn't get back up to stage 4 in no time stage++
|
||||
//world << "up"
|
||||
if(stage > 0 && (cure_present && prob(cure_chance)))
|
||||
stage--
|
||||
else if(stage <= 1 && ((prob(1) && curable) || (cure_present && prob(cure_chance))))
|
||||
//world << "down"
|
||||
|
||||
if(stage <= 1 && ((prob(1) && curable) || (cure_present && prob(cure_chance))))
|
||||
// world << "Cured as stage act"
|
||||
cure()
|
||||
return
|
||||
@@ -96,6 +99,11 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
|
||||
return result
|
||||
|
||||
/datum/disease/proc/spread_by_touch()
|
||||
switch(spread_type)
|
||||
if(CONTACT_FEET, CONTACT_HANDS, CONTACT_GENERAL)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/disease/proc/spread(var/atom/source=null, var/airborne_range = 2, var/force_spread)
|
||||
//world << "Disease [src] proc spread was called from holder [source]"
|
||||
@@ -105,7 +113,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
if(force_spread)
|
||||
how_spread = force_spread
|
||||
|
||||
if(how_spread == SPECIAL || how_spread == NON_CONTAGIOUS)//does not spread
|
||||
if(how_spread == SPECIAL || how_spread == NON_CONTAGIOUS || how_spread == BLOOD)//does not spread
|
||||
return
|
||||
|
||||
if(stage < contagious_period) //the disease is not contagious at this stage
|
||||
@@ -117,6 +125,9 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
else //no source and no mob affected. Rogue disease. Break
|
||||
return
|
||||
|
||||
if(affected_mob)
|
||||
if(affected_mob.reagents.has_reagent("spaceacillin"))
|
||||
return // Don't spread if we have spaceacillin in our system.
|
||||
|
||||
var/check_range = airborne_range//defaults to airborne - range 2
|
||||
|
||||
@@ -184,8 +195,8 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/datum/disease/proc/Copy()
|
||||
return new type(0, src)
|
||||
/datum/disease/proc/Copy(var/process = 0)
|
||||
return new type(process, src)
|
||||
|
||||
/*
|
||||
/datum/disease/Del()
|
||||
|
||||
@@ -11,6 +11,13 @@
|
||||
|
||||
var/list/archive_diseases = list()
|
||||
|
||||
// The order goes from easy to cure to hard to cure.
|
||||
var/list/advance_cures = list(
|
||||
"nutriment", "sugar", "orangejuice",
|
||||
"spaceacillin", "kelotane", "ethanol",
|
||||
"leporazine", "synaptizine", "lipozine",
|
||||
"silver", "gold", "plasma"
|
||||
)
|
||||
|
||||
/*
|
||||
|
||||
@@ -31,6 +38,8 @@ var/list/archive_diseases = list()
|
||||
// NEW VARS
|
||||
|
||||
var/list/symptoms = list() // The symptoms of the disease.
|
||||
var/id = ""
|
||||
var/processing = 0
|
||||
|
||||
/*
|
||||
|
||||
@@ -38,7 +47,7 @@ var/list/archive_diseases = list()
|
||||
|
||||
*/
|
||||
|
||||
/datum/disease/advance/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
/datum/disease/advance/New(var/process = 1, var/datum/disease/advance/D)
|
||||
|
||||
// Setup our dictionary if it hasn't already.
|
||||
if(!dictionary_symptoms.len)
|
||||
@@ -57,16 +66,27 @@ var/list/archive_diseases = list()
|
||||
else
|
||||
for(var/datum/symptom/S in D.symptoms)
|
||||
symptoms += new S.type
|
||||
name = D.name
|
||||
|
||||
Refresh(!copy)
|
||||
Refresh()
|
||||
..(process, D)
|
||||
return
|
||||
|
||||
/datum/disease/advance/Del()
|
||||
if(processing)
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
S.End(src)
|
||||
..()
|
||||
|
||||
// Randomly pick a symptom to activate.
|
||||
/datum/disease/advance/stage_act()
|
||||
..()
|
||||
if(symptoms && symptoms.len)
|
||||
|
||||
if(!processing)
|
||||
processing = 1
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
S.Start(src)
|
||||
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
S.Activate(src)
|
||||
else
|
||||
@@ -96,8 +116,8 @@ var/list/archive_diseases = list()
|
||||
return
|
||||
|
||||
// Returns the advance disease with a different reference memory.
|
||||
/datum/disease/advance/Copy()
|
||||
return new /datum/disease/advance(0, src, 1)
|
||||
/datum/disease/advance/Copy(var/process = 0)
|
||||
return new /datum/disease/advance(process, src, 1)
|
||||
|
||||
/*
|
||||
|
||||
@@ -149,13 +169,20 @@ var/list/archive_diseases = list()
|
||||
|
||||
return generated
|
||||
|
||||
/datum/disease/advance/proc/Refresh(var/save = 1)
|
||||
/datum/disease/advance/proc/Refresh(var/new_name = 0)
|
||||
//world << "[src.name] \ref[src] - REFRESH!"
|
||||
var/list/properties = GenerateProperties()
|
||||
AssignProperties(properties)
|
||||
if(save)
|
||||
|
||||
if(!archive_diseases[GetDiseaseID()])
|
||||
if(new_name)
|
||||
AssignName()
|
||||
archive_diseases[GetDiseaseID()] = src // So we don't infinite loop
|
||||
archive_diseases[GetDiseaseID()] = new /datum/disease/advance(0, src, 1)
|
||||
|
||||
var/datum/disease/advance/A = archive_diseases[GetDiseaseID()]
|
||||
AssignName(A.name)
|
||||
|
||||
//Generate disease properties based on the effects. Returns an associated list.
|
||||
/datum/disease/advance/proc/GenerateProperties()
|
||||
|
||||
@@ -182,9 +209,10 @@ var/list/archive_diseases = list()
|
||||
|
||||
hidden = list( (properties["stealth"] > 2), (properties["stealth"] > 3) )
|
||||
// The more symptoms we have, the less transmittable it is but some symptoms can make up for it.
|
||||
SetSpread(max(BLOOD, min(properties["transmittable"] - symptoms.len, AIRBORNE)))
|
||||
permeability_mod = max(round(0.5 * properties["transmittable"]), 1)
|
||||
stage_prob = max(properties["stage_rate"], 1)
|
||||
SetSpread(Clamp(properties["transmittable"] - symptoms.len, BLOOD, AIRBORNE))
|
||||
permeability_mod = max(Ceiling(0.4 * properties["transmittable"]), 1)
|
||||
cure_chance = 15 - Clamp(properties["resistance"], -5, 5) // can be between 10 and 20
|
||||
stage_prob = max(properties["stage_rate"], 2)
|
||||
SetSeverity(properties["severity"])
|
||||
GenerateCure(properties)
|
||||
else
|
||||
@@ -213,7 +241,7 @@ var/list/archive_diseases = list()
|
||||
|
||||
switch(level_sev)
|
||||
|
||||
if(0)
|
||||
if(-INFINITY to 0)
|
||||
severity = "Non-Threat"
|
||||
if(1)
|
||||
severity = "Minor"
|
||||
@@ -223,7 +251,7 @@ var/list/archive_diseases = list()
|
||||
severity = "Harmful"
|
||||
if(4)
|
||||
severity = "Dangerous!"
|
||||
if(5)
|
||||
if(5 to INFINITY)
|
||||
severity = "BIOHAZARD THREAT!"
|
||||
else
|
||||
severity = "Unknown"
|
||||
@@ -232,42 +260,9 @@ var/list/archive_diseases = list()
|
||||
// Will generate a random cure, the less resistance the symptoms have, the harder the cure.
|
||||
/datum/disease/advance/proc/GenerateCure(var/list/properties = list())
|
||||
if(properties && properties.len)
|
||||
var/res = max(properties["resistance"] - (symptoms.len / 2), 0)
|
||||
var/res = Clamp(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
|
||||
//world << "Res = [res]"
|
||||
switch(round(res))
|
||||
// Due to complications, I cannot randomly generate cures or randomly give cures.
|
||||
if(0)
|
||||
cure_id = "nutriment"
|
||||
|
||||
if(1)
|
||||
cure_id = "sodiumchloride"
|
||||
|
||||
if(2)
|
||||
cure_id = "orangejuice"
|
||||
|
||||
if(3)
|
||||
cure_id = "spaceacillin"
|
||||
|
||||
if(4)
|
||||
cure_id = "ethanol"
|
||||
|
||||
if(5)
|
||||
cure_id = "ethylredoxrazine"
|
||||
|
||||
if(6)
|
||||
cure_id = "synaptizine"
|
||||
|
||||
if(7)
|
||||
cure_id = "silver"
|
||||
|
||||
if(8)
|
||||
cure_id = "gold"
|
||||
|
||||
if(9)
|
||||
cure_id = "mindbreaker"
|
||||
|
||||
else
|
||||
cure_id = "plasma"
|
||||
cure_id = advance_cures[res]
|
||||
|
||||
// Get the cure name from the cure_id
|
||||
var/datum/reagent/D = chemical_reagents_list[cure_id]
|
||||
@@ -281,7 +276,7 @@ var/list/archive_diseases = list()
|
||||
var/s = safepick(GenerateSymptoms(level, 1))
|
||||
if(s)
|
||||
AddSymptom(s)
|
||||
Refresh()
|
||||
Refresh(1)
|
||||
return
|
||||
|
||||
// Randomly remove a symptom.
|
||||
@@ -290,7 +285,7 @@ var/list/archive_diseases = list()
|
||||
var/s = safepick(symptoms)
|
||||
if(s)
|
||||
RemoveSymptom(s)
|
||||
Refresh()
|
||||
Refresh(1)
|
||||
return
|
||||
|
||||
// Name the disease.
|
||||
@@ -300,11 +295,15 @@ var/list/archive_diseases = list()
|
||||
|
||||
// Return a unique ID of the disease.
|
||||
/datum/disease/advance/proc/GetDiseaseID()
|
||||
|
||||
var/list/L = list()
|
||||
for(var/datum/symptom/S in symptoms)
|
||||
L += S.id
|
||||
L = sortList(L) // Sort the list so it doesn't matter which order the symptoms are in.
|
||||
return dd_list2text(L, ":")
|
||||
var/result = dd_list2text(L, ":")
|
||||
id = result
|
||||
return result
|
||||
|
||||
|
||||
// Add a symptom, if it is over the limit (with a small chance to be able to go over)
|
||||
// we take a random symptom away and add the new one.
|
||||
@@ -313,7 +312,7 @@ var/list/archive_diseases = list()
|
||||
if(HasSymptom(S))
|
||||
return
|
||||
|
||||
if(symptoms.len < 3 + rand(-1, 1))
|
||||
if(symptoms.len < 5 + rand(-1, 1))
|
||||
symptoms += S
|
||||
else
|
||||
RemoveSymptom(pick(symptoms))
|
||||
@@ -338,7 +337,7 @@ var/list/archive_diseases = list()
|
||||
|
||||
var/list/diseases = list()
|
||||
|
||||
for(var/datum/disease/advance/A in D_list.Copy())
|
||||
for(var/datum/disease/advance/A in D_list)
|
||||
diseases += A.Copy()
|
||||
|
||||
if(!diseases.len)
|
||||
@@ -361,7 +360,7 @@ var/list/archive_diseases = list()
|
||||
// Should be only 1 entry left, but if not let's only return a single entry
|
||||
//world << "END MIXING!!!!!"
|
||||
var/datum/disease/advance/to_return = pick(diseases)
|
||||
to_return.Refresh()
|
||||
to_return.Refresh(1)
|
||||
return to_return
|
||||
|
||||
/proc/SetViruses(var/datum/reagent/R, var/list/data)
|
||||
@@ -376,4 +375,45 @@ var/list/archive_diseases = list()
|
||||
if(preserve.len)
|
||||
R.data["viruses"] = preserve
|
||||
|
||||
/proc/AdminCreateVirus(var/mob/user)
|
||||
var/i = 5
|
||||
|
||||
var/datum/disease/advance/D = new(0, null)
|
||||
D.symptoms = list()
|
||||
|
||||
var/list/symptoms = list()
|
||||
symptoms += "Done"
|
||||
symptoms += list_symptoms.Copy()
|
||||
do
|
||||
var/symptom = input(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom") in symptoms
|
||||
if(istext(symptom))
|
||||
i = 0
|
||||
else if(ispath(symptom))
|
||||
var/datum/symptom/S = new symptom
|
||||
if(!D.HasSymptom(S))
|
||||
D.symptoms += S
|
||||
i -= 1
|
||||
while(i > 0)
|
||||
|
||||
if(D.symptoms.len > 0)
|
||||
|
||||
var/new_name = input(user, "Name your new disease.", "New Name")
|
||||
D.AssignName(new_name)
|
||||
D.Refresh()
|
||||
|
||||
for(var/datum/disease/advance/AD in active_diseases)
|
||||
AD.Refresh()
|
||||
|
||||
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
|
||||
if(H.z != 1)
|
||||
continue
|
||||
if(!H.has_disease(D))
|
||||
H.contract_disease(D, 1)
|
||||
break
|
||||
|
||||
var/list/name_symptoms = list()
|
||||
for(var/datum/symptom/S in D.symptoms)
|
||||
name_symptoms += S.name
|
||||
message_admins("[key_name_admin(user)] has triggered a custom virus outbreak of [D.name]! It has these symptoms: [english_list(name_symptoms)]")
|
||||
|
||||
#undef RANDOM_STARTING_LEVEL
|
||||
@@ -1,5 +0,0 @@
|
||||
/datum/disease/advance/cold/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Cold"
|
||||
symptoms = list(new/datum/symptom/sneeze)
|
||||
..(process, D, copy)
|
||||
@@ -1,5 +0,0 @@
|
||||
/datum/disease/advance/flu/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Flu"
|
||||
symptoms = list(new/datum/symptom/cough)
|
||||
..(process, D, copy)
|
||||
43
code/datums/diseases/advance/presets.dm
Normal file
43
code/datums/diseases/advance/presets.dm
Normal file
@@ -0,0 +1,43 @@
|
||||
// Cold
|
||||
|
||||
/datum/disease/advance/cold/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Cold"
|
||||
symptoms = list(new/datum/symptom/sneeze)
|
||||
..(process, D, copy)
|
||||
|
||||
|
||||
// Flu
|
||||
|
||||
/datum/disease/advance/flu/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Flu"
|
||||
symptoms = list(new/datum/symptom/cough)
|
||||
..(process, D, copy)
|
||||
|
||||
|
||||
// Voice Changing
|
||||
|
||||
/datum/disease/advance/voice_change/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Epiglottis Mutation"
|
||||
symptoms = list(new/datum/symptom/voice_change)
|
||||
..(process, D, copy)
|
||||
|
||||
|
||||
// Toxin Filter
|
||||
|
||||
/datum/disease/advance/heal/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Liver Enhancer"
|
||||
symptoms = list(new/datum/symptom/heal)
|
||||
..(process, D, copy)
|
||||
|
||||
|
||||
// Hullucigen
|
||||
|
||||
/datum/disease/advance/hullucigen/New(var/process = 1, var/datum/disease/advance/D, var/copy = 0)
|
||||
if(!D)
|
||||
name = "Reality Impairment"
|
||||
symptoms = list(new/datum/symptom/hallucigen)
|
||||
..(process, D, copy)
|
||||
@@ -4,13 +4,13 @@
|
||||
Coughing
|
||||
|
||||
Noticable.
|
||||
No Resistance.
|
||||
Doesn't increase stage speed.
|
||||
Little Resistance.
|
||||
Doesn't increase stage speed much.
|
||||
Transmittable.
|
||||
Low Level.
|
||||
|
||||
BONUS
|
||||
Will force the affected mob to drop items!
|
||||
Will force the affected mob to drop small items!
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
@@ -19,8 +19,8 @@ BONUS
|
||||
|
||||
name = "Cough"
|
||||
stealth = -1
|
||||
resistance = 0
|
||||
stage_speed = 0
|
||||
resistance = 3
|
||||
stage_speed = 1
|
||||
transmittable = 2
|
||||
level = 1
|
||||
|
||||
@@ -33,5 +33,7 @@ BONUS
|
||||
M << "<span notice='notice'>[pick("You swallow excess mucus.", "You lightly cough.")]</span>"
|
||||
else
|
||||
M.emote("cough")
|
||||
M.drop_item()
|
||||
var/obj/item/I = M.get_active_hand()
|
||||
if(I && I.w_class < 3)
|
||||
M.drop_item()
|
||||
return
|
||||
@@ -15,7 +15,7 @@ Bonus
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/damage_converter // Not the egg
|
||||
/datum/symptom/damage_converter
|
||||
|
||||
name = "Toxic Compensation"
|
||||
stealth = 1
|
||||
@@ -29,7 +29,7 @@ Bonus
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(5)
|
||||
if(4, 5)
|
||||
Convert(M)
|
||||
return
|
||||
|
||||
@@ -39,5 +39,5 @@ Bonus
|
||||
var/get_damage = rand(1, 2)
|
||||
M.adjustFireLoss(-get_damage)
|
||||
M.adjustBruteLoss(-get_damage)
|
||||
M.adjustToxLoss(get_damage * 2)
|
||||
M.adjustToxLoss(get_damage)
|
||||
return 1
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
Dizziness
|
||||
|
||||
Little bit hidden.
|
||||
Hidden.
|
||||
Lowers resistance considerably.
|
||||
Decreases stage speed.
|
||||
Reduced transmittability
|
||||
@@ -18,7 +18,7 @@ Bonus
|
||||
/datum/symptom/dizzy // Not the egg
|
||||
|
||||
name = "Dizziness"
|
||||
stealth = 1
|
||||
stealth = 2
|
||||
resistance = -2
|
||||
stage_speed = -3
|
||||
transmittable = -1
|
||||
|
||||
@@ -21,7 +21,7 @@ Bonus
|
||||
stealth = 0
|
||||
resistance = 3
|
||||
stage_speed = 3
|
||||
transmittable = 1
|
||||
transmittable = 2
|
||||
level = 2
|
||||
|
||||
/datum/symptom/fever/Activate(var/datum/disease/advance/A)
|
||||
@@ -29,6 +29,7 @@ Bonus
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
M << "<span class='notice'>[pick("You feel hot.", "You feel like you're burning.")]</span>"
|
||||
M.bodytemperature += 20 * A.stage
|
||||
if(M.bodytemperature < BODYTEMP_HEAT_DAMAGE_LIMIT)
|
||||
M.bodytemperature = min(M.bodytemperature + (20 * A.stage), BODYTEMP_HEAT_DAMAGE_LIMIT - 1)
|
||||
|
||||
return
|
||||
|
||||
40
code/datums/diseases/advance/symptoms/heal.dm
Normal file
40
code/datums/diseases/advance/symptoms/heal.dm
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Healing
|
||||
|
||||
Little bit hidden.
|
||||
Lowers resistance tremendously.
|
||||
Decreases stage speed tremendously.
|
||||
Decreases transmittablity temrendously.
|
||||
Fatal Level.
|
||||
|
||||
Bonus
|
||||
Heals toxins in the affected mob's blood stream.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/heal
|
||||
|
||||
name = "Toxic Filter"
|
||||
stealth = 1
|
||||
resistance = -4
|
||||
stage_speed = -4
|
||||
transmittable = -4
|
||||
level = 6
|
||||
|
||||
/datum/symptom/heal/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(4, 5)
|
||||
Heal(M)
|
||||
return
|
||||
|
||||
/datum/symptom/heal/proc/Heal(var/mob/living/M)
|
||||
|
||||
var/get_damage = rand(1, 2)
|
||||
M.adjustToxLoss(-get_damage)
|
||||
return 1
|
||||
@@ -21,7 +21,7 @@ Bonus
|
||||
stealth = 0
|
||||
resistance = 2
|
||||
stage_speed = 2
|
||||
transmittable = 1
|
||||
transmittable = 2
|
||||
level = 2
|
||||
|
||||
/datum/symptom/shivering/Activate(var/datum/disease/advance/A)
|
||||
@@ -29,6 +29,7 @@ Bonus
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
M << "<span class='notice'>[pick("You feel cold.", "You start shaking from the cold.")]</span>"
|
||||
M.bodytemperature -= 20 * A.stage
|
||||
if(M.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
|
||||
M.bodytemperature = min(M.bodytemperature - (20 * A.stage), BODYTEMP_COLD_DAMAGE_LIMIT + 1)
|
||||
|
||||
return
|
||||
|
||||
@@ -20,9 +20,9 @@ Bonus
|
||||
|
||||
name = "Sneezing"
|
||||
stealth = -2
|
||||
resistance = 2
|
||||
resistance = 3
|
||||
stage_speed = 0
|
||||
transmittable = 3
|
||||
transmittable = 4
|
||||
level = 1
|
||||
|
||||
/datum/symptom/sneeze/Activate(var/datum/disease/advance/A)
|
||||
|
||||
@@ -25,7 +25,14 @@ var/global/const/SYMPTOM_ACTIVATION_PROB = 3
|
||||
return
|
||||
CRASH("We couldn't assign an ID!")
|
||||
|
||||
|
||||
/datum/symptom/proc/Activate(var/mob/living/M, var/stage)
|
||||
// Called when processing of the advance disease, which holds this symptom, starts.
|
||||
/datum/symptom/proc/Start(var/datum/disease/advance/A)
|
||||
return
|
||||
|
||||
// Called when the advance disease is going to be deleted or when the advance disease stops processing.
|
||||
/datum/symptom/proc/End(var/datum/disease/advance/A)
|
||||
return
|
||||
|
||||
/datum/symptom/proc/Activate(var/datum/disease/advance/A)
|
||||
return
|
||||
|
||||
|
||||
54
code/datums/diseases/advance/symptoms/voice_change.dm
Normal file
54
code/datums/diseases/advance/symptoms/voice_change.dm
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
//////////////////////////////////////
|
||||
|
||||
Voice Change
|
||||
|
||||
Very Very noticable.
|
||||
Lowers resistance considerably.
|
||||
Decreases stage speed.
|
||||
Reduced transmittable.
|
||||
Fatal Level.
|
||||
|
||||
Bonus
|
||||
Changes the voice of the affected mob. Causing confusion in communication.
|
||||
|
||||
//////////////////////////////////////
|
||||
*/
|
||||
|
||||
/datum/symptom/voice_change
|
||||
|
||||
name = "Voice Change"
|
||||
stealth = -2
|
||||
resistance = -3
|
||||
stage_speed = -3
|
||||
transmittable = -1
|
||||
level = 6
|
||||
|
||||
/datum/symptom/voice_change/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
|
||||
var/mob/living/carbon/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
M << "<span class='notice'>[pick("Your throat hurts.", "You clear your throat.")]</span>"
|
||||
else
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/random_name = ""
|
||||
switch(H.gender)
|
||||
if(MALE)
|
||||
random_name = pick(first_names_male)
|
||||
else
|
||||
random_name = pick(first_names_female)
|
||||
random_name += " [pick(last_names)]"
|
||||
H.SetSpecialVoice(random_name)
|
||||
|
||||
return
|
||||
|
||||
/datum/symptom/voice_change/End(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(ishuman(A.affected_mob))
|
||||
var/mob/living/carbon/human/H = A.affected_mob
|
||||
H.UnsetSpecialVoice()
|
||||
return
|
||||
@@ -30,7 +30,7 @@ Bonus
|
||||
|
||||
/datum/symptom/vomit/Activate(var/datum/disease/advance/A)
|
||||
..()
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB / 2))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(1, 2, 3, 4)
|
||||
@@ -42,7 +42,6 @@ Bonus
|
||||
|
||||
/datum/symptom/vomit/proc/Vomit(var/mob/living/M)
|
||||
|
||||
M.Stun(5)
|
||||
M.visible_message("<B>[M]</B> vomits on the floor!")
|
||||
|
||||
M.nutrition -= 20
|
||||
@@ -82,7 +81,7 @@ Bonus
|
||||
|
||||
/datum/symptom/vomit/blood/Vomit(var/mob/living/M)
|
||||
|
||||
M.Stun(5)
|
||||
M.Stun(1)
|
||||
M.visible_message("<B>[M]</B> vomits on the floor!")
|
||||
|
||||
// They lose blood and health.
|
||||
|
||||
@@ -112,7 +112,7 @@ Bonus
|
||||
if(prob(SYMPTOM_ACTIVATION_PROB))
|
||||
var/mob/living/M = A.affected_mob
|
||||
switch(A.stage)
|
||||
if(5)
|
||||
if(4, 5)
|
||||
M.overeatduration = 0
|
||||
M.nutrition = 400
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
agent = "Virus class [pick("A","B","C","D","E","F")][pick("A","B","C","D","E","F")]-[rand(50,300)]"
|
||||
if(prob(40))
|
||||
cure_id = list("ryetalyn")
|
||||
cure_list = list("ryetalyn")
|
||||
else
|
||||
restcure = 1
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ datum/mind
|
||||
else
|
||||
var/obj_count = 1
|
||||
for(var/datum/objective/objective in objectives)
|
||||
out += "<B>[obj_count]</B>: [objective.explanation_text] <a href='?src=\ref[src];obj_edit=\ref[objective]'>Edit</a> <a href='?src=\ref[src];obj_delete=\ref[objective]'>Delete</a><br>"
|
||||
out += "<B>[obj_count]</B>: [objective.explanation_text] <a href='?src=\ref[src];obj_edit=\ref[objective]'>Edit</a> <a href='?src=\ref[src];obj_delete=\ref[objective]'>Delete</a> <a href='?src=\ref[src];obj_completed=\ref[objective]'><font color=[objective.completed ? "green" : "red"]>Toggle Completion</font></a><br>"
|
||||
obj_count++
|
||||
out += "<a href='?src=\ref[src];obj_add=1'>Add objective</a><br><br>"
|
||||
|
||||
@@ -471,9 +471,14 @@ datum/mind
|
||||
|
||||
else if (href_list["obj_delete"])
|
||||
var/datum/objective/objective = locate(href_list["obj_delete"])
|
||||
if (!objective) return
|
||||
if(!istype(objective)) return
|
||||
objectives -= objective
|
||||
|
||||
else if(href_list["obj_completed"])
|
||||
var/datum/objective/objective = locate(href_list["obj_completed"])
|
||||
if(!istype(objective)) return
|
||||
objective.completed = !objective.completed
|
||||
|
||||
else if (href_list["revolution"])
|
||||
switch(href_list["revolution"])
|
||||
if("clear")
|
||||
@@ -757,7 +762,7 @@ datum/mind
|
||||
var/mob/living/carbon/monkey/M = current
|
||||
if (istype(H))
|
||||
log_admin("[key_name(usr)] attempting to monkeyize [key_name(current)]")
|
||||
message_admins("\blue [key_name_admin(usr)] attempting to monkeyize [key_name_admin(current)]", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] attempting to monkeyize [key_name_admin(current)]")
|
||||
src = null
|
||||
M = H.monkeyize()
|
||||
src = M.mind
|
||||
@@ -787,7 +792,7 @@ datum/mind
|
||||
D.cure(0)
|
||||
sleep(0) //because deleting of virus is doing throught spawn(0)
|
||||
log_admin("[key_name(usr)] attempting to humanize [key_name(current)]")
|
||||
message_admins("\blue [key_name_admin(usr)] attempting to humanize [key_name_admin(current)]", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] attempting to humanize [key_name_admin(current)]")
|
||||
var/obj/item/weapon/dnainjector/m2h/m2h = new
|
||||
var/obj/item/weapon/implant/mobfinder = new(M) //hack because humanizing deletes mind --rastaf0
|
||||
src = null
|
||||
|
||||
@@ -701,6 +701,18 @@
|
||||
obj/item/weapon/organ
|
||||
icon = 'icons/mob/human_races/r_human.dmi'
|
||||
|
||||
/*
|
||||
//Damage will not exceed max_damage using this proc
|
||||
//Cannot apply negative damage
|
||||
/datum/organ/external/proc/take_damage(brute, burn)
|
||||
if(owner && (owner.status_flags & GODMODE)) return 0 //godmode
|
||||
brute = max(brute,0)
|
||||
burn = max(burn,0)
|
||||
|
||||
var/can_inflict = max_damage - (brute_dam + burn_dam)
|
||||
if(!can_inflict) return 0
|
||||
*/
|
||||
|
||||
obj/item/weapon/organ/New(loc, mob/living/carbon/human/H)
|
||||
..(loc)
|
||||
if(!istype(H))
|
||||
|
||||
@@ -291,18 +291,17 @@
|
||||
/* VIRUS2 4LIFE
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/flu_virion,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/cold,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/epiglottis_virion,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/liver_enhance_virion,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/fake_gbs,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/magnitis,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/wizarditis, worse than GBS if anything
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/gbs, No. Just no.
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/pierrot_throat,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/brainrot,
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/hullucigen_virion,
|
||||
/obj/item/weapon/storage/syringes,
|
||||
/obj/item/weapon/storage/beakerbox
|
||||
*/
|
||||
)
|
||||
cost = 20
|
||||
containertype = /obj/structure/closet/crate/secure/weapon
|
||||
/obj/item/weapon/storage/beakerbox)
|
||||
/obj/item/weapon/reagent_containers/glass/bottle/mutagen)
|
||||
cost = 25 containertype = /obj/structure/closet/crate/secure/weapon
|
||||
containername = "Virus crate"
|
||||
access = access_cmo
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@
|
||||
var/list/bot = new()
|
||||
var/list/misc = new()
|
||||
var/list/isactive = new()
|
||||
|
||||
var/dat = {"
|
||||
<head><style>
|
||||
.manifest {border-collapse:collapse;}
|
||||
@@ -168,21 +167,6 @@
|
||||
dat = replacetext(dat, "\t", "")
|
||||
return dat
|
||||
|
||||
/obj/item/device/infra_sensor
|
||||
name = "Infrared Sensor"
|
||||
desc = "Scans for infrared beams in the vicinity."
|
||||
icon_state = "infra_sensor"
|
||||
var/passive = 1.0
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
item_state = "electronic"
|
||||
m_amt = 150
|
||||
origin_tech = "magnets=2"
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/obj/effect/laser
|
||||
name = "laser"
|
||||
desc = "IT BURNS!!!"
|
||||
@@ -263,13 +247,6 @@
|
||||
anchored = 1
|
||||
unacidable = 1//temporary until I decide whether the borg can be removed. -veyveyr
|
||||
|
||||
/obj/effect/deskclutter
|
||||
name = "desk clutter"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "deskclutter"
|
||||
desc = "Some clutter the detective has accumalated over the years..."
|
||||
anchored = 1
|
||||
|
||||
/obj/item/mouse_drag_pointer = MOUSE_ACTIVE_POINTER
|
||||
|
||||
// TODO: robust mixology system! (and merge with beakers, maybe)
|
||||
|
||||
@@ -33,6 +33,16 @@
|
||||
var/growthstages = 0
|
||||
var/plant_type = 0 // 0 = 'normal plant'; 1 = weed; 2 = shroom
|
||||
|
||||
/obj/item/seeds/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
if (istype(O, /obj/item/device/analyzer/plant_analyzer))
|
||||
user << "*** <B>[plantname]</B> ***"
|
||||
user << "-Plant Endurance: \blue [endurance]"
|
||||
user << "-Plant Lifespan: \blue [lifespan]"
|
||||
if(yield != -1)
|
||||
user << "-Plant Yield: \blue [yield]"
|
||||
user << "-Plant Production: \blue [production]"
|
||||
if(potency != -1)
|
||||
user << "-Plant Potency: \blue [potency]"
|
||||
|
||||
/obj/item/seeds/chiliseed
|
||||
name = "pack of chili seeds"
|
||||
@@ -706,6 +716,23 @@
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
|
||||
/obj/item/seeds/poisonedappleseed
|
||||
name = "pack of apple seeds"
|
||||
desc = "These seeds grow into apple trees."
|
||||
icon_state = "seed-apple"
|
||||
mypath = "/obj/item/seeds/poisonedappleseed"
|
||||
species = "apple"
|
||||
plantname = "Apple Tree"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/apple/poisoned"
|
||||
lifespan = 55
|
||||
endurance = 35
|
||||
maturation = 6
|
||||
production = 6
|
||||
yield = 5
|
||||
potency = 10
|
||||
plant_type = 0
|
||||
growthstages = 6
|
||||
|
||||
/obj/item/seeds/goldappleseed
|
||||
name = "pack of golden apple seeds"
|
||||
desc = "These seeds grow into golden apple trees. Good thing there are no firebirds in space."
|
||||
@@ -979,6 +1006,32 @@
|
||||
plant_type = 0
|
||||
growthstages = 5
|
||||
|
||||
/obj/item/seeds/kudzuseed
|
||||
name = "pack of kudzu seeds"
|
||||
desc = "These seeds grow into a weed that grows incredibly fast."
|
||||
icon_state = "seed-kudzu"
|
||||
mypath = "/obj/item/seeds/kudzuseed"
|
||||
species = "kudzu"
|
||||
plantname = "Kudzu"
|
||||
productname = "/obj/item/weapon/reagent_containers/food/snacks/grown/kudzupod"
|
||||
lifespan = 20
|
||||
endurance = 10
|
||||
maturation = 6
|
||||
production = 6
|
||||
yield = 4
|
||||
potency = 10
|
||||
growthstages = 4
|
||||
plant_type = 1
|
||||
|
||||
/obj/item/seeds/kudzuseed/attack_self(mob/user as mob)
|
||||
if(istype(user.loc,/turf/space))
|
||||
return
|
||||
user << "<span class='notice'>You plant the kudzu. You monster.</span>"
|
||||
new /obj/effect/spacevine_controller(user.loc)
|
||||
del(src)
|
||||
|
||||
|
||||
|
||||
/* // Maybe one day when I get it to work like a grenade which exlodes gibs.
|
||||
/obj/item/seeds/gibtomatoseed
|
||||
name = "Gib Tomato seeds"
|
||||
|
||||
@@ -14,15 +14,6 @@
|
||||
desc = "It's useful for both carrying extra gear and proudly declaring your insanity."
|
||||
icon_state = "cultpack"
|
||||
|
||||
/obj/item/weapon/storage/trashbag
|
||||
name = "trash bag"
|
||||
desc = "It's the heavy-duty black polymer kind. Time to take out the trash!"
|
||||
icon_state = "trashbag"
|
||||
item_state = "trashbag"
|
||||
w_class = 4.0
|
||||
storage_slots = 20
|
||||
max_w_class = 1
|
||||
max_combined_w_class = 20
|
||||
/*
|
||||
/obj/item/weapon/storage/lbe
|
||||
name = "Load Bearing Equipment"
|
||||
@@ -31,6 +22,7 @@
|
||||
w_class = 2.0
|
||||
max_combined_w_class = 17
|
||||
*/
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle
|
||||
name = "pill bottle"
|
||||
desc = "It's an airtight container for storing medication."
|
||||
@@ -519,23 +511,23 @@
|
||||
|
||||
//Plasma (rare ore)
|
||||
if(pickednum >= 15)
|
||||
new /obj/item/stack/sheet/plasma(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/sheet/mineral/plasma(src, rand(rare_min, rare_max))
|
||||
|
||||
//Silver (rare ore)
|
||||
if(pickednum >= 20)
|
||||
new /obj/item/stack/sheet/silver(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/sheet/mineral/silver(src, rand(rare_min, rare_max))
|
||||
|
||||
//Gold (rare ore)
|
||||
if(pickednum >= 30)
|
||||
new /obj/item/stack/sheet/gold(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/sheet/mineral/gold(src, rand(rare_min, rare_max))
|
||||
|
||||
//Uranium (rare ore)
|
||||
if(pickednum >= 40)
|
||||
new /obj/item/stack/sheet/uranium(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/sheet/mineral/uranium(src, rand(rare_min, rare_max))
|
||||
|
||||
//Diamond (rare HONK)
|
||||
if(pickednum >= 45)
|
||||
new /obj/item/stack/sheet/diamond(src, rand(rare_min, rare_max))
|
||||
new /obj/item/stack/sheet/mineral/diamond(src, rand(rare_min, rare_max))
|
||||
|
||||
//Jetpack (You hit the jackpot!)
|
||||
if(pickednum == 50)
|
||||
@@ -553,12 +545,12 @@
|
||||
|
||||
/obj/item/stack/sheet/metal,
|
||||
/obj/item/stack/sheet/glass,
|
||||
/obj/item/stack/sheet/gold,
|
||||
/obj/item/stack/sheet/silver,
|
||||
/obj/item/stack/sheet/plasma,
|
||||
/obj/item/stack/sheet/uranium,
|
||||
/obj/item/stack/sheet/diamond,
|
||||
/obj/item/stack/sheet/clown,
|
||||
/obj/item/stack/sheet/mineral/gold,
|
||||
/obj/item/stack/sheet/mineral/silver,
|
||||
/obj/item/stack/sheet/mineral/plasma,
|
||||
/obj/item/stack/sheet/mineral/uranium,
|
||||
/obj/item/stack/sheet/mineral/diamond,
|
||||
/obj/item/stack/sheet/mineral/clown,
|
||||
/obj/item/stack/sheet/plasteel,
|
||||
/obj/item/stack/rods
|
||||
|
||||
|
||||
@@ -596,15 +596,6 @@
|
||||
throw_speed = 4
|
||||
throw_range = 5
|
||||
|
||||
/obj/item/weapon/camera
|
||||
name = "camera"
|
||||
desc = "Use this to take pictures."
|
||||
icon_state = "camera"
|
||||
var/last_pic = 1.0
|
||||
item_state = "wrench"
|
||||
w_class = 2.0
|
||||
origin_tech = "magnets=1"
|
||||
|
||||
/obj/item/weapon/card
|
||||
name = "card"
|
||||
desc = "Does card things."
|
||||
@@ -819,25 +810,6 @@
|
||||
/obj/item/weapon/dummy/blob_act()
|
||||
return
|
||||
|
||||
/obj/item/weapon/f_card
|
||||
name = "finger print card"
|
||||
desc = "Used to take fingerprints."
|
||||
icon = 'icons/obj/card.dmi'
|
||||
icon_state = "fingerprint0"
|
||||
var/amount = 10.0
|
||||
item_state = "paper"
|
||||
throwforce = 1
|
||||
w_class = 1.0
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
|
||||
|
||||
/obj/item/weapon/fcardholder
|
||||
name = "fingerprint card case"
|
||||
desc = "Apply finger print card."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "fcardholder0"
|
||||
item_state = "clipboard"
|
||||
|
||||
/*
|
||||
/obj/item/weapon/game_kit
|
||||
@@ -935,23 +907,23 @@
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
throwforce = 0
|
||||
w_class = 3.0
|
||||
throw_speed = 2
|
||||
throw_range = 0 //cannot be thrown
|
||||
origin_tech = "materials=1"
|
||||
var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute
|
||||
var/breakouttime = 300 //Deciseconds = 30s = 0.5 minute
|
||||
|
||||
/obj/item/weapon/legcuffs/beartrap
|
||||
name = "bear trap"
|
||||
icon_state = "beartrap"
|
||||
throw_speed = 2
|
||||
throw_range = 1
|
||||
icon_state = "beartrap0"
|
||||
desc = "A trap used to catch bears and other legged creatures."
|
||||
breakouttime = 300 //Deciseconds = 30s = 0.5 minute
|
||||
var/armed = 0
|
||||
|
||||
/obj/item/weapon/legcuffs/beartrap/attack_self()
|
||||
/obj/item/weapon/legcuffs/beartrap/attack_self(mob/user as mob)
|
||||
..()
|
||||
if(ishuman(usr) && !usr.stat && !usr.restrained())
|
||||
if(ishuman(user) && !user.stat && !user.restrained())
|
||||
armed = !armed
|
||||
usr << "\blue \the [src] is now [(armed)?"armed":"disarmed"]"
|
||||
icon_state = "beartrap[armed]"
|
||||
user << "<span class='notice'>[src] is now [armed ? "armed" : "disarmed"]</span>"
|
||||
|
||||
/obj/item/weapon/legcuffs/beartrap/HasEntered(AM as mob|obj)
|
||||
if(armed)
|
||||
@@ -960,16 +932,16 @@
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == "run")
|
||||
armed = 0
|
||||
usr.legcuffed = src
|
||||
src.loc = usr
|
||||
usr.update_inv_legcuffed()
|
||||
H.legcuffed = src
|
||||
src.loc = H
|
||||
H.update_inv_legcuffed()
|
||||
H << "\red <B>You step on \the [src]!</B>"
|
||||
feedback_add_details("handcuffs","B") //Yes, I know they're legcuffs. Don't change this, no need for an extra variable. The "B" is used to tell them apart.
|
||||
for(var/mob/O in viewers(H, null))
|
||||
if(O == H)
|
||||
continue
|
||||
O.show_message("\red <B>[H] steps on \the [src].</B>", 1)
|
||||
if(isanimal(AM))
|
||||
if(isanimal(AM) && !istype(AM, /mob/living/simple_animal/parrot))
|
||||
armed = 0
|
||||
var/mob/living/simple_animal/SA = AM
|
||||
SA.health = 0
|
||||
@@ -1204,6 +1176,12 @@
|
||||
flags = FPRINT | TABLEPASS | NOSHIELD
|
||||
attack_verb = list("bludgeoned", "whacked", "disciplined")
|
||||
|
||||
/obj/item/weapon/staff/broom
|
||||
name = "broom"
|
||||
desc = "Used for sweeping, and flying into the night while cackling. Black cat not included."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "broom"
|
||||
|
||||
/obj/item/weapon/staff/stick
|
||||
name = "stick"
|
||||
desc = "A great tool to drag someone else's drinks across the bar."
|
||||
@@ -1428,7 +1406,7 @@
|
||||
pressure_resistance = 70
|
||||
|
||||
|
||||
/obj/item/weapon/camera_bug
|
||||
/obj/item/device/camera_bug
|
||||
name = "camera bug"
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "flash"
|
||||
|
||||
@@ -438,38 +438,51 @@ proc/process_ghost_teleport_locs()
|
||||
|
||||
//ENEMY
|
||||
|
||||
//names are used
|
||||
/area/syndicate_station
|
||||
name = "\improper Syndicate Station"
|
||||
icon_state = "yellow"
|
||||
requires_power = 0
|
||||
|
||||
/area/syndicate_station/start
|
||||
name = "\improper Syndicate Station Start"
|
||||
name = "\improper Syndicate Forward Operating Base"
|
||||
icon_state = "yellow"
|
||||
|
||||
/area/syndicate_station/one
|
||||
name = "\improper Syndicate Station Location 1"
|
||||
icon_state = "green"
|
||||
/area/syndicate_station/southwest
|
||||
name = "\improper south-west of SS13"
|
||||
icon_state = "southwest"
|
||||
|
||||
/area/syndicate_station/two
|
||||
name = "\improper Syndicate Station Location 2"
|
||||
icon_state = "green"
|
||||
/area/syndicate_station/northwest
|
||||
name = "\improper north-west of SS13"
|
||||
icon_state = "northwest"
|
||||
|
||||
/area/syndicate_station/three
|
||||
name = "\improper Syndicate Station Location 3"
|
||||
icon_state = "green"
|
||||
/area/syndicate_station/northeast
|
||||
name = "\improper north-east of SS13"
|
||||
icon_state = "northeast"
|
||||
|
||||
/area/syndicate_station/four
|
||||
name = "\improper Syndicate Station Location 4"
|
||||
icon_state = "green"
|
||||
/area/syndicate_station/southeast
|
||||
name = "\improper south-east of SS13"
|
||||
icon_state = "southeast"
|
||||
|
||||
/area/syndicate_station/five
|
||||
name = "\improper Syndicate Station Location 5"
|
||||
icon_state = "green"
|
||||
/area/syndicate_station/north
|
||||
name = "\improper north of SS13"
|
||||
icon_state = "north"
|
||||
|
||||
/area/syndicate_station/six
|
||||
name = "\improper Syndicate Station Location 6"
|
||||
icon_state = "green"
|
||||
/area/syndicate_station/south
|
||||
name = "\improper south of SS13"
|
||||
icon_state = "south"
|
||||
|
||||
/area/syndicate_station/commssat
|
||||
name = "\improper south of the communication satellite"
|
||||
icon_state = "south"
|
||||
|
||||
/area/syndicate_station/mining
|
||||
name = "\improper north east of the mining asteroid"
|
||||
icon_state = "north"
|
||||
|
||||
/area/syndicate_station/transit
|
||||
name = "\improper hyperspace"
|
||||
icon_state = "shuttle"
|
||||
|
||||
/area/wizard_station
|
||||
name = "\improper Wizard's Den"
|
||||
@@ -953,7 +966,7 @@ proc/process_ghost_teleport_locs()
|
||||
music = "signal"
|
||||
|
||||
/area/teleporter/gateway
|
||||
name = "\improper Secure Construction Area"
|
||||
name = "\improper Gateway"
|
||||
icon_state = "teleporter"
|
||||
music = "signal"
|
||||
|
||||
@@ -1503,6 +1516,35 @@ proc/process_ghost_teleport_locs()
|
||||
name = "\improper Strange Station"
|
||||
icon_state = "away"
|
||||
|
||||
/area/awaymission/wwmines
|
||||
name = "\improper Wild West Mines"
|
||||
icon_state = "away1"
|
||||
luminosity = 1
|
||||
requires_power = 0
|
||||
|
||||
/area/awaymission/wwgov
|
||||
name = "\improper Wild West Mansion"
|
||||
icon_state = "away2"
|
||||
luminosity = 1
|
||||
requires_power = 0
|
||||
|
||||
/area/awaymission/wwrefine
|
||||
name = "\improper Wild West Refinery"
|
||||
icon_state = "away3"
|
||||
luminosity = 1
|
||||
requires_power = 0
|
||||
|
||||
/area/awaymission/wwvault
|
||||
name = "\improper Wild West Vault"
|
||||
icon_state = "away3"
|
||||
luminosity = 0
|
||||
|
||||
/area/awaymission/wwvaultdoors
|
||||
name = "\improper Wild West Vault Doors" // this is to keep the vault area being entirely lit because of requires_power
|
||||
icon_state = "away2"
|
||||
requires_power = 0
|
||||
luminosity = 0
|
||||
|
||||
/area/awaymission/desert
|
||||
name = "Mars"
|
||||
icon_state = "away"
|
||||
@@ -1520,10 +1562,13 @@ proc/process_ghost_teleport_locs()
|
||||
icon_state = "away3"
|
||||
|
||||
/area/awaymission/spacebattle
|
||||
name = "\improper Nanotrasen Cruiser"
|
||||
name = "\improper Space Battle"
|
||||
icon_state = "away"
|
||||
requires_power = 0
|
||||
|
||||
/area/awaymission/spacebattle/cruiser
|
||||
name = "\improper Nanotrasen Cruiser"
|
||||
|
||||
/area/awaymission/spacebattle/syndicate1
|
||||
name = "\improper Syndicate Assault Ship 1"
|
||||
|
||||
@@ -1548,6 +1593,10 @@ proc/process_ghost_teleport_locs()
|
||||
/area/awaymission/spacebattle/secret
|
||||
name = "\improper Hidden Chamber"
|
||||
|
||||
/area/awaymission/listeningpost
|
||||
name = "\improper Listening Post"
|
||||
icon_state = "away"
|
||||
requires_power = 0
|
||||
|
||||
/area/awaymission/beach
|
||||
name = "Beach"
|
||||
|
||||
@@ -242,68 +242,56 @@
|
||||
|
||||
|
||||
/area/Entered(A)
|
||||
|
||||
var/sound = null
|
||||
var/musVolume = 25
|
||||
sound = 'sound/ambience/ambigen1.ogg'
|
||||
var/sound = 'sound/ambience/ambigen1.ogg'
|
||||
|
||||
if(!istype(A,/mob/living)) return
|
||||
|
||||
if (ismob(A))
|
||||
var/mob/living/L = A
|
||||
if(!L.ckey) return
|
||||
|
||||
if (istype(A, /mob/dead/observer)) return
|
||||
if (!A:ckey)
|
||||
return
|
||||
if(!L.lastarea)
|
||||
L.lastarea = get_area(L.loc)
|
||||
var/area/newarea = get_area(L.loc)
|
||||
var/area/oldarea = L.lastarea
|
||||
if((oldarea.has_gravity == 0) && (newarea.has_gravity == 1) && (L.m_intent == "run")) // Being ready when you change areas gives you a chance to avoid falling all together.
|
||||
thunk(L)
|
||||
|
||||
if(istype(A,/mob/living))
|
||||
if(!A:lastarea)
|
||||
A:lastarea = get_area(A:loc)
|
||||
//world << "Entered new area [get_area(A:loc)]"
|
||||
var/area/newarea = get_area(A:loc)
|
||||
var/area/oldarea = A:lastarea
|
||||
if((oldarea.has_gravity == 0) && (newarea.has_gravity == 1) && (A:m_intent == "run")) // Being ready when you change areas gives you a chance to avoid falling all together.
|
||||
thunk(A)
|
||||
L.lastarea = newarea
|
||||
|
||||
A:lastarea = newarea
|
||||
// Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
|
||||
if(!(L && L.client && (L.client.prefs.toggles & SOUND_AMBIENCE))) return
|
||||
|
||||
//if (A:ear_deaf) return
|
||||
if(!L.client.ambience_playing)
|
||||
L.client.ambience_playing = 1
|
||||
L << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2)
|
||||
|
||||
if (A && A:client && !A:client:ambience_playing && !A:client:no_ambi) // Ambience goes down here -- make sure to list each area seperately for ease of adding things in later, thanks! Note: areas adjacent to each other should have the same sounds to prevent cutoff when possible.- LastyScratch
|
||||
A:client:ambience_playing = 1
|
||||
A << sound('sound/ambience/shipambience.ogg', repeat = 1, wait = 0, volume = 35, channel = 2)
|
||||
if(prob(35))
|
||||
|
||||
switch(name)
|
||||
if ("Chapel") sound = pick('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg')
|
||||
if ("Morgue") sound = pick('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/music/title2.ogg')
|
||||
if ("Space") sound = pick('sound/ambience/ambispace.ogg','sound/music/title2.ogg',)
|
||||
if ("Engine Control", "Engineering", "Engineering SMES") sound = pick('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
|
||||
if ("AI Satellite Teleporter Room") sound = pick('sound/ambience/ambimalf.ogg')
|
||||
if ("AI Upload Foyer") sound = pick('sound/ambience/ambimalf.ogg')
|
||||
if ("AI Upload Chamber") sound = pick('sound/ambience/ambimalf.ogg')
|
||||
if ("Mine")
|
||||
sound = pick('sound/ambience/ambimine.ogg')
|
||||
musVolume = 25
|
||||
|
||||
if("Telecoms Teleporter") sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
||||
if("Telecoms Central Compartment") sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
||||
if("Telecoms Satellite") sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
||||
if("Telecoms Foyer") sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
||||
if("Telecommunications Satellite West Wing") sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
||||
if("Telecommunications Satellite East Wing") sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
||||
if("Telecoms Control Room") sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
||||
if("Telecommunications Satellite Lounge") sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
||||
|
||||
else
|
||||
sound = pick('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg')
|
||||
|
||||
|
||||
if (prob(35))
|
||||
if(A && A:client && !A:client:played && !A:client:no_ambi)
|
||||
A << sound(sound, repeat = 0, wait = 0, volume = musVolume, channel = 1)
|
||||
A:client:played = 1
|
||||
spawn(600)
|
||||
if(A && A:client)
|
||||
A:client:played = 0
|
||||
if(istype(src, /area/chapel))
|
||||
sound = pick('sound/ambience/ambicha1.ogg','sound/ambience/ambicha2.ogg','sound/ambience/ambicha3.ogg','sound/ambience/ambicha4.ogg')
|
||||
else if(istype(src, /area/medical/morgue))
|
||||
sound = pick('sound/ambience/ambimo1.ogg','sound/ambience/ambimo2.ogg','sound/ambience/title2.ogg')
|
||||
else if(type == /area)
|
||||
sound = pick('sound/ambience/ambispace.ogg','sound/ambience/title2.ogg',)
|
||||
else if(istype(src, /area/engine))
|
||||
sound = pick('sound/ambience/ambisin1.ogg','sound/ambience/ambisin2.ogg','sound/ambience/ambisin3.ogg','sound/ambience/ambisin4.ogg')
|
||||
else if(istype(src, /area/AIsattele) || istype(src, /area/turret_protected/ai) || istype(src, /area/turret_protected/ai_upload) || istype(src, /area/turret_protected/ai_upload_foyer))
|
||||
sound = pick('sound/ambience/ambimalf.ogg')
|
||||
else if(istype(src, /area/mine/explored) || istype(src, /area/mine/unexplored))
|
||||
sound = pick('sound/ambience/ambimine.ogg')
|
||||
musVolume = 25
|
||||
else if(istype(src, /area/tcommsat) || istype(src, /area/turret_protected/tcomwest) || istype(src, /area/turret_protected/tcomeast) || istype(src, /area/turret_protected/tcomfoyer) || istype(src, /area/turret_protected/tcomsat))
|
||||
sound = pick('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
|
||||
else
|
||||
sound = pick('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg')
|
||||
|
||||
if(!L.client.played)
|
||||
L << sound(sound, repeat = 0, wait = 0, volume = musVolume, channel = 1)
|
||||
L.client.played = 1
|
||||
spawn(600) //ewww - this is very very bad
|
||||
if(L.&& L.client)
|
||||
L.client.played = 0
|
||||
|
||||
/area/proc/gravitychange(var/gravitystate = 0, var/area/A)
|
||||
|
||||
|
||||
@@ -72,8 +72,6 @@ proc/admin_spawn_room_at_pos()
|
||||
wall=/turf/simulated/wall/r_wall
|
||||
if("Regular wall")
|
||||
wall=/turf/simulated/wall
|
||||
if("Asteroid wall")
|
||||
wall=/turf/simulated/wall/asteroid
|
||||
if("Resin wall")
|
||||
wall=/obj/effect/alien/resin
|
||||
switch(alert("Floor type",null,"Regular floor","Reinforced floor"))
|
||||
|
||||
@@ -340,15 +340,16 @@ its easier to just keep the beam vertical.
|
||||
//Add the list if it does not exist.
|
||||
if(!fingerprintshidden)
|
||||
fingerprintshidden = list()
|
||||
|
||||
//Fibers~
|
||||
add_fibers(M)
|
||||
|
||||
//He has no prints!
|
||||
if (mFingerprints in M.mutations)
|
||||
if(fingerprintslast != M.key)
|
||||
fingerprintshidden += "(Has no fingerprints) Real name: [M.real_name], Key: [M.key]"
|
||||
fingerprintslast = M.key
|
||||
return 0
|
||||
//Now, lets get to the dirty work.
|
||||
return 0 //Now, lets get to the dirty work.
|
||||
//First, make sure their DNA makes sense.
|
||||
var/mob/living/carbon/human/H = M
|
||||
if (!istype(H.dna, /datum/dna) || !H.dna.uni_identity || (length(H.dna.uni_identity) != 32))
|
||||
@@ -356,55 +357,43 @@ its easier to just keep the beam vertical.
|
||||
H.dna = new /datum/dna(null)
|
||||
H.dna.real_name = H.real_name
|
||||
H.check_dna()
|
||||
|
||||
//Now, deal with gloves.
|
||||
if (H.gloves && H.gloves != src)
|
||||
if(fingerprintslast != H.key)
|
||||
fingerprintshidden += text("\[[]\](Wearing gloves). Real name: [], Key: []",time_stamp(), H.real_name, H.key)
|
||||
fingerprintslast = H.key
|
||||
H.gloves.add_fingerprint(M)
|
||||
|
||||
//Deal with gloves the pass finger/palm prints.
|
||||
if(H.gloves != src)
|
||||
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
|
||||
return 0
|
||||
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
|
||||
return 0
|
||||
|
||||
//More adminstuffz
|
||||
if(fingerprintslast != H.key)
|
||||
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), H.real_name, H.key)
|
||||
fingerprintslast = H.key
|
||||
|
||||
//Make the list if it does not exist.
|
||||
if(!fingerprints)
|
||||
fingerprints = list()
|
||||
|
||||
//Hash this shit.
|
||||
var/full_print = md5(H.dna.uni_identity)
|
||||
//Smudge up dem prints some
|
||||
for(var/P in fingerprints)
|
||||
if(P == full_print)
|
||||
continue
|
||||
var/test_print = stars(fingerprints[P], rand(85,95))
|
||||
if(stringpercent(test_print) == 32) //She's full of stars! (No actual print left)
|
||||
fingerprints.Remove(P)
|
||||
else
|
||||
fingerprints[P] = test_print
|
||||
var/print = fingerprints[full_print] //Find if the print is already there.
|
||||
//It is not! We need to add it!
|
||||
if(!print)
|
||||
fingerprints[full_print] = stars(full_print, H.gloves ? rand(10,20) : rand(25,40))
|
||||
//It's there, lets merge this shit!
|
||||
else
|
||||
fingerprints[full_print] = stringmerge(print, stars(full_print, (H.gloves ? rand(10,20) : rand(25,40))))
|
||||
|
||||
// Add the fingerprints
|
||||
fingerprints[full_print] = full_print
|
||||
|
||||
return 1
|
||||
else
|
||||
//Smudge up dem prints some
|
||||
for(var/P in fingerprints)
|
||||
var/test_print = stars(fingerprints[P], rand(85,95))
|
||||
if(stringpercent(test_print) == 32) //She's full of stars! (No actual print left)
|
||||
fingerprints.Remove(P)
|
||||
else
|
||||
fingerprints[P] = test_print
|
||||
if(fingerprintslast != M.key)
|
||||
fingerprintshidden += text("\[[]\]Real name: [], Key: []",time_stamp(), M.real_name, M.key)
|
||||
fingerprintslast = M.key
|
||||
|
||||
//Cleaning up shit.
|
||||
if(fingerprints && !fingerprints.len)
|
||||
del(fingerprints)
|
||||
@@ -416,9 +405,14 @@ its easier to just keep the beam vertical.
|
||||
A.fingerprints = list()
|
||||
if(!istype(A.fingerprintshidden,/list))
|
||||
A.fingerprintshidden = list()
|
||||
A.fingerprints |= fingerprints //detective
|
||||
A.fingerprintshidden |= fingerprintshidden //admin
|
||||
A.fingerprintslast = fingerprintslast
|
||||
|
||||
//skytodo
|
||||
//A.fingerprints |= fingerprints //detective
|
||||
//A.fingerprintshidden |= fingerprintshidden //admin
|
||||
if(fingerprints)
|
||||
A.fingerprints |= fingerprints.Copy() //detective
|
||||
if(fingerprintshidden)
|
||||
A.fingerprintshidden |= fingerprintshidden.Copy() //admin A.fingerprintslast = fingerprintslast
|
||||
|
||||
|
||||
//returns 1 if made bloody, returns 0 otherwise
|
||||
@@ -469,7 +463,7 @@ its easier to just keep the beam vertical.
|
||||
if(!B.blood_DNA[M.dna.unique_enzymes])
|
||||
B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
var/datum/disease/newDisease = new D.type
|
||||
var/datum/disease/newDisease = D.Copy(1)
|
||||
B.viruses += newDisease
|
||||
newDisease.holder = B
|
||||
return 1 //we bloodied the floor
|
||||
@@ -478,7 +472,7 @@ its easier to just keep the beam vertical.
|
||||
var/obj/effect/decal/cleanable/blood/newblood = new /obj/effect/decal/cleanable/blood(T)
|
||||
newblood.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
var/datum/disease/newDisease = new D.type
|
||||
var/datum/disease/newDisease = D.Copy(1)
|
||||
newblood.viruses += newDisease
|
||||
newDisease.holder = newblood
|
||||
return 1 //we bloodied the floor
|
||||
@@ -503,7 +497,7 @@ its easier to just keep the beam vertical.
|
||||
this.icon_state = "vomittox_[pick(1,4)]"
|
||||
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
var/datum/disease/newDisease = new D.type
|
||||
var/datum/disease/newDisease = D.Copy(1)
|
||||
this.viruses += newDisease
|
||||
newDisease.holder = this
|
||||
|
||||
@@ -515,7 +509,7 @@ its easier to just keep the beam vertical.
|
||||
var/obj/effect/decal/cleanable/blood/this = new /obj/effect/decal/cleanable/blood(source1)
|
||||
this.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
var/datum/disease/newDisease = new D.type
|
||||
var/datum/disease/newDisease = D.Copy(1)
|
||||
this.viruses += newDisease
|
||||
newDisease.holder = this
|
||||
|
||||
@@ -525,7 +519,7 @@ its easier to just keep the beam vertical.
|
||||
var/obj/effect/decal/cleanable/xenoblood/this = new /obj/effect/decal/cleanable/xenoblood(source2)
|
||||
this.blood_DNA["UNKNOWN BLOOD"] = "X*"
|
||||
for(var/datum/disease/D in M.viruses)
|
||||
var/datum/disease/newDisease = new D.type
|
||||
var/datum/disease/newDisease = D.Copy(1)
|
||||
this.viruses += newDisease
|
||||
newDisease.holder = this
|
||||
|
||||
|
||||
@@ -287,3 +287,7 @@ datum/signal
|
||||
. = "signal = {source = '[source]' ()\n"
|
||||
for (var/i in data)
|
||||
. += "data\[\"[i]\"\] = \"[data[i]]\"\n"
|
||||
if(islist(data[i]))
|
||||
var/list/L = data[i]
|
||||
for(var/t in L)
|
||||
. += "data\[\"[i]\"\] list has: [t]"
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
proc/create_fragments(var/wave_size = 1)
|
||||
var/list/candidates = list()
|
||||
for(var/mob/dead/observer/G in player_list)
|
||||
if(G.client.be_alien)
|
||||
if(G.client.prefs.be_special & BE_ALIEN)
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
name = "Pylon"
|
||||
desc = "A floating crystal that hums with an unearthly energy"
|
||||
icon_state = "pylon"
|
||||
luminosity = 5
|
||||
|
||||
|
||||
/obj/structure/cult/tome
|
||||
|
||||
@@ -382,7 +382,7 @@ var/list/sacrificed = list()
|
||||
D.real_name = copytext(P.info, 1, MAX_NAME_LEN)
|
||||
break
|
||||
D.universal_speak = 1
|
||||
D.nodamage = 0
|
||||
D.status_flags &= ~GODMODE
|
||||
|
||||
D.key = ghost.key
|
||||
|
||||
@@ -755,7 +755,7 @@ var/list/sacrificed = list()
|
||||
if(iscultist(C) && !C.stat)
|
||||
users+=C
|
||||
if(users.len>=3)
|
||||
var/mob/cultist = input("Choose the one who you want to free", "Followers of Geometer") as null|anything in (cultists - users)
|
||||
var/mob/living/carbon/cultist = input("Choose the one who you want to free", "Followers of Geometer") as null|anything in (cultists - users)
|
||||
if(!cultist)
|
||||
return fizzle()
|
||||
if (cultist == user) //just to be sure.
|
||||
@@ -805,7 +805,7 @@ var/list/sacrificed = list()
|
||||
if(iscultist(C) && !C.stat)
|
||||
users+=C
|
||||
if(users.len>=3)
|
||||
var/mob/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - user)
|
||||
var/mob/living/carbon/cultist = input("Choose the one who you want to summon", "Followers of Geometer") as null|anything in (cultists - user)
|
||||
if(!cultist)
|
||||
return fizzle()
|
||||
if (cultist == user) //just to be sure.
|
||||
|
||||
@@ -219,9 +219,42 @@
|
||||
break
|
||||
|
||||
/proc/viral_outbreak(var/virus = null)
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
if((H.virus2) || (H.stat == 2) || prob(30))
|
||||
// command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
|
||||
// world << sound('sound/AI/outbreak7.ogg')
|
||||
var/virus_type
|
||||
if(!virus)
|
||||
virus_type = pick(/datum/disease/dnaspread,/datum/disease/advance/flu,/datum/disease/advance/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/advance/cold
|
||||
if("retrovirus")
|
||||
virus_type = /datum/disease/dnaspread
|
||||
if("flu")
|
||||
virus_type = /datum/disease/advance/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 shuffle(living_mob_list))
|
||||
|
||||
var/foundAlready = 0 // don't infect someone that already has the virus
|
||||
var/turf/T = get_turf(H)
|
||||
if(T.z != 1)
|
||||
continue
|
||||
for(var/datum/disease/D in H.viruses)
|
||||
foundAlready = 1
|
||||
if(H.stat == 2 || foundAlready) continue
|
||||
|
||||
infect_mob_random_lesser(H)
|
||||
break
|
||||
@@ -272,11 +305,17 @@
|
||||
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.z != 1)
|
||||
continue
|
||||
if(istype(H,/mob/living/carbon/human))
|
||||
H.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
if (prob(5))
|
||||
H.apply_effect((rand(90,150)),IRRADIATE,0)
|
||||
for(var/mob/living/carbon/monkey/M in living_mob_list)
|
||||
var/turf/T = get_turf(M)
|
||||
if(T.z != 1)
|
||||
continue
|
||||
M.apply_effect((rand(15,75)),IRRADIATE,0)
|
||||
sleep(100)
|
||||
command_alert("Radiation levels are within standard parameters again.", "Anomaly Alert")
|
||||
|
||||
@@ -593,7 +593,7 @@ ________________________________________________________________________________
|
||||
grant_kamikaze(U)//Give them verbs and change variables as necessary.
|
||||
U.regenerate_icons()//Update their clothing.
|
||||
ninjablade()//Summon two energy blades.
|
||||
message_admins("\blue [U.key] used KAMIKAZE mode.", 1)//Let the admins know.
|
||||
message_admins("\blue [key_name_admin(U)] used KAMIKAZE mode.")//Let the admins know.
|
||||
s_busy = 0
|
||||
return
|
||||
sleep(s_delay)
|
||||
@@ -844,16 +844,16 @@ ________________________________________________________________________________
|
||||
U << "\red Procedure interrupted. Protocol terminated."
|
||||
return
|
||||
else if(istype(I, /obj/item/weapon/disk/tech_disk))//If it's a data disk, we want to copy the research on to the suit.
|
||||
var/obj/item/weapon/disk/tech_disk/tdisk = I
|
||||
if(tdisk.stored)//If it has something on it.
|
||||
var/obj/item/weapon/disk/tech_disk/TD = I
|
||||
if(TD.stored)//If it has something on it.
|
||||
U << "Research information detected, processing..."
|
||||
if(do_after(U,s_delay))
|
||||
for(var/datum/tech/current_data in stored_research)
|
||||
if(current_data.id==tdisk.stored.id)
|
||||
if(current_data.level<tdisk.stored.level)
|
||||
current_data.level=tdisk.stored.level
|
||||
if(current_data.id==TD.stored.id)
|
||||
if(current_data.level<TD.stored.level)
|
||||
current_data.level=TD.stored.level
|
||||
break
|
||||
tdisk.stored = null
|
||||
TD.stored = null
|
||||
U << "\blue Data analyzed and updated. Disk erased."
|
||||
else
|
||||
U << "\red <b>ERROR</b>: \black Procedure interrupted. Process terminated."
|
||||
|
||||
@@ -263,7 +263,7 @@ Whitespace:Seperator;
|
||||
|
||||
for(var/mob/new_player/player in players)
|
||||
if(player.client && player.ready)
|
||||
if(player.preferences.be_special & role)
|
||||
if(player.client.prefs.be_special & role)
|
||||
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
|
||||
candidates += player.mind // Get a list of all the people who want to be the antagonist for this round
|
||||
|
||||
@@ -275,8 +275,8 @@ Whitespace:Seperator;
|
||||
|
||||
if(candidates.len < recommended_enemies)
|
||||
for(var/mob/new_player/player in players)
|
||||
if (player.client && player.ready)
|
||||
if(!(player.preferences.be_special & role)) // We don't have enough people who want to be antagonist, make a seperate list of people who don't want to be one
|
||||
if(player.client && player.ready)
|
||||
if(!(player.client.prefs.be_special & role)) // We don't have enough people who want to be antagonist, make a seperate list of people who don't want to be one
|
||||
if(!jobban_isbanned(player, "Syndicate") && !jobban_isbanned(player, roletext)) //Nodrak/Carn: Antag Job-bans
|
||||
drafted += player.mind
|
||||
|
||||
@@ -328,14 +328,14 @@ Whitespace:Seperator;
|
||||
// recommended_enemies if the number of people with that role set to yes is less than recomended_enemies,
|
||||
// Less if there are not enough valid players in the game entirely to make recommended_enemies.
|
||||
|
||||
|
||||
/*
|
||||
/datum/game_mode/proc/latespawn(var/mob)
|
||||
|
||||
/datum/game_mode/proc/check_player_role_pref(var/role, var/mob/new_player/player)
|
||||
if(player.preferences.be_special & role)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
*/
|
||||
|
||||
/datum/game_mode/proc/num_players()
|
||||
. = 0
|
||||
|
||||
@@ -46,6 +46,8 @@ var/global/datum/controller/gameticker/ticker
|
||||
|
||||
/datum/controller/gameticker/proc/pregame()
|
||||
login_music = pick('sound/music/title1.ogg','sound/music/title2.ogg') // choose title music!
|
||||
for(var/mob/new_player/M in mob_list)
|
||||
if(M.client) M.client.playtitlemusic()
|
||||
|
||||
do
|
||||
pregame_timeleft = 180
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
var/list/possible_syndicates = get_players_for_role(BE_OPERATIVE)
|
||||
var/agent_number = 0
|
||||
|
||||
syndicate_begin()
|
||||
|
||||
if(possible_syndicates.len < 1)
|
||||
return 0
|
||||
|
||||
@@ -112,23 +110,13 @@
|
||||
var/list/turf/synd_spawn = list()
|
||||
|
||||
for(var/obj/effect/landmark/A in landmarks_list)
|
||||
if (A.name == "Syndicate-Gear-Closet")
|
||||
new /obj/structure/closet/syndicate/personal(A.loc)
|
||||
del(A)
|
||||
continue
|
||||
|
||||
if (A.name == "Syndicate-Bomb")
|
||||
new /obj/effect/spawner/newbomb/timer/syndicate(A.loc)
|
||||
del(A)
|
||||
continue
|
||||
|
||||
if(A.name == "Syndicate-Spawn")
|
||||
synd_spawn += get_turf(A)
|
||||
del(A)
|
||||
continue
|
||||
|
||||
var/obj/effect/landmark/uplinklocker = locate("landmark*Syndicate-Uplink") //i will be rewriting this shortly
|
||||
var/obj/effect/landmark/nuke_spawn = locate("landmark*Nuclear-Bomb")
|
||||
var/obj/effect/landmark/closet_spawn = locate("landmark*Nuclear-Closet")
|
||||
|
||||
var/nuke_code = "[rand(10000, 99999)]"
|
||||
var/leader_selected = 0
|
||||
@@ -155,13 +143,12 @@
|
||||
|
||||
update_all_synd_icons()
|
||||
|
||||
if(uplinklocker)
|
||||
new /obj/structure/closet/syndicate/nuclear(uplinklocker.loc)
|
||||
if(nuke_spawn && synd_spawn.len > 0)
|
||||
var/obj/machinery/nuclearbomb/the_bomb = new /obj/machinery/nuclearbomb(nuke_spawn.loc)
|
||||
the_bomb.r_code = nuke_code
|
||||
|
||||
if(closet_spawn)
|
||||
new /obj/structure/closet/syndicate/nuclear(closet_spawn.loc)
|
||||
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
send_intercept()
|
||||
|
||||
@@ -189,7 +176,6 @@
|
||||
|
||||
else
|
||||
nuke_code = "code will be provided later"
|
||||
synd_mind.current << "Nuclear Explosives 101:\n\tHello and thank you for choosing the Syndicate for your nuclear information needs.\nToday's crash course will deal with the operation of a Fusion Class Nanotrasen made Nuclear Device.\nFirst and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.\nPressing any button on the compacted bomb will cause it to extend and bolt itself into place.\nIf this is done to unbolt it one must compeltely log in which at this time may not be possible.\nTo make the device functional:\n1. Place bomb in designated detonation zone\n2. Extend and anchor bomb (attack with hand).\n3. Insert Nuclear Auth. Disk into slot.\n4. Type numeric code into keypad ([nuke_code]).\n\tNote: If you make a mistake press R to reset the device.\n5. Press the E button to log onto the device\nYou now have activated the device. To deactivate the buttons at anytime for example when\nyou've already prepped the bomb for detonation remove the auth disk OR press the R ont he keypad.\nNow the bomb CAN ONLY be detonated using the timer. A manual det. is not an option.\n\tNote: Nanotrasen is a pain in the neck.\nToggle off the SAFETY.\n\tNote: You wouldn't believe how many Syndicate Operatives with doctorates have forgotten this step\nSo use the - - and + + to set a det time between 5 seconds and 10 minutes.\nThen press the timer toggle button to start the countdown.\nNow remove the auth. disk so that the buttons deactivate.\n\tNote: THE BOMB IS STILL SET AND WILL DETONATE\nNow before you remove the disk if you need to move the bomb you can:\nToggle off the anchor, move it, and re-anchor.\n\nGood luck. Remember the order:\nDisk, Code, Safety, Timer, Disk, RUN!\nIntelligence Analysts believe that they are hiding the disk in the bridge. Your space ship will not leave until the bomb is armed and timing.\nGood luck!"
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
var/bomb_set
|
||||
|
||||
/obj/machinery/nuclearbomb
|
||||
name = "\improper Nuclear Fission Explosive"
|
||||
desc = "Uh oh. RUN!!!!"
|
||||
@@ -192,9 +194,11 @@
|
||||
else
|
||||
off_station = 2
|
||||
|
||||
if (ticker)
|
||||
if(ticker)
|
||||
if(ticker.mode && ticker.mode.name == "nuclear emergency")
|
||||
ticker.mode:syndies_didnt_escape = syndicate_station_at_station
|
||||
var/obj/machinery/computer/syndicate_station/syndie_location = locate(/obj/machinery/computer/syndicate_station)
|
||||
if(syndie_location)
|
||||
ticker.mode:syndies_didnt_escape = (syndie_location.z > 1 ? 0 : 1) //muskets will make me change this, but it will do for now
|
||||
ticker.mode:nuke_off_station = off_station
|
||||
ticker.station_explosion_cinematic(off_station,null)
|
||||
if(ticker.mode)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
if(!the_disk)
|
||||
icon_state = "pinonnull"
|
||||
return
|
||||
src.dir = get_dir(src,the_disk)
|
||||
dir = get_dir(src,the_disk)
|
||||
switch(get_dist(src,the_disk))
|
||||
if(0)
|
||||
icon_state = "pinondirect"
|
||||
@@ -79,7 +79,7 @@
|
||||
if(!location)
|
||||
icon_state = "pinonnull"
|
||||
return
|
||||
src.dir = get_dir(src,location)
|
||||
dir = get_dir(src,location)
|
||||
switch(get_dist(src,location))
|
||||
if(0)
|
||||
icon_state = "pinondirect"
|
||||
@@ -98,7 +98,7 @@
|
||||
if(!target)
|
||||
icon_state = "pinonnull"
|
||||
return
|
||||
src.dir = get_dir(src,target)
|
||||
dir = get_dir(src,target)
|
||||
switch(get_dist(src,target))
|
||||
if(0)
|
||||
icon_state = "pinondirect"
|
||||
@@ -172,80 +172,85 @@
|
||||
return attack_self()
|
||||
|
||||
|
||||
///////////////////////
|
||||
//nuke op pinpointers//
|
||||
///////////////////////
|
||||
|
||||
/obj/item/weapon/pinpointer/nukeop//Used by nuke ops specifically so they can get their asses back to the shuttle
|
||||
var/mode = 0 // Mode 0 locates disk, mode 1 locates the shuttle
|
||||
var/location = null//Follow that shuttle!
|
||||
|
||||
/obj/item/weapon/pinpointer/nukeop
|
||||
var/mode = 0 //Mode 0 locates disk, mode 1 locates the shuttle
|
||||
var/obj/machinery/computer/syndicate_station/home = null
|
||||
|
||||
attack_self()
|
||||
if(!active)
|
||||
active = 1
|
||||
if(mode == 0)
|
||||
workdisk()
|
||||
usr << "\blue Authentication Disk Locator active."
|
||||
if(mode == 1)
|
||||
worklocation()
|
||||
usr << "\blue Shuttle Locator active."
|
||||
|
||||
/obj/item/weapon/pinpointer/nukeop/attack_self(mob/user as mob)
|
||||
if(!active)
|
||||
active = 1
|
||||
if(!mode)
|
||||
workdisk()
|
||||
user << "<span class='notice'>Authentication Disk Locator active.</span>"
|
||||
else
|
||||
active = 0
|
||||
icon_state = "pinoff"
|
||||
usr << "\blue You deactivate the pinpointer"
|
||||
worklocation()
|
||||
user << "<span class='notice'>Shuttle Locator active.</span>"
|
||||
else
|
||||
active = 0
|
||||
icon_state = "pinoff"
|
||||
user << "<span class='notice'>You deactivate the pinpointer.</span>"
|
||||
|
||||
|
||||
/obj/item/weapon/pinpointer/nukeop/workdisk()
|
||||
if(!active) return
|
||||
if(mode)//Check in case the mode changes while operating
|
||||
if(mode) //Check in case the mode changes while operating
|
||||
worklocation()
|
||||
return
|
||||
if(bomb_set)//If the bomb is set, lead to the shuttle
|
||||
mode = 1//Ensures worklocation() continues to work
|
||||
if(bomb_set) //If the bomb is set, lead to the shuttle
|
||||
mode = 1 //Ensures worklocation() continues to work
|
||||
worklocation()
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)//Plays a beep
|
||||
for (var/mob/O in hearers(1, src.loc))
|
||||
O.show_message(text("Shuttle Locator active."))//Lets the mob holding it know that the mode has changed
|
||||
return//Get outta here
|
||||
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) //Plays a beep
|
||||
visible_message("Shuttle Locator active.") //Lets the mob holding it know that the mode has changed
|
||||
return //Get outta here
|
||||
if(!the_disk)
|
||||
the_disk = locate()
|
||||
if(!the_disk)
|
||||
icon_state = "pinonnull"
|
||||
return
|
||||
if(src.loc.z >1)//If you are on a different z-level from the station
|
||||
icon_state = "pinonalert"
|
||||
else
|
||||
src.dir = get_dir(src,the_disk)
|
||||
switch(get_dist(src,the_disk))
|
||||
if(0)
|
||||
icon_state = "pinondirect"
|
||||
if(1 to 8)
|
||||
icon_state = "pinonclose"
|
||||
if(9 to 16)
|
||||
icon_state = "pinonmedium"
|
||||
if(16 to INFINITY)
|
||||
icon_state = "pinonfar"
|
||||
spawn(5) .()
|
||||
// if(loc.z != the_disk.z) //If you are on a different z-level from the disk
|
||||
// icon_state = "pinonnull"
|
||||
// else
|
||||
dir = get_dir(src, the_disk)
|
||||
switch(get_dist(src, the_disk))
|
||||
if(0)
|
||||
icon_state = "pinondirect"
|
||||
if(1 to 8)
|
||||
icon_state = "pinonclose"
|
||||
if(9 to 16)
|
||||
icon_state = "pinonmedium"
|
||||
if(16 to INFINITY)
|
||||
icon_state = "pinonfar"
|
||||
|
||||
spawn(5) .()
|
||||
|
||||
|
||||
/obj/item/weapon/pinpointer/nukeop/proc/worklocation()
|
||||
if(!active)
|
||||
return
|
||||
if(!active) return
|
||||
if(!mode)
|
||||
workdisk()
|
||||
return
|
||||
if(!bomb_set)
|
||||
mode = 0
|
||||
workdisk()
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(2, src.loc))
|
||||
O.show_message(text("Authentication Disk Locator active."))
|
||||
playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
visible_message("<span class='notice'>Authentication Disk Locator active.</span>")
|
||||
return
|
||||
if(!home)
|
||||
home = locate()
|
||||
if(!home)
|
||||
icon_state = "pinonnull"
|
||||
return
|
||||
if(src.loc.z >2)//If you are on a different z-level from the shuttle
|
||||
icon_state = "pinonalert"
|
||||
if(loc.z != home.z) //If you are on a different z-level from the shuttle
|
||||
icon_state = "pinonnull"
|
||||
else
|
||||
src.dir = get_dir(src,home)
|
||||
switch(get_dist(src,home))
|
||||
dir = get_dir(src, home)
|
||||
switch(get_dist(src, home))
|
||||
if(0)
|
||||
icon_state = "pinondirect"
|
||||
if(1 to 8)
|
||||
@@ -255,91 +260,4 @@
|
||||
if(16 to INFINITY)
|
||||
icon_state = "pinonfar"
|
||||
|
||||
spawn(5) .()
|
||||
|
||||
|
||||
/*/obj/item/weapon/pinpointer/New()
|
||||
. = ..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/item/weapon/pinpointer/Del()
|
||||
processing_objects.Remove(src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/pinpointer/attack_self(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if (src.temp)
|
||||
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
|
||||
else
|
||||
dat = "<B>Nuclear Disk Pinpointer</B><HR>"
|
||||
dat += "<A href='byond://?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
|
||||
user << browse(dat, "window=radio")
|
||||
onclose(user, "radio")
|
||||
|
||||
/obj/item/weapon/pinpointer/process()
|
||||
/*
|
||||
//TODO: REWRITE
|
||||
set background = 1
|
||||
var/turf/sr = get_turf(src)
|
||||
|
||||
if (sr)
|
||||
for(var/obj/item/weapon/disk/nuclear/W in world)
|
||||
var/turf/tr = get_turf(W)
|
||||
if (tr && tr.z == sr.z)
|
||||
src.dir = get_dir(sr, tr)
|
||||
break
|
||||
*/
|
||||
/obj/item/weapon/pinpointer/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
if (usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
|
||||
usr.set_machine(src)
|
||||
if (href_list["refresh"])
|
||||
src.temp = "<B>Nuclear Disk Pinpointer</B><HR>"
|
||||
var/turf/sr = get_turf(src)
|
||||
|
||||
if (sr)
|
||||
src.temp += "<B>Located Disks:</B><BR>"
|
||||
|
||||
for(var/obj/item/weapon/disk/nuclear/W in world)
|
||||
var/turf/tr = get_turf(W)
|
||||
if (tr && tr.z == sr.z)
|
||||
var/distance = max(abs(tr.x - sr.x), abs(tr.y - sr.y))
|
||||
var/strength = "unknown"
|
||||
var/directional = dir2text(get_dir(sr, tr));
|
||||
|
||||
if (distance < 5)
|
||||
strength = "very strong"
|
||||
else if (distance < 10)
|
||||
strength = "strong"
|
||||
else if (distance < 15)
|
||||
strength = "weak"
|
||||
else if (distance < 20)
|
||||
strength = "very weak"
|
||||
directional = "unknown"
|
||||
else
|
||||
continue
|
||||
|
||||
if (!directional)
|
||||
directional = "right on top of it"
|
||||
|
||||
src.temp += "[directional]-[strength]<BR>"
|
||||
|
||||
src.temp += "<B>You are at \[[sr.x],[sr.y],[sr.z]\]</B> in orbital coordinates.<BR><BR><A href='byond://?src=\ref[src];refresh=1'>Refresh</A><BR>"
|
||||
else
|
||||
src.temp += "<B><FONT color='red'>Processing Error:</FONT></B> Unable to locate orbital position.<BR>"
|
||||
else if (href_list["temp"])
|
||||
src.temp = null
|
||||
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for (var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
*/
|
||||
spawn(5) .()
|
||||
@@ -5,13 +5,14 @@ datum/objective
|
||||
var/explanation_text = "Nothing" //What that person is supposed to do.
|
||||
var/datum/mind/target = null //If they are focused on a particular person.
|
||||
var/target_amount = 0 //If they are focused on a particular number. Steal objectives have their own counter.
|
||||
var/completed = 0 //currently only used for custom objectives.
|
||||
|
||||
New(var/text)
|
||||
if(text)
|
||||
explanation_text = text
|
||||
|
||||
proc/check_completion()
|
||||
return 1
|
||||
return completed
|
||||
|
||||
proc/find_target()
|
||||
var/list/possible_targets = list()
|
||||
@@ -51,7 +52,7 @@ datum/objective/assassinate
|
||||
|
||||
check_completion()
|
||||
if(target && target.current)
|
||||
if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > 6) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
|
||||
if(target.current.stat == DEAD || issilicon(target.current) || isbrain(target.current) || target.current.z > 6 || !target.current.ckey) //Borgs/brains/AIs count as dead for traitor objectives. --NeoFite
|
||||
return 1
|
||||
return 0
|
||||
return 1
|
||||
@@ -78,7 +79,7 @@ datum/objective/mutiny
|
||||
|
||||
check_completion()
|
||||
if(target && target.current)
|
||||
if(target.current.stat == DEAD || !ishuman(target.current))
|
||||
if(target.current.stat == DEAD || !ishuman(target.current) || !target.current.ckey)
|
||||
return 1
|
||||
var/turf/T = get_turf(target.current)
|
||||
if(T && (T.z != 1)) //If they leave the station they count as dead for this
|
||||
@@ -486,9 +487,9 @@ datum/objective/steal
|
||||
"diamond drill" = /obj/item/weapon/pickaxe/diamonddrill,
|
||||
"bag of holding" = /obj/item/weapon/storage/backpack/holding,
|
||||
"hyper-capacity cell" = /obj/item/weapon/cell/hyper,
|
||||
"10 diamonds" = /obj/item/stack/sheet/diamond,
|
||||
"50 gold bars" = /obj/item/stack/sheet/gold,
|
||||
"25 refined uranium bars" = /obj/item/stack/sheet/uranium,
|
||||
"10 diamonds" = /obj/item/stack/sheet/mineral/diamond,
|
||||
"50 gold bars" = /obj/item/stack/sheet/mineral/gold,
|
||||
"25 refined uranium bars" = /obj/item/stack/sheet/mineral/uranium,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ datum/hSB
|
||||
continue
|
||||
if(istype(O, /obj/item/assembly))
|
||||
continue
|
||||
if(istype(O, /obj/item/weapon/camera))
|
||||
if(istype(O, /obj/item/device/camera))
|
||||
continue
|
||||
if(istype(O, /obj/item/weapon/cloaking_device))
|
||||
continue
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
if ("Summon")
|
||||
for(var/mob/living/simple_animal/shade/A in src)
|
||||
A.nodamage = 0
|
||||
A.status_flags &= ~GODMODE
|
||||
A.canmove = 1
|
||||
A << "<b>You have been released from your prison, but you are still bound to [U.name]'s will. Help them suceed in their goals at all costs.</b>"
|
||||
A.loc = U.loc
|
||||
@@ -123,7 +123,7 @@
|
||||
del(animation)
|
||||
var/mob/living/simple_animal/shade/S = new /mob/living/simple_animal/shade( T.loc )
|
||||
S.loc = C //put shade in stone
|
||||
S.nodamage = 1 //So they won't die inside the stone somehow
|
||||
S.status_flags |= GODMODE //So they won't die inside the stone somehow
|
||||
S.canmove = 0//Can't move out of the soul stone
|
||||
S.name = "Shade of [T.real_name]"
|
||||
S.real_name = "Shade of [T.real_name]"
|
||||
@@ -150,7 +150,7 @@
|
||||
U << "\red <b>Capture failed!</b>: \black The soul stone has already been imprinted with [C.imprinted]'s mind!"
|
||||
else
|
||||
T.loc = C //put shade in stone
|
||||
T.nodamage = 1
|
||||
T.status_flags |= GODMODE
|
||||
T.canmove = 0
|
||||
T.health = T.maxHealth
|
||||
C.icon_state = "soulstone2"
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
onclose(user, "radio")
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/spellbook/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained())
|
||||
@@ -52,7 +51,7 @@
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if (!( istype(H, /mob/living/carbon/human)))
|
||||
return 1
|
||||
if ((usr.contents.Find(src) || (in_range(src,usr) && istype(src.loc, /turf))))
|
||||
if ( src.loc == usr || (in_range(src,usr) && istype(src.loc, /turf)))
|
||||
usr.set_machine(src)
|
||||
if(href_list["spell_choice"])
|
||||
if(src.uses >= 1 && src.max_uses >=1 && text2num(href_list["spell_choice"]) < 18)
|
||||
@@ -156,10 +155,6 @@
|
||||
else
|
||||
if (href_list["temp"])
|
||||
src.temp = null
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client)
|
||||
src.attack_self(M)
|
||||
attack_self(H)
|
||||
|
||||
return
|
||||
|
||||
@@ -387,42 +387,6 @@
|
||||
|
||||
smoke.start()
|
||||
|
||||
/mob/proc/teleportscroll()
|
||||
if(usr.stat)
|
||||
usr << "Not when you are incapacitated."
|
||||
return
|
||||
var/A
|
||||
|
||||
A = input("Area to jump to", "BOOYEA", A) in teleportlocs
|
||||
var/area/thearea = teleportlocs[A]
|
||||
|
||||
var/datum/effect/effect/system/harmless_smoke_spread/smoke = new /datum/effect/effect/system/harmless_smoke_spread()
|
||||
smoke.set_up(5, 0, usr.loc)
|
||||
smoke.attach(usr)
|
||||
smoke.start()
|
||||
var/list/L = list()
|
||||
for(var/turf/T in get_area_turfs(thearea.type))
|
||||
if(!T.density)
|
||||
var/clear = 1
|
||||
for(var/obj/O in T)
|
||||
if(O.density)
|
||||
clear = 0
|
||||
break
|
||||
if(clear)
|
||||
L+=T
|
||||
|
||||
if(!L.len)
|
||||
usr <<"The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry."
|
||||
return
|
||||
|
||||
var/attempt = 0
|
||||
var/success = 0
|
||||
while(!success)
|
||||
success = Move(pick(L))
|
||||
if(attempt > 20) break //Failsafe
|
||||
if(!success)
|
||||
usr.loc = pick(L)
|
||||
smoke.start()
|
||||
|
||||
//JAUNT
|
||||
|
||||
|
||||
@@ -246,9 +246,11 @@ datum/hud/New(mob/owner)
|
||||
|
||||
/datum/hud/proc/instantiate()
|
||||
if(!ismob(mymob)) return 0
|
||||
if(!mymob.client) return 0
|
||||
var/ui_style = ui_style2icon(mymob.client.prefs.UI_style)
|
||||
|
||||
if(ishuman(mymob))
|
||||
human_hud(mymob.UI) // Pass the player the UI style chosen in preferences
|
||||
human_hud(ui_style) // Pass the player the UI style chosen in preferences
|
||||
|
||||
if(RADAR in mymob.augmentations)
|
||||
spawn()
|
||||
@@ -258,10 +260,10 @@ datum/hud/New(mob/owner)
|
||||
mymob:place_radar_closed()
|
||||
|
||||
else if(ismonkey(mymob))
|
||||
monkey_hud(mymob.UI)
|
||||
monkey_hud(ui_style)
|
||||
|
||||
else if(isbrain(mymob))
|
||||
brain_hud(mymob.UI)
|
||||
brain_hud(ui_style)
|
||||
|
||||
else if(islarva(mymob))
|
||||
larva_hud()
|
||||
@@ -284,4 +286,4 @@ datum/hud/New(mob/owner)
|
||||
else if(isobserver(mymob))
|
||||
ghost_hud()
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
/var/const/access_security = 1
|
||||
/var/const/access_brig = 2
|
||||
/var/const/access_security = 1 // Security equipment
|
||||
/var/const/access_brig = 2 // Brig timers and permabrig
|
||||
/var/const/access_armory = 3
|
||||
/var/const/access_forensics_lockers= 4
|
||||
/var/const/access_medical = 5
|
||||
@@ -61,6 +61,8 @@
|
||||
/var/const/access_RC_announce = 59 //Request console announcements
|
||||
/var/const/access_keycard_auth = 60 //Used for events which require at least two people to confirm them
|
||||
/var/const/access_tcomsat = 61 // has access to the entire telecomms satellite / machinery
|
||||
/var/const/access_gateway = 62
|
||||
/var/const/access_sec_doors = 63 // Security front doors
|
||||
|
||||
//BEGIN CENTCOM ACCESS
|
||||
/*Should leave plenty of room if we need to add more access levels.
|
||||
@@ -187,7 +189,7 @@
|
||||
if("Chaplain")
|
||||
return list(access_morgue, access_chapel_office, access_crematorium)
|
||||
if("Detective")
|
||||
return list(access_security, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
|
||||
return list(access_sec_doors, access_forensics_lockers, access_morgue, access_maint_tunnels, access_court)
|
||||
if("Medical Doctor")
|
||||
return list(access_medical, access_morgue, access_surgery, access_virology)
|
||||
if("Botanist") // -- TLE
|
||||
@@ -199,24 +201,22 @@
|
||||
if("Captain")
|
||||
return get_all_accesses()
|
||||
if("Security Officer")
|
||||
return list(access_security, access_brig, access_court,access_maint_tunnels) // Massively requested that sec get there maintenance access back //
|
||||
if("Warden")
|
||||
return list(access_security, access_brig, access_armory, access_court,access_maint_tunnels)
|
||||
if("Scientist")
|
||||
return list(access_security, access_sec_doors, access_brig, access_court, access_maint_tunnel) if("Warden")
|
||||
return list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnel) if("Scientist")
|
||||
return list(access_tox, access_tox_storage, access_research, access_xenobiology)
|
||||
if("Head of Security")
|
||||
return list(access_medical, access_morgue, access_tox, access_tox_storage, access_chemistry, access_genetics, access_court,
|
||||
access_teleporter, access_heads, access_tech_storage, access_security, access_brig, access_atmospherics,
|
||||
access_teleporter, access_heads, access_tech_storage, access_security, access_sec_doors, access_brig, access_atmospherics,
|
||||
access_maint_tunnels, access_bar, access_janitor, access_kitchen, access_robotics, access_armory, access_hydroponics,
|
||||
access_theatre, access_research, access_hos, access_RC_announce, access_forensics_lockers, access_keycard_auth)
|
||||
if("Head of Personnel")
|
||||
return list(access_security, access_brig, access_court, access_forensics_lockers,
|
||||
return list(access_security, access_sec_doors, access_brig, access_court, access_forensics_lockers,
|
||||
access_tox, access_tox_storage, access_chemistry, access_medical, access_genetics, access_engine,
|
||||
access_emergency_storage, access_change_ids, access_ai_upload, access_eva, access_heads,
|
||||
access_all_personal_lockers, access_tech_storage, access_maint_tunnels, access_bar, access_janitor,
|
||||
access_crematorium, access_kitchen, access_robotics, access_cargo, access_cargo_bot, access_mailsorting, access_qm, access_hydroponics, access_lawyer,
|
||||
access_theatre, access_chapel_office, access_library, access_research, access_mining, access_heads_vault, access_mining_station,
|
||||
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth)
|
||||
access_clown, access_mime, access_hop, access_RC_announce, access_keycard_auth, access_gateway)
|
||||
if("Atmospheric Technician")
|
||||
return list(access_atmospherics, access_maint_tunnels, access_emergency_storage, access_construction)
|
||||
if("Bartender")
|
||||
@@ -248,7 +248,7 @@
|
||||
return list(access_rd, access_heads, access_tox, access_genetics,
|
||||
access_tox_storage, access_teleporter,
|
||||
access_research, access_robotics, access_xenobiology,
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat)
|
||||
access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway)
|
||||
if("Virologist")
|
||||
return list(access_medical, access_virology)
|
||||
if("Chief Medical Officer")
|
||||
@@ -280,7 +280,7 @@
|
||||
return get_all_centcom_access()
|
||||
|
||||
/proc/get_all_accesses()
|
||||
return list(access_security, access_brig, access_armory, access_forensics_lockers, access_court,
|
||||
return list(access_security, access_sec_doors, access_brig, access_armory, access_forensics_lockers, access_court,
|
||||
access_medical, access_genetics, access_morgue, access_rd,
|
||||
access_tox, access_tox_storage, access_chemistry, access_engine, access_engine_equip, access_maint_tunnels,
|
||||
access_external_airlocks, access_emergency_storage, access_change_ids, access_ai_upload,
|
||||
@@ -290,7 +290,7 @@
|
||||
access_hydroponics, access_library, access_manufacturing, access_lawyer, access_virology, access_cmo, access_qm, access_clown, access_mime, access_surgery,
|
||||
access_theatre, access_research, access_mining, access_mailsorting, access_mint_vault, access_mint,
|
||||
access_heads_vault, access_mining_station, access_xenobiology, access_ce, access_hop, access_hos, access_RC_announce,
|
||||
access_keycard_auth, access_tcomsat)
|
||||
access_keycard_auth, access_tcomsat, access_gateway)
|
||||
|
||||
/proc/get_all_centcom_access()
|
||||
return list(access_cent_general, access_cent_thunder, access_cent_specops, access_cent_medical, access_cent_living, access_cent_storage, access_cent_teleporter, access_cent_creed, access_cent_captain)
|
||||
@@ -303,15 +303,15 @@
|
||||
if(0)
|
||||
return get_all_accesses()
|
||||
if(1) //security
|
||||
return list(access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
|
||||
return list(access_sec_doors, access_security, access_brig, access_armory, access_forensics_lockers, access_court, access_hos)
|
||||
if(2) //medbay
|
||||
return list(access_medical, access_genetics, access_morgue, access_chemistry, access_virology, access_surgery, access_cmo)
|
||||
if(3) //research
|
||||
return list(access_research, access_tox, access_tox_storage, access_xenobiology, access_rd)
|
||||
if(4) //engineering and maintenance
|
||||
return list(access_engine, access_engine_equip, access_maint_tunnels, access_external_airlocks, access_tech_storage, access_atmospherics, access_construction, access_robotics, access_ce)
|
||||
return list(access_maint_tunnels, access_engine, access_engine_equip, access_external_airlocks, access_tech_storage, access_atmospherics, access_construction, access_robotics, access_ce)
|
||||
if(5) //command
|
||||
return list(access_heads, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_all_personal_lockers, access_heads_vault, access_RC_announce, access_keycard_auth, access_tcomsat, access_hop, access_captain)
|
||||
return list(access_heads, access_change_ids, access_ai_upload, access_teleporter, access_eva, access_all_personal_lockers, access_heads_vault, access_RC_announce, access_keycard_auth, access_tcomsat, access_gateway, access_hop, access_captain)
|
||||
if(6) //station general
|
||||
return list(access_kitchen,access_bar, access_hydroponics, access_janitor, access_chapel_office, access_crematorium, access_library, access_theatre, access_lawyer, access_clown, access_mime)
|
||||
if(7) //supply
|
||||
@@ -346,7 +346,7 @@
|
||||
if(access_security)
|
||||
return "Security"
|
||||
if(access_brig)
|
||||
return "Brig Cells"
|
||||
return "Holding Cells"
|
||||
if(access_court)
|
||||
return "Courtroom"
|
||||
if(access_forensics_lockers)
|
||||
@@ -461,6 +461,10 @@
|
||||
return "Keycode Auth. Device"
|
||||
if(access_tcomsat)
|
||||
return "Telecommunications"
|
||||
if(access_gateway)
|
||||
return "Gateway"
|
||||
if(access_sec_doors)
|
||||
return "Brig"
|
||||
|
||||
/proc/get_centcom_access_desc(A)
|
||||
switch(A)
|
||||
|
||||
@@ -165,8 +165,8 @@
|
||||
if(2) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/industrial(H), slot_back)
|
||||
if(3) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel_eng(H), slot_back)
|
||||
if(4) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/shaftminer(H), slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/miner(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/shaftminer(H), slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/gloves/black(H), slot_gloves)
|
||||
if(H.backbag == 1)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
var/obj/item/weapon/storage/bible/B = new /obj/item/weapon/storage/bible(H) //BS12 EDIT
|
||||
H.equip_to_slot_or_del(B, slot_l_hand)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/chaplain(H), slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/chaplain(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/pda/chaplain(H), slot_belt)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/black(H), slot_shoes)
|
||||
if(H.backbag == 1)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
|
||||
@@ -107,14 +107,11 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/lighter/zippo(H), slot_l_store)
|
||||
|
||||
if(H.backbag == 1)//Why cant some of these things spawn in his office?
|
||||
var/obj/item/weapon/storage/box/survival/Evipack = new /obj/item/weapon/storage/box/survival(H)
|
||||
H.equip_to_slot_or_del(Evipack, slot_r_hand)
|
||||
new /obj/item/weapon/fcardholder(Evipack)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_l_hand)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_r_store)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/fcardholder(H), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/evidence(H), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/detective_scanner(H), slot_in_backpack)
|
||||
|
||||
|
||||
@@ -9,12 +9,6 @@ var/global/datum/controller/occupations/job_master
|
||||
var/list/job_debug = list()
|
||||
|
||||
|
||||
New()
|
||||
spawn(1)
|
||||
SetupOccupations()
|
||||
return
|
||||
|
||||
|
||||
proc/SetupOccupations(var/faction = "Station")
|
||||
occupations = list()
|
||||
var/list/all_jobs = typesof(/datum/job)
|
||||
@@ -74,10 +68,10 @@ var/global/datum/controller/occupations/job_master
|
||||
if(jobban_isbanned(player, job.title))
|
||||
Debug("FOC isbanned failed, Player: [player]")
|
||||
continue
|
||||
if(flag && (!player.preferences.be_special & flag))
|
||||
if(flag && (!player.client.prefs.be_special & flag))
|
||||
Debug("FOC flag failed, Player: [player], Flag: [flag], ")
|
||||
continue
|
||||
if(player.preferences.GetJobDepartment(job, level) & job.flag)
|
||||
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
|
||||
Debug("FOC pass, Player: [player], Level:[level]")
|
||||
candidates += player
|
||||
return candidates
|
||||
@@ -187,7 +181,7 @@ var/global/datum/controller/occupations/job_master
|
||||
|
||||
//Get the players who are ready
|
||||
for(var/mob/new_player/player in player_list)
|
||||
if((player) && (player.client) && (player.ready) && (player.mind) && (!player.mind.assigned_role))
|
||||
if(player.ready && player.mind && !player.mind.assigned_role)
|
||||
unassigned += player
|
||||
|
||||
Debug("DO, Len: [unassigned.len]")
|
||||
@@ -246,7 +240,7 @@ var/global/datum/controller/occupations/job_master
|
||||
continue
|
||||
|
||||
// If the player wants that job on this level, then try give it to him.
|
||||
if(player.preferences.GetJobDepartment(job, level) & job.flag)
|
||||
if(player.client.prefs.GetJobDepartment(job, level) & job.flag)
|
||||
|
||||
// If the job isn't filled
|
||||
if((job.current_positions < job.spawn_positions) || job.spawn_positions == -1)
|
||||
@@ -258,7 +252,7 @@ var/global/datum/controller/occupations/job_master
|
||||
// Hand out random jobs to the people who didn't get any in the last check
|
||||
// Also makes sure that they got their preference correct
|
||||
for(var/mob/new_player/player in unassigned)
|
||||
if(player.preferences.userandomjob)
|
||||
if(player.client.prefs.userandomjob)
|
||||
GiveRandomJob(player)
|
||||
|
||||
/*
|
||||
@@ -439,16 +433,16 @@ var/global/datum/controller/occupations/job_master
|
||||
var/level4 = 0 //never
|
||||
var/level5 = 0 //banned
|
||||
for(var/mob/new_player/player in player_list)
|
||||
if(!((player) && (player.client) && (player.ready) && (player.mind) && (!player.mind.assigned_role)))
|
||||
if(!(player.ready && player.mind && !player.mind.assigned_role))
|
||||
continue //This player is not ready
|
||||
if(jobban_isbanned(player, job.title))
|
||||
level5++
|
||||
continue
|
||||
if(player.preferences.GetJobDepartment(job, 1) & job.flag)
|
||||
if(player.client.prefs.GetJobDepartment(job, 1) & job.flag)
|
||||
level1++
|
||||
else if(player.preferences.GetJobDepartment(job, 2) & job.flag)
|
||||
else if(player.client.prefs.GetJobDepartment(job, 2) & job.flag)
|
||||
level2++
|
||||
else if(player.preferences.GetJobDepartment(job, 3) & job.flag)
|
||||
else if(player.client.prefs.GetJobDepartment(job, 3) & job.flag)
|
||||
level3++
|
||||
else level4++ //not selected
|
||||
|
||||
|
||||
@@ -54,10 +54,8 @@
|
||||
)
|
||||
radio_connection.post_signal(src, signal)
|
||||
|
||||
/obj/machinery/meter/examine()
|
||||
set src in view(3)
|
||||
|
||||
var/t = "A gas flow meter. "
|
||||
/obj/machinery/meter/proc/status()
|
||||
var/t = ""
|
||||
if (src.target)
|
||||
var/datum/gas_mixture/environment = target.return_air()
|
||||
if(environment)
|
||||
@@ -66,7 +64,13 @@
|
||||
t += "The sensor error light is blinking."
|
||||
else
|
||||
t += "The connect error light is blinking."
|
||||
return t
|
||||
|
||||
/obj/machinery/meter/examine()
|
||||
set src in view(3)
|
||||
|
||||
var/t = "A gas flow meter. "
|
||||
t += status()
|
||||
usr << t
|
||||
|
||||
|
||||
@@ -78,16 +82,10 @@
|
||||
|
||||
var/t = null
|
||||
if (get_dist(usr, src) <= 3 || istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/dead))
|
||||
if (src.target)
|
||||
var/datum/gas_mixture/environment = target.return_air()
|
||||
if(environment)
|
||||
t = "<B>Pressure:</B> [round(environment.return_pressure(), 0.01)] kPa; <B>Temperature:</B> [round(environment.temperature,0.01)]°K ([round(environment.temperature-T0C,0.01)]°C)"
|
||||
else
|
||||
t = "\red <B>Results: Sensor Error!</B>"
|
||||
else
|
||||
t = "\red <B>Results: Connection Error!</B>"
|
||||
t += status()
|
||||
else
|
||||
usr << "\blue <B>You are too far away.</B>"
|
||||
return 1
|
||||
|
||||
usr << t
|
||||
return 1
|
||||
|
||||
@@ -15,6 +15,8 @@ var/global/list/autolathe_recipes = list( \
|
||||
new /obj/item/clothing/head/welding(), \
|
||||
new /obj/item/weapon/stock_parts/console_screen(), \
|
||||
new /obj/item/weapon/airlock_electronics(), \
|
||||
new /obj/item/weapon/airalarm_electronics(), \
|
||||
new /obj/item/weapon/firealarm_electronics(), \
|
||||
new /obj/item/stack/sheet/metal(), \
|
||||
new /obj/item/stack/sheet/glass(), \
|
||||
new /obj/item/stack/sheet/rglass(), \
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
g_amt = 300
|
||||
|
||||
// Motion, EMP-Proof, X-Ray
|
||||
var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/plasma, /obj/item/weapon/reagent_containers/food/snacks/grown/carrot)
|
||||
var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/plasma, /obj/item/weapon/reagent_containers/food/snacks/grown/carrot)
|
||||
var/list/upgrades = list()
|
||||
var/state = 0
|
||||
var/busy = 0
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
// CHECKS
|
||||
|
||||
/obj/machinery/camera/proc/isEmpProof()
|
||||
var/O = locate(/obj/item/stack/sheet/plasma) in assembly.upgrades
|
||||
var/O = locate(/obj/item/stack/sheet/mineral/plasma) in assembly.upgrades
|
||||
return O
|
||||
|
||||
/obj/machinery/camera/proc/isXRay()
|
||||
@@ -67,7 +67,7 @@
|
||||
// UPGRADE PROCS
|
||||
|
||||
/obj/machinery/camera/proc/upgradeEmpProof()
|
||||
assembly.upgrades.Add(new /obj/item/stack/sheet/plasma(assembly))
|
||||
assembly.upgrades.Add(new /obj/item/stack/sheet/mineral/plasma(assembly))
|
||||
|
||||
/obj/machinery/camera/proc/upgradeXRay()
|
||||
assembly.upgrades.Add(new /obj/item/weapon/reagent_containers/food/snacks/grown/carrot(assembly))
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
//Clonepod
|
||||
|
||||
//Start growing a human clone in the pod!
|
||||
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace, var/UI)
|
||||
/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace)
|
||||
if(mess || attempting)
|
||||
return 0
|
||||
var/datum/mind/clonemind = locate(mindref)
|
||||
@@ -133,8 +133,7 @@
|
||||
return 0
|
||||
|
||||
|
||||
src.heal_level = rand(0,40) //Randomizes what health the clone is when ejected
|
||||
|
||||
src.heal_level = rand(60,100) //Randomizes what health the clone is when ejected
|
||||
src.attempting = 1 //One at a time!!
|
||||
src.locked = 1
|
||||
|
||||
@@ -144,7 +143,6 @@
|
||||
|
||||
var/mob/living/carbon/human/H = new /mob/living/carbon/human(src)
|
||||
occupant = H
|
||||
H.UI = UI // set interface preference
|
||||
|
||||
if(!clonename) //to prevent null names
|
||||
clonename = "clone ([rand(0,999)])"
|
||||
@@ -152,7 +150,7 @@
|
||||
|
||||
src.icon_state = "pod_1"
|
||||
//Get the clone body ready
|
||||
H.adjustCloneLoss(190) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
|
||||
H.adjustCloneLoss(src.heal_level + 100) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite
|
||||
H.adjustBrainLoss(heal_level)
|
||||
H.Paralyse(4)
|
||||
|
||||
|
||||
@@ -378,7 +378,12 @@
|
||||
temp = "Error: Clonepod malfunction."
|
||||
else if(!config.revival_cloning)
|
||||
temp = "Error: Unable to initiate cloning cycle."
|
||||
else
|
||||
|
||||
else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"]))
|
||||
temp = "Initiating cloning cycle..."
|
||||
records.Remove(C)
|
||||
del(C)
|
||||
menu = 1 else
|
||||
var/mob/selected = find_dead_player("[C.fields["ckey"]]")
|
||||
selected << 'chime.ogg' //probably not the best sound but I think it's reasonable
|
||||
var/answer = alert(selected,"Do you want to return to life?","Cloning","Yes","No")
|
||||
@@ -433,11 +438,6 @@
|
||||
R.fields["UI"] = subject.dna.uni_identity
|
||||
R.fields["SE"] = subject.dna.struc_enzymes
|
||||
|
||||
// Preferences stuff
|
||||
R.fields["interface"] = subject.UI
|
||||
|
||||
|
||||
|
||||
//Add an implant if needed
|
||||
var/obj/item/weapon/implant/health/imp = locate(/obj/item/weapon/implant/health, subject)
|
||||
if (isnull(imp))
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
if(security_level != old_level)
|
||||
//Only notify the admins if an actual change happened
|
||||
log_game("[key_name(usr)] has changed the security level to [get_security_level()].")
|
||||
message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].", 1)
|
||||
message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].")
|
||||
switch(security_level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
feedback_inc("alert_comms_green",1)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
name = "Medical Records"
|
||||
desc = "This can be used to check medical records."
|
||||
icon_state = "medcomp"
|
||||
req_access = list(access_medical)
|
||||
req_one_access = list(access_medical, access_forensics_lockers)
|
||||
circuit = "/obj/item/weapon/circuitboard/med_data"
|
||||
var/obj/item/weapon/card/id/scan = null
|
||||
var/authenticated = null
|
||||
@@ -85,6 +85,8 @@
|
||||
dat += "<CENTER><B>Virus Database</B></CENTER>"
|
||||
for(var/Dt in typesof(/datum/disease/))
|
||||
var/datum/disease/Dis = new Dt(0)
|
||||
if(istype(Dis, /datum/disease/advance))
|
||||
continue // TODO (tm): Add advance diseases to the virus database which no one uses.
|
||||
if(!Dis.desc)
|
||||
continue
|
||||
dat += "<br><a href='?src=\ref[src];vir=[Dt]'>[Dis.name]</a>"
|
||||
@@ -95,16 +97,15 @@
|
||||
dat += "<br><b>Medical Robots:</b>"
|
||||
var/bdat = null
|
||||
for(var/obj/machinery/bot/medbot/M in world)
|
||||
if(!M)
|
||||
continue
|
||||
|
||||
if(M.z != src.z) continue //only find medibots on the same z-level as the computer
|
||||
var/turf/bl = get_turf(M)
|
||||
if(bl)
|
||||
if(bl) //if it can't find a turf for the medibot, then it probably shouldn't be showing up
|
||||
bdat += "[M.name] - <b>\[[bl.x],[bl.y]\]</b> - [M.on ? "Online" : "Offline"]<br>"
|
||||
if((!isnull(M.reagent_glass)) && M.use_beaker)
|
||||
bdat += "Reservoir: \[[M.reagent_glass.reagents.total_volume]/[M.reagent_glass.reagents.maximum_volume]\]<br>"
|
||||
else
|
||||
bdat += "Using Internal Synthesizer.<br>"
|
||||
|
||||
if(!bdat)
|
||||
dat += "<br><center>None detected</center>"
|
||||
else
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
name = "Security Records"
|
||||
desc = "Used to view and edit personnel's security records"
|
||||
icon_state = "security"
|
||||
req_access = list(access_security)
|
||||
req_one_access = list(access_security, access_forensics_lockers)
|
||||
circuit = "/obj/item/weapon/circuitboard/secure_data"
|
||||
var/obj/item/weapon/card/id/scan = null
|
||||
var/authenticated = null
|
||||
|
||||
@@ -1,218 +1,104 @@
|
||||
//config stuff
|
||||
#define SYNDICATE_DOCKZ 5 //Z-level of the Dock.
|
||||
#define SYNDICATE_STATIONZ 1 //Z-level of the Station.
|
||||
#define SYNDICATE_MOVETIME 150 //Time to station is milliseconds.
|
||||
#define SYNDICATE_STATION_AREATYPE "/area/syndicate_station/start" //Type of for station
|
||||
#define SYNDICATE_DOCK_AREATYPE 0 //Type of area for dock
|
||||
|
||||
var/syndicate_station_moving_to_station = 0
|
||||
var/syndicate_station_moving_to_space = 0
|
||||
var/syndicate_station_at_station = 0
|
||||
var/syndicate_station_can_send = 1
|
||||
var/syndicate_station_time = 0
|
||||
var/syndicate_station_timeleft = 0
|
||||
var/area/syndicate_loc = null
|
||||
var/syndicate_out_of_moves = 0
|
||||
var/bomb_set = 1
|
||||
#define SYNDICATE_SHUTTLE_MOVE_TIME 240
|
||||
#define SYNDICATE_SHUTTLE_COOLDOWN 200
|
||||
|
||||
/obj/machinery/computer/syndicate_station
|
||||
name = "Syndicate Station Terminal"
|
||||
name = "syndicate shuttle terminal"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "syndishuttle"
|
||||
req_access = list()
|
||||
var/temp = null
|
||||
var/hacked = 0
|
||||
var/allowedtocall = 0
|
||||
var/syndicate_break = 0
|
||||
|
||||
/proc/syndicate_begin()
|
||||
switch(rand(1,6))
|
||||
if(1)
|
||||
syndicate_loc = locate(/area/syndicate_station/one)
|
||||
if(2)
|
||||
syndicate_loc = locate(/area/syndicate_station/two)
|
||||
if(3)
|
||||
syndicate_loc = locate(/area/syndicate_station/three)
|
||||
if(4)
|
||||
syndicate_loc = locate(/area/syndicate_station/four)
|
||||
if(5)
|
||||
syndicate_loc = locate(/area/syndicate_station/five)
|
||||
if(6)
|
||||
syndicate_loc = locate(/area/syndicate_station/six)
|
||||
|
||||
/proc/syndicate_process()
|
||||
while(syndicate_station_time - world.timeofday > 0)
|
||||
var/ticksleft = syndicate_station_time - world.timeofday
|
||||
|
||||
if(ticksleft > 1e5)
|
||||
syndicate_station_time = world.timeofday + 10 // midnight rollover
|
||||
var/area/curr_location
|
||||
var/moving = 0
|
||||
var/lastMove = 0
|
||||
|
||||
|
||||
syndicate_station_timeleft = (ticksleft / 10)
|
||||
sleep(5)
|
||||
syndicate_station_moving_to_station = 0
|
||||
syndicate_station_moving_to_space = 0
|
||||
|
||||
switch(syndicate_station_at_station)
|
||||
if(0)
|
||||
syndicate_station_at_station = 1
|
||||
if (syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
|
||||
var/area/start_location = locate(/area/syndicate_station/start)
|
||||
var/area/end_location = syndicate_loc
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in end_location)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
|
||||
start_location.move_contents_to(end_location)
|
||||
bomb_set = 0
|
||||
/obj/machinery/computer/syndicate_station/New()
|
||||
curr_location= locate(/area/syndicate_station/start)
|
||||
|
||||
|
||||
/obj/machinery/computer/syndicate_station/proc/syndicate_move_to(area/destination as area)
|
||||
if(moving) return
|
||||
if(lastMove + SYNDICATE_SHUTTLE_COOLDOWN > world.time) return
|
||||
var/area/dest_location = locate(destination)
|
||||
if(curr_location == dest_location) return
|
||||
|
||||
if(1)
|
||||
syndicate_station_at_station = 0
|
||||
if (syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
moving = 1
|
||||
lastMove = world.time
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
if(curr_location.z != dest_location.z)
|
||||
var/area/transit_location = locate(/area/syndicate_station/transit)
|
||||
curr_location.move_contents_to(transit_location)
|
||||
curr_location = transit_location
|
||||
sleep(SYNDICATE_SHUTTLE_MOVE_TIME)
|
||||
|
||||
var/area/start_location = syndicate_loc
|
||||
var/area/end_location = locate(/area/syndicate_station/start)
|
||||
curr_location.move_contents_to(dest_location)
|
||||
curr_location = dest_location
|
||||
moving = 0
|
||||
return 1
|
||||
|
||||
var/list/dstturfs = list()
|
||||
var/throwy = world.maxy
|
||||
|
||||
for(var/turf/T in end_location)
|
||||
dstturfs += T
|
||||
if(T.y < throwy)
|
||||
throwy = T.y
|
||||
/obj/machinery/computer/syndicate_station/attackby(obj/item/I as obj, mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
// hey you, get out of the way!
|
||||
for(var/turf/T in dstturfs)
|
||||
// find the turf to move things to
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/movable/AM as mob|obj in T)
|
||||
AM.Move(D)
|
||||
if(istype(T, /turf/simulated))
|
||||
del(T)
|
||||
/obj/machinery/computer/syndicate_station/attack_ai(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
start_location.move_contents_to(end_location)
|
||||
syndicate_out_of_moves = 1
|
||||
/obj/machinery/computer/syndicate_station/attack_paw(mob/user as mob)
|
||||
return attack_hand(user)
|
||||
|
||||
/proc/syndicate_can_move()
|
||||
//world << "moving_to_station = [syndicate_station_moving_to_station]; moving_to_space = [syndicate_station_moving_to_space]; out_of_moves = [syndicate_out_of_moves]; bomb_set = [bomb_set]; "
|
||||
if(syndicate_station_moving_to_station || syndicate_station_moving_to_space) return 0
|
||||
if(syndicate_out_of_moves) return 0
|
||||
if(!bomb_set) return 0
|
||||
else return 1
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attackby(I as obj, user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attack_paw(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attackby(I as obj, user as mob)
|
||||
if(istype(I,/obj/item/weapon/card/emag))
|
||||
user << "\blue Nothing happens."
|
||||
else
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/machinery/computer/syndicate_station/attack_hand(var/mob/user as mob)
|
||||
if(!src.allowed(user))
|
||||
user << "\red Access Denied."
|
||||
/obj/machinery/computer/syndicate_station/attack_hand(mob/user as mob)
|
||||
if(!allowed(user))
|
||||
user << "<span class='notice'>Access Denied.</span>"
|
||||
return
|
||||
|
||||
if(syndicate_break)
|
||||
user << "\red Unable to locate shuttle."
|
||||
return
|
||||
|
||||
if(..())
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat
|
||||
if (src.temp)
|
||||
dat = src.temp
|
||||
else
|
||||
dat += {"<BR><B>Syndicate Shuttle</B><HR>
|
||||
\nLocation: [syndicate_station_moving_to_station || syndicate_station_moving_to_space ? "Moving to station ([syndicate_station_timeleft] Secs.)":syndicate_station_at_station ? "Station":"Space"]<BR>
|
||||
[syndicate_station_moving_to_station || syndicate_station_moving_to_space ? "\n*Shuttle already called*<BR>\n<BR>":syndicate_station_at_station ? "\n<A href='?src=\ref[src];sendtospace=1'>Send to space</A><BR>\n<BR>":"\n<A href='?src=\ref[src];sendtostation=1'>Send to station</A><BR>\n<BR>"]
|
||||
\n<A href='?src=\ref[user];mach_close=computer'>Close</A>"}
|
||||
|
||||
var/dat = {"Location: [curr_location]<br>
|
||||
Ready to move[max(lastMove + SYNDICATE_SHUTTLE_COOLDOWN - world.time, 0) ? " in [max(round((lastMove + SYNDICATE_SHUTTLE_COOLDOWN - world.time) * 0.1), 0)] seconds" : ": now"]<br>
|
||||
<a href='?src=\ref[src];syndicate=1'>Syndicate Space</a><br>
|
||||
<a href='?src=\ref[src];station_nw=1'>North West of SS13</a> |
|
||||
<a href='?src=\ref[src];station_n=1'>North of SS13</a> |
|
||||
<a href='?src=\ref[src];station_ne=1'>North East of SS13</a><br>
|
||||
<a href='?src=\ref[src];station_sw=1'>South West of SS13</a> |
|
||||
<a href='?src=\ref[src];station_s=1'>South of SS13</a> |
|
||||
<a href='?src=\ref[src];station_se=1'>South East of SS13</a><br>
|
||||
<a href='?src=\ref[src];commssat=1'>South of the Communication Satellite</a> |
|
||||
<a href='?src=\ref[src];mining=1'>North East of the Mining Asteroid</a><br>
|
||||
<a href='?src=\ref[user];mach_close=computer'>Close</a>"}
|
||||
|
||||
user << browse(dat, "window=computer;size=575x450")
|
||||
onclose(user, "computer")
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/computer/syndicate_station/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(!isliving(usr)) return
|
||||
var/mob/living/user = usr
|
||||
|
||||
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
|
||||
usr.set_machine(src)
|
||||
if(in_range(src, user) || istype(user, /mob/living/silicon))
|
||||
user.set_machine(src)
|
||||
|
||||
if (href_list["sendtospace"])
|
||||
if(!syndicate_station_at_station|| syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
if(href_list["syndicate"])
|
||||
syndicate_move_to(/area/syndicate_station/start)
|
||||
else if(href_list["station_nw"])
|
||||
syndicate_move_to(/area/syndicate_station/northwest)
|
||||
else if(href_list["station_n"])
|
||||
syndicate_move_to(/area/syndicate_station/north)
|
||||
else if(href_list["station_ne"])
|
||||
syndicate_move_to(/area/syndicate_station/northeast)
|
||||
else if(href_list["station_sw"])
|
||||
syndicate_move_to(/area/syndicate_station/southwest)
|
||||
else if(href_list["station_s"])
|
||||
syndicate_move_to(/area/syndicate_station/south)
|
||||
else if(href_list["station_se"])
|
||||
syndicate_move_to(/area/syndicate_station/southeast)
|
||||
else if(href_list["commssat"])
|
||||
syndicate_move_to(/area/syndicate_station/commssat)
|
||||
else if(href_list["mining"])
|
||||
syndicate_move_to(/area/syndicate_station/mining)
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
add_fingerprint(usr)
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
usr << "\blue The syndicate shuttle will move in [(PRISON_MOVETIME/10)] seconds."
|
||||
|
||||
src.temp += "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
src.updateUsrDialog()
|
||||
|
||||
syndicate_station_moving_to_space = 1
|
||||
|
||||
syndicate_station_time = world.timeofday + SYNDICATE_MOVETIME
|
||||
spawn(0)
|
||||
syndicate_process()
|
||||
|
||||
else if (href_list["sendtostation"])
|
||||
if(syndicate_station_at_station || syndicate_station_moving_to_station || syndicate_station_moving_to_space) return
|
||||
|
||||
if (!syndicate_can_move())
|
||||
usr << "\red The syndicate shuttle is unable to leave."
|
||||
return
|
||||
|
||||
usr << "\blue The syndicate shuttle will move in [(SYNDICATE_MOVETIME/10)] seconds."
|
||||
|
||||
src.temp += "Shuttle sent.<BR><BR><A href='?src=\ref[src];mainmenu=1'>OK</A>"
|
||||
src.updateUsrDialog()
|
||||
|
||||
syndicate_station_moving_to_station = 1
|
||||
|
||||
syndicate_station_time = world.timeofday + SYNDICATE_MOVETIME
|
||||
spawn(0)
|
||||
syndicate_process()
|
||||
|
||||
else if (href_list["mainmenu"])
|
||||
src.temp = null
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
/obj/machinery/computer/syndicate_station/bullet_act(var/obj/item/projectile/Proj)
|
||||
visible_message("[Proj] ricochets off [src]!") //let's not let them fuck themselves in the rear
|
||||
43
code/game/machinery/doors/alarmlock.dm
Normal file
43
code/game/machinery/doors/alarmlock.dm
Normal file
@@ -0,0 +1,43 @@
|
||||
/obj/machinery/door/airlock/alarmlock
|
||||
|
||||
name = "Glass Alarm Airlock"
|
||||
icon = 'icons/obj/doors/Doorglass.dmi'
|
||||
opacity = 0
|
||||
doortype = 7
|
||||
glass = 1
|
||||
|
||||
var/datum/radio_frequency/air_connection
|
||||
var/air_frequency = 1437
|
||||
autoclose = 0
|
||||
|
||||
/obj/machinery/door/airlock/alarmlock/New()
|
||||
..()
|
||||
air_connection = new
|
||||
|
||||
/obj/machinery/door/airlock/alarmlock/initialize()
|
||||
..()
|
||||
radio_controller.remove_object(src, air_frequency)
|
||||
air_connection = radio_controller.add_object(src, air_frequency, RADIO_TO_AIRALARM)
|
||||
open()
|
||||
|
||||
|
||||
/obj/machinery/door/airlock/alarmlock/receive_signal(datum/signal/signal)
|
||||
..()
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
var/alarm_area = signal.data["zone"]
|
||||
var/alert = signal.data["alert"]
|
||||
|
||||
var/area/our_area = get_area(src)
|
||||
if (our_area.master)
|
||||
our_area = our_area.master
|
||||
|
||||
if(alarm_area == our_area.name)
|
||||
switch(alert)
|
||||
if("severe")
|
||||
autoclose = 1
|
||||
close()
|
||||
if("minor", "clear")
|
||||
autoclose = 0
|
||||
open()
|
||||
File diff suppressed because it is too large
Load Diff
@@ -82,7 +82,7 @@
|
||||
|
||||
for(var/datum/disease/D in O.viruses)
|
||||
if(D.spread_type != SPECIAL)
|
||||
B.data["viruses"] = new D.type(0, D)
|
||||
B.data["viruses"] = D.Copy()
|
||||
|
||||
B.data["blood_DNA"] = copytext(O.dna.unique_enzymes,1,0)
|
||||
if(O.resistances&&O.resistances.len)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 100
|
||||
flags = NOREACT
|
||||
var/global/max_n_of_items = 200
|
||||
var/global/max_n_of_items = 999 // Sorry but the BYOND infinite loop detector doesn't look things over 1000.
|
||||
var/item_quants = list()
|
||||
var/ispowered = 1 //starts powered
|
||||
var/isbroken = 0
|
||||
@@ -103,7 +103,10 @@
|
||||
var/N = item_quants[O]
|
||||
dat += "<FONT color = 'blue'><B>[capitalize(O)]</B>:"
|
||||
dat += " [N] </font>"
|
||||
dat += "<a href='byond://?src=\ref[src];vend=[O]'>Vend</A>"
|
||||
dat += "<a href='byond://?src=\ref[src];vend=[O];amount=1'>Vend</A> "
|
||||
dat += "(<a href='byond://?src=\ref[src];vend=[O];amount=5'>x5</A>)"
|
||||
dat += "(<a href='byond://?src=\ref[src];vend=[O];amount=10'>x10</A>)"
|
||||
dat += "(<a href='byond://?src=\ref[src];vend=[O];amount=25'>x25</A>)"
|
||||
dat += "<br>"
|
||||
|
||||
dat += "</TT>"
|
||||
@@ -114,18 +117,23 @@
|
||||
/obj/machinery/smartfridge/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
|
||||
var/N = href_list["vend"]
|
||||
var/amount = text2num(href_list["amount"])
|
||||
|
||||
if(item_quants[N] <= 0) // Sanity check, there are probably ways to press the button when it shouldn't be possible.
|
||||
return
|
||||
|
||||
item_quants[N] -= 1
|
||||
item_quants[N] = max(item_quants[N] - amount, 0)
|
||||
|
||||
var/i = amount
|
||||
for(var/obj/O in contents)
|
||||
if(O.name == N)
|
||||
O.loc = src.loc
|
||||
break
|
||||
i--
|
||||
if(i <= 0)
|
||||
break
|
||||
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
@@ -199,12 +199,12 @@
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/toggleUV(mob/user as mob)
|
||||
var/protected = 0
|
||||
var/mob/living/carbon/human/H = user
|
||||
// var/protected = 0
|
||||
// var/mob/living/carbon/human/H = user
|
||||
if(!src.panelopen)
|
||||
return
|
||||
|
||||
if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
|
||||
/*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
|
||||
if(H.gloves)
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
if(istype(G,/obj/item/clothing/gloves/yellow))
|
||||
@@ -213,7 +213,7 @@
|
||||
if(!protected)
|
||||
playsound(src.loc, "sparks", 75, 1, -1)
|
||||
user << "<font color='red'>You try to touch the controls but you get zapped. There must be a short circuit somewhere.</font>"
|
||||
return
|
||||
return*/
|
||||
else //welp, the guy is protected, we can continue
|
||||
if(src.issuperUV)
|
||||
user << "You slide the dial back towards \"185nm\"."
|
||||
@@ -225,12 +225,12 @@
|
||||
|
||||
|
||||
/obj/machinery/suit_storage_unit/proc/togglesafeties(mob/user as mob)
|
||||
var/protected = 0
|
||||
var/mob/living/carbon/human/H = user
|
||||
// var/protected = 0
|
||||
// var/mob/living/carbon/human/H = user
|
||||
if(!src.panelopen) //Needed check due to bugs
|
||||
return
|
||||
|
||||
if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
|
||||
/*if(istype(H)) //Let's check if the guy's wearing electrically insulated gloves
|
||||
if(H.gloves)
|
||||
var/obj/item/clothing/gloves/G = H.gloves
|
||||
if(istype(G,/obj/item/clothing/gloves/yellow) )
|
||||
@@ -239,7 +239,7 @@
|
||||
if(!protected)
|
||||
playsound(src.loc, "sparks", 75, 1, -1)
|
||||
user << "<font color='red'>You try to touch the controls but you get zapped. There must be a short circuit somewhere.</font>"
|
||||
return
|
||||
return*/
|
||||
else
|
||||
user << "You push the button. The coloured LED next to it changes."
|
||||
src.safetieson = !src.safetieson
|
||||
@@ -406,7 +406,7 @@
|
||||
if(user != OCCUPANT)
|
||||
OCCUPANT << "<font color='blue'>The machine kicks you out!</font>"
|
||||
if(user.loc != src.loc)
|
||||
OCCUPANT << "<font color='blue'>You leave the not-so-cosy confines of the SSU.</font>"
|
||||
OCCUPANT << "<font color='blue'>You leave the not-so-cozy confines of the SSU.</font>"
|
||||
|
||||
src.OCCUPANT.client.eye = src.OCCUPANT.client.mob
|
||||
src.OCCUPANT.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
/*
|
||||
@@ -741,3 +742,754 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
|
||||
|
||||
return signal
|
||||
|
||||
=======
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
/*
|
||||
The broadcaster sends processed messages to all radio devices in the game. They
|
||||
do not have to be headsets; intercoms and station-bounced radios suffice.
|
||||
|
||||
They receive their message from a server after the message has been logged.
|
||||
*/
|
||||
|
||||
var/list/recentmessages = list() // global list of recent messages broadcasted : used to circumvent massive radio spam
|
||||
var/message_delay = 0 // To make sure restarting the recentmessages list is kept in sync
|
||||
|
||||
/obj/machinery/telecomms/broadcaster
|
||||
name = "Subspace Broadcaster"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "broadcaster"
|
||||
desc = "A dish-shaped machine used to broadcast processed subspace signals."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 1
|
||||
idle_power_usage = 25
|
||||
machinetype = 5
|
||||
heatgen = 0
|
||||
delay = 7
|
||||
circuitboard = "/obj/item/weapon/circuitboard/telecomms/broadcaster"
|
||||
|
||||
/obj/machinery/telecomms/broadcaster/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
|
||||
// Don't broadcast rejected signals
|
||||
if(signal.data["reject"])
|
||||
return
|
||||
|
||||
if(signal.data["message"])
|
||||
|
||||
// Prevents massive radio spam
|
||||
signal.data["done"] = 1 // mark the signal as being broadcasted
|
||||
// Search for the original signal and mark it as done as well
|
||||
var/datum/signal/original = signal.data["original"]
|
||||
if(original)
|
||||
original.data["done"] = 1
|
||||
|
||||
var/signal_message = "[signal.frequency]:[signal.data["message"]]:[signal.data["realname"]]"
|
||||
if(signal_message in recentmessages)
|
||||
return
|
||||
recentmessages.Add(signal_message)
|
||||
|
||||
if(signal.data["slow"] > 0)
|
||||
sleep(signal.data["slow"]) // simulate the network lag if necessary
|
||||
|
||||
signal.data["level"] |= listening_level
|
||||
|
||||
// Is it a test signal? Don't send it.
|
||||
if(signal.data["type"] == 4)
|
||||
return
|
||||
|
||||
/** #### - Normal Broadcast - #### **/
|
||||
|
||||
if(signal.data["type"] == 0)
|
||||
|
||||
/* ###### Broadcast a message using signal.data ###### */
|
||||
Broadcast_Message(signal.data["connection"], signal.data["mob"],
|
||||
signal.data["vmask"], signal.data["vmessage"],
|
||||
signal.data["radio"], signal.data["message"],
|
||||
signal.data["name"], signal.data["job"],
|
||||
signal.data["realname"], signal.data["vname"],, signal.data["compression"], signal.data["level"], signal.frequency)
|
||||
|
||||
|
||||
/** #### - Simple Broadcast - #### **/
|
||||
|
||||
if(signal.data["type"] == 1)
|
||||
|
||||
/* ###### Broadcast a message using signal.data ###### */
|
||||
Broadcast_SimpleMessage(signal.data["name"], signal.frequency,
|
||||
signal.data["message"],null, null,
|
||||
signal.data["compression"], listening_level)
|
||||
|
||||
|
||||
/** #### - Artificial Broadcast - #### **/
|
||||
// (Imitates a mob)
|
||||
|
||||
if(signal.data["type"] == 2)
|
||||
|
||||
/* ###### Broadcast a message using signal.data ###### */
|
||||
// Parameter "data" as 4: AI can't track this person/mob
|
||||
|
||||
Broadcast_Message(signal.data["connection"], signal.data["mob"],
|
||||
signal.data["vmask"], signal.data["vmessage"],
|
||||
signal.data["radio"], signal.data["message"],
|
||||
signal.data["name"], signal.data["job"],
|
||||
signal.data["realname"], signal.data["vname"], 4, signal.data["compression"], signal.data["level"], signal.frequency)
|
||||
|
||||
if(!message_delay)
|
||||
message_delay = 1
|
||||
spawn(10)
|
||||
message_delay = 0
|
||||
recentmessages = list()
|
||||
|
||||
/* --- Do a snazzy animation! --- */
|
||||
flick("broadcaster_send", src)
|
||||
|
||||
/obj/machinery/telecomms/broadcaster/Del()
|
||||
// In case message_delay is left on 1, otherwise it won't reset the list and people can't say the same thing twice anymore.
|
||||
if(message_delay)
|
||||
message_delay = 0
|
||||
..()
|
||||
|
||||
|
||||
/*
|
||||
Basically just an empty shell for receiving and broadcasting radio messages. Not
|
||||
very flexible, but it gets the job done.
|
||||
*/
|
||||
|
||||
/obj/machinery/telecomms/allinone
|
||||
name = "Telecommunications Mainframe"
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "comm_server"
|
||||
desc = "A compact machine used for portable subspace telecommuniations processing."
|
||||
density = 1
|
||||
anchored = 1
|
||||
use_power = 0
|
||||
idle_power_usage = 0
|
||||
machinetype = 6
|
||||
heatgen = 0
|
||||
var/intercept = 0 // if nonzero, broadcasts all messages to syndicate channel
|
||||
|
||||
/obj/machinery/telecomms/allinone/receive_signal(datum/signal/signal)
|
||||
|
||||
if(!on) // has to be on to receive messages
|
||||
return
|
||||
|
||||
if(is_freq_listening(signal)) // detect subspace signals
|
||||
|
||||
signal.data["done"] = 1 // mark the signal as being broadcasted
|
||||
signal.data["compression"] = 0
|
||||
|
||||
// Search for the original signal and mark it as done as well
|
||||
var/datum/signal/original = signal.data["original"]
|
||||
if(original)
|
||||
original.data["done"] = 1
|
||||
|
||||
if(signal.data["slow"] > 0)
|
||||
sleep(signal.data["slow"]) // simulate the network lag if necessary
|
||||
|
||||
/* ###### Broadcast a message using signal.data ###### */
|
||||
|
||||
var/datum/radio_frequency/connection = signal.data["connection"]
|
||||
|
||||
if(connection.frequency == SYND_FREQ) // if syndicate broadcast, just
|
||||
Broadcast_Message(signal.data["connection"], signal.data["mob"],
|
||||
signal.data["vmask"], signal.data["vmessage"],
|
||||
signal.data["radio"], signal.data["message"],
|
||||
signal.data["name"], signal.data["job"],
|
||||
signal.data["realname"], signal.data["vname"],, signal.data["compression"], list(0), connection.frequency)
|
||||
else
|
||||
if(intercept)
|
||||
Broadcast_Message(signal.data["connection"], signal.data["mob"],
|
||||
signal.data["vmask"], signal.data["vmessage"],
|
||||
signal.data["radio"], signal.data["message"],
|
||||
signal.data["name"], signal.data["job"],
|
||||
signal.data["realname"], signal.data["vname"], 3, signal.data["compression"], list(0), connection.frequency)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Here is the big, bad function that broadcasts a message given the appropriate
|
||||
parameters.
|
||||
|
||||
@param connection:
|
||||
The datum generated in radio.dm, stored in signal.data["connection"].
|
||||
|
||||
@param M:
|
||||
Reference to the mob/speaker, stored in signal.data["mob"]
|
||||
|
||||
@param vmask:
|
||||
Boolean value if the mob is "hiding" its identity via voice mask, stored in
|
||||
signal.data["vmask"]
|
||||
|
||||
@param vmessage:
|
||||
If specified, will display this as the message; such as "chimpering"
|
||||
for monkies if the mob is not understood. Stored in signal.data["vmessage"].
|
||||
|
||||
@param radio:
|
||||
Reference to the radio broadcasting the message, stored in signal.data["radio"]
|
||||
|
||||
@param message:
|
||||
The actual string message to display to mobs who understood mob M. Stored in
|
||||
signal.data["message"]
|
||||
|
||||
@param name:
|
||||
The name to display when a mob receives the message. signal.data["name"]
|
||||
|
||||
@param job:
|
||||
The name job to display for the AI when it receives the message. signal.data["job"]
|
||||
|
||||
@param realname:
|
||||
The "real" name associated with the mob. signal.data["realname"]
|
||||
|
||||
@param vname:
|
||||
If specified, will use this name when mob M is not understood. signal.data["vname"]
|
||||
|
||||
@param data:
|
||||
If specified:
|
||||
1 -- Will only broadcast to intercoms
|
||||
2 -- Will only broadcast to intercoms and station-bounced radios
|
||||
3 -- Broadcast to syndicate frequency
|
||||
4 -- AI can't track down this person. Useful for imitation broadcasts where you can't find the actual mob
|
||||
|
||||
@param compression:
|
||||
If 0, the signal is audible
|
||||
If nonzero, the signal may be partially inaudible or just complete gibberish.
|
||||
|
||||
@param level:
|
||||
The list of Z levels that the sending radio is broadcasting to. Having 0 in the list broadcasts on all levels
|
||||
|
||||
@param freq
|
||||
The frequency of the signal
|
||||
|
||||
**/
|
||||
|
||||
/proc/Broadcast_Message(var/datum/radio_frequency/connection, var/mob/M,
|
||||
var/vmask, var/vmessage, var/obj/item/device/radio/radio,
|
||||
var/message, var/name, var/job, var/realname, var/vname,
|
||||
var/data, var/compression, var/list/level, var/freq)
|
||||
|
||||
/* ###### Prepare the radio connection ###### */
|
||||
|
||||
var/display_freq = freq
|
||||
|
||||
var/list/obj/item/device/radio/radios = list()
|
||||
|
||||
// --- Broadcast only to intercom devices ---
|
||||
|
||||
if(data == 1)
|
||||
|
||||
for (var/obj/item/device/radio/intercom/R in connection.devices["[RADIO_CHAT]"])
|
||||
if(R.receive_range(display_freq, level) > -1)
|
||||
radios += R
|
||||
|
||||
// --- Broadcast only to intercoms and station-bounced radios ---
|
||||
|
||||
else if(data == 2)
|
||||
|
||||
for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
|
||||
|
||||
if(istype(R, /obj/item/device/radio/headset))
|
||||
continue
|
||||
|
||||
if(R.receive_range(display_freq, level) > -1)
|
||||
radios += R
|
||||
|
||||
// --- Broadcast to syndicate radio! ---
|
||||
|
||||
else if(data == 3)
|
||||
|
||||
var/datum/radio_frequency/syndicateconnection = radio_controller.return_frequency(SYND_FREQ)
|
||||
|
||||
for (var/obj/item/device/radio/R in syndicateconnection.devices["[RADIO_CHAT]"])
|
||||
|
||||
if(R.receive_range(SYND_FREQ, level) > -1)
|
||||
radios += R
|
||||
|
||||
// --- Broadcast to ALL radio devices ---
|
||||
|
||||
else
|
||||
|
||||
for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
|
||||
if(R.receive_range(display_freq, level) > -1)
|
||||
radios += R
|
||||
|
||||
// Get a list of mobs who can hear from the radios we collected.
|
||||
var/list/receive = get_mobs_in_radio_ranges(radios)
|
||||
|
||||
/* ###### Organize the receivers into categories for displaying the message ###### */
|
||||
|
||||
// Understood the message:
|
||||
var/list/heard_masked = list() // masked name or no real name
|
||||
var/list/heard_normal = list() // normal message
|
||||
|
||||
// Did not understand the message:
|
||||
var/list/heard_voice = list() // voice message (ie "chimpers")
|
||||
var/list/heard_garbled = list() // garbled message (ie "f*c* **u, **i*er!")
|
||||
var/list/heard_gibberish= list() // completely screwed over message (ie "F%! (O*# *#!<>&**%!")
|
||||
|
||||
for (var/mob/R in receive)
|
||||
|
||||
/* --- Loop through the receivers and categorize them --- */
|
||||
|
||||
if (R.client && !(R.client.prefs.toggles & CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
|
||||
continue
|
||||
|
||||
if(istype(M, /mob/new_player)) // we don't want new players to hear messages. rare but generates runtimes.
|
||||
continue
|
||||
|
||||
|
||||
// --- Check for compression ---
|
||||
if(compression > 0)
|
||||
heard_gibberish += R
|
||||
continue
|
||||
|
||||
// --- Can understand the speech ---
|
||||
|
||||
if (R.say_understands(M))
|
||||
|
||||
// - Not human or wearing a voice mask -
|
||||
if (!ishuman(M) || vmask)
|
||||
heard_masked += R
|
||||
|
||||
// - Human and not wearing voice mask -
|
||||
else
|
||||
heard_normal += R
|
||||
|
||||
// --- Can't understand the speech ---
|
||||
|
||||
else
|
||||
// - The speaker has a prespecified "voice message" to display if not understood -
|
||||
if (vmessage)
|
||||
heard_voice += R
|
||||
|
||||
// - Just display a garbled message -
|
||||
else
|
||||
heard_garbled += R
|
||||
|
||||
|
||||
/* ###### Begin formatting and sending the message ###### */
|
||||
if (length(heard_masked) || length(heard_normal) || length(heard_voice) || length(heard_garbled) || length(heard_gibberish))
|
||||
|
||||
/* --- Some miscellaneous variables to format the string output --- */
|
||||
var/part_a = "<span class='radio'><span class='name'>" // goes in the actual output
|
||||
var/freq_text // the name of the channel
|
||||
|
||||
// --- Set the name of the channel ---
|
||||
switch(display_freq)
|
||||
|
||||
if(SYND_FREQ)
|
||||
freq_text = "#unkn"
|
||||
if(COMM_FREQ)
|
||||
freq_text = "Command"
|
||||
if(1351)
|
||||
freq_text = "Science"
|
||||
if(1355)
|
||||
freq_text = "Medical"
|
||||
if(1357)
|
||||
freq_text = "Engineering"
|
||||
if(1359)
|
||||
freq_text = "Security"
|
||||
if(1349)
|
||||
freq_text = "Mining"
|
||||
if(1347)
|
||||
freq_text = "Cargo"
|
||||
//There's probably a way to use the list var of channels in code\game\communications.dm to make the dept channels non-hardcoded, but I wasn't in an experimentive mood. --NEO
|
||||
|
||||
|
||||
// --- If the frequency has not been assigned a name, just use the frequency as the name ---
|
||||
|
||||
if(!freq_text)
|
||||
freq_text = format_frequency(display_freq)
|
||||
|
||||
// --- Some more pre-message formatting ---
|
||||
|
||||
var/part_b_extra = ""
|
||||
if(data == 3) // intercepted radio message
|
||||
part_b_extra = " <i>(Intercepted)</i>"
|
||||
var/part_b = "</span><b> \icon[radio]\[[freq_text]\][part_b_extra]</b> <span class='message'>" // Tweaked for security headsets -- TLE
|
||||
var/part_c = "</span></span>"
|
||||
|
||||
if (display_freq==SYND_FREQ)
|
||||
part_a = "<span class='syndradio'><span class='name'>"
|
||||
else if (display_freq==COMM_FREQ)
|
||||
part_a = "<span class='comradio'><span class='name'>"
|
||||
else if (display_freq in DEPT_FREQS)
|
||||
part_a = "<span class='deptradio'><span class='name'>"
|
||||
|
||||
|
||||
// --- Filter the message; place it in quotes apply a verb ---
|
||||
|
||||
var/quotedmsg = M.say_quote(message)
|
||||
|
||||
// --- This following recording is intended for research and feedback in the use of department radio channels ---
|
||||
|
||||
var/part_blackbox_b = "</span><b> \[[freq_text]\]</b> <span class='message'>" // Tweaked for security headsets -- TLE
|
||||
var/blackbox_msg = "[part_a][name][part_blackbox_b][quotedmsg][part_c]"
|
||||
//var/blackbox_admin_msg = "[part_a][M.name] (Real name: [M.real_name])[part_blackbox_b][quotedmsg][part_c]"
|
||||
|
||||
//BR.messages_admin += blackbox_admin_msg
|
||||
if(istype(blackbox))
|
||||
switch(display_freq)
|
||||
if(1459)
|
||||
blackbox.msg_common += blackbox_msg
|
||||
if(1351)
|
||||
blackbox.msg_science += blackbox_msg
|
||||
if(1353)
|
||||
blackbox.msg_command += blackbox_msg
|
||||
if(1355)
|
||||
blackbox.msg_medical += blackbox_msg
|
||||
if(1357)
|
||||
blackbox.msg_engineering += blackbox_msg
|
||||
if(1359)
|
||||
blackbox.msg_security += blackbox_msg
|
||||
if(1441)
|
||||
blackbox.msg_deathsquad += blackbox_msg
|
||||
if(1213)
|
||||
blackbox.msg_syndicate += blackbox_msg
|
||||
if(1349)
|
||||
blackbox.msg_mining += blackbox_msg
|
||||
if(1347)
|
||||
blackbox.msg_cargo += blackbox_msg
|
||||
else
|
||||
blackbox.messages += blackbox_msg
|
||||
|
||||
//End of research and feedback code.
|
||||
|
||||
var/aitrack = ""
|
||||
|
||||
/* ###### Send the message ###### */
|
||||
|
||||
|
||||
/* --- Process all the mobs that heard a masked voice (understood) --- */
|
||||
|
||||
if (length(heard_masked))
|
||||
var/N = name
|
||||
var/J = job
|
||||
var/rendered = "[part_a][N][part_b][quotedmsg][part_c]"
|
||||
for (var/mob/R in heard_masked)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
||||
if(data == 4)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
||||
|
||||
if(istype(R, /mob/living/silicon/ai))
|
||||
R.show_message("[part_a][aitrack][N] ([J]) </a>[part_b][quotedmsg][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
/* --- Process all the mobs that heard the voice normally (understood) --- */
|
||||
|
||||
if (length(heard_normal))
|
||||
var/rendered = "[part_a][realname][part_b][quotedmsg][part_c]"
|
||||
|
||||
for (var/mob/R in heard_normal)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
||||
if(data == 4)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
||||
|
||||
if(istype(R, /mob/living/silicon/ai))
|
||||
R.show_message("[part_a][aitrack][realname] ([job]) </a>[part_b][quotedmsg][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
/* --- Process all the mobs that heard the voice normally (did not understand) --- */
|
||||
// Does not display message; displayes the mob's voice_message (ie "chimpers")
|
||||
|
||||
if (length(heard_voice))
|
||||
var/rendered = "[part_a][vname][part_b][M.voice_message][part_c]"
|
||||
|
||||
for (var/mob/R in heard_voice)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
||||
if(data == 4)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
||||
|
||||
|
||||
if(istype(R, /mob/living/silicon/ai))
|
||||
R.show_message("[part_a][aitrack][vname] ([job]) </a>[part_b][vmessage]][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
/* --- Process all the mobs that heard a garbled voice (did not understand) --- */
|
||||
// Displays garbled message (ie "f*c* **u, **i*er!")
|
||||
|
||||
if (length(heard_garbled))
|
||||
quotedmsg = M.say_quote(stars(message))
|
||||
var/rendered = "[part_a][vname][part_b][quotedmsg][part_c]"
|
||||
|
||||
for (var/mob/R in heard_garbled)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
||||
if(data == 4)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
||||
|
||||
|
||||
if(istype(R, /mob/living/silicon/ai))
|
||||
R.show_message("[part_a][aitrack][vname]</a>[part_b][quotedmsg][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
|
||||
/* --- Complete gibberish. Usually happens when there's a compressed message --- */
|
||||
|
||||
if (length(heard_gibberish))
|
||||
quotedmsg = M.say_quote(Gibberish(message, compression + 50))
|
||||
var/rendered = "[part_a][Gibberish(M.real_name, compression + 50)][part_b][quotedmsg][part_c]"
|
||||
|
||||
for (var/mob/R in heard_gibberish)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];track=\ref[M]'>"
|
||||
if(data == 4)
|
||||
aitrack = "<a href='byond://?src=\ref[radio];track2=\ref[R];faketrack=\ref[M]'>"
|
||||
|
||||
|
||||
if(istype(R, /mob/living/silicon/ai))
|
||||
R.show_message("[part_a][aitrack][Gibberish(realname, compression + 50)] ([Gibberish(job, compression + 50)]) </a>[part_b][quotedmsg][part_c]", 2)
|
||||
else
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
|
||||
|
||||
/proc/Broadcast_SimpleMessage(var/source, var/frequency, var/text, var/data, var/mob/M, var/compression, var/level)
|
||||
|
||||
/* ###### Prepare the radio connection ###### */
|
||||
|
||||
if(!M)
|
||||
var/mob/living/carbon/human/H = new
|
||||
M = H
|
||||
|
||||
var/datum/radio_frequency/connection = radio_controller.return_frequency(frequency)
|
||||
|
||||
var/display_freq = connection.frequency
|
||||
|
||||
var/list/receive = list()
|
||||
|
||||
|
||||
// --- Broadcast only to intercom devices ---
|
||||
|
||||
if(data == 1)
|
||||
for (var/obj/item/device/radio/intercom/R in connection.devices["[RADIO_CHAT]"])
|
||||
var/turf/position = get_turf(R)
|
||||
if(position && position.z == level)
|
||||
receive |= R.send_hear(display_freq, level)
|
||||
|
||||
|
||||
// --- Broadcast only to intercoms and station-bounced radios ---
|
||||
|
||||
else if(data == 2)
|
||||
for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
|
||||
|
||||
if(istype(R, /obj/item/device/radio/headset))
|
||||
continue
|
||||
var/turf/position = get_turf(R)
|
||||
if(position && position.z == level)
|
||||
receive |= R.send_hear(display_freq)
|
||||
|
||||
|
||||
// --- Broadcast to syndicate radio! ---
|
||||
|
||||
else if(data == 3)
|
||||
var/datum/radio_frequency/syndicateconnection = radio_controller.return_frequency(SYND_FREQ)
|
||||
|
||||
for (var/obj/item/device/radio/R in syndicateconnection.devices["[RADIO_CHAT]"])
|
||||
var/turf/position = get_turf(R)
|
||||
if(position && position.z == level)
|
||||
receive |= R.send_hear(SYND_FREQ)
|
||||
|
||||
|
||||
// --- Broadcast to ALL radio devices ---
|
||||
|
||||
else
|
||||
for (var/obj/item/device/radio/R in connection.devices["[RADIO_CHAT]"])
|
||||
var/turf/position = get_turf(R)
|
||||
if(position && position.z == level)
|
||||
receive |= R.send_hear(display_freq)
|
||||
|
||||
|
||||
/* ###### Organize the receivers into categories for displaying the message ###### */
|
||||
|
||||
// Understood the message:
|
||||
var/list/heard_normal = list() // normal message
|
||||
|
||||
// Did not understand the message:
|
||||
var/list/heard_garbled = list() // garbled message (ie "f*c* **u, **i*er!")
|
||||
var/list/heard_gibberish= list() // completely screwed over message (ie "F%! (O*# *#!<>&**%!")
|
||||
|
||||
for (var/mob/R in receive)
|
||||
|
||||
/* --- Loop through the receivers and categorize them --- */
|
||||
|
||||
if (R.client && !(R.client.prefs.toggles & CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
|
||||
continue
|
||||
|
||||
|
||||
// --- Check for compression ---
|
||||
if(compression > 0)
|
||||
|
||||
heard_gibberish += R
|
||||
continue
|
||||
|
||||
// --- Can understand the speech ---
|
||||
|
||||
if (R.say_understands(M))
|
||||
|
||||
heard_normal += R
|
||||
|
||||
// --- Can't understand the speech ---
|
||||
|
||||
else
|
||||
// - Just display a garbled message -
|
||||
|
||||
heard_garbled += R
|
||||
|
||||
|
||||
/* ###### Begin formatting and sending the message ###### */
|
||||
if (length(heard_normal) || length(heard_garbled) || length(heard_gibberish))
|
||||
|
||||
/* --- Some miscellaneous variables to format the string output --- */
|
||||
var/part_a = "<span class='radio'><span class='name'>" // goes in the actual output
|
||||
var/freq_text // the name of the channel
|
||||
|
||||
// --- Set the name of the channel ---
|
||||
switch(display_freq)
|
||||
|
||||
if(SYND_FREQ)
|
||||
freq_text = "#unkn"
|
||||
if(COMM_FREQ)
|
||||
freq_text = "Command"
|
||||
if(1351)
|
||||
freq_text = "Science"
|
||||
if(1355)
|
||||
freq_text = "Medical"
|
||||
if(1357)
|
||||
freq_text = "Engineering"
|
||||
if(1359)
|
||||
freq_text = "Security"
|
||||
if(1349)
|
||||
freq_text = "Mining"
|
||||
if(1347)
|
||||
freq_text = "Cargo"
|
||||
//There's probably a way to use the list var of channels in code\game\communications.dm to make the dept channels non-hardcoded, but I wasn't in an experimentive mood. --NEO
|
||||
|
||||
|
||||
// --- If the frequency has not been assigned a name, just use the frequency as the name ---
|
||||
|
||||
if(!freq_text)
|
||||
freq_text = format_frequency(display_freq)
|
||||
|
||||
// --- Some more pre-message formatting ---
|
||||
|
||||
var/part_b_extra = ""
|
||||
if(data == 3) // intercepted radio message
|
||||
part_b_extra = " <i>(Intercepted)</i>"
|
||||
|
||||
// Create a radio headset for the sole purpose of using its icon
|
||||
var/obj/item/device/radio/headset/radio = new
|
||||
|
||||
var/part_b = "</span><b> \icon[radio]\[[freq_text]\][part_b_extra]</b> <span class='message'>" // Tweaked for security headsets -- TLE
|
||||
var/part_c = "</span></span>"
|
||||
|
||||
if (display_freq==SYND_FREQ)
|
||||
part_a = "<span class='syndradio'><span class='name'>"
|
||||
else if (display_freq==COMM_FREQ)
|
||||
part_a = "<span class='comradio'><span class='name'>"
|
||||
else if (display_freq in DEPT_FREQS)
|
||||
part_a = "<span class='deptradio'><span class='name'>"
|
||||
|
||||
// --- This following recording is intended for research and feedback in the use of department radio channels ---
|
||||
|
||||
var/part_blackbox_b = "</span><b> \[[freq_text]\]</b> <span class='message'>" // Tweaked for security headsets -- TLE
|
||||
var/blackbox_msg = "[part_a][source][part_blackbox_b]\"[text]\"[part_c]"
|
||||
//var/blackbox_admin_msg = "[part_a][M.name] (Real name: [M.real_name])[part_blackbox_b][quotedmsg][part_c]"
|
||||
|
||||
//BR.messages_admin += blackbox_admin_msg
|
||||
if(istype(blackbox))
|
||||
switch(display_freq)
|
||||
if(1459)
|
||||
blackbox.msg_common += blackbox_msg
|
||||
if(1351)
|
||||
blackbox.msg_science += blackbox_msg
|
||||
if(1353)
|
||||
blackbox.msg_command += blackbox_msg
|
||||
if(1355)
|
||||
blackbox.msg_medical += blackbox_msg
|
||||
if(1357)
|
||||
blackbox.msg_engineering += blackbox_msg
|
||||
if(1359)
|
||||
blackbox.msg_security += blackbox_msg
|
||||
if(1441)
|
||||
blackbox.msg_deathsquad += blackbox_msg
|
||||
if(1213)
|
||||
blackbox.msg_syndicate += blackbox_msg
|
||||
if(1349)
|
||||
blackbox.msg_mining += blackbox_msg
|
||||
if(1347)
|
||||
blackbox.msg_cargo += blackbox_msg
|
||||
else
|
||||
blackbox.messages += blackbox_msg
|
||||
|
||||
//End of research and feedback code.
|
||||
|
||||
/* ###### Send the message ###### */
|
||||
|
||||
/* --- Process all the mobs that heard the voice normally (understood) --- */
|
||||
|
||||
if (length(heard_normal))
|
||||
var/rendered = "[part_a][source][part_b]\"[text]\"[part_c]"
|
||||
|
||||
for (var/mob/R in heard_normal)
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
/* --- Process all the mobs that heard a garbled voice (did not understand) --- */
|
||||
// Displays garbled message (ie "f*c* **u, **i*er!")
|
||||
|
||||
if (length(heard_garbled))
|
||||
var/quotedmsg = "\"[stars(text)]\""
|
||||
var/rendered = "[part_a][source][part_b][quotedmsg][part_c]"
|
||||
|
||||
for (var/mob/R in heard_garbled)
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
|
||||
/* --- Complete gibberish. Usually happens when there's a compressed message --- */
|
||||
|
||||
if (length(heard_gibberish))
|
||||
var/quotedmsg = "\"[Gibberish(text, compression + 50)]\""
|
||||
var/rendered = "[part_a][Gibberish(source, compression + 50)][part_b][quotedmsg][part_c]"
|
||||
|
||||
for (var/mob/R in heard_gibberish)
|
||||
R.show_message(rendered, 2)
|
||||
|
||||
//Use this to test if an obj can communicate with a Telecommunications Network
|
||||
|
||||
/atom/proc/test_telecomms()
|
||||
var/datum/signal/signal = src.telecomms_process()
|
||||
var/turf/position = get_turf(src)
|
||||
return (position.z in signal.data["level"] && signal.data["done"])
|
||||
|
||||
/atom/proc/telecomms_process()
|
||||
|
||||
// First, we want to generate a new radio signal
|
||||
var/datum/signal/signal = new
|
||||
signal.transmission_method = 2 // 2 would be a subspace transmission.
|
||||
var/turf/pos = get_turf(src)
|
||||
|
||||
// --- Finally, tag the actual signal with the appropriate values ---
|
||||
signal.data = list(
|
||||
"slow" = 0, // how much to sleep() before broadcasting - simulates net lag
|
||||
"message" = "TEST",
|
||||
"compression" = rand(45, 50), // If the signal is compressed, compress our message too.
|
||||
"traffic" = 0, // dictates the total traffic sum that the signal went through
|
||||
"type" = 4, // determines what type of radio input it is: test broadcast
|
||||
"reject" = 0,
|
||||
"done" = 0,
|
||||
"level" = pos.z // The level it is being broadcasted at.
|
||||
)
|
||||
signal.frequency = 1459// Common channel
|
||||
|
||||
//#### Sending the signal to all subspace receivers ####//
|
||||
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
|
||||
R.receive_signal(signal)
|
||||
|
||||
sleep(rand(10,25))
|
||||
|
||||
//world.log << "Level: [signal.data["level"]] - Done: [signal.data["done"]]"
|
||||
|
||||
return signal
|
||||
|
||||
>>>>>>> incremental_tg
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#define STATION_Z 1
|
||||
#define TELECOMM_Z 3
|
||||
|
||||
/obj/machinery/telecomms
|
||||
var/temp = "" // output message
|
||||
@@ -122,11 +123,6 @@
|
||||
dat += "<br>Prefabrication: [autolinkers.len ? "TRUE" : "FALSE"]"
|
||||
if(hide) dat += "<br>Shadow Link: ACTIVE</a>"
|
||||
|
||||
if(check_links())
|
||||
dat += "<br>Signal Locked to Station: <A href='?src=\ref[src];input=level'>[listening_level == STATION_Z ? "TRUE" : "FALSE"]</a>"
|
||||
else
|
||||
dat += "<br>Signal Locked to Station: FALSE"
|
||||
|
||||
//Show additional options for certain machines.
|
||||
dat += Options_Menu()
|
||||
|
||||
@@ -167,71 +163,22 @@
|
||||
user << browse(dat, "window=tcommachine;size=520x500;can_resize=0")
|
||||
onclose(user, "dormitory")
|
||||
|
||||
|
||||
// Off-Site Relays
|
||||
//
|
||||
// You are able to send/receive signals from the station's z level (changeable in the STATION_Z #define) if you have two or more broadcasters/receivers linked to the relay.
|
||||
// Meaning, if you want to setup a relay for the station OUTSIDE of it's z level, you will have to setup the following:
|
||||
//
|
||||
// 2 Broadcasters (any frequency), 2 Receivers (any frequency), 1 Relay.
|
||||
// Link the broadcasters and receivers to the Relay.
|
||||
// Now, use a multi-tool to set their "Locked to station" to TRUE. (The FALSE link should be clickable, if not, check your previous steps)
|
||||
//
|
||||
// The machines will now check if there is enough broadcasters/receivers to send/receive signals from the station.
|
||||
//
|
||||
// Why 2 receivers/broadcasters? I didn't want ANYONE to be able to setup a backup relay with already pre-existing relays.
|
||||
// The mining relay and the ruskie relay all have 1 broadcaster and 1 receiver. If I didn't have this check then anyone could
|
||||
// click on the button and turn it into an instant off-site relay.
|
||||
//
|
||||
// After clicking the button, and if successful, the machine's "listening_level" will change to the station's Z level.
|
||||
//
|
||||
// You are able to send/receive signals from the station's z level (changeable in the STATION_Z #define) if
|
||||
// the relay is on the telecomm satellite (changable in the TELECOMM_Z #define)
|
||||
|
||||
// Only broadcasters/receivers can lock their signal onto the station.
|
||||
/obj/machinery/telecomms/proc/check_links()
|
||||
return 0
|
||||
|
||||
// I am sorry for the copy+paste below, please let me know if I could do this without having to copy+paste it. -Giacom
|
||||
/obj/machinery/telecomms/relay/proc/toggle_level()
|
||||
|
||||
// The connected relay needs to be linked to at least 2 receivers to receive signals from the station.
|
||||
/obj/machinery/telecomms/receiver/check_links()
|
||||
var/count = 0
|
||||
for(var/obj/machinery/telecomms/relay/R in links)
|
||||
for(var/obj/machinery/telecomms/receiver/L in R.links)
|
||||
count += 1
|
||||
return (count >= 2)
|
||||
var/turf/position = get_turf(src)
|
||||
|
||||
// The connected relay needs to be linked to at least 2 broadcasters to send signals to the station.
|
||||
/obj/machinery/telecomms/broadcaster/check_links()
|
||||
var/count = 0
|
||||
for(var/obj/machinery/telecomms/relay/R in links)
|
||||
for(var/obj/machinery/telecomms/broadcaster/L in R.links)
|
||||
count += 1
|
||||
return (count >= 2)
|
||||
|
||||
// Will update all telecomms machines and check that they can still send signals to off-site levels.
|
||||
// Called when a machine is unlinked.
|
||||
/proc/update_all_machines()
|
||||
for(var/obj/machinery/telecomms/M in telecomms_list)
|
||||
M.update_level()
|
||||
|
||||
/obj/machinery/telecomms/proc/update_level()
|
||||
// If the broadcaster/receiver cannot lock onto the station and it is set to...
|
||||
// ..update it to not lock onto the station.
|
||||
if(src.listening_level == STATION_Z)
|
||||
if(!check_links())
|
||||
var/turf/position = get_turf(src)
|
||||
src.listening_level = position.z
|
||||
|
||||
// Toggles the broadcaster/receiver to lock onto the station's level or onto it's own.
|
||||
// It will need the connected relay to have at least two broadcasters and receivers for it to work.
|
||||
// Returns true if it sucessfully changes, false otherwise.
|
||||
|
||||
/obj/machinery/telecomms/proc/toggle_level()
|
||||
// Toggle on/off getting signals from the station or the current Z level
|
||||
if(src.listening_level == STATION_Z) // equals the station
|
||||
var/turf/position = get_turf(src) // set the level to our z level
|
||||
src.listening_level = position.z
|
||||
return 1
|
||||
else if(check_links())
|
||||
else if(position.z == TELECOMM_Z)
|
||||
src.listening_level = STATION_Z
|
||||
return 1
|
||||
return 0
|
||||
@@ -277,6 +224,56 @@
|
||||
src.process_mode = !src.process_mode
|
||||
*/
|
||||
|
||||
// RELAY
|
||||
|
||||
/obj/machinery/telecomms/relay/Options_Menu()
|
||||
var/dat = ""
|
||||
if(src.z == TELECOMM_Z)
|
||||
dat += "<br>Signal Locked to Station: <A href='?src=\ref[src];change_listening=1'>[listening_level == STATION_Z ? "TRUE" : "FALSE"]</a>"
|
||||
dat += "<br>Broadcasting: <A href='?src=\ref[src];broadcast=1'>[broadcasting ? "YES" : "NO"]</a>"
|
||||
dat += "<br>Receiving: <A href='?src=\ref[src];receive=1'>[receiving ? "YES" : "NO"]</a>"
|
||||
return dat
|
||||
|
||||
/obj/machinery/telecomms/relay/Options_Topic(href, href_list)
|
||||
|
||||
if(href_list["receive"])
|
||||
receiving = !receiving
|
||||
temp = "<font color = #666633>-% Receiving mode changed. %-</font color>"
|
||||
if(href_list["broadcast"])
|
||||
broadcasting = !broadcasting
|
||||
temp = "<font color = #666633>-% Broadcasting mode changed. %-</font color>"
|
||||
if(href_list["change_listening"])
|
||||
//Lock to the station OR lock to the current position!
|
||||
//You need at least two receivers and two broadcasters for this to work, this includes the machine.
|
||||
var/result = toggle_level()
|
||||
if(result)
|
||||
temp = "<font color = #666633>-% [src]'s signal has been successfully changed.</font color>"
|
||||
else
|
||||
temp = "<font color = #666633>-% [src] could not lock it's signal onto the station. Two broadcasters or receivers required.</font color>"
|
||||
|
||||
// BUS
|
||||
|
||||
/obj/machinery/telecomms/bus/Options_Menu()
|
||||
var/dat = "<br>Change Signal Frequency: <A href='?src=\ref[src];change_freq=1'>[change_frequency ? "YES ([change_frequency])" : "NO"]</a>"
|
||||
return dat
|
||||
|
||||
/obj/machinery/telecomms/bus/Options_Topic(href, href_list)
|
||||
|
||||
if(href_list["change_freq"])
|
||||
|
||||
var/newfreq = input(usr, "Specify a new frequency for new signals to change to. Enter null to turn off frequency changing. Decimals assigned automatically.", src, network) as null|num
|
||||
if(usr in range(1, src))
|
||||
if(newfreq)
|
||||
if(findtext(num2text(newfreq), "."))
|
||||
newfreq *= 10 // shift the decimal one place
|
||||
if(newfreq < 10000)
|
||||
change_frequency = newfreq
|
||||
temp = "<font color = #666633>-% New frequency to change to assigned: \"[newfreq] GHz\" %-</font color>"
|
||||
else
|
||||
change_frequency = 0
|
||||
temp = "<font color = #666633>-% Frequency changing deactivated %-</font color>"
|
||||
|
||||
|
||||
/obj/machinery/telecomms/Topic(href, href_list)
|
||||
|
||||
if(!issilicon(usr))
|
||||
@@ -303,15 +300,6 @@
|
||||
temp = "<font color = #666633>-% Shadow Link has been [src.hide ? "activated" : "deactivated"].</font color>"
|
||||
*/
|
||||
|
||||
if("level")
|
||||
//Lock to the station OR lock to the current position!
|
||||
//You need at least two receivers and two broadcasters for this to work, this includes the machine.
|
||||
var/result = toggle_level()
|
||||
if(result)
|
||||
temp = "<font color = #666633>-% [src]'s signal has been successfully changed.</font color>"
|
||||
else
|
||||
temp = "<font color = #666633>-% [src] could not lock it's signal onto the station. Two broadcasters or receivers required.</font color>"
|
||||
|
||||
if("id")
|
||||
var/newid = copytext(reject_bad_text(input(usr, "Specify the new ID for this machine", src, id) as null|text),1,MAX_MESSAGE_LEN)
|
||||
if(newid && usr in range(1, src))
|
||||
@@ -363,14 +351,10 @@
|
||||
T.links.Remove(src)
|
||||
links.Remove(T)
|
||||
|
||||
// Make sure every telecomms machine is not locked to the station when it shouldn't be.
|
||||
update_all_machines()
|
||||
|
||||
if(href_list["link"])
|
||||
|
||||
if(P)
|
||||
|
||||
if(P.buffer)
|
||||
if(P.buffer && P.buffer != src)
|
||||
if(!(src in P.buffer.links))
|
||||
P.buffer.links.Add(src)
|
||||
|
||||
@@ -400,4 +384,5 @@
|
||||
|
||||
updateUsrDialog()
|
||||
|
||||
#undef TELECOMM_Z
|
||||
#undef STATION_Z
|
||||
|
||||
@@ -7,21 +7,22 @@
|
||||
|
||||
/obj/machinery/telecomms/relay/preset/station
|
||||
id = "Station Relay"
|
||||
autolinkers = list("s_relay", "s_receiverA", "s_broadcasterA", "s_receiverB", "s_broadcasterB")
|
||||
listening_level = 1
|
||||
autolinkers = list("s_relay")
|
||||
|
||||
/obj/machinery/telecomms/relay/preset/telecomms
|
||||
id = "Telecomms Relay"
|
||||
autolinkers = list("relay", "receiverA", "receiverB", "broadcasterA", "broadcasterB")
|
||||
autolinkers = list("relay")
|
||||
|
||||
/obj/machinery/telecomms/relay/preset/mining
|
||||
id = "Mining Relay"
|
||||
autolinkers = list("m_relay", "m_receiverB", "m_broadcasterB")
|
||||
autolinkers = list("m_relay")
|
||||
|
||||
/obj/machinery/telecomms/relay/preset/ruskie
|
||||
id = "Ruskie Relay"
|
||||
hide = 1
|
||||
toggled = 0
|
||||
autolinkers = list("r_relay", "r_receiverB", "r_broadcasterB")
|
||||
autolinkers = list("r_relay")
|
||||
|
||||
//HUB
|
||||
|
||||
@@ -29,7 +30,8 @@
|
||||
id = "Hub"
|
||||
network = "tcommsat"
|
||||
autolinkers = list("hub", "relay", "s_relay", "m_relay", "r_relay", "science", "medical",
|
||||
"cargo", "mining", "common", "command", "engineering", "security")
|
||||
"cargo", "mining", "common", "command", "engineering", "security",
|
||||
"receiverA", "receiverB", "broadcasterA", "broadcasterB")
|
||||
|
||||
//Receivers
|
||||
|
||||
@@ -41,10 +43,6 @@
|
||||
autolinkers = list("receiverA") // link to relay
|
||||
freq_listening = list(1351, 1355, 1347, 1349) // science, medical, cargo, mining
|
||||
|
||||
/obj/machinery/telecomms/receiver/preset_left/station
|
||||
id = "Station Receiver A"
|
||||
autolinkers = list("s_receiverA") // link to relay
|
||||
listening_level = 1
|
||||
|
||||
//--PRESET RIGHT--//
|
||||
|
||||
@@ -60,23 +58,6 @@
|
||||
freq_listening |= i
|
||||
..()
|
||||
|
||||
/obj/machinery/telecomms/receiver/preset_right/station
|
||||
id = "Station Receiver B"
|
||||
autolinkers = list("s_receiverB")
|
||||
listening_level = 1 // Listen to the station remotely
|
||||
|
||||
/obj/machinery/telecomms/receiver/preset_right/mining
|
||||
id = "Mining Receiver B"
|
||||
autolinkers = list("m_receiverB")
|
||||
freq_listening = list(1351, 1355, 1347, 1349, 1353, 1357, 1359)
|
||||
|
||||
/obj/machinery/telecomms/receiver/preset_right/ruskie
|
||||
id = "Ruskie Receiver B"
|
||||
autolinkers = list("r_receiverB")
|
||||
freq_listening = list(1351, 1355, 1347, 1349, 1353, 1357, 1359) // science, medical, cargo, mining, command, engineering, security
|
||||
toggled = 0
|
||||
hide = 1
|
||||
|
||||
|
||||
//Buses
|
||||
|
||||
@@ -186,30 +167,9 @@
|
||||
network = "tcommsat"
|
||||
autolinkers = list("broadcasterA")
|
||||
|
||||
/obj/machinery/telecomms/broadcaster/preset_left/station
|
||||
id = "Station Broadcaster A"
|
||||
autolinkers = list("s_broadcasterA")
|
||||
listening_level = 1 // Station
|
||||
|
||||
//--PRESET RIGHT--//
|
||||
|
||||
/obj/machinery/telecomms/broadcaster/preset_right
|
||||
id = "Broadcaster B"
|
||||
network = "tcommsat"
|
||||
autolinkers = list("broadcasterB")
|
||||
|
||||
|
||||
/obj/machinery/telecomms/broadcaster/preset_right/station
|
||||
id = "Station Broadcaster B"
|
||||
autolinkers = list("s_broadcasterB")
|
||||
listening_level = 1 // Station
|
||||
|
||||
/obj/machinery/telecomms/broadcaster/preset_right/mining
|
||||
id = "Mining Broadcaster B"
|
||||
autolinkers = list("m_broadcasterB")
|
||||
|
||||
/obj/machinery/telecomms/broadcaster/preset_right/ruskie
|
||||
id = "Ruskie Broadcaster B"
|
||||
autolinkers = list("r_broadcasterB")
|
||||
toggled = 0
|
||||
hide = 1
|
||||
|
||||
@@ -43,7 +43,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
|
||||
if(!on)
|
||||
return
|
||||
|
||||
//world << "[src] ([src.id]) - [signal.debug_print()]"
|
||||
var/send_count = 0
|
||||
|
||||
signal.data["slow"] += rand(0, round((100-integrity))) // apply some lag based on integrity
|
||||
@@ -64,13 +64,6 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
if(machine.loc.z != listening_level)
|
||||
if(long_range_link == 0 && machine.long_range_link == 0)
|
||||
continue
|
||||
//Is this a test signal?
|
||||
if(signal.data["type"] == 4)
|
||||
send_count++
|
||||
if(machine.is_freq_listening(signal))
|
||||
machine.traffic++
|
||||
machine.receive_information(signal, src)
|
||||
continue
|
||||
// If we're sending a copy, be sure to create the copy for EACH machine and paste the data
|
||||
var/datum/signal/copy = new
|
||||
if(copysig)
|
||||
@@ -136,11 +129,14 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
|
||||
/obj/machinery/telecomms/proc/is_freq_listening(datum/signal/signal)
|
||||
// return 1 if found, 0 if not found
|
||||
if(!signal)
|
||||
return 0
|
||||
if((signal.frequency in freq_listening) || (!freq_listening.len))
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/telecomms/New()
|
||||
telecomms_list += src
|
||||
..()
|
||||
@@ -151,33 +147,30 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
var/turf/position = get_turf(src)
|
||||
listening_level = position.z
|
||||
|
||||
/obj/machinery/telecomms/initialize()
|
||||
if(autolinkers.len)
|
||||
spawn(15)
|
||||
// Links nearby machines
|
||||
if(!long_range_link)
|
||||
for(var/obj/machinery/telecomms/T in orange(20, src))
|
||||
add_link(T)
|
||||
else
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
add_link(T)
|
||||
// Links nearby machines
|
||||
if(!long_range_link)
|
||||
for(var/obj/machinery/telecomms/T in orange(20, src))
|
||||
add_link(T)
|
||||
else
|
||||
for(var/obj/machinery/telecomms/T in telecomms_list)
|
||||
add_link(T)
|
||||
|
||||
if(istype(src, /obj/machinery/telecomms/server))
|
||||
var/obj/machinery/telecomms/server/S = src
|
||||
S.Compiler = new()
|
||||
S.Compiler.Holder = src
|
||||
|
||||
/obj/machinery/telecomms/Del()
|
||||
telecomms_list -= src
|
||||
..()
|
||||
|
||||
// Used in auto linking
|
||||
/obj/machinery/telecomms/proc/add_link(var/obj/machinery/telecomms/T)
|
||||
var/turf/position = get_turf(src)
|
||||
var/turf/T_position = get_turf(T)
|
||||
if((position.z == T_position.z) || (src.long_range_link && T.long_range_link))
|
||||
for(var/x in autolinkers)
|
||||
if(T.autolinkers.Find(x))
|
||||
if(!(T in links) && machinetype != T.machinetype)
|
||||
links.Add(T)
|
||||
if(src != T)
|
||||
links |= T
|
||||
|
||||
/obj/machinery/telecomms/update_icon()
|
||||
if(on)
|
||||
@@ -186,6 +179,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
icon_state = "[initial(icon_state)]_off"
|
||||
|
||||
/obj/machinery/telecomms/proc/update_power()
|
||||
|
||||
if(toggled)
|
||||
if(stat & (BROKEN|NOPOWER|EMPED) || integrity <= 0) // if powered, on. if not powered, off. if too damaged, off
|
||||
on = 0
|
||||
@@ -278,19 +272,36 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
|
||||
if(!on) // has to be on to receive messages
|
||||
return
|
||||
if(!signal || signal.data["level"] != listening_level)
|
||||
if(!signal)
|
||||
return
|
||||
if(!check_receive_level(signal))
|
||||
return
|
||||
|
||||
if(signal.transmission_method == 2)
|
||||
|
||||
if(is_freq_listening(signal)) // detect subspace signals
|
||||
|
||||
if(signal.data["type"] == 4) // If a test signal, remove the level and then start adding levels that it is being broadcasted in.
|
||||
signal.data["level"] = list()
|
||||
//Remove the level and then start adding levels that it is being broadcasted in.
|
||||
signal.data["level"] = list()
|
||||
|
||||
var/can_send = relay_information(signal, "/obj/machinery/telecomms/relay") // ideally relay the copied information to relays
|
||||
var/can_send = relay_information(signal, "/obj/machinery/telecomms/hub") // ideally relay the copied information to relays
|
||||
if(!can_send)
|
||||
relay_information(signal, "/obj/machinery/telecomms/bus") // Send it to a bus instead, if it's linked to one
|
||||
|
||||
/obj/machinery/telecomms/receiver/proc/check_receive_level(datum/signal/signal)
|
||||
|
||||
if(signal.data["level"] != listening_level)
|
||||
for(var/obj/machinery/telecomms/hub/H in links)
|
||||
var/list/connected_levels = list()
|
||||
for(var/obj/machinery/telecomms/relay/R in H.links)
|
||||
if(R.can_receive(signal))
|
||||
connected_levels |= R.listening_level
|
||||
if(signal.data["level"] in connected_levels)
|
||||
return 1
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
/*
|
||||
The HUB idles until it receives information. It then passes on that information
|
||||
depending on where it came from.
|
||||
@@ -316,17 +327,18 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
long_range_link = 1
|
||||
netspeed = 40
|
||||
|
||||
|
||||
/obj/machinery/telecomms/hub/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
|
||||
if(is_freq_listening(signal))
|
||||
if(istype(machine_from, /obj/machinery/telecomms/relay))
|
||||
|
||||
if(istype(machine_from, /obj/machinery/telecomms/receiver))
|
||||
//If the signal is compressed, send it to the bus.
|
||||
relay_information(signal, "/obj/machinery/telecomms/bus") // ideally relay the copied information to bus units
|
||||
else
|
||||
//The signal is ready to be sent!
|
||||
var/can_send = relay_information(signal, "/obj/machinery/telecomms/relay")
|
||||
if(!can_send)
|
||||
relay_information(signal, "/obj/machinery/telecomms/broadcaster") // Send it to a broadcaster instead, if it's linked to one
|
||||
// Get a list of relays that we're linked to, then send the signal to their levels.
|
||||
relay_information(signal, "/obj/machinery/telecomms/relay")
|
||||
relay_information(signal, "/obj/machinery/telecomms/broadcaster") // Send it to a broadcaster.
|
||||
|
||||
|
||||
/*
|
||||
The relay idles until it receives information. It then passes on that information
|
||||
depending on where it came from.
|
||||
@@ -349,19 +361,33 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
circuitboard = "/obj/item/weapon/circuitboard/telecomms/relay"
|
||||
netspeed = 5
|
||||
long_range_link = 1
|
||||
var/broadcasting = 1
|
||||
var/receiving = 1
|
||||
|
||||
/obj/machinery/telecomms/relay/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
|
||||
|
||||
if(is_freq_listening(signal))
|
||||
if(istype(machine_from, /obj/machinery/telecomms/receiver))
|
||||
// Add our level and send it back
|
||||
if(can_send(signal))
|
||||
signal.data["level"] |= listening_level
|
||||
|
||||
//If the signal is compressed, send it to the bus.
|
||||
var/can_send = relay_information(signal, "/obj/machinery/telecomms/hub") // ideally relay the copied information to bus units
|
||||
if(!can_send)
|
||||
relay_information(signal, "/obj/machinery/telecomms/bus") // Send it to a bus instead, if it's linked to one
|
||||
else
|
||||
//The signal is ready to be sent!
|
||||
relay_information(signal, "/obj/machinery/telecomms/broadcaster")
|
||||
// Checks to see if it can send/receive.
|
||||
|
||||
/obj/machinery/telecomms/relay/proc/can(datum/signal/signal)
|
||||
if(!on)
|
||||
return 0
|
||||
if(!is_freq_listening(signal))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/telecomms/relay/proc/can_send(datum/signal/signal)
|
||||
if(!can(signal))
|
||||
return 0
|
||||
return broadcasting
|
||||
|
||||
/obj/machinery/telecomms/relay/proc/can_receive(datum/signal/signal)
|
||||
if(!can(signal))
|
||||
return 0
|
||||
return receiving
|
||||
|
||||
/*
|
||||
The bus mainframe idles and waits for hubs to relay them signals. They act
|
||||
@@ -386,31 +412,36 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
heatgen = 20
|
||||
circuitboard = "/obj/item/weapon/circuitboard/telecomms/bus"
|
||||
netspeed = 40
|
||||
var/change_frequency = 0
|
||||
|
||||
/obj/machinery/telecomms/bus/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
|
||||
|
||||
if(is_freq_listening(signal))
|
||||
if(change_frequency)
|
||||
|
||||
world << "changing [signal.frequency] to [change_frequency]"
|
||||
signal.frequency = change_frequency
|
||||
|
||||
if(!istype(machine_from, /obj/machinery/telecomms/processor)) // Signal must be ready (stupid assuming machine), let's send it
|
||||
// send to one linked processor unit
|
||||
var/send_to_processor = relay_information(signal, "/obj/machinery/telecomms/processor")
|
||||
|
||||
if(!send_to_processor) // failed to send to a processor, relay information anyway
|
||||
signal.data["slow"] += rand(1, 5) // slow the signal down only slightly
|
||||
relay_information(signal, "/obj/machinery/telecomms/server", 1)
|
||||
if(send_to_processor)
|
||||
return
|
||||
// failed to send to a processor, relay information anyway
|
||||
signal.data["slow"] += rand(1, 5) // slow the signal down only slightly
|
||||
src.receive_information(signal, src)
|
||||
|
||||
|
||||
else // the signal has been decompressed by a processor unit
|
||||
|
||||
// Try sending it!
|
||||
var/list/try_send = list("/obj/machinery/telecomms/server", "/obj/machinery/telecomms/hub", "/obj/machinery/telecomms/broadcaster")
|
||||
var/i = 0
|
||||
for(var/send in try_send)
|
||||
if(i)
|
||||
signal.data["slow"] += rand(0, 1) // slow the signal down only slightly
|
||||
i++
|
||||
var/can_send = relay_information(signal, send)
|
||||
if(can_send)
|
||||
break
|
||||
// Try sending it!
|
||||
var/list/try_send = list("/obj/machinery/telecomms/server", "/obj/machinery/telecomms/hub", "/obj/machinery/telecomms/broadcaster", "/obj/machinery/telecomms/bus")
|
||||
var/i = 0
|
||||
for(var/send in try_send)
|
||||
if(i)
|
||||
signal.data["slow"] += rand(0, 1) // slow the signal down only slightly
|
||||
i++
|
||||
var/can_send = relay_information(signal, send)
|
||||
if(can_send)
|
||||
break
|
||||
|
||||
|
||||
|
||||
@@ -489,6 +520,11 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
// would add up to md5("password123comsat")
|
||||
var/language = "human"
|
||||
|
||||
/obj/machinery/telecomms/server/New()
|
||||
..()
|
||||
Compiler = new()
|
||||
Compiler.Holder = src
|
||||
|
||||
/obj/machinery/telecomms/server/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
|
||||
|
||||
if(signal.data["message"])
|
||||
|
||||
@@ -837,7 +837,7 @@
|
||||
return
|
||||
|
||||
proc/init()
|
||||
fuel = new /obj/item/stack/sheet/plasma(src)
|
||||
fuel = new /obj/item/stack/sheet/mineral/plasma(src)
|
||||
fuel.amount = 0
|
||||
pr_mech_generator = new /datum/global_iterator/mecha_generator(list(src),0)
|
||||
pr_mech_generator.set_delay(equip_cooldown)
|
||||
@@ -967,7 +967,7 @@
|
||||
reliability = 1000
|
||||
|
||||
init()
|
||||
fuel = new /obj/item/stack/sheet/uranium(src)
|
||||
fuel = new /obj/item/stack/sheet/mineral/uranium(src)
|
||||
fuel.amount = 0
|
||||
pr_mech_generator = new /datum/global_iterator/mecha_generator/nuclear(list(src),0)
|
||||
pr_mech_generator.set_delay(equip_cooldown)
|
||||
|
||||
@@ -680,17 +680,17 @@
|
||||
if("glass")
|
||||
type = /obj/item/stack/sheet/glass
|
||||
if("gold")
|
||||
type = /obj/item/stack/sheet/gold
|
||||
type = /obj/item/stack/sheet/mineral/gold
|
||||
if("silver")
|
||||
type = /obj/item/stack/sheet/silver
|
||||
type = /obj/item/stack/sheet/mineral/silver
|
||||
if("diamond")
|
||||
type = /obj/item/stack/sheet/diamond
|
||||
type = /obj/item/stack/sheet/mineral/diamond
|
||||
if("plasma")
|
||||
type = /obj/item/stack/sheet/plasma
|
||||
type = /obj/item/stack/sheet/mineral/plasma
|
||||
if("uranium")
|
||||
type = /obj/item/stack/sheet/uranium
|
||||
type = /obj/item/stack/sheet/mineral/uranium
|
||||
if("bananium")
|
||||
type = /obj/item/stack/sheet/clown
|
||||
type = /obj/item/stack/sheet/mineral/clown
|
||||
else
|
||||
return 0
|
||||
var/result = 0
|
||||
@@ -734,22 +734,22 @@
|
||||
var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
|
||||
G.amount = round(src.resources["glass"] / G.perunit)
|
||||
if(src.resources["plasma"] >= 2000)
|
||||
var/obj/item/stack/sheet/plasma/G = new /obj/item/stack/sheet/plasma(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/plasma/G = new /obj/item/stack/sheet/mineral/plasma(src.loc)
|
||||
G.amount = round(src.resources["plasma"] / G.perunit)
|
||||
if(src.resources["silver"] >= 2000)
|
||||
var/obj/item/stack/sheet/silver/G = new /obj/item/stack/sheet/silver(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/silver/G = new /obj/item/stack/sheet/mineral/silver(src.loc)
|
||||
G.amount = round(src.resources["silver"] / G.perunit)
|
||||
if(src.resources["gold"] >= 2000)
|
||||
var/obj/item/stack/sheet/gold/G = new /obj/item/stack/sheet/gold(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/gold/G = new /obj/item/stack/sheet/mineral/gold(src.loc)
|
||||
G.amount = round(src.resources["gold"] / G.perunit)
|
||||
if(src.resources["uranium"] >= 2000)
|
||||
var/obj/item/stack/sheet/uranium/G = new /obj/item/stack/sheet/uranium(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/uranium/G = new /obj/item/stack/sheet/mineral/uranium(src.loc)
|
||||
G.amount = round(src.resources["uranium"] / G.perunit)
|
||||
if(src.resources["diamond"] >= 2000)
|
||||
var/obj/item/stack/sheet/diamond/G = new /obj/item/stack/sheet/diamond(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(src.loc)
|
||||
G.amount = round(src.resources["diamond"] / G.perunit)
|
||||
if(src.resources["bananium"] >= 2000)
|
||||
var/obj/item/stack/sheet/clown/G = new /obj/item/stack/sheet/clown(src.loc)
|
||||
var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown(src.loc)
|
||||
G.amount = round(src.resources["bananium"] / G.perunit)
|
||||
del(src)
|
||||
return 1
|
||||
@@ -762,21 +762,21 @@
|
||||
return
|
||||
var/material
|
||||
switch(W.type)
|
||||
if(/obj/item/stack/sheet/gold)
|
||||
if(/obj/item/stack/sheet/mineral/gold)
|
||||
material = "gold"
|
||||
if(/obj/item/stack/sheet/silver)
|
||||
if(/obj/item/stack/sheet/mineral/silver)
|
||||
material = "silver"
|
||||
if(/obj/item/stack/sheet/diamond)
|
||||
if(/obj/item/stack/sheet/mineral/diamond)
|
||||
material = "diamond"
|
||||
if(/obj/item/stack/sheet/plasma)
|
||||
if(/obj/item/stack/sheet/mineral/plasma)
|
||||
material = "plasma"
|
||||
if(/obj/item/stack/sheet/metal)
|
||||
material = "metal"
|
||||
if(/obj/item/stack/sheet/glass)
|
||||
material = "glass"
|
||||
if(/obj/item/stack/sheet/clown)
|
||||
if(/obj/item/stack/sheet/mineral/clown)
|
||||
material = "bananium"
|
||||
if(/obj/item/stack/sheet/uranium)
|
||||
if(/obj/item/stack/sheet/mineral/uranium)
|
||||
material = "uranium"
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
if (i > 0)
|
||||
var/obj/effect/decal/cleanable/xenoblood/b = new /obj/effect/decal/cleanable/xenoblood/xsplatter(src.loc)
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
b.viruses += new D.type(0, D, 1)
|
||||
b.viruses += D.Copy()
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
if (i > 0)
|
||||
var/obj/effect/decal/cleanable/blood/b = new /obj/effect/decal/cleanable/blood/splatter(src.loc)
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
b.viruses += new D.type(0, D, 1)
|
||||
b.viruses += D.Copy()
|
||||
if (step_to(src, get_step(src, direction), 0))
|
||||
break
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
//########################## CONTRABAND ;3333333333333333333 -Agouri ###################################################
|
||||
|
||||
#define NUM_OF_POSTER_DESIGNS 17
|
||||
#define NUM_OF_POSTER_DESIGNS 10
|
||||
|
||||
/obj/item/weapon/contraband
|
||||
name = "contraband item"
|
||||
@@ -15,49 +15,49 @@
|
||||
desc = "The poster comes with its own automatic adhesive mechanism, for easy pinning to any vertical surface."
|
||||
icon_state = "rolled_poster"
|
||||
var/serial_number = 0
|
||||
var/obj/effect/decal/poster/resulting_poster = null //The poster that will be created is initialised and stored through contraband/poster's constructor
|
||||
var/obj/structure/sign/poster/resulting_poster = null //The poster that will be created is initialised and stored through contraband/poster's constructor
|
||||
|
||||
|
||||
/obj/item/weapon/contraband/poster/New(turf/loc,var/given_serial=0)
|
||||
if(given_serial==0)
|
||||
serial_number = rand(1,NUM_OF_POSTER_DESIGNS)
|
||||
src.resulting_poster = new(serial_number)
|
||||
/obj/item/weapon/contraband/poster/New(turf/loc, var/given_serial = 0)
|
||||
if(given_serial == 0)
|
||||
serial_number = rand(1, NUM_OF_POSTER_DESIGNS)
|
||||
resulting_poster = new(serial_number)
|
||||
else
|
||||
serial_number = given_serial
|
||||
//We don't give it a resulting_poster because if we called it with a given_serial it means that we're rerolling an already used poster.
|
||||
src.name += " - No. [serial_number]"
|
||||
name += " - No. [serial_number]"
|
||||
..(loc)
|
||||
|
||||
|
||||
/*/obj/item/weapon/contraband/poster/attack(mob/M as mob, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
if(src.resulting_poster)
|
||||
src.resulting_poster.add_fingerprint(user)
|
||||
if(resulting_poster)
|
||||
resulting_poster.add_fingerprint(user)
|
||||
..()*/
|
||||
|
||||
/*/obj/item/weapon/contraband/poster/attack(atom/A, mob/user as mob) //This shit is handled through the wall's attackby()
|
||||
if (istype(A, /turf/simulated/wall))
|
||||
if(src.resulting_poster == null)
|
||||
if(istype(A, /turf/simulated/wall))
|
||||
if(resulting_poster == null)
|
||||
return
|
||||
else
|
||||
var/turf/simulated/wall/W = A
|
||||
var/check = 0
|
||||
var/stuff_on_wall = 0
|
||||
for( var/obj/O in W.contents) //Let's see if it already has a poster on it or too much stuff
|
||||
if(istype(O,/obj/effect/decal/poster))
|
||||
for(var/obj/O in W.contents) //Let's see if it already has a poster on it or too much stuff
|
||||
if(istype(O,/obj/structure/sign/poster))
|
||||
check = 1
|
||||
break
|
||||
stuff_on_wall++
|
||||
if(stuff_on_wall==3)
|
||||
if(stuff_on_wall == 3)
|
||||
check = 1
|
||||
break
|
||||
|
||||
if(check)
|
||||
user << "<FONT COLOR='RED'>The wall is far too cluttered to place a poster!</FONT>"
|
||||
user << "<span class='notice'>The wall is far too cluttered to place a poster!</span>"
|
||||
return
|
||||
|
||||
src.resulting_poster.loc = W //Looks like it's uncluttered enough. Place the poster
|
||||
W.contents += src.resulting_poster
|
||||
resulting_poster.loc = W //Looks like it's uncluttered enough. Place the poster
|
||||
W.contents += resulting_poster
|
||||
|
||||
del(src)*/
|
||||
|
||||
@@ -65,116 +65,95 @@
|
||||
|
||||
//############################## THE ACTUAL DECALS ###########################
|
||||
|
||||
obj/effect/decal/poster
|
||||
obj/structure/sign/poster
|
||||
name = "poster"
|
||||
desc = "A large piece of space-resistant printed paper. It's considered contraband."
|
||||
icon = 'icons/obj/contraband.dmi'
|
||||
anchored = 1
|
||||
var/serial_number //Will hold the value of src.loc if nobody initialises it
|
||||
var/serial_number //Will hold the value of src.loc if nobody initialises it
|
||||
var/ruined = 0
|
||||
|
||||
|
||||
obj/effect/decal/poster/New(var/serial)
|
||||
obj/structure/sign/poster/New(var/serial)
|
||||
|
||||
src.serial_number = serial
|
||||
serial_number = serial
|
||||
|
||||
if(serial_number==src.loc){serial_number = rand(1,NUM_OF_POSTER_DESIGNS);} //This is for the mappers that want individual posters without having to use rolled posters.
|
||||
if(serial_number == loc)
|
||||
serial_number = rand(1, NUM_OF_POSTER_DESIGNS) //This is for the mappers that want individual posters without having to use rolled posters.
|
||||
|
||||
icon_state = "poster[serial_number]"
|
||||
|
||||
switch(serial_number)
|
||||
if(1)
|
||||
name += " - Unlucky Space Explorer"
|
||||
desc += " This particular one depicts a skeletal form within a space suit."
|
||||
name += " - Free Tonto"
|
||||
desc += " A framed shred of a much larger flag, colors bled together and faded from age."
|
||||
if(2)
|
||||
name += " - Positronic Logic Conflicts"
|
||||
desc += " This particular one depicts the cold, unmoving stare of a particular advanced AI."
|
||||
name += " - Atmosia Declaration of Independence"
|
||||
desc += " A relic of a failed rebellion"
|
||||
if(3)
|
||||
name += " - Paranoia"
|
||||
desc += " This particular one warns of the dangers of trusting your co-workers too much."
|
||||
name += " - Fun Police"
|
||||
desc += " A poster condemning the station's security forces."
|
||||
if(4)
|
||||
name += " - Keep Calm"
|
||||
desc += " This particular one is of a famous New Earth design, although a bit modified."
|
||||
name += " - Lusty Xeno"
|
||||
desc += " A heretical poster depicting the titular star of an equally heretical book."
|
||||
if(5)
|
||||
name += " - Martian Warlord"
|
||||
desc += " This particular one depicts the cartoony mug of a certain Martial Warmonger."
|
||||
name += " - Syndicate Recruitment Poster"
|
||||
desc += " See the galaxy! Shatter corrupt megacorporations! Join today!"
|
||||
if(6)
|
||||
name += " - Technological Singularity"
|
||||
desc += " This particular one is of the blood-curdling symbol of a long-since defeated enemy of humanity."
|
||||
name += " - Clown"
|
||||
desc += " Honk."
|
||||
if(7)
|
||||
name += " - Wasteland"
|
||||
desc += " This particular one is of a couple of ragged gunmen, one male and one female, on top of a mound of rubble. The number \"13\" is visible on their blue jumpsuits."
|
||||
name += " - Smoke"
|
||||
desc += " A poster depicting a carton of cigarettes."
|
||||
if(8)
|
||||
name += " - Pinup Girl Cindy"
|
||||
desc += " This particular one is of Nanotrasen's PR girl, Cindy, in a particularly feminine pose."
|
||||
name += " - Grey Tide"
|
||||
desc += " A rebellious poster symbolizing assistant solidarity."
|
||||
if(9)
|
||||
name += " - Pinup Girl Amy"
|
||||
desc += " This particular one is of Amy, the nymphomaniac Urban Legend of Nanotrasen Space Stations. How this photograph came to be is not known."
|
||||
if(10)
|
||||
name += " - Don't Panic"
|
||||
desc += " This particular one depicts some sort of star in a grimace. The \"Don't Panic\" is written in big, friendly letters."
|
||||
if(11)
|
||||
name += " - Underwater Laboratory"
|
||||
desc += " This particular one is of the fabled last crew of Nanotrasen's previous project before going big on Asteroid mining, Sealab."
|
||||
if(12)
|
||||
name += " - Missing Gloves"
|
||||
desc += " This particular one is about the uproar that followed Nanotrasen's financial cuts towards insulated-glove purchases."
|
||||
if(13)
|
||||
name += " - Rogue AI"
|
||||
desc += " This particular one depicts the shell of the infamous AI that catastropically comandeered one of Nanotrasen's earliest space stations. Back then, the corporation was just known as TriOptimum."
|
||||
if(14)
|
||||
name += " - User of the Arcane Arts"
|
||||
desc += " This particular one depicts a wizard, casting a spell. You can't really make out if it's an actial photograph or a computer-generated image."
|
||||
if(15)
|
||||
name += " - Levitating Skull"
|
||||
desc += " This particular one is the portrait of a certain flying, friendly and somewhat sex-crazed enchanted skull. Its adventures along with its fabled companion are now fading through history..."
|
||||
if(16)
|
||||
name += " - Augmented Legend"
|
||||
desc += " This particular one is of an obviously augmented individual, gazing towards the sky. The cyber-city in the backround is rather punkish."
|
||||
if(17)
|
||||
name += " - Dangerous Static"
|
||||
desc += " This particular one depicts nothing remarkable other than a rather mesmerising pattern of monitor static. There's a tag on the sides of the poster, urging you to \"tear this poster in half to receive your free sample\"."
|
||||
desc += " This poster is about the uproar that followed Nanotrasen's financial cuts towards insulated-glove purchases."
|
||||
if(10)
|
||||
name += " - Hacking Guide"
|
||||
desc += " This poster details the internal workings of the common Nanotrasen airlock."
|
||||
else
|
||||
name = "This shit just bugged. Report it to Agouri - polyxenitopalidou@gmail.com"
|
||||
desc = "Why are you still here?"
|
||||
..()
|
||||
|
||||
obj/effect/decal/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if( istype(W, /obj/item/weapon/wirecutters) )
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
if(src.ruined)
|
||||
user << "<FONT COLOR='BLUE'>You remove the remnants of the poster.</FONT>"
|
||||
obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/wirecutters))
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
|
||||
if(ruined)
|
||||
user << "<span class='notice'>You remove the remnants of the poster.</span>"
|
||||
del(src)
|
||||
else
|
||||
user << "<FONT COLOR='BLUE'>You carefully remove the poster from the wall.</FONT>"
|
||||
src.roll_and_drop(user.loc)
|
||||
user << "<span class='notice'>You carefully remove the poster from the wall.</span>"
|
||||
roll_and_drop(user.loc)
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/decal/poster/attack_hand(mob/user as mob)
|
||||
if(src.ruined)
|
||||
/obj/structure/sign/poster/attack_hand(mob/user as mob)
|
||||
if(ruined)
|
||||
return
|
||||
var/temp_loc = user.loc
|
||||
switch(alert("Do I want to rip the poster from the wall?","You think...","Yes","No"))
|
||||
if("Yes")
|
||||
if(user.loc != temp_loc)
|
||||
return
|
||||
for (var/mob/O in hearers(5, src.loc))
|
||||
O.show_message("<FONT COLOR='RED'>[user.name] rips the [src.name] in a single, decisive motion!</FONT>" )
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 100, 1)
|
||||
src.ruined = 1
|
||||
src.icon_state = "poster_ripped"
|
||||
src.name = "Ripped poster"
|
||||
src.desc = "You can't make out anything from the poster's original print. It's ruined."
|
||||
src.add_fingerprint(user)
|
||||
visible_message("<span class='warning'>[user] rips [src] in a single, decisive motion!</span>" )
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 100, 1)
|
||||
ruined = 1
|
||||
icon_state = "poster_ripped"
|
||||
name = "ripped poster"
|
||||
desc = "You can't make out anything from the poster's original print. It's ruined."
|
||||
add_fingerprint(user)
|
||||
if("No")
|
||||
return
|
||||
|
||||
/obj/effect/decal/poster/proc/roll_and_drop(turf/loc)
|
||||
var/obj/item/weapon/contraband/poster/P = new(src,src.serial_number)
|
||||
/obj/structure/sign/poster/proc/roll_and_drop(turf/loc)
|
||||
var/obj/item/weapon/contraband/poster/P = new(src, serial_number)
|
||||
P.resulting_poster = src
|
||||
P.loc = loc
|
||||
src.loc = P
|
||||
loc = P
|
||||
|
||||
|
||||
//seperated to reduce code duplication. Moved here for ease of reference and to unclutter r_wall/attackby()
|
||||
@@ -182,19 +161,19 @@ obj/effect/decal/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(!P.resulting_poster) return
|
||||
|
||||
var/stuff_on_wall = 0
|
||||
for( var/obj/O in src.contents) //Let's see if it already has a poster on it or too much stuff
|
||||
if(istype(O,/obj/effect/decal/poster))
|
||||
user << "<span class='warning'>The wall is far too cluttered to place a poster!</span>"
|
||||
for(var/obj/O in contents) //Let's see if it already has a poster on it or too much stuff
|
||||
if(istype(O,/obj/structure/sign/poster))
|
||||
user << "<span class='notice'>The wall is far too cluttered to place a poster!</span>"
|
||||
return
|
||||
stuff_on_wall++
|
||||
if(stuff_on_wall==3)
|
||||
user << "<span class='warning'>The wall is far too cluttered to place a poster!</span>"
|
||||
if(stuff_on_wall == 3)
|
||||
user << "<span class='notice'>The wall is far too cluttered to place a poster!</span>"
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You start placing the poster on the wall...</span>" //Looks like it's uncluttered enough. Place the poster.
|
||||
|
||||
//declaring D because otherwise if P gets 'deconstructed' we lose our reference to P.resulting_poster
|
||||
var/obj/effect/decal/poster/D = P.resulting_poster
|
||||
var/obj/structure/sign/poster/D = P.resulting_poster
|
||||
|
||||
var/temp_loc = user.loc
|
||||
flick("poster_being_set",D)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(viruses.len > 0)
|
||||
for(var/datum/disease/D in viruses)
|
||||
if(prob(virusProb))
|
||||
var/datum/disease/viruus = new D.type(0, D, 1)
|
||||
var/datum/disease/viruus = D.Copy()
|
||||
gib.viruses += viruus
|
||||
viruus.holder = gib
|
||||
viruus.spread_type = CONTACT_FEET
|
||||
|
||||
@@ -212,6 +212,7 @@
|
||||
/obj/effect/landmark/costume/cutewitch/New()
|
||||
new /obj/item/clothing/under/sundress(src.loc)
|
||||
new /obj/item/clothing/head/witchwig(src.loc)
|
||||
new /obj/item/weapon/staff/broom(src.loc)
|
||||
del(src)
|
||||
|
||||
/obj/effect/landmark/costume/fakewizard/New()
|
||||
|
||||
@@ -91,9 +91,6 @@
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
|
||||
|
||||
|
||||
/obj/effect/mine/dnascramble
|
||||
name = "Radiation Mine"
|
||||
icon_state = "uglymine"
|
||||
|
||||
@@ -1,233 +0,0 @@
|
||||
/obj/effect/sign/securearea/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
/obj/effect/sign/securearea/blob_act()
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/sign/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
del(src)
|
||||
return
|
||||
if(2.0)
|
||||
del(src)
|
||||
return
|
||||
if(3.0)
|
||||
del(src)
|
||||
return
|
||||
else
|
||||
return
|
||||
|
||||
/obj/effect/sign/blob_act()
|
||||
del(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/sign/map
|
||||
desc = "A framed picture of the station."
|
||||
name = "station map"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/map/left
|
||||
icon_state = "map-left"
|
||||
|
||||
/obj/effect/sign/map/right
|
||||
icon_state = "map-right"
|
||||
|
||||
/obj/effect/sign/securearea
|
||||
desc = "A warning sign which reads 'SECURE AREA'. This obviously applies to a nun-Clown."
|
||||
name = "SECURE AREA"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "securearea"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/biohazard
|
||||
desc = "A warning sign which reads 'BIOHAZARD'"
|
||||
name = "BIOHAZARD"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "bio"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/electricshock
|
||||
desc = "A warning sign which reads 'HIGH VOLTAGE'"
|
||||
name = "HIGH VOLTAGE"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "shock"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/movingparts
|
||||
desc = "A warning sign which reads 'CAUTION: MOVING PARTS, machinery liable to stop and start at random'"
|
||||
name = "CAUTION"
|
||||
icon = 'decals.dmi'
|
||||
icon_state = "securearea"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/examroom
|
||||
desc = "A guidance sign which reads 'EXAM ROOM'"
|
||||
name = "EXAM"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "examroom"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/vacuum
|
||||
desc = "A warning sign which reads 'HARD VACUUM AHEAD'"
|
||||
name = "HARD VACUUM AHEAD"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "space"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/deathsposal
|
||||
desc = "A warning sign which reads 'DISPOSAL LEADS TO SPACE'"
|
||||
name = "DISPOSAL LEADS TO SPACE"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "deathsposal"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/pods
|
||||
desc = "A warning sign which reads 'ESCAPE PODS'"
|
||||
name = "ESCAPE PODS"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "pods"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/fire
|
||||
desc = "A warning sign which reads 'DANGER: FIRE'"
|
||||
name = "DANGER: FIRE"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "fire"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
|
||||
/obj/effect/sign/nosmoking_1
|
||||
desc = "A warning sign which reads 'NO SMOKING'"
|
||||
name = "NO SMOKING"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "nosmoking"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
|
||||
/obj/effect/sign/nosmoking_2
|
||||
desc = "A warning sign which reads 'NO SMOKING'"
|
||||
name = "NO SMOKING"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "nosmoking2"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/redcross
|
||||
desc = "The Intergalactic symbol of Medical institutions. You'll probably get help here.'"
|
||||
name = "Med-Bay"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "redcross"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/goldenplaque
|
||||
desc = "To be Robust is not an action or a way of life, but a mental state. Only those with the force of Will strong enough to act during a crisis, saving friend from foe, are truly Robust. Stay Robust my friends."
|
||||
name = "The Most Robust Men Award for Robustness"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "goldenplaque"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/kiddieplaque
|
||||
desc = "Next to the extremely long list of names and job titles, there is a drawing of a little child. The child is holding a crayon and writing some code in his diary with it. The child is smiling evilly."
|
||||
name = "Credits plaque for AI developers."
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "kiddieplaque"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/atmosplaque
|
||||
desc = "This plaque commemorates the fall of the Atmos FEA division. For all the charred, dizzy, and brittle men who have died in its hands."
|
||||
name = "FEA Atmospherics Division"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "atmosplaque"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/maltesefalcon1 //The sign is 64x32, so it needs two tiles. ;3
|
||||
desc = "The Maltese Falcon, Space Bar and Grill."
|
||||
name = "The Maltese Falcon"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "maltesefalcon1"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/maltesefalcon2
|
||||
desc = "The Maltese Falcon, Space Bar and Grill."
|
||||
name = "The Maltese Falcon"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "maltesefalcon2"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/science//These 3 have multiple types, just var-edit the icon_state to whatever one you want on the map
|
||||
desc = "A warning sign which reads 'SCIENCE!'"
|
||||
name = "SCIENCE!"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "science1"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/chemistry
|
||||
desc = "A warning sign which reads 'CHEMISTY'"
|
||||
name = "CHEMISTRY"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "chemistry1"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
|
||||
/obj/effect/sign/botany
|
||||
desc = "A warning sign which reads 'HYDROPONICS'"
|
||||
name = "HYDROPONICS"
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
icon_state = "hydro1"
|
||||
anchored = 1.0
|
||||
opacity = 0
|
||||
density = 0
|
||||
@@ -305,7 +305,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
dat += "<h4>Security Functions</h4>"
|
||||
dat += "<ul>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=45'><img src=pda_cuffs.png> Security Records</A></li>"
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=Forensic Scan'><img src=pda_scanner.png> [scanmode == 2 ? "Disable" : "Enable"] Forensic Scanner</a></li>"
|
||||
if(istype(cartridge.radio, /obj/item/radio/integrated/beepsky))
|
||||
dat += "<li><a href='byond://?src=\ref[src];choice=46'><img src=pda_cuffs.png> Security Bot Access</a></li>"
|
||||
dat += "</ul>"
|
||||
@@ -524,11 +523,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
scanmode = 0
|
||||
else if((!isnull(cartridge)) && (cartridge.access_medical))
|
||||
scanmode = 1
|
||||
if("Forensic Scan")
|
||||
if(scanmode == 2)
|
||||
scanmode = 0
|
||||
else if((!isnull(cartridge)) && (cartridge.access_security))
|
||||
scanmode = 2
|
||||
if("Reagent Scan")
|
||||
if(scanmode == 3)
|
||||
scanmode = 0
|
||||
@@ -720,6 +714,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if (last_text && world.time < last_text + 5)
|
||||
return
|
||||
|
||||
if(!can_use())
|
||||
return
|
||||
|
||||
last_text = world.time
|
||||
// check if telecomms I/O route 1459 is stable
|
||||
//var/telecomms_intact = telecomms_process(P.owner, owner, t)
|
||||
@@ -798,6 +795,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
set name = "Remove id"
|
||||
set src in usr
|
||||
|
||||
if(issilicon(usr))
|
||||
return
|
||||
|
||||
if ( !(usr.stat || usr.restrained()) )
|
||||
if(id)
|
||||
remove_id()
|
||||
@@ -812,6 +812,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
set name = "Remove pen"
|
||||
set src in usr
|
||||
|
||||
if(issilicon(usr))
|
||||
return
|
||||
|
||||
if ( !(usr.stat || usr.restrained()) )
|
||||
var/obj/item/weapon/pen/O = locate() in src
|
||||
if(O)
|
||||
@@ -851,13 +854,12 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
/obj/item/device/pda/attackby(obj/item/C as obj, mob/user as mob)
|
||||
..()
|
||||
if(istype(C, /obj/item/weapon/cartridge) && !cartridge)
|
||||
user.drop_item()
|
||||
C.loc = src
|
||||
user << "<span class='notice'>You insert [C] into [src].</span>"
|
||||
cartridge = C
|
||||
user.drop_item()
|
||||
cartridge.loc = src
|
||||
user << "<span class='notice'>You insert [cartridge] into [src].</span>"
|
||||
if(cartridge.radio)
|
||||
cartridge.radio.hostpda = src
|
||||
|
||||
else if(istype(C, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/idcard = C
|
||||
if(!idcard.registered_name)
|
||||
@@ -952,27 +954,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user as mob)
|
||||
switch(scanmode)
|
||||
if(2)
|
||||
if(!istype(A, /obj/item/weapon/f_card))
|
||||
if (!A.fingerprints)
|
||||
user << "\blue Unable to locate any fingerprints on [A]!"
|
||||
else
|
||||
user << "\blue Isolated [A:fingerprints.len] fingerprints."
|
||||
var/list/prints = A:fingerprints
|
||||
var/list/complete_prints = list()
|
||||
for(var/i in prints)
|
||||
var/print = prints[i]
|
||||
if(stringpercent(print) <= FINGERPRINT_COMPLETE)
|
||||
complete_prints += print
|
||||
if(complete_prints.len < 1)
|
||||
user << "\blue No intact prints found"
|
||||
else
|
||||
user << "\blue Found [complete_prints.len] intact prints"
|
||||
for(var/i in complete_prints)
|
||||
user << "\blue [i]"
|
||||
if(cartridge && cartridge.access_security)
|
||||
cartridge.add_data(A)
|
||||
user << "Data added to internal storage. Scan with a High-Resolution Scanner to retreive."
|
||||
|
||||
if(3)
|
||||
if(!isnull(A.reagents))
|
||||
|
||||
@@ -503,9 +503,7 @@ Code:
|
||||
|
||||
else
|
||||
for(var/obj/machinery/bot/mulebot/B in QC.botlist)
|
||||
if(B && B.loc)
|
||||
menu += "<A href='byond://?src=\ref[QC];op=control;bot=\ref[B]'>[B] at [B.loc.loc]</A><BR>"
|
||||
|
||||
menu += "<A href='byond://?src=\ref[QC];op=control;bot=\ref[B]'>[B] at [get_area(B)]</A><BR>"
|
||||
menu += "<BR><A href='byond://?src=\ref[QC];op=scanbots'><img src=pda_scanner.png> Scan for active bots</A><BR>"
|
||||
|
||||
else // bot selected, control it
|
||||
@@ -609,42 +607,6 @@ Code:
|
||||
menu += "ERROR: Unable to determine current location."
|
||||
menu += "<br><br><A href='byond://?src=\ref[src];choice=49'>Refresh GPS Locator</a>"
|
||||
|
||||
proc/add_data(atom/A as mob|obj|turf|area)
|
||||
//I love hashtables.
|
||||
var/list/data_entry = stored_data["\ref [A]"]
|
||||
if(islist(data_entry)) //Yay, it was already stored!
|
||||
//Merge the fingerprints.
|
||||
var/list/data_prints = data_entry[1]
|
||||
for(var/print in A.fingerprints)
|
||||
var/merged_print = data_prints[print]
|
||||
if(!merged_print)
|
||||
data_prints[print] = A.fingerprints[print]
|
||||
else
|
||||
data_prints[print] = stringmerge(data_prints[print],A.fingerprints[print])
|
||||
|
||||
//Now the fibers
|
||||
var/list/fibers = data_entry[2]
|
||||
if(!fibers)
|
||||
fibers = list()
|
||||
if(A.suit_fibers && A.suit_fibers.len)
|
||||
for(var/j = 1, j <= A.suit_fibers.len, j++) //Fibers~~~
|
||||
if(!fibers.Find(A.suit_fibers[j])) //It isn't! Add!
|
||||
fibers += A.suit_fibers[j]
|
||||
var/list/blood = data_entry[3]
|
||||
if(!blood)
|
||||
blood = list()
|
||||
if(A.blood_DNA && A.blood_DNA.len)
|
||||
for(var/main_blood in A.blood_DNA)
|
||||
if(!blood[main_blood])
|
||||
blood[main_blood] = A.blood_DNA[blood]
|
||||
return 1
|
||||
var/list/sum_list[4] //Pack it back up!
|
||||
sum_list[1] = A.fingerprints
|
||||
sum_list[2] = A.suit_fibers
|
||||
sum_list[3] = A.blood_DNA
|
||||
sum_list[4] = "\The [A] in \the [get_area(A)]"
|
||||
stored_data["\ref [A]"] = sum_list
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/cartridge/Topic(href, href_list)
|
||||
..()
|
||||
|
||||
@@ -157,6 +157,7 @@
|
||||
brightness_on = 7 // Pretty bright.
|
||||
icon_state = "flare"
|
||||
item_state = "flare"
|
||||
icon_action_button = null //just pull it manually, neckbeard.
|
||||
var/fuel = 0
|
||||
var/on_damage = 7
|
||||
var/produce_heat = 1500
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
|
||||
var/max_uses = 20
|
||||
var/uses = 0
|
||||
var/inuse = 0
|
||||
var/emagged = 0
|
||||
var/failmsg = ""
|
||||
// How much to increase per each glass?
|
||||
@@ -123,16 +122,9 @@
|
||||
|
||||
/obj/item/device/lightreplacer/proc/Use(var/mob/user)
|
||||
|
||||
if(inuse) return
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
|
||||
var/pass = 0
|
||||
inuse = 1
|
||||
if(do_after(user, 30))
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
AddUses(-1)
|
||||
pass = 1
|
||||
inuse = 0
|
||||
return pass
|
||||
AddUses(-1)
|
||||
return 1
|
||||
|
||||
// Negative numbers will subtract
|
||||
/obj/item/device/lightreplacer/proc/AddUses(var/amount = 1)
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
return -1
|
||||
if (!(src.wires & WIRE_RECEIVE))
|
||||
return -1
|
||||
if(level != 0)
|
||||
if(!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
if(isnull(position) || position.z != level)
|
||||
if(isnull(position) || !(position.z in level))
|
||||
return -1
|
||||
if (!src.listening)
|
||||
return -1
|
||||
|
||||
@@ -402,11 +402,11 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
|
||||
sleep(rand(10,25)) // wait a little...
|
||||
|
||||
if(signal.data["done"])
|
||||
if(signal.data["done"] && position.z in signal.data["level"])
|
||||
// we're done here.
|
||||
return
|
||||
|
||||
// Oh my god; the comms are down or something because the signal hasn't been broadcasted yet.
|
||||
// Oh my god; the comms are down or something because the signal hasn't been broadcasted yet in our level.
|
||||
// Send a mundane broadcast with limited targets:
|
||||
|
||||
//THIS IS TEMPORARY.
|
||||
@@ -414,7 +414,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
|
||||
Broadcast_Message(connection, M, voicemask, M.voice_message,
|
||||
src, message, displayname, jobname, real_name, M.voice_name,
|
||||
filter_type, signal.data["compression"], position.z)
|
||||
filter_type, signal.data["compression"], list(position.z), connection.frequency)
|
||||
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
var/list/heard_garbled = list() // garbled message
|
||||
|
||||
for (var/mob/R in receive)
|
||||
if (R.client && R.client.STFU_radio) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
|
||||
if (R.client && !(R.client.prefs.toggles & CHAT_RADIO)) //Adminning with 80 people on can be fun when you're trying to talk and all you can hear is radios.
|
||||
continue
|
||||
if (R.say_understands(M))
|
||||
if (ishuman(M) && M.GetVoice() != M.real_name)
|
||||
@@ -618,9 +618,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
return -1
|
||||
if(!listening)
|
||||
return -1
|
||||
if(level != 0)
|
||||
if(!(0 in level))
|
||||
var/turf/position = get_turf(src)
|
||||
if(isnull(position) || position.z != level)
|
||||
if(!position || !(position.z in level))
|
||||
return -1
|
||||
if(freq == SYND_FREQ)
|
||||
if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
|
||||
@@ -640,7 +640,6 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
|
||||
break
|
||||
if (!accept)
|
||||
return -1
|
||||
|
||||
return canhear_range
|
||||
|
||||
/obj/item/device/radio/proc/send_hear(freq, level)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
R.module = null
|
||||
R.modtype = "robot"
|
||||
R.updatename("Default")
|
||||
R.nopush = 0
|
||||
R.status_flags |= CANPUSH
|
||||
R.updateicon()
|
||||
|
||||
return 1
|
||||
|
||||
@@ -1,24 +1,23 @@
|
||||
/* Mineral Sheets
|
||||
* Contains:
|
||||
* Sandstone
|
||||
* Diamond
|
||||
* Uranium
|
||||
* Plasma
|
||||
* Gold
|
||||
* Silver
|
||||
*/
|
||||
/*
|
||||
Mineral Sheets
|
||||
Contains:
|
||||
- Sandstone
|
||||
- Diamond
|
||||
- Uranium
|
||||
- Plasma
|
||||
- Gold
|
||||
- Silver
|
||||
- Clown
|
||||
Others:
|
||||
- Adamantine
|
||||
- Mythril
|
||||
- Enriched Uranium
|
||||
*/
|
||||
|
||||
/*
|
||||
* Sandstone
|
||||
*/
|
||||
var/global/list/datum/stack_recipe/sandstone_recipes = list ( \
|
||||
new/datum/stack_recipe("pile of dirt", /obj/machinery/hydroponics/soil, 3, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \
|
||||
/* new/datum/stack_recipe("sandstone wall", ???), \
|
||||
new/datum/stack_recipe("sandstone floor", ???),\*/
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/sandstone
|
||||
/obj/item/stack/sheet/mineral/sandstone
|
||||
name = "sandstone bricks"
|
||||
desc = "This appears to be a combination of both sand and stone."
|
||||
singular_name = "sandstone brick"
|
||||
@@ -26,68 +25,206 @@ var/global/list/datum/stack_recipe/sandstone_recipes = list ( \
|
||||
throw_speed = 4
|
||||
throw_range = 5
|
||||
origin_tech = "materials=1"
|
||||
sheettype = "sandstone"
|
||||
|
||||
/obj/item/stack/sheet/sandstone
|
||||
New(var/loc, var/amount=null)
|
||||
recipes = sandstone_recipes
|
||||
return ..()
|
||||
var/global/list/datum/stack_recipe/sandstone_recipes = list ( \
|
||||
new/datum/stack_recipe("pile of dirt", /obj/machinery/hydroponics/soil, 3, time = 10, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \
|
||||
/* new/datum/stack_recipe("sandstone wall", ???), \
|
||||
new/datum/stack_recipe("sandstone floor", ???),\ */
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/mineral/sandstone/New(var/loc, var/amount=null)
|
||||
recipes = sandstone_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
..()
|
||||
|
||||
/*
|
||||
* Diamond
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/diamond
|
||||
name = "diamond"
|
||||
icon_state = "sheet-diamond"
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_range = 3
|
||||
origin_tech = "materials=6"
|
||||
perunit = 3750
|
||||
sheettype = "diamond"
|
||||
|
||||
var/global/list/datum/stack_recipe/diamond_recipes = list ( \
|
||||
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/diamond
|
||||
New(var/loc, var/amount=null)
|
||||
recipes = diamond_recipes
|
||||
return ..()
|
||||
/obj/item/stack/sheet/mineral/diamond/New(var/loc, var/amount=null)
|
||||
recipes = diamond_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
..()
|
||||
|
||||
/*
|
||||
* Uranium
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/uranium
|
||||
name = "uranium"
|
||||
icon_state = "sheet-uranium"
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
origin_tech = "materials=5"
|
||||
perunit = 2000
|
||||
sheettype = "uranium"
|
||||
|
||||
var/global/list/datum/stack_recipe/uranium_recipes = list ( \
|
||||
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/uranium
|
||||
New(var/loc, var/amount=null)
|
||||
recipes = uranium_recipes
|
||||
return ..()
|
||||
/obj/item/stack/sheet/mineral/uranium/New(var/loc, var/amount=null)
|
||||
recipes = uranium_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
..()
|
||||
|
||||
/*
|
||||
* Plasma
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/plasma
|
||||
name = "solid plasma"
|
||||
icon_state = "sheet-plasma"
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
origin_tech = "plasmatech=2;materials=2"
|
||||
perunit = 2000
|
||||
sheettype = "plasma"
|
||||
|
||||
var/global/list/datum/stack_recipe/plasma_recipes = list ( \
|
||||
new/datum/stack_recipe("plasma door", /obj/structure/mineral_door/transparent/plasma, 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/plasma
|
||||
New(var/loc, var/amount=null)
|
||||
recipes = plasma_recipes
|
||||
return ..()
|
||||
/obj/item/stack/sheet/mineral/plasma/New(var/loc, var/amount=null)
|
||||
recipes = plasma_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
..()
|
||||
|
||||
/*
|
||||
* Gold
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/gold
|
||||
name = "gold"
|
||||
icon_state = "sheet-gold"
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
origin_tech = "materials=4"
|
||||
perunit = 2000
|
||||
sheettype = "gold"
|
||||
|
||||
var/global/list/datum/stack_recipe/gold_recipes = list ( \
|
||||
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/gold
|
||||
New(var/loc, var/amount=null)
|
||||
recipes = gold_recipes
|
||||
return ..()
|
||||
/obj/item/stack/sheet/mineral/gold/New(var/loc, var/amount=null)
|
||||
recipes = gold_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
..()
|
||||
|
||||
/*
|
||||
* Silver
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/silver
|
||||
name = "silver"
|
||||
icon_state = "sheet-silver"
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
origin_tech = "materials=3"
|
||||
perunit = 2000
|
||||
sheettype = "silver"
|
||||
|
||||
var/global/list/datum/stack_recipe/silver_recipes = list ( \
|
||||
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/silver
|
||||
New(var/loc, var/amount=null)
|
||||
recipes = silver_recipes
|
||||
return ..()
|
||||
/obj/item/stack/sheet/mineral/silver/New(var/loc, var/amount=null)
|
||||
recipes = silver_recipes
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
..()
|
||||
|
||||
/*
|
||||
* Clown
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/clown
|
||||
name = "bananium"
|
||||
icon_state = "sheet-clown"
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
origin_tech = "materials=4"
|
||||
perunit = 2000
|
||||
sheettype = "clown"
|
||||
|
||||
/obj/item/stack/sheet/mineral/clown/New(var/loc, var/amount=null)
|
||||
pixel_x = rand(0,4)-4
|
||||
pixel_y = rand(0,4)-4
|
||||
..()
|
||||
|
||||
|
||||
/****************************** Others ****************************/
|
||||
|
||||
/*
|
||||
* Enriched Uranium
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/enruranium
|
||||
name = "enriched uranium"
|
||||
icon_state = "sheet-enruranium"
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
origin_tech = "materials=5"
|
||||
perunit = 1000
|
||||
|
||||
/*
|
||||
* Adamantine
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/adamantine
|
||||
name = "adamantine"
|
||||
icon_state = "sheet-adamantine"
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
origin_tech = "materials=4"
|
||||
perunit = 2000
|
||||
|
||||
/*
|
||||
* Mythril
|
||||
*/
|
||||
/obj/item/stack/sheet/mineral/mythril
|
||||
name = "mythril"
|
||||
icon_state = "sheet-mythril"
|
||||
force = 5.0
|
||||
throwforce = 5
|
||||
w_class = 3.0
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
origin_tech = "materials=4"
|
||||
perunit = 2000
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user