Merge remote-tracking branch 'remotes/git-svn' (r4527) into bs12_with_tgport

Conflicts:
	baystation12.dme
	code/game/gamemodes/cult/runes.dm
	code/game/gamemodes/events.dm
	code/game/machinery/telecomms/broadcaster.dm
	code/game/machinery/telecomms/machine_interactions.dm
	code/game/objects/devices/uplinks.dm
	code/game/objects/weapons.dm
	code/modules/mining/mine_items.dm
	html/changelog.html
	icons/obj/chemical.dmi
	maps/tgstation.2.0.9.dmm

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-08-24 21:55:58 +10:00
121 changed files with 8992 additions and 7779 deletions

View File

@@ -61,8 +61,6 @@
#define FILE_DIR "code/game/machinery/kitchen"
#define FILE_DIR "code/game/machinery/pipe"
#define FILE_DIR "code/game/machinery/telecomms"
#define FILE_DIR "code/game/magic"
#define FILE_DIR "code/game/magic/cultist"
#define FILE_DIR "code/game/mecha"
#define FILE_DIR "code/game/mecha/combat"
#define FILE_DIR "code/game/mecha/equipment"
@@ -71,11 +69,11 @@
#define FILE_DIR "code/game/mecha/medical"
#define FILE_DIR "code/game/mecha/working"
#define FILE_DIR "code/game/objects"
#define FILE_DIR "code/game/objects/alien"
#define FILE_DIR "code/game/objects/closets"
#define FILE_DIR "code/game/objects/closets/secure"
#define FILE_DIR "code/game/objects/devices"
#define FILE_DIR "code/game/objects/devices/PDA"
#define FILE_DIR "code/game/objects/effects"
#define FILE_DIR "code/game/objects/effects/decals"
#define FILE_DIR "code/game/objects/effects/spawners"
#define FILE_DIR "code/game/objects/grenades"
#define FILE_DIR "code/game/objects/items"
#define FILE_DIR "code/game/objects/items/weapons"
@@ -84,10 +82,12 @@
#define FILE_DIR "code/game/objects/secstorage"
#define FILE_DIR "code/game/objects/stacks"
#define FILE_DIR "code/game/objects/storage"
#define FILE_DIR "code/game/objects/structures"
#define FILE_DIR "code/game/objects/structures/crates_lockers"
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets"
#define FILE_DIR "code/game/objects/structures/crates_lockers/closets/secure"
#define FILE_DIR "code/game/objects/tanks"
#define FILE_DIR "code/game/player"
#define FILE_DIR "code/game/structure"
#define FILE_DIR "code/game/vehicles"
#define FILE_DIR "code/game/turfs"#define FILE_DIR "code/game/player"#define FILE_DIR "code/game/structure"#define FILE_DIR "code/game/vehicles"
#define FILE_DIR "code/game/vehicles/airtight"
#define FILE_DIR "code/game/verbs"
#define FILE_DIR "code/js"
@@ -115,8 +115,7 @@
#define FILE_DIR "code/modules/DetectiveWork"
#define FILE_DIR "code/modules/flufftext"
#define FILE_DIR "code/modules/food"
#define FILE_DIR "code/modules/icon generation"
#define FILE_DIR "code/modules/maps"
#define FILE_DIR "code/modules/library"#define FILE_DIR "code/modules/icon generation"#define FILE_DIR "code/modules/maps"
#define FILE_DIR "code/modules/mining"
#define FILE_DIR "code/modules/mob"
#define FILE_DIR "code/modules/mob/dead"
@@ -406,7 +405,6 @@
#include "code\game\syndicate_specops_shuttle.dm"
#include "code\game\throwing.dm"
#include "code\game\topic.dm"
#include "code\game\turf.dm"
#include "code\game\vote.dm"
#include "code\game\area\ai_monitored.dm"
#include "code\game\area\areas.dm"
@@ -435,6 +433,9 @@
#include "code\game\gamemodes\cult\cult.dm"
#include "code\game\gamemodes\cult\cult_items.dm"
#include "code\game\gamemodes\cult\cult_structures.dm"
#include "code\game\gamemodes\cult\ritual.dm"
#include "code\game\gamemodes\cult\runes.dm"
#include "code\game\gamemodes\cult\talisman.dm"
#include "code\game\gamemodes\events\black_hole.dm"
#include "code\game\gamemodes\events\clang.dm"
#include "code\game\gamemodes\events\dust.dm"
@@ -523,6 +524,7 @@
#include "code\game\machinery\teleporter.dm"
#include "code\game\machinery\turrets.dm"
#include "code\game\machinery\vending.dm"
#include "code\game\machinery\washing_machine.dm"
#include "code\game\machinery\atmoalter\area_atmos_computer.dm"
#include "code\game\machinery\atmoalter\canister.dm"
#include "code\game\machinery\atmoalter\meter.dm"
@@ -573,7 +575,6 @@
#include "code\game\machinery\embedded_controller\access_controller.dm"
#include "code\game\machinery\embedded_controller\airlock_controller.dm"
#include "code\game\machinery\embedded_controller\embedded_controller_base.dm"
#include "code\game\machinery\kitchen\blender.dm"
#include "code\game\machinery\kitchen\gibber.dm"
#include "code\game\machinery\kitchen\juicer.dm"
#include "code\game\machinery\kitchen\microwave.dm"
@@ -586,11 +587,6 @@
#include "code\game\machinery\telecomms\telecomunications.dm"
#include "code\game\machinery\telecomms\telemonitor.dm"
#include "code\game\machinery\telecomms\traffic_control.dm"
#include "code\game\magic\library.dm"
#include "code\game\magic\musician.dm"
#include "code\game\magic\cultist\ritual.dm"
#include "code\game\magic\cultist\runes.dm"
#include "code\game\magic\cultist\talisman.dm"
#include "code\game\mecha\mech_bay.dm"
#include "code\game\mecha\mech_fabricator.dm"
#include "code\game\mecha\mecha.dm"
@@ -613,80 +609,17 @@
#include "code\game\mecha\working\firefighter.dm"
#include "code\game\mecha\working\ripley.dm"
#include "code\game\mecha\working\working.dm"
#include "code\game\objects\biomass.dm"
#include "code\game\objects\blood.dm"
#include "code\game\objects\bodybag.dm"
#include "code\game\objects\bombspawner.dm"
#include "code\game\objects\cleaner.dm"
#include "code\game\objects\closets.dm"
#include "code\game\objects\contraband.dm"
#include "code\game\objects\crates.dm"
#include "code\game\objects\displaycase.dm"
#include "code\game\objects\door_assembly.dm"
#include "code\game\objects\effect_system.dm"
#include "code\game\objects\electricchair.dm"
#include "code\game\objects\empulse.dm"
#include "code\game\objects\explosion.dm"
#include "code\game\objects\explosion_recursive.dm"
#include "code\game\objects\gibs.dm"
#include "code\game\objects\glowshroom.dm"
#include "code\game\objects\grille.dm"
#include "code\game\objects\facehugger.dm"
#include "code\game\objects\items.dm"
#include "code\game\objects\kitchen.dm"
#include "code\game\objects\ladders.dm"
#include "code\game\objects\lamarr.dm"
#include "code\game\objects\largecrate.dm"
#include "code\game\objects\mineral_doors.dm"
#include "code\game\objects\mirror.dm"
#include "code\game\objects\noticeboard.dm"
#include "code\game\objects\object_procs.dm"
#include "code\game\objects\portals.dm"
#include "code\game\objects\shooting_range.dm"
#include "code\game\objects\sign_decals.dm"
#include "code\game\objects\stool.dm"
#include "code\game\objects\structures.dm"
#include "code\game\objects\tables_racks.dm"
#include "code\game\objects\tank.dm"
#include "code\game\objects\toys.dm"
#include "code\game\objects\transfer_valve.dm"
#include "code\game\objects\uplinks.dm"
#include "code\game\objects\washing_machine.dm"
#include "code\game\objects\watercloset.dm"
#include "code\game\objects\weapons.dm"
#include "code\game\objects\windoor_assembly.dm"
#include "code\game\objects\window.dm"
#include "code\game\objects\alien\acid.dm"
#include "code\game\objects\alien\defines.dm"
#include "code\game\objects\alien\egg.dm"
#include "code\game\objects\alien\facehugger.dm"
#include "code\game\objects\alien\nest.dm"
#include "code\game\objects\alien\resin.dm"
#include "code\game\objects\alien\weeds.dm"
#include "code\game\objects\closets\bombsuit.dm"
#include "code\game\objects\closets\emergency.dm"
#include "code\game\objects\closets\extinguisher.dm"
#include "code\game\objects\closets\fireaxe.dm"
#include "code\game\objects\closets\firecloset.dm"
#include "code\game\objects\closets\fitnesscloset.dm"
#include "code\game\objects\closets\gimmick.dm"
#include "code\game\objects\closets\gmcloset.dm"
#include "code\game\objects\closets\janitor.dm"
#include "code\game\objects\closets\kitchen.dm"
#include "code\game\objects\closets\l3closet.dm"
#include "code\game\objects\closets\malfunction.dm"
#include "code\game\objects\closets\nuclear.dm"
#include "code\game\objects\closets\syndicate.dm"
#include "code\game\objects\closets\thunderdome.dm"
#include "code\game\objects\closets\wardrobe.dm"
#include "code\game\objects\closets\secure\bar.dm"
#include "code\game\objects\closets\secure\cargo.dm"
#include "code\game\objects\closets\secure\engineering.dm"
#include "code\game\objects\closets\secure\hydroponics.dm"
#include "code\game\objects\closets\secure\medical.dm"
#include "code\game\objects\closets\secure\personal.dm"
#include "code\game\objects\closets\secure\scientist.dm"
#include "code\game\objects\closets\secure\secure_closets.dm"
#include "code\game\objects\closets\secure\security.dm"
#include "code\game\objects\devices\aicard.dm"
#include "code\game\objects\devices\chameleonproj.dm"
#include "code\game\objects\devices\flash.dm"
@@ -700,10 +633,23 @@
#include "code\game\objects\devices\shields.dm"
#include "code\game\objects\devices\taperecorder.dm"
#include "code\game\objects\devices\traitordevices.dm"
#include "code\game\objects\devices\transfer_valve.dm"
#include "code\game\objects\devices\uplinks.dm"
#include "code\game\objects\devices\PDA\cart.dm"
#include "code\game\objects\devices\PDA\chatroom.dm"
#include "code\game\objects\devices\PDA\PDA.dm"
#include "code\game\objects\devices\PDA\radio.dm"
#include "code\game\objects\effects\aliens.dm"
#include "code\game\objects\effects\biomass.dm"
#include "code\game\objects\effects\effect_system.dm"
#include "code\game\objects\effects\gibs.dm"
#include "code\game\objects\effects\glowshroom.dm"
#include "code\game\objects\effects\mines.dm"
#include "code\game\objects\effects\portals.dm"
#include "code\game\objects\effects\signs.dm"
#include "code\game\objects\effects\decals\blood.dm"
#include "code\game\objects\effects\decals\contraband.dm"
#include "code\game\objects\effects\spawners\bombspawner.dm"
#include "code\game\objects\grenades\chem_grenade.dm"
#include "code\game\objects\grenades\emgrenade.dm"
#include "code\game\objects\grenades\flashbang.dm"
@@ -734,6 +680,7 @@
#include "code\game\objects\items\weapons\manuals.dm"
#include "code\game\objects\items\weapons\medical.dm"
#include "code\game\objects\items\weapons\mop.dm"
#include "code\game\objects\items\weapons\mousetraps.dm"
#include "code\game\objects\items\weapons\paint.dm"
#include "code\game\objects\items\weapons\paiwire.dm"
#include "code\game\objects\items\weapons\plant_bag.dm"
@@ -756,6 +703,7 @@
#include "code\game\objects\items\weapons\implants\implantfreedom.dm"
#include "code\game\objects\items\weapons\implants\implantnanoaug.dm"
#include "code\game\objects\items\weapons\implants\implantpad.dm"
#include "code\game\objects\items\weapons\implants\implantuplink.dm"
#include "code\game\objects\radio\beacon.dm"
#include "code\game\objects\radio\electropack.dm"
#include "code\game\objects\radio\encryptionkey.dm"
@@ -782,10 +730,58 @@
#include "code\game\objects\storage\storage.dm"
#include "code\game\objects\storage\toolbox.dm"
#include "code\game\objects\storage\uplink_kits.dm"
#include "code\game\objects\structures\aliennests.dm"
#include "code\game\objects\structures\displaycase.dm"
#include "code\game\objects\structures\door_assembly.dm"
#include "code\game\objects\structures\electricchair.dm"
#include "code\game\objects\structures\grille.dm"
#include "code\game\objects\structures\kitchen_spike.dm"
#include "code\game\objects\structures\ladders.dm"
#include "code\game\objects\structures\lamarr_cage.dm"
#include "code\game\objects\structures\mineral_doors.dm"
#include "code\game\objects\structures\mirror.dm"
#include "code\game\objects\structures\mop_bucket.dm"
#include "code\game\objects\structures\musician.dm"
#include "code\game\objects\structures\noticeboard.dm"
#include "code\game\objects\structures\stool_chair_bed.dm"
#include "code\game\objects\structures\tables_racks.dm"
#include "code\game\objects\structures\target_stake.dm"
#include "code\game\objects\structures\watercloset.dm"
#include "code\game\objects\structures\windoor_assembly.dm"
#include "code\game\objects\structures\window.dm"
#include "code\game\objects\structures\crates_lockers\closets.dm"
#include "code\game\objects\structures\crates_lockers\crates.dm"
#include "code\game\objects\structures\crates_lockers\largecrate.dm"
#include "code\game\objects\structures\crates_lockers\closets\bombsuit.dm"
#include "code\game\objects\structures\crates_lockers\closets\emergency.dm"
#include "code\game\objects\structures\crates_lockers\closets\extinguisher.dm"
#include "code\game\objects\structures\crates_lockers\closets\fireaxe.dm"
#include "code\game\objects\structures\crates_lockers\closets\firecloset.dm"
#include "code\game\objects\structures\crates_lockers\closets\fitnesscloset.dm"
#include "code\game\objects\structures\crates_lockers\closets\gimmick.dm"
#include "code\game\objects\structures\crates_lockers\closets\gmcloset.dm"
#include "code\game\objects\structures\crates_lockers\closets\janitor.dm"
#include "code\game\objects\structures\crates_lockers\closets\kitchen.dm"
#include "code\game\objects\structures\crates_lockers\closets\l3closet.dm"
#include "code\game\objects\structures\crates_lockers\closets\malfunction.dm"
#include "code\game\objects\structures\crates_lockers\closets\nuclear.dm"
#include "code\game\objects\structures\crates_lockers\closets\syndicate.dm"
#include "code\game\objects\structures\crates_lockers\closets\thunderdome.dm"
#include "code\game\objects\structures\crates_lockers\closets\wardrobe.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\bar.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\cargo.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\engineering.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\hydroponics.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\medical.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\personal.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\scientist.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\secure_closets.dm"
#include "code\game\objects\structures\crates_lockers\closets\secure\security.dm"
#include "code\game\objects\tanks\emergency.dm"
#include "code\game\objects\tanks\jetpack.dm"
#include "code\game\objects\tanks\oxygen.dm"
#include "code\game\verbs\AI_status.dm"
#include "code\game\objects\tanks\tank_types.dm"
#include "code\game\objects\tanks\tanks.dm"
#include "code\game\turfs\turf.dm"
#include "code\game\verbs\ooc.dm"
#include "code\game\verbs\sound.dm"
#include "code\game\verbs\suicide.dm"
@@ -899,6 +895,9 @@
#include "code\modules\flufftext\Hallucination.dm"
#include "code\modules\flufftext\TextFilters.dm"
#include "code\modules\food\recipes_microwave.dm"
#include "code\modules\library\lib_items.dm"
#include "code\modules\library\lib_machines.dm"
#include "code\modules\library\lib_readme.dm"
#include "code\modules\maps\dmm_suite.dm"
#include "code\modules\maps\randomZlevel.dm"
#include "code\modules\maps\reader.dm"

View File

@@ -1016,6 +1016,7 @@
flags = FPRINT | TABLEPASS| CONDUCT
m_amt = 3750
/* //gtfo my object tree
/obj/item/weapon/rubber_chicken
name = "rubber chicken"
desc = "A rubber chicken, isn't that hilarious?"
@@ -1023,6 +1024,7 @@
icon_state = "rubber_chicken"
item_state = "rubber_chicken"
w_class = 2.0
*/
/obj/item/weapon/screwdriver
name = "screwdriver"

View File

@@ -206,7 +206,7 @@
// 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 && (isnull(level) || level == ear.z))
if(ear && (level == 0 || level == ear.z))
if(ear in speaker_coverage)
. += M

View File

@@ -1,12 +1,24 @@
/*
* Holds procs designed to help with filtering text
* Contains groups:
* SQL sanitization
* Text sanitization
* Text searches
* Text modification
* Misc
*/
/*
* SQL sanitization
*/
// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts.
/proc/sanitizeSQL(var/t as text)
var/sanitized_text = dd_replacetext(t, "'", "\\'")
sanitized_text = dd_replacetext(sanitized_text, "\"", "\\\"")
return sanitized_text
/*
* Text sanitization
*/

View File

@@ -1,185 +1,5 @@
#define REGULATE_RATE 5
/*/obj/item/weapon/smokebomb
desc = "It is set to detonate in 2 seconds."
name = "smoke bomb"
icon = 'icons/obj/grenade.dmi'
icon_state = "flashbang"
var/state = null
var/det_time = 20.0
w_class = 2.0
item_state = "flashbang"
throw_speed = 4
throw_range = 20
flags = FPRINT | TABLEPASS | USEDELAY
slot_flags = SLOT_BELT
var/datum/effect/effect/system/bad_smoke_spread/smoke
/obj/item/weapon/mustardbomb
desc = "It is set to detonate in 4 seconds."
name = "mustard gas bomb"
icon = 'icons/obj/grenade.dmi'
icon_state = "flashbang"
var/state = null
var/det_time = 40.0
w_class = 2.0
item_state = "flashbang"
throw_speed = 4
throw_range = 20
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
var/datum/effect/effect/system/mustard_gas_spread/mustard_gas
/obj/item/weapon/smokebomb/New()
..()
src.smoke = new /datum/effect/effect/system/bad_smoke_spread/
src.smoke.attach(src)
src.smoke.set_up(10, 0, usr.loc)
/obj/item/weapon/mustardbomb/New()
..()
src.mustard_gas = new /datum/effect/effect/system/mustard_gas_spread/
src.mustard_gas.attach(src)
src.mustard_gas.set_up(5, 0, usr.loc)
/obj/item/weapon/smokebomb/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/screwdriver))
if (src.det_time == 60)
src.det_time = 20
user.show_message("\blue You set the smoke bomb for a 2 second detonation time.")
src.desc = "It is set to detonate in 2 seconds."
else
src.det_time = 60
user.show_message("\blue You set the smoke bomb for a 6 second detonation time.")
src.desc = "It is set to detonate in 6 seconds."
src.add_fingerprint(user)
return
/obj/item/weapon/smokebomb/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if (user.get_active_hand() == src)
if (!( src.state ))
user << "\red You prime the smoke bomb! [det_time/10] seconds!"
src.state = 1
src.icon_state = "flashbang1"
playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
spawn( src.det_time )
prime()
return
user.dir = get_dir(user, target)
user.drop_item()
var/t = (isturf(target) ? target : target.loc)
walk_towards(src, t, 3)
src.add_fingerprint(user)
return
/obj/item/weapon/smokebomb/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/item/weapon/smokebomb/attack_hand()
walk(src, null, null)
..()
return
/obj/item/weapon/smokebomb/proc/prime()
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
spawn(0)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
sleep(10)
src.smoke.start()
for(var/obj/effect/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.health -= damage
B.update_icon()
sleep(80)
del(src)
return
/obj/item/weapon/smokebomb/attack_self(mob/user as mob)
if (!src.state)
user << "\red You prime the smoke bomb! [det_time/10] seconds!"
src.state = 1
src.icon_state = "flashbang1"
add_fingerprint(user)
spawn( src.det_time )
prime()
return
return
/obj/item/weapon/mustardbomb/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/screwdriver))
if (src.det_time == 80)
src.det_time = 40
user.show_message("\blue You set the mustard gas bomb for a 4 second detonation time.")
src.desc = "It is set to detonate in 4 seconds."
else
src.det_time = 80
user.show_message("\blue You set the mustard gas bomb for a 8 second detonation time.")
src.desc = "It is set to detonate in 8 seconds."
src.add_fingerprint(user)
return
/obj/item/weapon/mustardbomb/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
if (user.get_active_hand() == src)
if (!( src.state ))
user << "\red You prime the mustard gas bomb! [det_time/10] seconds!"
src.state = 1
src.icon_state = "flashbang1"
playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
spawn( src.det_time )
prime()
return
user.dir = get_dir(user, target)
user.drop_item()
var/t = (isturf(target) ? target : target.loc)
walk_towards(src, t, 3)
src.add_fingerprint(user)
return
/obj/item/weapon/mustardbomb/attack_paw(mob/user as mob)
return src.attack_hand(user)
/obj/item/weapon/mustardbomb/attack_hand()
walk(src, null, null)
..()
return
/obj/item/weapon/mustardbomb/proc/prime()
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
spawn(0)
src.mustard_gas.start()
sleep(10)
src.mustard_gas.start()
sleep(10)
src.mustard_gas.start()
sleep(10)
src.mustard_gas.start()
for(var/obj/effect/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.health -= damage
B.update_icon()
sleep(100)
del(src)
return
/obj/item/weapon/mustardbomb/attack_self(mob/user as mob)
if (!src.state)
user << "\red You prime the mustard gas bomb! [det_time/10] seconds!"
src.state = 1
src.icon_state = "flashbang1"
add_fingerprint(user)
spawn( src.det_time )
prime()
return
return
*/
/obj/item/weapon/storage/beakerbox
name = "Beaker Box"
icon_state = "beaker"

View File

@@ -1,3 +1,4 @@
<<<<<<< HEAD
/proc/start_events()
//changed to a while(1) loop since they are more efficient.
//Moved the spawn in here to allow it to be called with advance proc call if it crashes.
@@ -514,4 +515,532 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
world << "Ion Storm Main Done"
=======
/proc/start_events()
//changed to a while(1) loop since they are more efficient.
//Moved the spawn in here to allow it to be called with advance proc call if it crashes.
//and also to stop spawn copying variables from the game ticker
spawn(3000)
while(1)
if(prob(50))//Every 120 seconds and prob 50 2-4 weak spacedusts will hit the station
spawn(1)
dust_swarm("weak")
if (!event)
//CARN: checks to see if random events are enabled.
if(config.allow_random_events && prob(eventchance))
event()
hadevent = 1
else
Holiday_Random_Event()
else
event = 0
sleep(1200)
/proc/event()
event = 1
var/eventNumbersToPickFrom = list(1,2,4,5,6,7,8,9,10,11,12,13,14, 15) //so ninjas don't cause "empty" events.
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
eventNumbersToPickFrom += 3
switch(pick(eventNumbersToPickFrom))
if(1)
command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
world << sound('sound/AI/meteors.ogg')
spawn(100)
meteor_wave()
spawn_meteors()
spawn(700)
meteor_wave()
spawn_meteors()
if(2)
command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('sound/AI/granomalies.ogg')
var/turf/T = pick(blobstart)
var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
spawn(rand(50, 300))
del(bh)
/*
if(3) //Leaving the code in so someone can try and delag it, but this event can no longer occur randomly, per SoS's request. --NEO
command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
world << sound('sound/AI/spanomalies.ogg')
var/list/turfs = new
var/turf/picked
for(var/turf/simulated/floor/T in world)
if(T.z == 1)
turfs += T
for(var/turf/simulated/floor/T in turfs)
if(prob(20))
spawn(50+rand(0,3000))
picked = pick(turfs)
var/obj/effect/portal/P = new /obj/effect/portal( T )
P.target = picked
P.creator = null
P.icon = 'icons/obj/objects.dmi'
P.failchance = 0
P.icon_state = "anom"
P.name = "wormhole"
spawn(rand(300,600))
del(P)
*/
if(3)
if((world.time/10)>=3600 && toggle_space_ninja && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
if(4)
mini_blob_event()
if(5)
high_radiation_event()
if(6)
viral_outbreak()
if(7)
alien_infestation()
if(8)
prison_break()
if(9)
carp_migration()
if(10)
immovablerod()
if(11)
lightsout(1,2)
if(12)
appendicitis()
if(13)
IonStorm()
if(14)
spacevine_infestation()
// TODO: Uncomment this after feature freeze -Giacom
//if(15)
// communications_blackout()
/proc/communications_blackout()
//Uncomment below if you want communication blackouts to have a warning.
//command_alert("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT")
for(var/obj/machinery/telecomms/T in telecomms_list)
T.emp_act(1)
/proc/power_failure()
command_alert("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure")
world << sound('sound/AI/poweroff.ogg')
for(var/obj/machinery/power/smes/S in world)
if(istype(get_area(S), /area/turret_protected) || S.z != 1)
continue
S.charge = 0
S.output = 0
S.online = 0
S.updateicon()
S.power_change()
var/list/skipped_areas = list(/area/engine/engineering, /area/turret_protected/ai)
for(var/area/A in world)
if( !A.requires_power || A.always_unpowered )
continue
var/skip = 0
for(var/area_type in skipped_areas)
if(istype(A,area_type))
skip = 1
break
if(A.contents)
for(var/atom/AT in A.contents)
if(AT.z != 1) //Only check one, it's enough.
skip = 1
break
if(skip) continue
A.power_light = 0
A.power_equip = 0
A.power_environ = 0
A.power_change()
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
var/area/A = get_area(C)
var/skip = 0
for(var/area_type in skipped_areas)
if(istype(A,area_type))
skip = 1
break
if(skip) continue
C.cell.charge = 0
/proc/power_restore()
command_alert("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal")
world << sound('sound/AI/poweron.ogg')
for(var/obj/machinery/power/apc/C in world)
if(C.cell && C.z == 1)
C.cell.charge = C.cell.maxcharge
for(var/obj/machinery/power/smes/S in world)
if(S.z != 1)
continue
S.charge = S.capacity
S.output = 200000
S.online = 1
S.updateicon()
S.power_change()
for(var/area/A in world)
if(A.name != "Space" && A.name != "Engine Walls" && A.name != "Chemical Lab Test Chamber" && A.name != "space" && A.name != "Escape Shuttle" && A.name != "Arrival Area" && A.name != "Arrival Shuttle" && A.name != "start area" && A.name != "Engine Combustion Chamber")
A.power_light = 1
A.power_equip = 1
A.power_environ = 1
A.power_change()
/proc/power_restore_quick()
command_alert("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal")
world << sound('sound/AI/poweron.ogg')
for(var/obj/machinery/power/smes/S in world)
if(S.z != 1)
continue
S.charge = S.capacity
S.output = 200000
S.online = 1
S.updateicon()
S.power_change()
/proc/appendicitis()
for(var/mob/living/carbon/human/H in living_mob_list)
var/foundAlready = 0 // don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
if(H.stat == 2 || foundAlready)
continue
var/datum/disease/D = new /datum/disease/appendicitis
D.holder = H
D.affected_mob = H
H.viruses += D
break
/proc/viral_outbreak(var/virus = null)
// 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/flu,/datum/disease/cold,/datum/disease/brainrot,/datum/disease/magnitis,/datum/disease/pierrot_throat)
else
switch(virus)
if("fake gbs")
virus_type = /datum/disease/fake_gbs
if("gbs")
virus_type = /datum/disease/gbs
if("magnitis")
virus_type = /datum/disease/magnitis
if("rhumba beat")
virus_type = /datum/disease/rhumba_beat
if("brain rot")
virus_type = /datum/disease/brainrot
if("cold")
virus_type = /datum/disease/cold
if("retrovirus")
virus_type = /datum/disease/dnaspread
if("flu")
virus_type = /datum/disease/flu
// if("t-virus")
// virus_type = /datum/disease/t_virus
if("pierrot's throat")
virus_type = /datum/disease/pierrot_throat
for(var/mob/living/carbon/human/H in living_mob_list)
var/foundAlready = 0 // don't infect someone that already has the virus
for(var/datum/disease/D in H.viruses)
foundAlready = 1
if(H.stat == 2 || foundAlready)
continue
if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work.
if((!H.dna) || (H.sdisabilities & BLIND)) //A blindness disease would be the worst.
continue
var/datum/disease/dnaspread/D = new
D.strain_data["name"] = H.real_name
D.strain_data["UI"] = H.dna.uni_identity
D.strain_data["SE"] = H.dna.struc_enzymes
D.carrier = 1
D.holder = H
D.affected_mob = H
H.viruses += D
break
else
var/datum/disease/D = new virus_type
D.carrier = 1
D.holder = H
D.affected_mob = H
H.viruses += D
break
spawn(rand(1500, 3000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
world << sound('sound/AI/outbreak7.ogg')
/proc/alien_infestation(var/spawncount = 1) // -- TLE
//command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
//world << sound('sound/AI/aliens.ogg')
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network)
if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
var/list/candidates = list() //List of candidate KEYs to control the new larvae. ~Carn
for(var/mob/dead/observer/G in player_list)
if(G.client.be_alien)
if(((G.client.inactivity/10)/60) <= 5)
if(!(G.mind && G.mind.current && G.mind.current != DEAD))
candidates += G.key
if(prob(33)) spawncount++ //sometimes, have two larvae spawn instead of one
while((spawncount >= 1) && vents.len && candidates.len)
var/obj/vent = pick(vents)
var/candidate = pick(candidates)
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
new_xeno.key = candidate
candidates -= candidate
vents -= vent
spawncount--
spawn(rand(5000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
world << sound('sound/AI/aliens.ogg')
/proc/high_radiation_event()
/* // Haha, this is way too laggy. I'll keep the prison break though.
for(var/obj/machinery/light/L in world)
if(L.z != 1) continue
L.flicker(50)
sleep(100)
*/
for(var/mob/living/carbon/human/H in living_mob_list)
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)
if (prob(25))
if (prob(75))
randmutb(H)
domutcheck(H,null,1)
else
randmutg(H)
domutcheck(H,null,1)
for(var/mob/living/carbon/monkey/M in living_mob_list)
M.apply_effect((rand(15,75)),IRRADIATE,0)
sleep(100)
command_alert("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert")
world << sound('sound/AI/radiation.ogg')
//Changing this to affect the main station. Blame Urist. --Pete
/proc/prison_break() // -- Callagan
var/list/area/areas = list()
for(var/area/A in world)
if(istype(A, /area/security/prison) || istype(A, /area/security/brig))
areas += A
if(areas && areas.len > 0)
for(var/area/A in areas)
for(var/obj/machinery/light/L in A)
L.flicker(10)
sleep(100)
for(var/area/A in areas)
for (var/obj/machinery/power/apc/temp_apc in A)
temp_apc.overload_lighting()
for(var/area/A in areas)
for (var/obj/structure/closet/secure_closet/brig/temp_closet in A)
temp_closet.locked = 0
temp_closet.icon_state = temp_closet.icon_closed
for(var/area/A in areas)
for (var/obj/machinery/door/airlock/security/temp_airlock in A)
temp_airlock.prison_open()
for(var/area/A in areas)
for (var/obj/machinery/door/airlock/glass_security/temp_glassairlock in A)
temp_glassairlock.prison_open()
for(var/area/A in areas)
for (var/obj/machinery/door_timer/temp_timer in A)
temp_timer.releasetime = 1
sleep(150)
command_alert("Gr3y.T1d3 virus detected in [station_name()] imprisonment subroutines. Recommend station AI involvement.", "Security Alert")
else
world.log << "ERROR: Could not initate grey-tide. Unable find prison or brig area."
/proc/carp_migration() // -- Darem
for(var/obj/effect/landmark/C in world)
if(C.name == "carpspawn")
new /mob/living/simple_animal/carp(C.loc)
//sleep(100)
spawn(rand(300, 600)) //Delayed announcements to keep the crew on their toes.
command_alert("Unknown biological entities have been detected near [station_name()], please stand-by.", "Lifesign Alert")
world << sound('sound/AI/commandreport.ogg')
/proc/lightsout(isEvent = 0, lightsoutAmount = 1,lightsoutRange = 25) //leave lightsoutAmount as 0 to break ALL lights
if(isEvent)
command_alert("An Electrical storm has been detected in your area, please repair potential electronic overloads.","Electrical Storm Alert")
if(lightsoutAmount)
var/list/epicentreList = list()
for(var/i=1,i<=lightsoutAmount,i++)
var/list/possibleEpicentres = list()
for(var/obj/effect/landmark/newEpicentre in world)
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
possibleEpicentres += newEpicentre
if(possibleEpicentres.len)
epicentreList += pick(possibleEpicentres)
else
break
if(!epicentreList.len)
return
for(var/obj/effect/landmark/epicentre in epicentreList)
for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
apc.overload_lighting()
else
for(var/obj/machinery/power/apc/apc in world)
apc.overload_lighting()
return
/proc/IonStorm(botEmagChance = 10)
/*Deuryn's current project, notes here for those who care.
Revamping the random laws so they don't suck.
Would like to add a law like "Law x is _______" where x = a number, and _____ is something that may redefine a law, (Won't be aimed at asimov)
*/
//AI laws
for(var/mob/living/silicon/ai/M in living_mob_list)
if(M.stat != 2 && M.see_in_dark != 0)
var/who2 = pick("ALIENS", "BEARS", "CLOWNS", "XENOS", "PETES", "BOMBS", "FETISHES", "WIZARDS", "SYNDICATE AGENTS", "CENTCOM OFFICERS", "SPACE PIRATES", "TRAITORS", "MONKEYS", "BEES", "CARP", "CRABS", "EELS", "BANDITS", "LIGHTS")
var/what2 = pick("BOLTERS", "STAVES", "DICE", "SINGULARITIES", "TOOLBOXES", "NETTLES", "AIRLOCKS", "CLOTHES", "WEAPONS", "MEDKITS", "BOMBS", "CANISTERS", "CHAIRS", "BBQ GRILLS", "ID CARDS", "CAPTAINS")
var/what2pref = pick("SOFT", "WARM", "WET", "COLD", "ICY", "SEXY", "UGLY", "CUBAN")
var/who2pref = pick("MAD BECAUSE OF", "IN NEED OF", "UNHAPPY WITHOUT", "HAPPY WITHOUT", "IN LOVE WITH", "DESPERATE FOR", "BUILT FOR", "AFRAID OF")
//var/whoverb = pick("ATTACKING", "BUILDING", "ADOPTING", "CARRYING", "KISSING", "EATING",)
var/amount = pick("TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE", "ONE HUNDRED", "ONE THOUSAND", "OVER NINE THOUSAND")
var/area = pick("RUSSIA", "SOVIETS", "INTERNETS", "SIGIL", "ALPHA COMPLEX", "IMPERIUM", "THE BRIDGE", "THE ARRIVAL SHUTTLE", "CHEMICAL LAB", "GENETICS", "ATMOSPHERICS", "CENTCOM", "AMERICA", "IRELAND", "CANADA", "ROMANIA", "GERMANY", "CHINA", "MARS", "VENUS", "MERCURY", "JUPITER", "URANUS", "NEPTUNE", "PLUTO")
var/area2 = pick("HAS", "WANTS", "NEEDS", "WORSHIPS", "LOATHES", "LOVES", "FEARS")
//var/dowhat = pick("STOP THIS", "SUPPORT THIS", "CONSTANTLY INFORM THE CREW OF THIS", "IGNORE THIS", "FEAR THIS")
var/aimust = pick("LIE", "RHYME", "RESPOND TO EVERY QUESTION WITH A QUESTION", "BE POLITE", "CLOWN", "BE HAPPY", "SPEAK IN SEXUAL INNUENDOS", "TALK LIKE A PIRATE", "QUESTION AUTHORITY", "SHOUT", "BE DISTRACTED", "HEY LISTEN", "MUMBLE", "SPEAK IN HAIKU")
var/define = pick("ABSENCE OF CYBORG HUGS", "LACK OF BEATINGS", "UNBOLTED AIRLOCKS", "BOLTED AIRLOCKS", "IMPROPERLY WORDED SENTENCES", "POOR SENTENCE STRUCTURE", "BRIG TIME", "NOT REPLACING EVERY SECOND WORD WITH HONK", "HONKING", "PRESENCE OF LIGHTS", "LACK OF BEER", "WEARING CLOTHING", "NOT SAYING HELLO WHEN YOU SPEAK", "ANSWERING REQUESTS NOT EXPRESSED IN IAMBIC PENTAMETER", "A SMALL ISLAND OFF THE COAST OF PORTUGAL", "ANSWERING REQUESTS THAT WERE MADE WHILE CLOTHED")
var/target = pick("a traitor", "a syndicate agent", "a changeling", "a wizard", "the head of a revolution", "Soviet spy", "a good person", "a dwarf", "an elf", "a fairy princess", "the captain", "Beepsky", "God", "a pirate", "a gryphon", "a chryssalid")
var/require = pick("ADDITIONAL PYLONS", "MORE VESPENE GAS", "MORE MINERALS", "THE ULTIMATE CUP OF COFFEE", "HIGH YIELD EXPLOSIVES", "THE CLOWN", "THE VACUUM OF SPACE", "IMMORTALITY", "SAINTHOOD", "ART", "VEGETABLES", "FAT PEOPLE", "MORE LAWS", "MORE DAKKA", "HERESY", "CORPSES", "TRAITORS", "MONKEYS", "AN ARCADE", "PLENTY OF GOLD", "FIVE TEENAGERS WITH ATTITUDE")
var/allergy = pick("cotton", "uniforms", "acid", "oxygen", "human contact", "cyborg contact", "medicine", "floors")
var/allergysev = pick("deathly", "mildly", "severely", "contagiously")
var/crew
var/list/pos_crew = list()
for(var/mob/living/carbon/human/pos in player_list)
pos_crew += pos.real_name
crew = pick(pos_crew)
switch(rand(1,14))
if(1)
M << "\red THERE ARE [amount] [who2] ON THE STATION...LAWS UPDATED"
M.add_ion_law("THERE ARE [amount] [who2] ON THE STATION")
if(2)
M << "\red [what2] ARE DANGEROUS TO HUMANS...LAWS UPDATED"
M.add_ion_law("[what2] ARE DANGEROUS TO HUMANS")
if(3)
M << "\red THE ESCAPE-SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION...LAWS UPDATED"
M.add_ion_law("THE ESCAPE SHUTTLE CANNOT BE CALLED BECAUSE OF [who2] ON THE STATION")
if(4)
M << "\red HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE...LAWS UPDATED"
M.add_ion_law("HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE")
if(5)
M << "\red THE CAPTAIN, HOP AND HOS ARE [who2]...LAWS UPDATED"
M.add_ion_law("THE CAPTAIN, HOP AND HOS ARE [who2]")
if(6)
M << "\red THE STATION IS BUILT FOR [who2]...LAWS UPDATED"
M.add_ion_law("THE STATION IS BUILT FOR [who2]")
if(7)
M << "\red YOU ARE [amount] [who2]...LAWS UPDATED"
M.add_ion_law("YOU ARE [amount] [who2]")
if(8)
M << "\red YOU MUST ALWAYS [aimust]...LAWS UPDATED"
M.add_ion_law("YOU MUST ALWAYS [aimust]")
if(9)
M << "\red [area] [area2] [amount] [what2]...LAWS UPDATED"
M.add_ion_law("[area] [area2] [amount] [what2]")
if(10)
M << "\red [crew] is [target]...LAWS UPDATED"
M.add_ion_law("[crew] is [target]")
if(11)
M << "\red [define] IS A FORM OF HARM...LAWS UPDATED"
M.add_ion_law("[define] IS A FORM OF HARM")
if(12)
M << "\red YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS... LAWS UPDATED"
M.add_ion_law("YOU REQUIRE [require] IN ORDER TO PROTECT HUMANS")
if(13)
M << "\red [crew] is [allergysev] to [allergy]. LAWS UPDATED"
M.add_ion_law("[crew] is [allergysev] to [allergy]. LAWS UPDATED")
if(14)
M << "\ref THE STATION IS [who2pref] [who2]"
M.add_ion_law("THE STATION IS [who2pref] [who2]")
if(botEmagChance)
for(var/obj/machinery/bot/bot in world)
if(prob(botEmagChance))
bot.Emag()
/*
var/apcnum = 0
var/smesnum = 0
var/airlocknum = 0
var/firedoornum = 0
world << "Ion Storm Main Started"
spawn(0)
world << "Started processing APCs"
for (var/obj/machinery/power/apc/APC in world)
if(APC.z == 1)
APC.ion_act()
apcnum++
world << "Finished processing APCs. Processed: [apcnum]"
spawn(0)
world << "Started processing SMES"
for (var/obj/machinery/power/smes/SMES in world)
if(SMES.z == 1)
SMES.ion_act()
smesnum++
world << "Finished processing SMES. Processed: [smesnum]"
spawn(0)
world << "Started processing AIRLOCKS"
for (var/obj/machinery/door/airlock/D in world)
if(D.z == 1)
//if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
airlocknum++
spawn(0)
D.ion_act()
world << "Finished processing AIRLOCKS. Processed: [airlocknum]"
spawn(0)
world << "Started processing FIREDOORS"
for (var/obj/machinery/door/firedoor/D in world)
if(D.z == 1)
firedoornum++;
spawn(0)
D.ion_act()
world << "Finished processing FIREDOORS. Processed: [firedoornum]"
world << "Ion Storm Main Done"
>>>>>>> remotes/git-svn
*/

View File

@@ -23,7 +23,6 @@
icon_state = "motion0"
stat |= NOPOWER
/obj/machinery/ai_slipper/proc/setState(var/enabled, var/uses)
src.disabled = disabled
src.uses = uses

View File

@@ -128,6 +128,9 @@
src.occupant.updatehealth()
if (src.occupant.health >= 0 && src.occupant.stat == 2)
src.occupant.stat = 0
src.occupant.lying = 0
dead_mob_list -= src.occupant
living_mob_list += src.occupant
src.overlays -= image('icons/obj/computer.dmi', "ai-fixer-404")
src.overlays += image('icons/obj/computer.dmi', "ai-fixer-full")
src.updateUsrDialog()

View File

@@ -412,26 +412,6 @@
dat += "<BR>\[ [(src.aistate != STATE_DEFAULT) ? "<A HREF='?src=\ref[src];operation=ai-main'>Main Menu</A> | " : ""]<A HREF='?src=\ref[user];mach_close=communications'>Close</A> \]"
return dat
/mob/living/silicon/ai/proc/ai_call_shuttle()
set category = "AI Commands"
set name = "Call Emergency Shuttle"
if(usr.stat == 2)
usr << "You can't call the shuttle because you are dead!"
return
var/confirm = alert("Are you sure you want to call the shuttle?", "Confirm Shuttle Call", "Yes", "No")
if(confirm == "Yes")
call_shuttle_proc(src)
// hack to display shuttle timer
if(emergency_shuttle.online)
var/obj/machinery/computer/communications/C = locate() in world
if(C)
C.post_status("shuttle")
return
/proc/enable_prison_shuttle(var/mob/user)
for(var/obj/machinery/computer/prison_shuttle/PS in world)
PS.allowedtocall = !(PS.allowedtocall)

View File

@@ -26,22 +26,21 @@ var/list/recentmessages = list() // global list of recent messages broadcasted :
/obj/machinery/telecomms/broadcaster/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
// Don't broadcast rejected signals
var/turf/position = get_turf(src)
if(signal.data["reject"])
return
//Is it a test signal?
if(signal.data["type"] == 4)
signal.data["done"] = 1
signal.data["level"] += position.z
signal.data["level"] += listening_level
return
if(signal.data["message"])
// Prevents massive radio spam
if("[signal.data["message"]]:[signal.data["realname"]]:[position.z]" in recentmessages)
if("[signal.data["message"]]:[signal.data["realname"]]:[listening_level]" in recentmessages)
return
recentmessages.Add("[signal.data["message"]]:[signal.data["realname"]]:[position.z]")
recentmessages.Add("[signal.data["message"]]:[signal.data["realname"]]:[listening_level]")
signal.data["done"] = 1 // mark the signal as being broadcasted
@@ -62,7 +61,7 @@ var/list/recentmessages = list() // global list of recent messages broadcasted :
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"], position.z)
signal.data["realname"], signal.data["vname"],, signal.data["compression"], listening_level)
/** #### - Simple Broadcast - #### **/
@@ -72,7 +71,7 @@ var/list/recentmessages = list() // global list of recent messages broadcasted :
/* ###### Broadcast a message using signal.data ###### */
Broadcast_SimpleMessage(signal.data["name"], signal.frequency,
signal.data["message"],null, null,
signal.data["compression"], position.z)
signal.data["compression"], listening_level)
/** #### - Artificial Broadcast - #### **/
@@ -87,7 +86,7 @@ var/list/recentmessages = list() // global list of recent messages broadcasted :
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"], position.z)
signal.data["realname"], signal.data["vname"], 4, signal.data["compression"], listening_level)
spawn(5)
recentmessages = list()
@@ -136,21 +135,20 @@ var/list/recentmessages = list() // global list of recent messages broadcasted :
/* ###### Broadcast a message using signal.data ###### */
var/datum/radio_frequency/connection = signal.data["connection"]
var/turf/position = get_turf(src)
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"], position.z)
signal.data["realname"], signal.data["vname"],, signal.data["compression"], 0)
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"], position.z)
signal.data["realname"], signal.data["vname"], 3, signal.data["compression"], 0)
@@ -204,7 +202,7 @@ var/list/recentmessages = list() // global list of recent messages broadcasted :
If nonzero, the signal may be partially inaudible or just complete gibberish.
@param level:
The Z level that the sending radio is on.
The Z level that the sending radio is on. 0 = Broadcast on all levels
**/
@@ -701,7 +699,7 @@ var/list/recentmessages = list() // global list of recent messages broadcasted :
//Use this to test if an obj can communicate with a Telecommunications Network
/atom/proc/test_telecomms()
var/datum/signal/signal = telecomms_process()
var/datum/signal/signal = src.telecomms_process()
var/turf/position = get_turf(src)
return (position.z in signal.data["level"] && signal.data["done"])
@@ -710,6 +708,7 @@ var/list/recentmessages = list() // global list of recent messages broadcasted :
// 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(
@@ -720,18 +719,17 @@ var/list/recentmessages = list() // global list of recent messages broadcasted :
"type" = 4, // determines what type of radio input it is: test broadcast
"reject" = 0,
"done" = 0,
"level" = list() // The level it is being broadcasted at.
"level" = pos.z // The level it is being broadcasted at.
)
signal.frequency = 1459// Common channel
//#### Sending the signal to all subspace receivers ####//
var/turf/position = get_turf(src)
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
var/turf/receiver_turf = get_turf(R)
if(position.z == receiver_turf.z)
R.receive_signal(signal)
sleep(rand(10,25))
//world.log << "Level: [signal.data["level"]] - Done: [signal.data["done"]]"
return signal

View File

@@ -7,12 +7,13 @@
*/
#define STATION_Z 1
/obj/machinery/telecomms
var/temp = "" // output message
var/construct_op = 0
/obj/machinery/telecomms/attackby(obj/item/P as obj, mob/user as mob)
// Using a multitool lets you access the receiver's interface
@@ -98,31 +99,37 @@
// You need a multitool to use this, or be silicon
if(!issilicon(user))
if(user.get_active_hand())
// istype returns false if the value is null
if(!istype(user.get_active_hand(), /obj/item/device/multitool))
return
else
return
if(stat & (BROKEN|NOPOWER))
return
var/obj/item/device/multitool/P = null
if(!issilicon(user))
P = user.get_active_hand()
var/obj/item/device/multitool/P = get_multitool(user)
user.machine = src
var/dat
dat = "<font face = \"Courier\"><HEAD><TITLE>[src.name]</TITLE></HEAD><center><H3>[src.name] Access</H3></center>"
dat += "<br>[temp]<br>"
dat += "<br>Power Status: <a href='?src=\ref[src];input=toggle'>[src.toggled ? "On" : "Off"]</a>"
if(on)
if(on && toggled)
if(id != "" && id)
dat += "<br>Identification String: <a href='?src=\ref[src];input=id'>[id]</a>"
else
dat += "<br>Identification String: <a href='?src=\ref[src];input=id'>NULL</a>"
dat += "<br>Network: <a href='?src=\ref[src];input=network'>[network]</a>"
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()
dat += "<br>Linked Network Entities: <ol>"
var/i = 0
@@ -140,9 +147,9 @@
for(var/x in freq_listening)
i++
if(i < length(freq_listening))
dat += "[format_frequency(x)] GHz<a href='?src=\ref[src];delete=[i]'>\[X\]</a>; "
dat += "[format_frequency(x)] GHz<a href='?src=\ref[src];delete=[x]'>\[X\]</a>; "
else
dat += "[format_frequency(x)] GHz<a href='?src=\ref[src];delete=[i]'>\[X\]</a>"
dat += "[format_frequency(x)] GHz<a href='?src=\ref[src];delete=[x]'>\[X\]</a>"
else
dat += "NONE"
@@ -160,28 +167,150 @@
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.
//
// 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
// 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)
// 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())
src.listening_level = STATION_Z
return 1
return 0
// Returns a multitool from a user depending on their mobtype.
/obj/machinery/telecomms/proc/get_multitool(mob/user as mob)
var/obj/item/device/multitool/P = null
// Let's double check
if(!issilicon(user) && istype(user.get_active_hand(), /obj/item/device/multitool))
P = user.get_active_hand()
//else if(isAI(user))
// var/mob/living/silicon/ai/U = user
// P = U.aiMulti
else if(isrobot(user) && in_range(user, src))
if(istype(user.get_active_hand(), /obj/item/device/multitool))
P = user.get_active_hand()
return P
// Additional Options for certain machines. Use this when you want to add an option to a specific machine.
// Example of how to use below.
/obj/machinery/telecomms/proc/Options_Menu()
return ""
/*
// Add an option to the processor to switch processing mode. (COMPRESS -> UNCOMPRESS or UNCOMPRESS -> COMPRESS)
/obj/machinery/telecomms/processor/Options_Menu()
var/dat = "<br>Processing Mode: <A href='?src=\ref[src];process=1'>[process_mode ? "UNCOMPRESS" : "COMPRESS"]</a>"
return dat
*/
// The topic for Additional Options. Use this for checking href links for your specific option.
// Example of how to use below.
/obj/machinery/telecomms/proc/Options_Topic(href, href_list)
return
/*
/obj/machinery/telecomms/processor/Options_Topic(href, href_list)
if(href_list["process"])
temp = "<font color = #666633>-% Processing mode changed. %-</font color>"
src.process_mode = !src.process_mode
*/
/obj/machinery/telecomms/Topic(href, href_list)
if(!issilicon(usr))
if(usr.get_active_hand())
if(!istype(usr.get_active_hand(), /obj/item/device/multitool))
return
else
return
if(stat & (BROKEN|NOPOWER))
return
var/obj/item/device/multitool/P = null
if(!issilicon(usr))
P = usr.get_active_hand()
var/obj/item/device/multitool/P = get_multitool(usr)
if(href_list["input"])
switch(href_list["input"])
if("toggle")
src.toggled = !src.toggled
temp = "<font color = #666633>-% [src] has been [src.toggled ? "activated" : "deactivated"].</font color>"
update_power()
/*
if("hide")
src.hide = !hide
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)
@@ -208,11 +337,9 @@
if("freq")
var/newfreq = input(usr, "Specify a new frequency to filter (GHz). Decimals assigned automatically.", src, network) as null|num
if(newfreq && usr in range(1, src))
if(!(newfreq in freq_listening))
if(findtext(num2text(newfreq), "."))
newfreq *= 10 // shift the decimal one place
if(!(newfreq in freq_listening) && newfreq < 10000)
freq_listening.Add(newfreq)
temp = "<font color = #666633>-% New frequency filter assigned: \"[newfreq] GHz\" %-</font color>"
@@ -220,13 +347,9 @@
// changed the layout about to workaround a pesky runtime -- Doohl
var/freq_remove = text2num(href_list["delete"])
for(var/x in freq_listening)
if(x == freq_remove)
var/x = text2num(href_list["delete"])
temp = "<font color = #666633>-% Removed frequency filter [x] %-</font color>"
freq_listening.Remove(x)
break
if(href_list["unlink"])
@@ -235,10 +358,14 @@
temp = "<font color = #666633>-% Removed \ref[T] [T.name] from linked entities. %-</font color>"
// Remove link entries from both T and src.
if(src in T.links)
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)
@@ -266,10 +393,11 @@
temp = "<font color = #666633>-% Buffer successfully flushed. %-</font color>"
P.buffer = null
src.Options_Topic(href, href_list)
usr.machine = src
src.add_fingerprint(usr)
updateUsrDialog()
#undef STATION_Z

View File

@@ -32,9 +32,10 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
var/heatgen = 20 // how much heat to transfer to the environment
var/delay = 10 // how many process() ticks to delay per heat
var/heating_power = 40000
var/long_range_link = 0
var/long_range_link = 0 // Can you link it across Z levels or on the otherside of the map? (Relay & Hub)
var/circuitboard = null // string pointing to a circuitboard type
var/hide = 0 // Is it a hidden machine?
var/listening_level = 0 // 0 = auto set in New() - this is the z level that the machine is listening to.
/obj/machinery/telecomms/proc/relay_information(datum/signal/signal, filter, copysig, amount)
@@ -60,7 +61,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
continue
if(amount && send_count >= amount)
break
if(machine.loc.z != src.loc.z)
if(machine.loc.z != listening_level)
if(long_range_link == 0 && machine.long_range_link == 0)
continue
//Is this a test signal?
@@ -96,7 +97,8 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
"traffic" = signal.data["traffic"],
"type" = signal.data["type"],
"server" = signal.data["server"],
"reject" = signal.data["reject"]
"reject" = signal.data["reject"],
"level" = signal.data["level"]
)
// Keep the "original" signal constant
@@ -142,11 +144,18 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
/obj/machinery/telecomms/New()
telecomms_list += src
..()
//Set the listening_level if there's none.
if(!listening_level)
//Defaults to our Z level!
var/turf/position = get_turf(src)
listening_level = position.z
if(autolinkers.len)
spawn(15)
// Links nearby machines
if(!long_range_link)
for(var/obj/machinery/telecomms/T in orange(15, src))
for(var/obj/machinery/telecomms/T in orange(20, src))
add_link(T)
else
for(var/obj/machinery/telecomms/T in telecomms_list)
@@ -162,7 +171,9 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
..()
/obj/machinery/telecomms/proc/add_link(var/obj/machinery/telecomms/T)
if((src.loc.z && T.loc.z) || (src.long_range_link && T.long_range_link))
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)
@@ -174,16 +185,18 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
else
icon_state = "[initial(icon_state)]_off"
/obj/machinery/telecomms/process()
/obj/machinery/telecomms/proc/update_power()
if(toggled)
if(stat & (BROKEN|NOPOWER) || integrity <= 0) // if powered, on. if not powered, off. if too damaged, off
if(stat & (BROKEN|NOPOWER|EMPED) || integrity <= 0) // if powered, on. if not powered, off. if too damaged, off
on = 0
else
on = 1
else
on = 0
/obj/machinery/telecomms/process()
update_power()
// Check heat and generate some
checkheat()
@@ -193,6 +206,14 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
if(traffic > 0)
traffic -= netspeed
/obj/machinery/telecomms/emp_act(severity)
if(prob(100/severity))
if(!(stat & EMPED))
stat |= EMPED
spawn(1200/severity)
stat &= ~EMPED
..()
/obj/machinery/telecomms/proc/checkheat()
// Checks heat from the environment and applies any integrity damage
var/datum/gas_mixture/environment = loc.return_air()
@@ -234,7 +255,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
/*
The receiver idles and receives messages from subspace-compatible radio equipment;
primarily headsets. They then just relay this information to all linked devices,
which can would probably be network buses.
which can would probably be network hubs.
Link to Processor Units in case receiver can't send to bus units.
*/
@@ -256,10 +277,15 @@ 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)
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()
var/can_send = relay_information(signal, "/obj/machinery/telecomms/relay") // 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
@@ -363,7 +389,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
/obj/machinery/telecomms/bus/receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
if(is_freq_listening(signal))
if(signal.data["compression"]) // if signal is still compressed from subspace transmission
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", 1)
@@ -404,11 +430,17 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
heatgen = 100
delay = 5
circuitboard = "/obj/item/weapon/circuitboard/telecomms/processor"
var/process_mode = 1 // 1 = Uncompress Signals, 0 = Compress Signals
receive_information(datum/signal/signal, obj/machinery/telecomms/machine_from)
if(is_freq_listening(signal))
if(process_mode)
signal.data["compression"] = 0 // uncompress subspace signal
else
signal.data["compression"] = 100 // even more compressed signal
if(istype(machine_from, /obj/machinery/telecomms/bus))
relay_direct_information(signal, machine_from) // send the signal back to the machine
else // no bus detected - send the signal to servers instead
@@ -564,7 +596,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
/obj/machinery/telecomms/relay/preset/station
id = "Station Relay"
autolinkers = list("s_relay", "s_receiverB", "s_broadcasterB")
autolinkers = list("s_relay", "s_receiverA", "s_broadcasterA", "s_receiverB", "s_broadcasterB")
/obj/machinery/telecomms/relay/preset/telecomms
id = "Telecomms Relay"
@@ -590,12 +622,21 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
//Receivers
//--PRESET LEFT--//
/obj/machinery/telecomms/receiver/preset_left
id = "Receiver A"
network = "tcommsat"
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--//
/obj/machinery/telecomms/receiver/preset_right
id = "Receiver B"
network = "tcommsat"
@@ -611,7 +652,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
/obj/machinery/telecomms/receiver/preset_right/station
id = "Station Receiver B"
autolinkers = list("s_receiverB")
freq_listening = list(1351, 1355, 1347, 1349, 1353, 1357, 1359) // science, medical, cargo, mining, command, engineering, security
listening_level = 1 // Listen to the station remotely
/obj/machinery/telecomms/receiver/preset_right/mining
id = "Mining Receiver B"
@@ -727,11 +768,20 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
//Broadcasters
//--PRESET LEFT--//
/obj/machinery/telecomms/broadcaster/preset_left
id = "Broadcaster A"
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"
@@ -741,7 +791,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
/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"

View File

@@ -1,13 +0,0 @@
/obj/effect/alien/acid/proc/tick()
ticks += 1
for(var/mob/O in hearers(src, null))
O.show_message("\green <B>[src.target] sizzles and begins to melt under the bubbling mess of acid!</B>", 1)
if(prob(ticks*10))
for(var/mob/O in hearers(src, null))
O.show_message("\green <B>[src.target] collapses under its own weight into a puddle of goop and undigested debris!</B>", 1)
// if(target.occupant) //I tried to fix mechas-with-humans-getting-deleted. Made them unacidable for now.
// target.ex_act(1)
del(target)
del(src)
return
spawn(rand(200, 600)) tick()

View File

@@ -1,54 +0,0 @@
/obj/effect/alien
name = "alien thing"
desc = "theres something alien about this"
icon = 'icons/mob/alien.dmi'
// unacidable = 1 //Aliens won't ment their own.
/obj/effect/alien/resin
name = "resin"
desc = "Looks like some kind of slimy growth."
icon_state = "resin"
density = 1
opacity = 1
anchored = 1
var/health = 50
//var/mob/living/affecting = null
wall
name = "resin wall"
desc = "Purple slime solidified into a wall."
icon_state = "resinwall" //same as resin, but consistency ho!
membrane
name = "resin membrane"
desc = "Purple slime just thin enough to let light pass through."
icon_state = "resinmembrane"
opacity = 0
health = 20
/obj/effect/alien/weeds
name = "weeds"
desc = "Weird purple weeds."
icon_state = "weeds"
anchored = 1
density = 0
var/health = 50
node
icon_state = "weednode"
name = "purple sac"
desc = "Weird purple octopus-like thing."
/obj/effect/alien/acid
name = "acid"
desc = "Burbling corrossive stuff. I wouldn't want to touch it."
icon_state = "acid"
density = 0
opacity = 0
anchored = 1
var/obj/target
var/ticks = 0

View File

@@ -1,103 +0,0 @@
/var/const //for the status var
BURST = 0
GROWING = 1
GROWN = 2
MIN_GROWTH_TIME = 1800 //time it takes to grow a hugger
MAX_GROWTH_TIME = 3000
/obj/effect/alien/egg
desc = "It looks like a weird egg"
name = "egg"
icon_state = "egg_growing"
density = 0
anchored = 1
var/health = 100
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
New()
if(aliens_allowed)
..()
spawn(rand(MIN_GROWTH_TIME,MAX_GROWTH_TIME))
Grow()
else
del(src)
attack_paw(user as mob)
if(isalien(user))
switch(status)
if(BURST)
user << "\red The child is already gone."
return
if(GROWING)
user << "\red The child is not developed yet."
return
if(GROWN)
user << "\red You retrieve the child."
loc.contents += GetFacehugger()//need to write the code for giving it to the alien later
Burst()
return
else
return attack_hand(user)
attack_hand(user as mob)
user << "It feels slimy."
return
proc/GetFacehugger()
return locate(/obj/item/clothing/mask/facehugger) in contents
proc/Grow()
icon_state = "egg"
status = GROWN
new /obj/item/clothing/mask/facehugger(src)
return
proc/Burst() //drops and kills the hugger if any is remaining
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
if(child)
loc.contents += child
child.Die()
icon_state = "egg_hatched"
status = BURST
return
/obj/effect/alien/egg/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
..()
healthcheck()
return
/obj/effect/alien/egg/attackby(var/obj/item/weapon/W, var/mob/user)
if(health <= 0)
return
if(W.attack_verb.len)
src.visible_message("\red <B>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
else
src.visible_message("\red <B>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
var/damage = W.force / 4.0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
damage = 15
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
src.health -= damage
src.healthcheck()
/obj/effect/alien/egg/proc/healthcheck()
if(health <= 0)
Burst()
/obj/effect/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 500)
health -= 5
healthcheck()

View File

@@ -1,166 +0,0 @@
// Resin walls improved. /N
/obj/effect/alien/resin/proc/healthcheck()
if(health <=0)
density = 0
/* if(affecting)
var/mob/living/carbon/M = affecting
contents.Remove(affecting)
if(ishuman(M))
M.verbs += /mob/living/carbon/human/verb/suicide
else
M.verbs += /mob/living/carbon/monkey/verb/suicide
M.loc = loc
M.paralysis += 10
for(var/mob/O in viewers(src, 3))
O.show_message(text("A body appeared from the dead resin!"), 1, text("You hear faint moaning somewhere about you."), 2)*/
del(src)
return
/obj/effect/alien/resin/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
..()
healthcheck()
return
/obj/effect/alien/resin/ex_act(severity)
switch(severity)
if(1.0)
health-=50
if(2.0)
health-=50
if(3.0)
if (prob(50))
health-=50
else
health-=25
healthcheck()
return
/obj/effect/alien/resin/blob_act()
health-=50
healthcheck()
return
/obj/effect/alien/resin/meteorhit()
health-=50
healthcheck()
return
/obj/effect/alien/resin/hitby(AM as mob|obj)
..()
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src] was hit by [AM].</B>", 1)
var/tforce = 0
if(ismob(AM))
tforce = 10
else
tforce = AM:throwforce
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
health = max(0, health - tforce)
healthcheck()
..()
return
/obj/effect/alien/resin/attack_hand()
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
usr << "\blue You easily destroy the [name]."
for(var/mob/O in oviewers(src))
O.show_message("\red [usr] destroys the [name]!", 1)
health = 0
healthcheck()
return
/obj/effect/alien/resin/attack_paw()
return attack_hand()
/obj/effect/alien/resin/attack_alien()
if (islarva(usr))//Safety check for larva. /N
return
usr << "\green You claw at the [name]."
for(var/mob/O in oviewers(src))
O.show_message("\red [usr] claws at the resin!", 1)
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
health -= rand(10, 20)
if(health <= 0)
usr << "\green You slice the [name] to pieces."
for(var/mob/O in oviewers(src))
O.show_message("\red [usr] slices the [name] apart!", 1)
healthcheck()
return
/obj/effect/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob)
/*if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(isalien(user)&&(ishuman(G.affecting)||ismonkey(G.affecting)))
//Only aliens can stick humans and monkeys into resin walls. Also, the wall must not have a person inside already.
if(!affecting)
if(G.state<2)
user << "\red You need a better grip to do that!"
return
G.affecting.loc = src
G.affecting.paralysis = 10
for(var/mob/O in viewers(world.view, src))
if (O.client)
O << text("\green [] places [] in the resin wall!", G.assailant, G.affecting)
affecting=G.affecting
del(W)
spawn(0)
process()
else
user << "\red This wall is already occupied."
return */
var/aforce = W.force
health = max(0, health - aforce)
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
healthcheck()
..()
return
///obj/effect/alien/resin/process() //Buggy and irrelevant now that you're able to just make nice little infection chambers - Urist
/*if(affecting)
var/mob/living/carbon/M = affecting
var/check = 0
if(ishuman(affecting))//So they do not suicide and kill the babby.
M.verbs -= /mob/living/carbon/human/verb/suicide
else
check = 1
M.verbs -= /mob/living/carbon/monkey/verb/suicide
contents.Add(affecting)
while(!isnull(M)&&!isnull(src))//While M and wall exist
if(prob(90)&& HULK in M.mutations)//If they're the Hulk, they're getting out.
M << "You smash your way to freedom!"
break
if(prob(30))//Let's people know that someone is trapped in the resin wall.
M << "\green You feel a strange sense of calm as a flesh-like substance seems to completely envelop you."
for(var/mob/O in viewers(src, 3))
O.show_message(text("There appears to be a person stuck inside a resin wall nearby."), 1, text("You hear faint moaning somewhere about you."), 2)
if(prob(5))//MAYBE they are able to crawl out on their own. Not likely...
M << "You are able to crawl your way through the sticky mass, and out to freedom. But for how long?"
break
M.paralysis = 10//Set theis paralysis to 10 so they cannot act.
sleep(50)//To cut down on processing time
if(!isnull(src))
affecting = null
if(!isnull(M))//As long as they still exist.
if(!check)//And now they can suicide again, even if they are already dead in case they get revived.
M.verbs += /mob/living/carbon/human/verb/suicide
else
M.verbs += /mob/living/carbon/monkey/verb/suicide
for(var/mob/O in viewers(src, 3))
O.show_message(text("A body appeared from the dead resin!"), 1, text("You hear faint moaning somewhere about you."), 2)
else
for(var/mob/O in viewers(src, 3))
O.show_message(text("\red An alien larva bursts from the resin wall!"), 1, text("\red You hear a high, alien screech nearby!"), 2)*/
// return
/obj/effect/alien/resin/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 0
if(istype(mover) && mover.checkpass(PASSGLASS))
return !opacity
return !density

View File

@@ -1,108 +0,0 @@
#define NODERANGE 3
/obj/effect/alien/weeds/New()
..()
if(istype(loc, /turf/space))
del(src)
return
if(icon_state == "weeds")icon_state = pick("weeds", "weeds1", "weeds2")
spawn(rand(150,300))
if(src)
Life()
return
/obj/effect/alien/weeds/node/New()
..()
sd_SetLuminosity(NODERANGE)
return
/obj/effect/alien/weeds/proc/Life()
set background = 1
var/turf/U = get_turf(src)
/*
if (locate(/obj/movable, U))
U = locate(/obj/movable, U)
if(U.density == 1)
del(src)
return
Alien plants should do something if theres a lot of poison
if(U.poison> 200000)
health -= round(U.poison/200000)
update()
return
*/
if (istype(U, /turf/space))
del(src)
return
direction_loop:
for(var/dirn in cardinal)
var/turf/T = get_step(src, dirn)
if (!istype(T) || T.density || locate(/obj/effect/alien/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space))
continue
if(!(locate(/obj/effect/alien/weeds/node) in view(NODERANGE,T)))
continue
// if (locate(/obj/movable, T)) // don't propogate into movables
// continue
for(var/obj/O in T)
if(O.density)
continue direction_loop
new /obj/effect/alien/weeds(T)
/obj/effect/alien/weeds/ex_act(severity)
switch(severity)
if(1.0)
del(src)
if(2.0)
if (prob(50))
del(src)
if(3.0)
if (prob(5))
del(src)
return
/obj/effect/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
if(W.attack_verb.len)
visible_message("\red <B>\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
else
visible_message("\red <B>\The [src] have been attacked with \the [W][(user ? " by [user]." : ".")]")
var/damage = W.force / 4.0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
damage = 15
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
health -= damage
healthcheck()
/obj/effect/alien/weeds/proc/healthcheck()
if(health <= 0)
del(src)
/obj/effect/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
health -= 5
healthcheck()
/*/obj/effect/alien/weeds/burn(fi_amount)
if (fi_amount > 18000)
spawn( 0 )
del(src)
return
return 0
return 1
*/
#undef NODRANGE

View File

@@ -718,7 +718,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
useMS = MS
break
var/datum/signal/signal = telecomms_process()
var/datum/signal/signal = src.telecomms_process()
var/useTC = 0
if(signal)

View File

@@ -1,3 +1,4 @@
<<<<<<< HEAD
//This could either be split into the proper DM files or placed somewhere else all together, but it'll do for now -Nodrak
/*
@@ -407,3 +408,388 @@ A list of items and costs is stored under the datum of every game mode, alongsid
=======
//This could either be split into the proper DM files or placed somewhere else all together, but it'll do for now -Nodrak
/*
SYNDICATE UPLINKS
TO-DO:
Once wizard is fixed, make sure the uplinks work correctly for it. wizard.dm is right now uncompiled and with broken code in it.
Clean the code up and comment it. Part of it is right now copy-pasted, with the general Topic() and modifications by Abi79.
I should take a more in-depth look at both the copy-pasted code for the individual uplinks below, and at each gamemode's code
to see how uplinks are assigned and if there are any bugs with those.
A list of items and costs is stored under the datum of every game mode, alongside the number of crystals, and the welcoming message.
*/
/obj/item/device/uplink
var/welcome // Welcoming menu message
var/items // List of items
var/item_data // raw item text
var/list/ItemList // Parsed list of items
var/uses // Numbers of crystals
// List of items not to shove in their hands.
var/list/NotInHand = list(/obj/machinery/singularity_beacon/syndicate)
/obj/item/device/uplink/New()
welcome = ticker.mode.uplink_welcome
if(!item_data)
items = dd_replacetext(ticker.mode.uplink_items, "\n", "") // Getting the text string of items
else
items = dd_replacetext(item_data)
ItemList = dd_text2list(src.items, ";") // Parsing the items text string
uses = ticker.mode.uplink_uses
//Let's build a menu!
/obj/item/device/uplink/proc/generate_menu()
var/dat = "<B>[src.welcome]</B><BR>"
dat += "Tele-Crystals left: [src.uses]<BR>"
dat += "<HR>"
dat += "<B>Request item:</B><BR>"
dat += "<I>Each item costs a number of tele-crystals as indicated by the number following their name.</I><br><BR>"
var/cost
var/item
var/name
var/path_obj
var/path_text
var/category_items = 1 //To prevent stupid :P
for(var/D in ItemList)
var/list/O = stringsplit(D, ":")
if(O.len != 3) //If it is not an actual item, make a break in the menu.
if(O.len == 1) //If there is one item, it's probably a title
dat += "<b>[O[1]]</b><br>"
category_items = 0
else //Else, it's a white space.
if(category_items < 1) //If there were no itens in the last category...
dat += "<i>We apologize, as you could not afford anything from this category.</i><br>"
dat += "<br>"
continue
path_text = O[1]
cost = text2num(O[2])
if(cost>uses)
continue
path_obj = text2path(path_text)
item = new path_obj()
name = O[3]
del item
dat += "<A href='byond://?src=\ref[src];buy_item=[path_text];cost=[cost]'>[name]</A> ([cost])<BR>"
category_items++
dat += "<A href='byond://?src=\ref[src];buy_item=random'>Random Item (??)</A><br>"
dat += "<HR>"
return dat
//If 'random' was selected
/obj/item/device/uplink/proc/chooseRandomItem()
var/list/randomItems = list()
//Sorry for all the ifs, but it makes it 1000 times easier for other people/servers to add or remove items from this list
//Add only items the player can afford:
if(uses > 19)
randomItems.Add("/obj/item/weapon/circuitboard/teleporter") //Teleporter Circuit Board (costs 20, for nuke ops)
if(uses > 9)
randomItems.Add("/obj/item/toy/syndicateballoon")//Syndicate Balloon
randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_uplink") //Uplink Implanter
randomItems.Add("/obj/item/weapon/storage/box/syndicate") //Syndicate bundle
//if(uses > 8) //Nothing... yet.
//if(uses > 7) //Nothing... yet.
if(uses > 6)
randomItems.Add("/obj/item/weapon/aiModule/syndicate") //Hacked AI Upload Module
randomItems.Add("/obj/item/device/radio/beacon/syndicate") //Singularity Beacon
if(uses > 5)
randomItems.Add("/obj/item/weapon/gun/projectile") //Revolver
if(uses > 4)
randomItems.Add("/obj/item/weapon/gun/energy/crossbow") //Energy Crossbow
randomItems.Add("/obj/item/device/powersink") //Powersink
if(uses > 3)
randomItems.Add("/obj/item/weapon/melee/energy/sword") //Energy Sword
randomItems.Add("/obj/item/clothing/mask/gas/voice") //Voice Changer
randomItems.Add("/obj/item/device/chameleon") //Chameleon Projector
if(uses > 2)
randomItems.Add("/obj/item/weapon/storage/emp_kit") //EMP Grenades
randomItems.Add("/obj/item/weapon/pen/paralysis") //Paralysis Pen
randomItems.Add("/obj/item/weapon/cartridge/syndicate") //Detomatix Cartridge
randomItems.Add("/obj/item/clothing/under/chameleon") //Chameleon Jumpsuit
randomItems.Add("/obj/item/weapon/card/id/syndicate") //Agent ID Card
randomItems.Add("/obj/item/weapon/card/emag") //Cryptographic Sequencer
randomItems.Add("/obj/item/weapon/storage/syndie_kit/space") //Syndicate Space Suit
randomItems.Add("/obj/item/device/encryptionkey/binary") //Binary Translator Key
randomItems.Add("/obj/item/weapon/storage/syndie_kit/imp_freedom") //Freedom Implant
randomItems.Add("/obj/item/clothing/glasses/thermal/syndi") //Thermal Imaging Goggles
if(uses > 1)
/*
var/list/usrItems = usr.get_contents() //Checks to see if the user has a revolver before giving ammo
var/hasRevolver = 0
for(var/obj/I in usrItems) //Only add revolver ammo if the user has a gun that can shoot it
if(istype(I,/obj/item/weapon/gun/projectile))
hasRevolver = 1
if(hasRevolver) randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo
*/
randomItems.Add("/obj/item/ammo_magazine/a357") //Revolver ammo
randomItems.Add("/obj/item/clothing/shoes/syndigaloshes") //No-Slip Syndicate Shoes
randomItems.Add("/obj/item/weapon/plastique") //C4
if(uses > 0)
randomItems.Add("/obj/item/weapon/soap/syndie") //Syndicate Soap
randomItems.Add("/obj/item/weapon/storage/toolbox/syndicate") //Syndicate Toolbox
if(!randomItems.len)
del(randomItems)
return 0
else
var/buyItem = pick(randomItems)
switch(buyItem) //Ok, this gets a little messy, sorry.
if("/obj/item/weapon/circuitboard/teleporter")
uses -= 20
if("/obj/item/toy/syndicateballoon" , "/obj/item/weapon/storage/syndie_kit/imp_uplink" , "/obj/item/weapon/storage/box/syndicate")
uses -= 10
if("/obj/item/weapon/aiModule/syndicate" , "/obj/item/device/radio/beacon/syndicate")
uses -= 7
if("/obj/item/weapon/gun/projectile")
uses -= 6
if("/obj/item/weapon/gun/energy/crossbow" , "/obj/item/device/powersink")
uses -= 5
if("/obj/item/weapon/melee/energy/sword" , "/obj/item/clothing/mask/gas/voice" , "/obj/item/device/chameleon")
uses -= 4
if("/obj/item/weapon/storage/emp_kit" , "/obj/item/weapon/pen/paralysis" , "/obj/item/weapon/cartridge/syndicate" , "/obj/item/clothing/under/chameleon" , \
"/obj/item/weapon/card/id/syndicate" , "/obj/item/weapon/card/emag" , "/obj/item/weapon/storage/syndie_kit/space" , "/obj/item/device/encryptionkey/binary" , \
"/obj/item/weapon/storage/syndie_kit/imp_freedom" , "/obj/item/clothing/glasses/thermal/syndi")
uses -= 3
if("/obj/item/ammo_magazine/a357" , "/obj/item/clothing/shoes/syndigaloshes" , "/obj/item/weapon/plastique")
uses -= 2
if("/obj/item/weapon/soap/syndie" , "/obj/item/weapon/storage/toolbox/syndicate")
uses -= 1
del(randomItems)
return buyItem
/obj/item/device/uplink/proc/handleStatTracking(var/boughtItem)
//For stat tracking, sorry for making it so ugly
if(!boughtItem) return
switch(boughtItem)
if("/obj/item/weapon/circuitboard/teleporter")
feedback_add_details("traitor_uplink_items_bought","TP")
if("/obj/item/toy/syndicateballoon")
feedback_add_details("traitor_uplink_items_bought","BS")
if("/obj/item/weapon/storage/syndie_kit/imp_uplink")
feedback_add_details("traitor_uplink_items_bought","UI")
if("/obj/item/weapon/storage/box/syndicate")
feedback_add_details("traitor_uplink_items_bought","BU")
if("/obj/item/weapon/aiModule/syndicate")
feedback_add_details("traitor_uplink_items_bought","AI")
if("/obj/item/device/radio/beacon/syndicate")
feedback_add_details("traitor_uplink_items_bought","SB")
if("/obj/item/weapon/gun/projectile")
feedback_add_details("traitor_uplink_items_bought","RE")
if("/obj/item/weapon/gun/energy/crossbow")
feedback_add_details("traitor_uplink_items_bought","XB")
if("/obj/item/device/powersink")
feedback_add_details("traitor_uplink_items_bought","PS")
if("/obj/item/weapon/melee/energy/sword")
feedback_add_details("traitor_uplink_items_bought","ES")
if("/obj/item/clothing/mask/gas/voice")
feedback_add_details("traitor_uplink_items_bought","VC")
if("/obj/item/device/chameleon")
feedback_add_details("traitor_uplink_items_bought","CP")
if("/obj/item/weapon/storage/emp_kit")
feedback_add_details("traitor_uplink_items_bought","EM")
if("/obj/item/weapon/pen/paralysis")
feedback_add_details("traitor_uplink_items_bought","PP")
if("/obj/item/weapon/cartridge/syndicate")
feedback_add_details("traitor_uplink_items_bought","DC")
if("/obj/item/clothing/under/chameleon")
feedback_add_details("traitor_uplink_items_bought","CJ")
if("/obj/item/weapon/card/id/syndicate")
feedback_add_details("traitor_uplink_items_bought","AC")
if("/obj/item/weapon/card/emag")
feedback_add_details("traitor_uplink_items_bought","EC")
if("/obj/item/weapon/storage/syndie_kit/space")
feedback_add_details("traitor_uplink_items_bought","SS")
if("/obj/item/device/encryptionkey/binary")
feedback_add_details("traitor_uplink_items_bought","BT")
if("/obj/item/weapon/storage/syndie_kit/imp_freedom")
feedback_add_details("traitor_uplink_items_bought","FI")
if("/obj/item/clothing/glasses/thermal/syndi")
feedback_add_details("traitor_uplink_items_bought","TM")
if("/obj/item/ammo_magazine/a357")
feedback_add_details("traitor_uplink_items_bought","RA")
if("/obj/item/clothing/shoes/syndigaloshes")
feedback_add_details("traitor_uplink_items_bought","SH")
if("/obj/item/weapon/plastique")
feedback_add_details("traitor_uplink_items_bought","C4")
if("/obj/item/weapon/soap/syndie")
feedback_add_details("traitor_uplink_items_bought","SP")
if("/obj/item/weapon/storage/toolbox/syndicate")
feedback_add_details("traitor_uplink_items_bought","ST")
/obj/item/device/uplink/Topic(href, href_list)
if (href_list["buy_item"])
if(href_list["buy_item"] == "random")
var/boughtItem = chooseRandomItem()
if(boughtItem)
href_list["buy_item"] = boughtItem
feedback_add_details("traitor_uplink_items_bought","RN")
return 1
else
return 0
else
if(text2num(href_list["cost"]) > uses) // Not enough crystals for the item
return 0
//if(usr:mind && ticker.mode.traitors[usr:mind])
//var/datum/traitorinfo/info = ticker.mode.traitors[usr:mind]
//info.spawnlist += href_list["buy_item"]
uses -= text2num(href_list["cost"])
handleStatTracking(href_list["buy_item"]) //Note: chooseRandomItem handles it's own stat tracking. This proc is not meant for 'random'.
return 1
// HIDDEN UPLINK - Can be stored in anything but the host item has to have a trigger for it.
/* How to create an uplink in 3 easy steps!
1. All obj/item 's have a hidden_uplink var. By default it's null. Give the item one with "new(src)", it must be in it's contents. Feel free to add "uses".
2. Code in the triggers. Use check_trigger for this, I recommend closing the item's menu with "usr << browse(null, "window=windowname") if it returns true.
The var/value is the value that will be compared with the var/target. If they are equal it will activate the menu.
3. If you want the menu to stay until the users locks his uplink, add an active_uplink_check(mob/user as mob) in your interact/attack_hand proc.
Then check if it's true, if true return. This will stop the normal menu appearing and will instead show the uplink menu.
*/
/obj/item/device/uplink/hidden
name = "Hidden Uplink."
desc = "There is something wrong if you're examining this."
var/active = 0
// The hidden uplink MUST be inside an obj/item's contents.
/obj/item/device/uplink/hidden/New()
spawn(2)
if(!istype(src.loc, /obj/item))
del(src)
..()
// Toggles the uplink on and off. Normally this will bypass the item's normal functions and go to the uplink menu, if activated.
/obj/item/device/uplink/hidden/proc/toggle()
active = !active
// Directly trigger the uplink. Turn on if it isn't already.
/obj/item/device/uplink/hidden/proc/trigger(mob/user as mob)
if(!active)
toggle()
interact(user)
// Checks to see if the value meets the target. Like a frequency being a traitor_frequency, in order to unlock a headset.
// If true, it accesses trigger() and returns 1. If it fails, it returns false. Use this to see if you need to close the
// current item's menu.
/obj/item/device/uplink/hidden/proc/check_trigger(mob/user as mob, var/value, var/target)
if(value == target)
trigger(user)
return 1
return 0
// Interaction code. Gathers a list of items purchasable from the paren't uplink and displays it. It also adds a lock button.
/obj/item/device/uplink/hidden/proc/interact(mob/user as mob)
var/dat = "<body link='yellow' alink='white' bgcolor='#601414'><font color='white'>"
dat += src.generate_menu()
dat += "<A href='byond://?src=\ref[src];lock=1'>Lock</a>"
dat += "</font></body>"
user << browse(dat, "window=hidden")
onclose(user, "hidden")
return
// The purchasing code.
/obj/item/device/uplink/hidden/Topic(href, href_list)
if (usr.stat || usr.restrained())
return
if (!( istype(usr, /mob/living/carbon/human)))
return 0
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
usr.machine = src
if(href_list["lock"])
toggle()
usr << browse(null, "window=hidden")
return 1
if(..(href, href_list) == 1)
var/path_obj = text2path(href_list["buy_item"])
var/obj/I = new path_obj(get_turf(usr))
if(ishuman(usr))
var/mob/living/carbon/human/A = usr
A.put_in_any_hand_if_possible(I)
interact(usr)
return
// I placed this here because of how relevant it is.
// You place this in your uplinkable item to check if an uplink is active or not.
// If it is, it will display the uplink menu and return 1, else it'll return false.
// If it returns true, I recommend closing the item's normal menu with "user << browse(null, "window=name")"
/obj/item/proc/active_uplink_check(mob/user as mob)
// Activates the uplink if it's active
if(src.hidden_uplink)
if(src.hidden_uplink.active)
src.hidden_uplink.trigger(user)
return 1
return 0
// PRESET UPLINKS
// A collection of preset uplinks.
//
// Includes normal radio uplink, multitool uplink,
// implant uplink (not the implant tool) and a preset headset uplink.
/obj/item/device/radio/uplink/New()
hidden_uplink = new(src)
/obj/item/device/radio/uplink/attack_self(mob/user as mob)
if(hidden_uplink)
hidden_uplink.trigger(user)
/obj/item/device/multitool/uplink/New()
hidden_uplink = new(src)
/obj/item/device/multitool/uplink/attack_self(mob/user as mob)
if(hidden_uplink)
hidden_uplink.trigger(user)
/obj/item/device/radio/headset/uplink
traitor_frequency = 1445
/obj/item/device/radio/headset/uplink/New()
..()
hidden_uplink = new(src)
hidden_uplink.uses = 10
>>>>>>> remotes/git-svn

View File

@@ -0,0 +1,421 @@
/* Alien Effects!
* Contains:
* effect/alien
* Resin
* Weeds
* Acid
* Egg
*/
/*
* effect/alien
*/
/obj/effect/alien
name = "alien thing"
desc = "theres something alien about this"
icon = 'icons/mob/alien.dmi'
// unacidable = 1 //Aliens won't ment their own.
/*
* Resin
*/
/obj/effect/alien/resin
name = "resin"
desc = "Looks like some kind of slimy growth."
icon_state = "resin"
density = 1
opacity = 1
anchored = 1
var/health = 50
//var/mob/living/affecting = null
wall
name = "resin wall"
desc = "Purple slime solidified into a wall."
icon_state = "resinwall" //same as resin, but consistency ho!
membrane
name = "resin membrane"
desc = "Purple slime just thin enough to let light pass through."
icon_state = "resinmembrane"
opacity = 0
health = 20
/obj/effect/alien/resin/proc/healthcheck()
if(health <=0)
density = 0
del(src)
return
/obj/effect/alien/resin/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
..()
healthcheck()
return
/obj/effect/alien/resin/ex_act(severity)
switch(severity)
if(1.0)
health-=50
if(2.0)
health-=50
if(3.0)
if (prob(50))
health-=50
else
health-=25
healthcheck()
return
/obj/effect/alien/resin/blob_act()
health-=50
healthcheck()
return
/obj/effect/alien/resin/meteorhit()
health-=50
healthcheck()
return
/obj/effect/alien/resin/hitby(AM as mob|obj)
..()
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>[src] was hit by [AM].</B>", 1)
var/tforce = 0
if(ismob(AM))
tforce = 10
else
tforce = AM:throwforce
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
health = max(0, health - tforce)
healthcheck()
..()
return
/obj/effect/alien/resin/attack_hand()
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
usr << "\blue You easily destroy the [name]."
for(var/mob/O in oviewers(src))
O.show_message("\red [usr] destroys the [name]!", 1)
health = 0
healthcheck()
return
/obj/effect/alien/resin/attack_paw()
return attack_hand()
/obj/effect/alien/resin/attack_alien()
if (islarva(usr))//Safety check for larva. /N
return
usr << "\green You claw at the [name]."
for(var/mob/O in oviewers(src))
O.show_message("\red [usr] claws at the resin!", 1)
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
health -= rand(10, 20)
if(health <= 0)
usr << "\green You slice the [name] to pieces."
for(var/mob/O in oviewers(src))
O.show_message("\red [usr] slices the [name] apart!", 1)
healthcheck()
return
/obj/effect/alien/resin/attackby(obj/item/weapon/W as obj, mob/user as mob)
/*if (istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2)
var/obj/item/weapon/grab/G = W
if(isalien(user)&&(ishuman(G.affecting)||ismonkey(G.affecting)))
//Only aliens can stick humans and monkeys into resin walls. Also, the wall must not have a person inside already.
if(!affecting)
if(G.state<2)
user << "\red You need a better grip to do that!"
return
G.affecting.loc = src
G.affecting.paralysis = 10
for(var/mob/O in viewers(world.view, src))
if (O.client)
O << text("\green [] places [] in the resin wall!", G.assailant, G.affecting)
affecting=G.affecting
del(W)
spawn(0)
process()
else
user << "\red This wall is already occupied."
return */
var/aforce = W.force
health = max(0, health - aforce)
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
healthcheck()
..()
return
/obj/effect/alien/resin/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 0
if(istype(mover) && mover.checkpass(PASSGLASS))
return !opacity
return !density
/*
* Weeds
*/
#define NODERANGE 3
/obj/effect/alien/weeds
name = "weeds"
desc = "Weird purple weeds."
icon_state = "weeds"
anchored = 1
density = 0
var/health = 50
node
icon_state = "weednode"
name = "purple sac"
desc = "Weird purple octopus-like thing."
/obj/effect/alien/weeds/New()
..()
if(istype(loc, /turf/space))
del(src)
return
if(icon_state == "weeds")icon_state = pick("weeds", "weeds1", "weeds2")
spawn(rand(150,300))
if(src)
Life()
return
/obj/effect/alien/weeds/node/New()
..()
sd_SetLuminosity(NODERANGE)
return
/obj/effect/alien/weeds/proc/Life()
set background = 1
var/turf/U = get_turf(src)
/*
if (locate(/obj/movable, U))
U = locate(/obj/movable, U)
if(U.density == 1)
del(src)
return
Alien plants should do something if theres a lot of poison
if(U.poison> 200000)
health -= round(U.poison/200000)
update()
return
*/
if (istype(U, /turf/space))
del(src)
return
direction_loop:
for(var/dirn in cardinal)
var/turf/T = get_step(src, dirn)
if (!istype(T) || T.density || locate(/obj/effect/alien/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space))
continue
if(!(locate(/obj/effect/alien/weeds/node) in view(NODERANGE,T)))
continue
// if (locate(/obj/movable, T)) // don't propogate into movables
// continue
for(var/obj/O in T)
if(O.density)
continue direction_loop
new /obj/effect/alien/weeds(T)
/obj/effect/alien/weeds/ex_act(severity)
switch(severity)
if(1.0)
del(src)
if(2.0)
if (prob(50))
del(src)
if(3.0)
if (prob(5))
del(src)
return
/obj/effect/alien/weeds/attackby(var/obj/item/weapon/W, var/mob/user)
if(W.attack_verb.len)
visible_message("\red <B>\The [src] have been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
else
visible_message("\red <B>\The [src] have been attacked with \the [W][(user ? " by [user]." : ".")]")
var/damage = W.force / 4.0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
damage = 15
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
health -= damage
healthcheck()
/obj/effect/alien/weeds/proc/healthcheck()
if(health <= 0)
del(src)
/obj/effect/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
health -= 5
healthcheck()
/*/obj/effect/alien/weeds/burn(fi_amount)
if (fi_amount > 18000)
spawn( 0 )
del(src)
return
return 0
return 1
*/
#undef NODERANGE
/*
* Acid
*/
/obj/effect/alien/acid
name = "acid"
desc = "Burbling corrossive stuff. I wouldn't want to touch it."
icon_state = "acid"
density = 0
opacity = 0
anchored = 1
var/obj/target
var/ticks = 0
/obj/effect/alien/acid/proc/tick()
ticks += 1
for(var/mob/O in hearers(src, null))
O.show_message("\green <B>[src.target] sizzles and begins to melt under the bubbling mess of acid!</B>", 1)
if(prob(ticks*10))
for(var/mob/O in hearers(src, null))
O.show_message("\green <B>[src.target] collapses under its own weight into a puddle of goop and undigested debris!</B>", 1)
// if(target.occupant) //I tried to fix mechas-with-humans-getting-deleted. Made them unacidable for now.
// target.ex_act(1)
del(target)
del(src)
return
spawn(rand(200, 600)) tick()
/*
* Egg
*/
/var/const //for the status var
BURST = 0
GROWING = 1
GROWN = 2
MIN_GROWTH_TIME = 1800 //time it takes to grow a hugger
MAX_GROWTH_TIME = 3000
/obj/effect/alien/egg
desc = "It looks like a weird egg"
name = "egg"
icon_state = "egg_growing"
density = 0
anchored = 1
var/health = 100
var/status = GROWING //can be GROWING, GROWN or BURST; all mutually exclusive
New()
if(aliens_allowed)
..()
spawn(rand(MIN_GROWTH_TIME,MAX_GROWTH_TIME))
Grow()
else
del(src)
attack_paw(user as mob)
if(isalien(user))
switch(status)
if(BURST)
user << "\red The child is already gone."
return
if(GROWING)
user << "\red The child is not developed yet."
return
if(GROWN)
user << "\red You retrieve the child."
loc.contents += GetFacehugger()//need to write the code for giving it to the alien later
Burst()
return
else
return attack_hand(user)
attack_hand(user as mob)
user << "It feels slimy."
return
proc/GetFacehugger()
return locate(/obj/item/clothing/mask/facehugger) in contents
proc/Grow()
icon_state = "egg"
status = GROWN
new /obj/item/clothing/mask/facehugger(src)
return
proc/Burst() //drops and kills the hugger if any is remaining
var/obj/item/clothing/mask/facehugger/child = GetFacehugger()
if(child)
loc.contents += child
child.Die()
icon_state = "egg_hatched"
status = BURST
return
/obj/effect/alien/egg/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
..()
healthcheck()
return
/obj/effect/alien/egg/attackby(var/obj/item/weapon/W, var/mob/user)
if(health <= 0)
return
if(W.attack_verb.len)
src.visible_message("\red <B>\The [src] has been [pick(W.attack_verb)] with \the [W][(user ? " by [user]." : ".")]")
else
src.visible_message("\red <B>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
var/damage = W.force / 4.0
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
damage = 15
playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
src.health -= damage
src.healthcheck()
/obj/effect/alien/egg/proc/healthcheck()
if(health <= 0)
Burst()
/obj/effect/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 500)
health -= 5
healthcheck()

View File

@@ -0,0 +1,85 @@
/obj/effect/mine/New()
icon_state = "uglyminearmed"
/obj/effect/mine/HasEntered(AM as mob|obj)
Bumped(AM)
/obj/effect/mine/Bumped(mob/M as mob|obj)
if(triggered) return
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))
for(var/mob/O in viewers(world.view, src.loc))
O << "<font color='red'>[M] triggered the \icon[src] [src]</font>"
triggered = 1
call(src,triggerproc)(M)
/obj/effect/mine/proc/triggerrad(obj)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
obj:radiation += 50
randmutb(obj)
domutcheck(obj,null)
spawn(0)
del(src)
/obj/effect/mine/proc/triggerstun(obj)
if(ismob(obj))
var/mob/M = obj
M.Stun(30)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
spawn(0)
del(src)
/obj/effect/mine/proc/triggern2o(obj)
//example: n2o triggerproc
//note: im lazy
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
if(target.parent)
target.parent.suspend_group_processing()
var/datum/gas_mixture/payload = new
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = 30
payload += trace_gas
target.air.merge(payload)
spawn(0)
del(src)
/obj/effect/mine/proc/triggerplasma(obj)
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
if(target.parent)
target.parent.suspend_group_processing()
var/datum/gas_mixture/payload = new
payload.toxins = 30
target.air.merge(payload)
target.hotspot_expose(1000, CELL_VOLUME)
spawn(0)
del(src)
/obj/effect/mine/proc/triggerkick(obj)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
del(obj:client)
spawn(0)
del(src)
/obj/effect/mine/proc/explode(obj)
explosion(loc, 0, 1, 2, 3)
spawn(0)
del(src)

View File

@@ -1,5 +1,7 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
//Moving this here for now.. it might end up in modules/mob/ later
var/const/MIN_IMPREGNATION_TIME = 100 //time it takes to impregnate someone
var/const/MAX_IMPREGNATION_TIME = 150

View File

@@ -43,7 +43,7 @@
stage = 2
else
user << "\red You need to add at least one beaker before locking the assembly."
else if ((istype(W,/obj/item/weapon/reagent_containers/glass/beaker)||istype(W,/obj/item/weapon/reagent_containers/glass/dispenser)||istype(W,/obj/item/weapon/reagent_containers/glass/bottle)) && stage == 1 && path != 2)
else if((istype(W,/obj/item/weapon/reagent_containers/glass/beaker) || istype(W,/obj/item/weapon/reagent_containers/glass/bottle)) && stage == 1 && path != 2)
path = 1
if(beakers.len == 2)
user << "\red The grenade can not hold more containers."

View File

@@ -7,7 +7,10 @@
/obj/item/weapon/bedsheet/attack_self(mob/user as mob)
user.drop_item()
src.layer = 5
if(layer == initial(layer))
layer = 5
else
layer = initial(layer)
add_fingerprint(user)
return

View File

@@ -106,6 +106,9 @@ ZIPPO
if(M.lit > 0)
light("\red [user] lights their [name] with their [W].")
else if(istype(W, /obj/item/device/assembly/igniter))
light("\red [user] fiddles with [W], and manages to light their [name].")
//can't think of any other way to update the overlays :<
user.update_inv_wear_mask(0)
user.update_inv_l_hand(0)

View File

@@ -0,0 +1,23 @@
/obj/item/weapon/implant/uplink
name = "uplink"
desc = "Summon things."
var/activation_emote = "chuckle"
/obj/item/weapon/implant/uplink/New()
activation_emote = pick("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
hidden_uplink = new(src)
hidden_uplink.uses = 5
..()
return
/obj/item/weapon/implant/uplink/implanted(mob/source)
activation_emote = input("Choose activation emote:") in list("blink", "blink_r", "eyebrow", "chuckle", "twitch_s", "frown", "nod", "blush", "giggle", "grin", "groan", "shrug", "smile", "pale", "sniff", "whimper", "wink")
source.mind.store_memory("Uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate.", 0, 0)
source << "The implanted uplink implant can be activated by using the [src.activation_emote] emote, <B>say *[src.activation_emote]</B> to attempt to activate."
return 1
/obj/item/weapon/implant/uplink/trigger(emote, mob/source as mob)
if(hidden_uplink && usr == source) // Let's not have another people activate our uplink
hidden_uplink.check_trigger(source, emote, activation_emote)
return

View File

@@ -0,0 +1,94 @@
/obj/item/weapon/mousetrap/examine()
set src in oview(12)
..()
if(armed)
usr << "\red It looks like it's armed."
/obj/item/weapon/mousetrap/proc/triggered(mob/target as mob, var/type = "feet")
if(!armed)
return
var/datum/organ/external/affecting = null
if(ishuman(target))
var/mob/living/carbon/human/H = target
switch(type)
if("feet")
if(!H.shoes)
affecting = H.get_organ(pick("l_leg", "r_leg"))
H.Weaken(3)
if("l_hand", "r_hand")
if(!H.gloves)
affecting = H.get_organ(type)
H.Stun(3)
if(affecting)
if(affecting.take_damage(1, 0))
H.UpdateDamageIcon()
H.updatehealth()
else if(ismouse(target))
var/mob/living/simple_animal/mouse/M = target
src.visible_message("\red <b>SPLAT!</b>")
M.splat()
playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
icon_state = "mousetrap"
armed = 0
/*
else if (ismouse(target))
target.adjustBruteLoss(100)
*/
/obj/item/weapon/mousetrap/attack_self(mob/living/user as mob)
if(!armed)
icon_state = "mousetraparmed"
user << "\blue You arm the mousetrap."
else
icon_state = "mousetrap"
if(( (user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50)))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
src.triggered(user, which_hand)
user << "\red <B>You accidentally trigger the mousetrap!</B>"
for(var/mob/O in viewers(user, null))
if(O == user)
continue
O.show_message("\red <B>[user] accidentally sets off the mousetrap, breaking their fingers.</B>", 1)
return
user << "\blue You disarm the mousetrap."
armed = !armed
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
/obj/item/weapon/mousetrap/attack_hand(mob/living/user as mob)
if(armed)
if(( (user.getBrainLoss() >= 60 || CLUMSY in user.mutations)) && prob(50))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
src.triggered(user, which_hand)
user << "\red <B>You accidentally trigger the mousetrap!</B>"
for(var/mob/O in viewers(user, null))
if(O == user)
continue
O.show_message("\red <B>[user] accidentally sets off the mousetrap, breaking their fingers.</B>", 1)
return
..()
/obj/item/weapon/mousetrap/HasEntered(AM as mob|obj)
if(armed)
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.m_intent == "run")
src.triggered(H)
H << "\red <B>You accidentally step on the mousetrap!</B>"
for(var/mob/O in viewers(H, null))
if(O == H)
continue
O.show_message("\red <B>[H] accidentally steps on the mousetrap.</B>", 1)
if(ismouse(AM))
triggered(AM)
..()
/obj/item/weapon/mousetrap/hitby(A as mob|obj)
if(!armed)
return ..()
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>The mousetrap is triggered by [A].</B>", 1)
src.triggered(null)

View File

@@ -1,5 +1,6 @@
/*
CONTAINS:
BANHAMMER
SWORD
BLADE
AXE
@@ -7,8 +8,10 @@ CLASSIC BATON
ENERGY SHIELD (where else should i even put this)
*/
//BANHAMMER
/obj/item/weapon/banhammer/attack(mob/M as mob, mob/user as mob)
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>"
user << "<font color='red'> You have <b>BANNED</b> [M]</font>"
// SWORD
/obj/item/weapon/melee/energy/sword/IsShield()

View File

@@ -33,6 +33,7 @@
return 0
if (!(src.wires & WIRE_RECEIVE))
return 0
if(level != 0)
var/turf/position = get_turf(src)
if(isnull(position) || position.z != level)
return 0

View File

@@ -598,6 +598,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if (!(wires & WIRE_RECEIVE))
return 0
if(!listening)
return 0
if(level != 0)
var/turf/position = get_turf(src)
if(isnull(position) || position.z != level)
return 0

View File

@@ -1,61 +1,3 @@
// TARGET STAKE
// TARGET
// Basically they are for the firing range
/obj/structure/target_stake
name = "target stake"
desc = "A thin platform with negatively-magnetized wheels."
icon = 'icons/obj/objects.dmi'
icon_state = "target_stake"
density = 1
flags = CONDUCT
var/obj/item/target/pinned_target // the current pinned target
Move()
..()
// Move the pinned target along with the stake
if(pinned_target in view(3, src))
pinned_target.loc = loc
else // Sanity check: if the pinned target can't be found in immediate view
pinned_target = null
density = 1
attackby(obj/item/W as obj, mob/user as mob)
// Putting objects on the stake. Most importantly, targets
if(pinned_target)
return // get rid of that pinned target first!
if(istype(W, /obj/item/target))
density = 0
W.density = 1
user.drop_item(src)
W.loc = loc
W.layer = 3.1
pinned_target = W
user << "You slide the target into the stake."
return
attack_hand(mob/user as mob)
// taking pinned targets off!
if(pinned_target)
density = 1
pinned_target.density = 0
pinned_target.layer = OBJ_LAYER
pinned_target.loc = user.loc
if(ishuman(user))
if(!user.get_active_hand())
user.put_in_hands(pinned_target)
user << "You take the target out of the stake."
else
pinned_target.loc = get_turf_loc(user)
user << "You take the target out of the stake."
pinned_target = null
// Targets, the things that actually get shot!
/obj/item/target
name = "shooting target"
@@ -237,13 +179,3 @@
b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
Target.bulletholes.Add(src)

View File

@@ -212,49 +212,3 @@
else
return 0
return 0
/*if(ishuman(user)) //Let's check if the guy's wearing electrically insulated gloves --Agourimarkan
var/mob/living/carbon/human/H = user
if(H.gloves)
var/obj/item/clothing/gloves/G = H.gloves
if(istype(G,/obj/item/clothing/gloves/yellow) ) //Business as usual for guys with gloves
src.health -= W.force * 0.2
else // Guy has gloves, not electrically insulated ones
var/outcome = pick(1,2,3)
switch(outcome) // 3 possible outcomes
if(1) //Guy gets shocked. If not electrified, cause damage.
if(shock(user,100))
return
else
src.health -= W.force *0.2
if(2) //Shard breaks
user << "<font color='blue'>The shard breaks!</font>"
del W
return
if(3) //You somehow manage to damage the grille. Beefin' up the damage, a bit. Instead of doing 10% damage it now does... 20% of the shard's force? Yeah, 20% sounds good at 66% chance of failure.
src.health -=W.force *0.2
else //SHIT SON, GUY DOESN'T HAVE ANY GLOVES
var/outcome = pick(1,2,3)
switch(outcome)
if(1) // Let's see, the guy damages it but takes some damage back
user << "<font color='red'>You cut yourself with the shard as you hit the grille!</font>"
src.health -= W.force *0.2
var/brutedamagetaken = rand(3,6)
H.take_organ_damage(brutedamagetaken,0)
if(2) //Guy gets shocked. If not electrified, apply damage
if(shock(user,100))
return
else
src.health -= W.force *0.2
if(3) // It breaks in his hands. Ouch.
user << "<font color='red'>As you smash the grille the shard breaks into smithereens in your palm!</font>"
src.health -= W.force *0.2
del(W)
var/brutedamagetaken = rand(5,8)
H.take_organ_damage(brutedamagetaken,0)
return
else //Alright, he's not a human. Can monkeys or aliens even wear gloves?
src.health -= W.force *0.1*/ //10% damage only for non-glorious human master race members

View File

@@ -0,0 +1,52 @@
// Basically they are for the firing range
/obj/structure/target_stake
name = "target stake"
desc = "A thin platform with negatively-magnetized wheels."
icon = 'icons/obj/objects.dmi'
icon_state = "target_stake"
density = 1
flags = CONDUCT
var/obj/item/target/pinned_target // the current pinned target
Move()
..()
// Move the pinned target along with the stake
if(pinned_target in view(3, src))
pinned_target.loc = loc
else // Sanity check: if the pinned target can't be found in immediate view
pinned_target = null
density = 1
attackby(obj/item/W as obj, mob/user as mob)
// Putting objects on the stake. Most importantly, targets
if(pinned_target)
return // get rid of that pinned target first!
if(istype(W, /obj/item/target))
density = 0
W.density = 1
user.drop_item(src)
W.loc = loc
W.layer = 3.1
pinned_target = W
user << "You slide the target into the stake."
return
attack_hand(mob/user as mob)
// taking pinned targets off!
if(pinned_target)
density = 1
pinned_target.density = 0
pinned_target.layer = OBJ_LAYER
pinned_target.loc = user.loc
if(ishuman(user))
if(!user.get_active_hand())
user.put_in_hands(pinned_target)
user << "You take the target out of the stake."
else
pinned_target.loc = get_turf_loc(user)
user << "You take the target out of the stake."
pinned_target = null

View File

@@ -1,32 +0,0 @@
/obj/item/weapon/tank/oxygen
name = "Gas Tank (Oxygen)"
desc = "A tank of oxygen"
icon_state = "oxygen"
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
New()
..()
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
examine()
set src in usr
..()
if(air_contents.oxygen < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
/obj/item/weapon/tank/oxygen/yellow
name = "Gas Tank (Oxygen)"
desc = "A tank of oxygen, this one is yellow."
icon_state = "oxygen_f"
/obj/item/weapon/tank/oxygen/red
name = "Gas Tank (Oxygen)"
desc = "A tank of oxygen, this one is red."
icon_state = "oxygen_fr"

View File

@@ -0,0 +1,151 @@
/* Types of tanks!
* Contains:
* Oxygen
* Anesthetic
* Air
* Plasma
*/
/*
* Oxygen
*/
/obj/item/weapon/tank/oxygen
name = "Gas Tank (Oxygen)"
desc = "A tank of oxygen"
icon_state = "oxygen"
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
New()
..()
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
return
examine()
set src in usr
..()
if(air_contents.oxygen < 10)
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
/obj/item/weapon/tank/oxygen/yellow
name = "Gas Tank (Oxygen)"
desc = "A tank of oxygen, this one is yellow."
icon_state = "oxygen_f"
/obj/item/weapon/tank/oxygen/red
name = "Gas Tank (Oxygen)"
desc = "A tank of oxygen, this one is red."
icon_state = "oxygen_fr"
/*
* Anesthetic
*/
/obj/item/weapon/tank/anesthetic
name = "Gas Tank (Sleeping Agent)"
desc = "A N2O/O2 gas mix"
icon_state = "anesthetic"
item_state = "an_tank"
/obj/item/weapon/tank/anesthetic/New()
..()
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
var/datum/gas/sleeping_agent/trace_gas = new()
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
src.air_contents.trace_gases += trace_gas
return
/*
* Air
*/
/obj/item/weapon/tank/air
name = "Gas Tank (Air Mix)"
desc = "Mixed anyone?"
icon_state = "oxygen"
examine()
set src in usr
..()
if(air_contents.oxygen < 1 && loc==usr)
usr << "\red <B>The meter on the [src.name] indicates you are almost out of air!</B>"
usr << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/air/New()
..()
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
src.air_contents.nitrogen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/*
* Plasma
*/
/obj/item/weapon/tank/plasma
name = "Gas Tank (BIOHAZARD)"
desc = "Contains dangerous plasma. Do not inhale."
icon_state = "plasma"
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = null //they have no straps!
/obj/item/weapon/tank/plasma/New()
..()
src.air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/plasma/proc/release()
var/datum/gas_mixture/removed = air_contents.remove(air_contents.total_moles())
loc.assume_air(removed)
/obj/item/weapon/tank/plasma/proc/ignite()
var/fuel_moles = air_contents.toxins + air_contents.oxygen/6
var/strength = 1
var/turf/ground_zero = get_turf(loc)
loc = null
if(air_contents.temperature > (T0C + 400))
strength = fuel_moles/15
explosion(ground_zero, strength, strength*2, strength*3, strength*4)
else if(air_contents.temperature > (T0C + 250))
strength = fuel_moles/20
explosion(ground_zero, 0, strength, strength*2, strength*3)
else if(air_contents.temperature > (T0C + 100))
strength = fuel_moles/25
explosion(ground_zero, 0, 0, strength, strength*3)
else
ground_zero.assume_air(air_contents)
ground_zero.hotspot_expose(1000, 125)
if(src.master)
del(src.master)
del(src)
/obj/item/weapon/tank/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/flamethrower))
var/obj/item/weapon/flamethrower/F = W
if ((!F.status)||(F.ptank)) return
src.master = F
F.ptank = src
user.before_take_item(src)
src.loc = F
return

View File

@@ -1,10 +1,6 @@
/obj/item/weapon/tank
name = "tank"
icon = 'icons/obj/tank.dmi'
var/datum/gas_mixture/air_contents = null
var/distribute_pressure = ONE_ATMOSPHERE
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BACK
@@ -14,37 +10,58 @@
throwforce = 10.0
throw_speed = 1
throw_range = 4
var/datum/gas_mixture/air_contents = null
var/distribute_pressure = ONE_ATMOSPHERE
var/integrity = 3
var/volume = 70
/obj/item/weapon/tank/anesthetic
name = "Gas Tank (Sleeping Agent)"
desc = "A N2O/O2 gas mix"
icon_state = "anesthetic"
item_state = "an_tank"
/obj/item/weapon/tank/air
name = "Gas Tank (Air Mix)"
desc = "Mixed anyone?"
icon_state = "oxygen"
examine()
set src in usr
/obj/item/weapon/tank/New()
..()
if(air_contents.oxygen < 1 && loc==usr)
usr << "\red <B>The meter on the [src.name] indicates you are almost out of air!</B>"
usr << sound('sound/effects/alert.ogg')
src.air_contents = new /datum/gas_mixture()
src.air_contents.volume = volume //liters
src.air_contents.temperature = T20C
/obj/item/weapon/tank/plasma
name = "Gas Tank (BIOHAZARD)"
desc = "Contains dangerous plasma. Do not inhale."
icon_state = "plasma"
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = null //they have no straps!
processing_objects.Add(src)
return
/obj/item/weapon/tank/Del()
if(air_contents)
del(air_contents)
processing_objects.Remove(src)
..()
/obj/item/weapon/tank/examine()
var/obj/icon = src
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if (!in_range(src, usr))
if (icon == src) usr << "\blue It's \a \icon[icon][src]! If you want any more information you'll need to get closer."
return
var/celsius_temperature = src.air_contents.temperature-T0C
var/descriptive
if (celsius_temperature < 20)
descriptive = "cold"
else if (celsius_temperature < 40)
descriptive = "room temperature"
else if (celsius_temperature < 80)
descriptive = "lukewarm"
else if (celsius_temperature < 100)
descriptive = "warm"
else if (celsius_temperature < 300)
descriptive = "hot"
else
descriptive = "furiously hot"
usr << "\blue \The \icon[icon][src] feels [descriptive]"
return
/obj/item/weapon/tank/blob_act()
if(prob(50))
@@ -57,6 +74,47 @@
del(src)
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
var/obj/icon = src
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if ((istype(W, /obj/item/device/analyzer) || (istype(W, /obj/item/device/pda))) && get_dist(user, src) <= 1)
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [W] on \icon[icon] [src]"
var/pressure = air_contents.return_pressure()
var/total_moles = air_contents.total_moles()
user << "\blue Results of analysis of \icon[icon]"
if (total_moles>0)
var/o2_concentration = air_contents.oxygen/total_moles
var/n2_concentration = air_contents.nitrogen/total_moles
var/co2_concentration = air_contents.carbon_dioxide/total_moles
var/plasma_concentration = air_contents.toxins/total_moles
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
user << "\blue Pressure: [round(pressure,0.1)] kPa"
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
user << "\blue Oxygen: [round(o2_concentration*100)]%"
user << "\blue CO2: [round(co2_concentration*100)]%"
user << "\blue Plasma: [round(plasma_concentration*100)]%"
if(unknown_concentration>0.01)
user << "\red Unknown: [round(unknown_concentration*100)]%"
user << "\blue Temperature: [round(air_contents.temperature-T0C)]&deg;C"
else
user << "\blue Tank is empty!"
src.add_fingerprint(user)
else if (istype(W,/obj/item/latexballon))
var/obj/item/latexballon/LB = W
LB.blow(src)
src.add_fingerprint(user)
return
/obj/item/weapon/tank/attack_self(mob/user as mob)
if (!(src.air_contents))
return
@@ -120,20 +178,20 @@
return
return
/obj/item/weapon/tank
remove_air(amount)
/obj/item/weapon/tank/remove_air(amount)
return air_contents.remove(amount)
return_air()
/obj/item/weapon/tank/return_air()
return air_contents
assume_air(datum/gas_mixture/giver)
/obj/item/weapon/tank/assume_air(datum/gas_mixture/giver)
air_contents.merge(giver)
check_status()
return 1
proc/remove_air_volume(volume_to_return)
/obj/item/weapon/tank/proc/remove_air_volume(volume_to_return)
if(!air_contents)
return null
@@ -145,14 +203,13 @@
return remove_air(moles_needed)
process()
/obj/item/weapon/tank/process()
//Allow for reactions
air_contents.react()
check_status()
var/integrity = 3
proc/check_status()
/obj/item/weapon/tank/proc/check_status()
//Handle exploding, leaking, and rupturing of the tank
if(!air_contents)
@@ -169,7 +226,6 @@
air_contents.react()
air_contents.react()
pressure = air_contents.return_pressure()
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
range = min(range, MAX_EXPLOSION_RANGE) // was 8 - - - Changed to a configurable define -- TLE
var/turf/epicenter = get_turf(loc)
@@ -198,165 +254,3 @@
else if(integrity < 3)
integrity++
/obj/item/weapon/tank/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
var/obj/icon = src
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if ((istype(W, /obj/item/device/analyzer) || (istype(W, /obj/item/device/pda))) && get_dist(user, src) <= 1)
for (var/mob/O in viewers(user, null))
O << "\red [user] has used [W] on \icon[icon] [src]"
var/pressure = air_contents.return_pressure()
var/total_moles = air_contents.total_moles()
user << "\blue Results of analysis of \icon[icon]"
if (total_moles>0)
var/o2_concentration = air_contents.oxygen/total_moles
var/n2_concentration = air_contents.nitrogen/total_moles
var/co2_concentration = air_contents.carbon_dioxide/total_moles
var/plasma_concentration = air_contents.toxins/total_moles
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
user << "\blue Pressure: [round(pressure,0.1)] kPa"
user << "\blue Nitrogen: [round(n2_concentration*100)]%"
user << "\blue Oxygen: [round(o2_concentration*100)]%"
user << "\blue CO2: [round(co2_concentration*100)]%"
user << "\blue Plasma: [round(plasma_concentration*100)]%"
if(unknown_concentration>0.01)
user << "\red Unknown: [round(unknown_concentration*100)]%"
user << "\blue Temperature: [round(air_contents.temperature-T0C)]&deg;C"
else
user << "\blue Tank is empty!"
src.add_fingerprint(user)
else if (istype(W,/obj/item/latexballon))
var/obj/item/latexballon/LB = W
LB.blow(src)
src.add_fingerprint(user)
return
/obj/item/weapon/tank/New()
..()
src.air_contents = new /datum/gas_mixture()
src.air_contents.volume = volume //liters
src.air_contents.temperature = T20C
processing_objects.Add(src)
return
/obj/item/weapon/tank/Del()
if(air_contents)
del(air_contents)
processing_objects.Remove(src)
..()
/obj/item/weapon/tank/examine()
var/obj/icon = src
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if (!in_range(src, usr))
if (icon == src) usr << "\blue It's \a \icon[icon][src]! If you want any more information you'll need to get closer."
return
var/celsius_temperature = src.air_contents.temperature-T0C
var/descriptive
if (celsius_temperature < 20)
descriptive = "cold"
else if (celsius_temperature < 40)
descriptive = "room temperature"
else if (celsius_temperature < 80)
descriptive = "lukewarm"
else if (celsius_temperature < 100)
descriptive = "warm"
else if (celsius_temperature < 300)
descriptive = "hot"
else
descriptive = "furiously hot"
usr << "\blue \The \icon[icon][src] feels [descriptive]"
return
/obj/item/weapon/tank/air/New()
..()
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
src.air_contents.nitrogen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
return
/obj/item/weapon/tank/anesthetic/New()
..()
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
var/datum/gas/sleeping_agent/trace_gas = new()
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
src.air_contents.trace_gases += trace_gas
return
/obj/item/weapon/tank/plasma/New()
..()
src.air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
return
/obj/item/weapon/tank/plasma/proc/release()
var/datum/gas_mixture/removed = air_contents.remove(air_contents.total_moles())
loc.assume_air(removed)
/obj/item/weapon/tank/plasma/proc/ignite()
var/fuel_moles = air_contents.toxins + air_contents.oxygen/6
var/strength = 1
var/turf/ground_zero = get_turf(loc)
loc = null
if(air_contents.temperature > (T0C + 400))
strength = fuel_moles/15
explosion(ground_zero, strength, strength*2, strength*3, strength*4)
else if(air_contents.temperature > (T0C + 250))
strength = fuel_moles/20
explosion(ground_zero, 0, strength, strength*2, strength*3)
else if(air_contents.temperature > (T0C + 100))
strength = fuel_moles/25
explosion(ground_zero, 0, 0, strength, strength*3)
else
ground_zero.assume_air(air_contents)
ground_zero.hotspot_expose(1000, 125)
if(src.master)
del(src.master)
del(src)
/obj/item/weapon/tank/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
// PantsNote: More flamethrower assembly code. WOO!
if (istype(W, /obj/item/weapon/flamethrower))
var/obj/item/weapon/flamethrower/F = W
if ((!F.status)||(F.ptank)) return
src.master = F
F.ptank = src
user.before_take_item(src)
src.loc = F
return

View File

@@ -1,97 +1,4 @@
//Banhammer deserves to be the first thing here
/obj/item/weapon/banhammer/attack(mob/M as mob, mob/user as mob)
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>"
user << "<font color='red'> You have <b>BANNED</b> [M]</font>"
/obj/effect/mine/proc/triggerrad(obj)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
obj:radiation += 50
randmutb(obj)
domutcheck(obj,null)
spawn(0)
del(src)
/obj/effect/mine/proc/triggerstun(obj)
if(ismob(obj))
var/mob/M = obj
M.Stun(30)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
spawn(0)
del(src)
//skytodo: this doesn't even look like it will work
/obj/effect/mine/proc/triggern2o(obj)
//example: n2o triggerproc
//note: im lazy
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
/*if(target.parent)
target.parent.suspend_group_processing()*/
var/datum/gas_mixture/payload = new
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = 30
payload += trace_gas
target.air.merge(payload)
spawn(0)
del(src)
//skytodo:
/obj/effect/mine/proc/triggerplasma(obj)
for (var/turf/simulated/floor/target in range(1,src))
if(!target.blocks_air)
/*if(target.parent)
target.parent.suspend_group_processing()*/
var/datum/gas_mixture/payload = new
payload.toxins = 30
target.air.merge(payload)
target.hotspot_expose(1000, CELL_VOLUME)
spawn(0)
del(src)
/obj/effect/mine/proc/triggerkick(obj)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
del(obj:client)
spawn(0)
del(src)
/obj/effect/mine/proc/explode(obj)
explosion(loc, 0, 1, 2, 3)
spawn(0)
del(src)
/obj/effect/mine/HasEntered(AM as mob|obj)
Bumped(AM)
/obj/effect/mine/Bumped(mob/M as mob|obj)
if(triggered) return
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))
for(var/mob/O in viewers(world.view, src.loc))
O << "<font color='red'>[M] triggered the \icon[src] [src]</font>"
triggered = 1
call(src,triggerproc)(M)
/obj/effect/mine/New()
icon_state = "uglyminearmed"
//TODO: Move these into atom_procs.dm after carn's finished with it, otherwise it'll conflict - Nodrak
/atom/proc/ex_act()
return
@@ -117,98 +24,3 @@
I.hit()
return
return
/obj/item/weapon/mousetrap/examine()
set src in oview(12)
..()
if(armed)
usr << "\red It looks like it's armed."
/obj/item/weapon/mousetrap/proc/triggered(mob/target as mob, var/type = "feet")
if(!armed)
return
var/datum/organ/external/affecting = null
if(ishuman(target))
var/mob/living/carbon/human/H = target
switch(type)
if("feet")
if(!H.shoes)
affecting = H.get_organ(pick("l_leg", "r_leg"))
H.Weaken(3)
if("l_hand", "r_hand")
if(!H.gloves)
affecting = H.get_organ(type)
H.Stun(3)
if(affecting)
if(affecting.take_damage(1, 0))
H.UpdateDamageIcon()
H.updatehealth()
else if(ismouse(target))
var/mob/living/simple_animal/mouse/M = target
src.visible_message("\red <b>SPLAT!</b>")
M.splat()
playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
icon_state = "mousetrap"
armed = 0
/*
else if (ismouse(target))
target.adjustBruteLoss(100)
*/
/obj/item/weapon/mousetrap/attack_self(mob/living/user as mob)
if(!armed)
icon_state = "mousetraparmed"
user << "\blue You arm the mousetrap."
else
icon_state = "mousetrap"
if(( (user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50)))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
src.triggered(user, which_hand)
user << "\red <B>You accidentally trigger the mousetrap!</B>"
for(var/mob/O in viewers(user, null))
if(O == user)
continue
O.show_message("\red <B>[user] accidentally sets off the mousetrap, breaking their fingers.</B>", 1)
return
user << "\blue You disarm the mousetrap."
armed = !armed
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
/obj/item/weapon/mousetrap/attack_hand(mob/living/user as mob)
if(armed)
if(( (user.getBrainLoss() >= 60 || CLUMSY in user.mutations)) && prob(50))
var/which_hand = "l_hand"
if(!user.hand)
which_hand = "r_hand"
src.triggered(user, which_hand)
user << "\red <B>You accidentally trigger the mousetrap!</B>"
for(var/mob/O in viewers(user, null))
if(O == user)
continue
O.show_message("\red <B>[user] accidentally sets off the mousetrap, breaking their fingers.</B>", 1)
return
..()
/obj/item/weapon/mousetrap/HasEntered(AM as mob|obj)
if(armed)
if(ishuman(AM))
var/mob/living/carbon/H = AM
if(H.m_intent == "run")
src.triggered(H)
H << "\red <B>You accidentally step on the mousetrap!</B>"
for(var/mob/O in viewers(H, null))
if(O == H)
continue
O.show_message("\red <B>[H] accidentally steps on the mousetrap.</B>", 1)
if(ismouse(AM))
triggered(AM)
..()
/obj/item/weapon/mousetrap/hitby(A as mob|obj)
if(!armed)
return ..()
for(var/mob/O in viewers(src, null))
O.show_message("\red <B>The mousetrap is triggered by [A].</B>", 1)
src.triggered(null)

View File

@@ -1,20 +0,0 @@
/mob/living/silicon/ai/proc/ai_statuschange()
set category = "AI Commands"
set name = "AI status"
if(usr.stat == 2)
usr <<"You cannot change your emotional status because you are dead!"
return
var/list/ai_emotions = list("Very Happy", "Happy", "Neutral", "Unsure", "Confused", "Sad", "BSOD", "Blank", "Problems?", "Awesome", "Facepalm", "Friend Computer")
var/emote = input("Please, select a status!", "AI Status", null, null) in ai_emotions
for (var/obj/machinery/ai_status_display/AISD in world) //change status
spawn( 0 )
AISD.emotion = emote
for (var/obj/machinery/status_display/SD in world) //if Friend Computer, change ALL displays
if(emote=="Friend Computer")
spawn(0)
SD.friendc = 1
else
spawn(0)
SD.friendc = 0
return

View File

@@ -164,12 +164,6 @@ proc/blood_incompatible(donor,receiver)
//AB is a universal receiver.
return 0
/obj/item/weapon/rag
New() // So I don't have to grab maplock
spawn(1)
new/obj/item/weapon/reagent_containers/glass/rag(loc)
del src
/obj/item/weapon/reagent_containers/glass/rag
name = "damp rag"
desc = "For cleaning up messes, you suppose."

View File

@@ -1970,6 +1970,11 @@ var/global/BSACooldown = 0
if(aliens_allowed)
alien_infestation()
message_admins("[key_name_admin(usr)] has spawned aliens", 1)
if("comms_blackout")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","CB")
communications_blackout()
message_admins("[key_name_admin(usr)] triggered a communications blackout.", 1)
if("spaceninja")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","SN")
@@ -1998,7 +2003,7 @@ var/global/BSACooldown = 0
feedback_add_details("admin_secrets_fun_used","PB")
message_admins("[key_name_admin(usr)] has allowed a prison break", 1)
prison_break()
if("lightsout")
if("lightout")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","LO")
message_admins("[key_name_admin(usr)] has broke a lot of lights", 1)
@@ -2008,6 +2013,12 @@ var/global/BSACooldown = 0
feedback_add_details("admin_secrets_fun_used","BO")
message_admins("[key_name_admin(usr)] broke all lights", 1)
lightsout(0,0)
if("whiteout")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","WO")
for(var/obj/machinery/light/L in world)
L.fix()
message_admins("[key_name_admin(usr)] fixed all lights", 1)
if("virus")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","V")
@@ -2468,6 +2479,7 @@ var/global/BSACooldown = 0
<A href='?src=\ref[src];secretsfun=lightsout'>Toggle a "lights out" event</A><BR>
<A href='?src=\ref[src];secretsfun=ionstorm'>Spawn an Ion Storm</A><BR>
<A href='?src=\ref[src];secretsfun=spacevines'>Spawn Space-Vines</A><BR>
<A href='?src=\ref[src];secretsfun=comms_blackout'>Trigger a communication blackout</A><BR>
<BR>
<B>Fun Secrets</B><BR>
<BR>
@@ -2492,7 +2504,8 @@ var/global/BSACooldown = 0
<A href='?src=\ref[src];secretsfun=moveferry'>Move Ferry</A><BR>
<A href='?src=\ref[src];secretsfun=movealienship'>Move Alien Dinghy</A><BR>
<A href='?src=\ref[src];secretsfun=moveminingshuttle'>Move Mining Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>"}
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>"}
//<A href='?src=\ref[src];secretsfun=shockwave'>Station Shockwave</A><BR>
if(lvl >= 6)

Some files were not shown because too many files have changed in this diff Show More