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
-13
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()
-54
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
-103
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()
-166
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
-108
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
+1 -1
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)
@@ -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
+421
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()
+85
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)
@@ -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
+1 -1
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."
+4 -1
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
@@ -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)
@@ -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
@@ -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)
@@ -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()
+4 -3
View File
@@ -33,9 +33,10 @@
return 0
if (!(src.wires & WIRE_RECEIVE))
return 0
var/turf/position = get_turf(src)
if(isnull(position) || position.z != level)
return 0
if(level != 0)
var/turf/position = get_turf(src)
if(isnull(position) || position.z != level)
return 0
if (!src.listening)
return 0
if(freq == SYND_FREQ)
+5 -2
View File
@@ -598,9 +598,12 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if (!(wires & WIRE_RECEIVE))
return 0
var/turf/position = get_turf(src)
if(isnull(position) || position.z != level)
if(!listening)
return 0
if(level != 0)
var/turf/position = get_turf(src)
if(isnull(position) || position.z != level)
return 0
if(freq == SYND_FREQ)
if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
return 0
+1 -69
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"
@@ -236,14 +178,4 @@
b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
Target.bulletholes.Add(src)
Target.bulletholes.Add(src)
@@ -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
+587
View File
@@ -0,0 +1,587 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/datum/song
var/name = "Untitled"
var/list/lines = new()
var/tempo = 5
/obj/structure/device/piano
name = "space minimoog"
icon = 'icons/obj/musician.dmi'
icon_state = "minimoog"
anchored = 1
density = 1
var/datum/song/song
var/playing = 0
var/help = 0
var/edit = 1
var/repeat = 0
proc
playnote(var/note as text)
//world << "Note: [note]"
var/soundfile
/*BYOND loads resource files at compile time if they are ''. This means you can't really manipulate them dynamically.
Tried doing it dynamically at first but its more trouble than its worth. Would have saved many lines tho.*/
switch(note)
if("Cn1")
soundfile = 'sound/piano/Cn1.ogg'
if("C#1")
soundfile = 'sound/piano/C#1.ogg'
if("Db1")
soundfile = 'sound/piano/Db1.ogg'
if("Dn1")
soundfile = 'sound/piano/Dn1.ogg'
if("D#1")
soundfile = 'sound/piano/D#1.ogg'
if("Eb1")
soundfile = 'sound/piano/Eb1.ogg'
if("En1")
soundfile = 'sound/piano/En1.ogg'
if("E#1")
soundfile = 'sound/piano/E#1.ogg'
if("Fb1")
soundfile = 'sound/piano/Fb1.ogg'
if("Fn1")
soundfile = 'sound/piano/Fn1.ogg'
if("F#1")
soundfile = 'sound/piano/F#1.ogg'
if("Gb1")
soundfile = 'sound/piano/Gb1.ogg'
if("Gn1")
soundfile = 'sound/piano/Gn1.ogg'
if("G#1")
soundfile = 'sound/piano/G#1.ogg'
if("Ab1")
soundfile = 'sound/piano/Ab1.ogg'
if("An1")
soundfile = 'sound/piano/An1.ogg'
if("A#1")
soundfile = 'sound/piano/A#1.ogg'
if("Bb1")
soundfile = 'sound/piano/Bb1.ogg'
if("Bn1")
soundfile = 'sound/piano/Bn1.ogg'
if("B#1")
soundfile = 'sound/piano/B#1.ogg'
if("Cb2")
soundfile = 'sound/piano/Cb2.ogg'
if("Cn2")
soundfile = 'sound/piano/Cn2.ogg'
if("C#2")
soundfile = 'sound/piano/C#2.ogg'
if("Db2")
soundfile = 'sound/piano/Db2.ogg'
if("Dn2")
soundfile = 'sound/piano/Dn2.ogg'
if("D#2")
soundfile = 'sound/piano/D#2.ogg'
if("Eb2")
soundfile = 'sound/piano/Eb2.ogg'
if("En2")
soundfile = 'sound/piano/En2.ogg'
if("E#2")
soundfile = 'sound/piano/E#2.ogg'
if("Fb2")
soundfile = 'sound/piano/Fb2.ogg'
if("Fn2")
soundfile = 'sound/piano/Fn2.ogg'
if("F#2")
soundfile = 'sound/piano/F#2.ogg'
if("Gb2")
soundfile = 'sound/piano/Gb2.ogg'
if("Gn2")
soundfile = 'sound/piano/Gn2.ogg'
if("G#2")
soundfile = 'sound/piano/G#2.ogg'
if("Ab2")
soundfile = 'sound/piano/Ab2.ogg'
if("An2")
soundfile = 'sound/piano/An2.ogg'
if("A#2")
soundfile = 'sound/piano/A#2.ogg'
if("Bb2")
soundfile = 'sound/piano/Bb2.ogg'
if("Bn2")
soundfile = 'sound/piano/Bn2.ogg'
if("B#2")
soundfile = 'sound/piano/B#2.ogg'
if("Cb3")
soundfile = 'sound/piano/Cb3.ogg'
if("Cn3")
soundfile = 'sound/piano/Cn3.ogg'
if("C#3")
soundfile = 'sound/piano/C#3.ogg'
if("Db3")
soundfile = 'sound/piano/Db3.ogg'
if("Dn3")
soundfile = 'sound/piano/Dn3.ogg'
if("D#3")
soundfile = 'sound/piano/D#3.ogg'
if("Eb3")
soundfile = 'sound/piano/Eb3.ogg'
if("En3")
soundfile = 'sound/piano/En3.ogg'
if("E#3")
soundfile = 'sound/piano/E#3.ogg'
if("Fb3")
soundfile = 'sound/piano/Fb3.ogg'
if("Fn3")
soundfile = 'sound/piano/Fn3.ogg'
if("F#3")
soundfile = 'sound/piano/F#3.ogg'
if("Gb3")
soundfile = 'sound/piano/Gb3.ogg'
if("Gn3")
soundfile = 'sound/piano/Gn3.ogg'
if("G#3")
soundfile = 'sound/piano/G#3.ogg'
if("Ab3")
soundfile = 'sound/piano/Ab3.ogg'
if("An3")
soundfile = 'sound/piano/An3.ogg'
if("A#3")
soundfile = 'sound/piano/A#3.ogg'
if("Bb3")
soundfile = 'sound/piano/Bb3.ogg'
if("Bn3")
soundfile = 'sound/piano/Bn3.ogg'
if("B#3")
soundfile = 'sound/piano/B#3.ogg'
if("Cb4")
soundfile = 'sound/piano/Cb4.ogg'
if("Cn4")
soundfile = 'sound/piano/Cn4.ogg'
if("C#4")
soundfile = 'sound/piano/C#4.ogg'
if("Db4")
soundfile = 'sound/piano/Db4.ogg'
if("Dn4")
soundfile = 'sound/piano/Dn4.ogg'
if("D#4")
soundfile = 'sound/piano/D#4.ogg'
if("Eb4")
soundfile = 'sound/piano/Eb4.ogg'
if("En4")
soundfile = 'sound/piano/En4.ogg'
if("E#4")
soundfile = 'sound/piano/E#4.ogg'
if("Fb4")
soundfile = 'sound/piano/Fb4.ogg'
if("Fn4")
soundfile = 'sound/piano/Fn4.ogg'
if("F#4")
soundfile = 'sound/piano/F#4.ogg'
if("Gb4")
soundfile = 'sound/piano/Gb4.ogg'
if("Gn4")
soundfile = 'sound/piano/Gn4.ogg'
if("G#4")
soundfile = 'sound/piano/G#4.ogg'
if("Ab4")
soundfile = 'sound/piano/Ab4.ogg'
if("An4")
soundfile = 'sound/piano/An4.ogg'
if("A#4")
soundfile = 'sound/piano/A#4.ogg'
if("Bb4")
soundfile = 'sound/piano/Bb4.ogg'
if("Bn4")
soundfile = 'sound/piano/Bn4.ogg'
if("B#4")
soundfile = 'sound/piano/B#4.ogg'
if("Cb5")
soundfile = 'sound/piano/Cb5.ogg'
if("Cn5")
soundfile = 'sound/piano/Cn5.ogg'
if("C#5")
soundfile = 'sound/piano/C#5.ogg'
if("Db5")
soundfile = 'sound/piano/Db5.ogg'
if("Dn5")
soundfile = 'sound/piano/Dn5.ogg'
if("D#5")
soundfile = 'sound/piano/D#5.ogg'
if("Eb5")
soundfile = 'sound/piano/Eb5.ogg'
if("En5")
soundfile = 'sound/piano/En5.ogg'
if("E#5")
soundfile = 'sound/piano/E#5.ogg'
if("Fb5")
soundfile = 'sound/piano/Fb5.ogg'
if("Fn5")
soundfile = 'sound/piano/Fn5.ogg'
if("F#5")
soundfile = 'sound/piano/F#5.ogg'
if("Gb5")
soundfile = 'sound/piano/Gb5.ogg'
if("Gn5")
soundfile = 'sound/piano/Gn5.ogg'
if("G#5")
soundfile = 'sound/piano/G#5.ogg'
if("Ab5")
soundfile = 'sound/piano/Ab5.ogg'
if("An5")
soundfile = 'sound/piano/An5.ogg'
if("A#5")
soundfile = 'sound/piano/A#5.ogg'
if("Bb5")
soundfile = 'sound/piano/Bb5.ogg'
if("Bn5")
soundfile = 'sound/piano/Bn5.ogg'
if("B#5")
soundfile = 'sound/piano/B#5.ogg'
if("Cb6")
soundfile = 'sound/piano/Cb6.ogg'
if("Cn6")
soundfile = 'sound/piano/Cn6.ogg'
if("C#6")
soundfile = 'sound/piano/C#6.ogg'
if("Db6")
soundfile = 'sound/piano/Db6.ogg'
if("Dn6")
soundfile = 'sound/piano/Dn6.ogg'
if("D#6")
soundfile = 'sound/piano/D#6.ogg'
if("Eb6")
soundfile = 'sound/piano/Eb6.ogg'
if("En6")
soundfile = 'sound/piano/En6.ogg'
if("E#6")
soundfile = 'sound/piano/E#6.ogg'
if("Fb6")
soundfile = 'sound/piano/Fb6.ogg'
if("Fn6")
soundfile = 'sound/piano/Fn6.ogg'
if("F#6")
soundfile = 'sound/piano/F#6.ogg'
if("Gb6")
soundfile = 'sound/piano/Gb6.ogg'
if("Gn6")
soundfile = 'sound/piano/Gn6.ogg'
if("G#6")
soundfile = 'sound/piano/G#6.ogg'
if("Ab6")
soundfile = 'sound/piano/Ab6.ogg'
if("An6")
soundfile = 'sound/piano/An6.ogg'
if("A#6")
soundfile = 'sound/piano/A#6.ogg'
if("Bb6")
soundfile = 'sound/piano/Bb6.ogg'
if("Bn6")
soundfile = 'sound/piano/Bn6.ogg'
if("B#6")
soundfile = 'sound/piano/B#6.ogg'
if("Cb7")
soundfile = 'sound/piano/Cb7.ogg'
if("Cn7")
soundfile = 'sound/piano/Cn7.ogg'
if("C#7")
soundfile = 'sound/piano/C#7.ogg'
if("Db7")
soundfile = 'sound/piano/Db7.ogg'
if("Dn7")
soundfile = 'sound/piano/Dn7.ogg'
if("D#7")
soundfile = 'sound/piano/D#7.ogg'
if("Eb7")
soundfile = 'sound/piano/Eb7.ogg'
if("En7")
soundfile = 'sound/piano/En7.ogg'
if("E#7")
soundfile = 'sound/piano/E#7.ogg'
if("Fb7")
soundfile = 'sound/piano/Fb7.ogg'
if("Fn7")
soundfile = 'sound/piano/Fn7.ogg'
if("F#7")
soundfile = 'sound/piano/F#7.ogg'
if("Gb7")
soundfile = 'sound/piano/Gb7.ogg'
if("Gn7")
soundfile = 'sound/piano/Gn7.ogg'
if("G#7")
soundfile = 'sound/piano/G#7.ogg'
if("Ab7")
soundfile = 'sound/piano/Ab7.ogg'
if("An7")
soundfile = 'sound/piano/An7.ogg'
if("A#7")
soundfile = 'sound/piano/A#7.ogg'
if("Bb7")
soundfile = 'sound/piano/Bb7.ogg'
if("Bn7")
soundfile = 'sound/piano/Bn7.ogg'
if("B#7")
soundfile = 'sound/piano/B#7.ogg'
if("Cb8")
soundfile = 'sound/piano/Cb8.ogg'
if("Cn8")
soundfile = 'sound/piano/Cn8.ogg'
if("C#8")
soundfile = 'sound/piano/C#8.ogg'
if("Db8")
soundfile = 'sound/piano/Db8.ogg'
if("Dn8")
soundfile = 'sound/piano/Dn8.ogg'
if("D#8")
soundfile = 'sound/piano/D#8.ogg'
if("Eb8")
soundfile = 'sound/piano/Eb8.ogg'
if("En8")
soundfile = 'sound/piano/En8.ogg'
if("E#8")
soundfile = 'sound/piano/E#8.ogg'
if("Fb8")
soundfile = 'sound/piano/Fb8.ogg'
if("Fn8")
soundfile = 'sound/piano/Fn8.ogg'
if("F#8")
soundfile = 'sound/piano/F#8.ogg'
if("Gb8")
soundfile = 'sound/piano/Gb8.ogg'
if("Gn8")
soundfile = 'sound/piano/Gn8.ogg'
if("G#8")
soundfile = 'sound/piano/G#8.ogg'
if("Ab8")
soundfile = 'sound/piano/Ab8.ogg'
if("An8")
soundfile = 'sound/piano/An8.ogg'
if("A#8")
soundfile = 'sound/piano/A#8.ogg'
if("Bb8")
soundfile = 'sound/piano/Bb8.ogg'
if("Bn8")
soundfile = 'sound/piano/Bn8.ogg'
if("B#8")
soundfile = 'sound/piano/B#8.ogg'
if("Cb9")
soundfile = 'sound/piano/Cb9.ogg'
if("Cn9")
soundfile = 'sound/piano/Cn9.ogg'
else
return
for(var/mob/M in hearers(15, src))
M << sound(soundfile)
playsong()
do
var/cur_oct[7]
var/cur_acc[7]
for(var/i = 1 to 7)
cur_oct[i] = "3"
cur_acc[i] = "n"
for(var/line in song.lines)
//world << line
for(var/beat in dd_text2list(lowertext(line), ","))
//world << "beat: [beat]"
var/list/notes = dd_text2list(beat, "/")
for(var/note in dd_text2list(notes[1], "-"))
//world << "note: [note]"
if(!playing || !anchored)//If the piano is playing, or is loose
playing = 0
return
if(lentext(note) == 0)
continue
//world << "Parse: [copytext(note,1,2)]"
var/cur_note = text2ascii(note) - 96
if(cur_note < 1 || cur_note > 7)
continue
for(var/i=2 to lentext(note))
var/ni = copytext(note,i,i+1)
if(!text2num(ni))
if(ni == "#" || ni == "b" || ni == "n")
cur_acc[cur_note] = ni
else if(ni == "s")
cur_acc[cur_note] = "#" // so shift is never required
else
cur_oct[cur_note] = ni
playnote(uppertext(copytext(note,1,2)) + cur_acc[cur_note] + cur_oct[cur_note])
if(notes.len >= 2 && text2num(notes[2]))
sleep(song.tempo / text2num(notes[2]))
else
sleep(song.tempo)
if(repeat > 0)
repeat-- //Infinite loops are baaaad.
while(repeat > 0)
playing = 0
updateUsrDialog()
attack_hand(var/mob/user as mob)
if(!anchored)
return
usr.machine = src
var/dat = "<HEAD><TITLE>Piano</TITLE></HEAD><BODY>"
if(song)
if(song.lines.len > 0 && !(playing))
dat += "<A href='?src=\ref[src];play=1'>Play Song</A><BR><BR>"
dat += "<A href='?src=\ref[src];repeat=1'>Repeat Song: [repeat] times.</A><BR><BR>"
if(playing)
dat += "<A href='?src=\ref[src];stop=1'>Stop Playing</A><BR>"
dat += "Repeats left: [repeat].<BR><BR>"
if(!edit)
dat += "<A href='?src=\ref[src];edit=2'>Show Editor</A><BR><BR>"
else
dat += "<A href='?src=\ref[src];edit=1'>Hide Editor</A><BR>"
dat += "<A href='?src=\ref[src];newsong=1'>Start a New Song</A><BR>"
dat += "<A href='?src=\ref[src];import=1'>Import a Song</A><BR><BR>"
if(song)
var/calctempo = (10/song.tempo)*60
dat += "Tempo : <A href='?src=\ref[src];tempo=10'>-</A><A href='?src=\ref[src];tempo=1'>-</A> [calctempo] BPM <A href='?src=\ref[src];tempo=-1'>+</A><A href='?src=\ref[src];tempo=-10'>+</A><BR><BR>"
var/linecount = 0
for(var/line in song.lines)
linecount += 1
dat += "Line [linecount]: [line] <A href='?src=\ref[src];deleteline=[linecount]'>Delete Line</A> <A href='?src=\ref[src];modifyline=[linecount]'>Modify Line</A><BR>"
dat += "<A href='?src=\ref[src];newline=1'>Add Line</A><BR><BR>"
if(help)
dat += "<A href='?src=\ref[src];help=1'>Hide Help</A><BR>"
dat += {"
Lines are a series of chords, separated by commas (,), each with notes seperated by hyphens (-).<br>
Every note in a chord will play together, with chord timed by the tempo.<br>
<br>
Notes are played by the names of the note, and optionally, the accidental, and/or the octave number.<br>
By default, every note is natural and in octave 3. Defining otherwise is remembered for each note.<br>
Example: <i>C,D,E,F,G,A,B</i> will play a C major scale.<br>
After a note has an accidental placed, it will be remembered: <i>C,C4,C,C3</i> is C3,C4,C4,C3</i><br>
Chords can be played simply by seperating each note with a hyphon: <i>A-C#,Cn-E,E-G#,Gn-B</i><br>
A pause may be denoted by an empty chord: <i>C,E,,C,G</i><br>
To make a chord be a different time, end it with /x, where the chord length will be length<br>
defined by tempo / x: <i>C,G/2,E/4</i><br>
Combined, an example is: <i>E-E4/4,/2,G#/8,B/8,E3-E4/4</i>
<br>
Lines may be up to 50 characters.<br>
A song may only contain up to 50 lines.<br>
"}
else
dat += "<A href='?src=\ref[src];help=2'>Show Help</A><BR>"
dat += "</BODY></HTML>"
user << browse(dat, "window=piano;size=700x300")
onclose(user, "piano")
Topic(href, href_list)
if(!in_range(src, usr) || issilicon(usr) || !anchored || !usr.canmove || usr.restrained())
usr << browse(null, "window=piano;size=700x300")
onclose(usr, "piano")
return
if(href_list["repeat"]) //Changing this from a toggle to a number of repeats to avoid infinite loops.
if(playing) return //So that people cant keep adding to repeat. If the do it intentionally, it could result in the server crashing.
var/tempnum = input("How many times do you want to repeat this piece? (max:10)") as num
if(tempnum > 10)
tempnum = 10
repeat = tempnum
else if(href_list["tempo"])
song.tempo += text2num(href_list["tempo"])
if(song.tempo < 1)
song.tempo = 1
else if(href_list["play"])
if(song)
playing = 1
spawn() playsong()
else if(href_list["newsong"])
song = new()
else if(href_list["newline"])
var/newline = input("Enter your line: ", "Piano") as text|null
if(!newline)
return
if(song.lines.len > 50)
return
if(lentext(newline) > 50)
newline = copytext(newline, 1, 50)
song.lines.Add(newline)
else if(href_list["deleteline"])
var/num = text2num(href_list["deleteline"])
song.lines.Cut(num, num+1)
else if(href_list["modifyline"])
var/num = text2num(href_list["modifyline"])
var/content = input("Enter your line: ", "Piano", song.lines[num]) as text|null
if(!content)
return
if(lentext(content) > 50)
content = copytext(content, 1, 50)
song.lines[num] = content
else if(href_list["stop"])
playing = 0
else if(href_list["help"])
help = text2num(href_list["help"]) - 1
else if(href_list["edit"])
edit = text2num(href_list["edit"]) - 1
else if(href_list["import"])
var/t = ""
do
t = input(usr, "Please paste the entire song, formatted:", text("[]", src.name), t) as message
if (!in_range(src, usr))
return
if(lentext(t) >= 3072)
var/cont = input(usr, "Your message is too long! Would you like to continue editing it?", "", "yes") in list("yes", "no")
if(cont == "no")
break
while(lentext(t) > 3072)
//split into lines
spawn()
var/list/lines = dd_text2list(t, "\n")
var/tempo = 5
if(copytext(lines[1],1,6) == "BPM: ")
tempo = 600 / text2num(copytext(lines[1],6))
lines.Cut(1,2)
if(lines.len > 50)
usr << "Too many lines!"
lines.Cut(51)
var/linenum = 1
for(var/l in lines)
if(lentext(l) > 50)
usr << "Line [linenum] too long!"
lines.Remove(l)
else
linenum++
song = new()
song.lines = lines
song.tempo = tempo
updateUsrDialog()
add_fingerprint(usr)
updateUsrDialog()
return
attackby(obj/item/O as obj, mob/user as mob)
if (istype(O, /obj/item/weapon/wrench))
if (anchored)
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to loosen \the [src]'s casters..."
if (do_after(user, 40))
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
"\blue You have loosened \the [src]. Now it can be pulled somewhere else.", \
"You hear ratchet.")
src.anchored = 0
else
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
user << "\blue You begin to tighten \the [src] to the floor..."
if (do_after(user, 20))
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
"\blue You have tightened \the [src]'s casters. Now it can be played again.", \
"You hear ratchet.")
src.anchored = 1
else
..()
@@ -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
-32
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"
+151
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
@@ -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/New()
..()
/obj/item/weapon/tank/anesthetic
name = "Gas Tank (Sleeping Agent)"
desc = "A N2O/O2 gas mix"
icon_state = "anesthetic"
item_state = "an_tank"
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/air
name = "Gas Tank (Air Mix)"
desc = "Mixed anyone?"
icon_state = "oxygen"
/obj/item/weapon/tank/Del()
if(air_contents)
del(air_contents)
processing_objects.Remove(src)
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/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
/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!
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,243 +178,79 @@
return
return
/obj/item/weapon/tank
remove_air(amount)
return air_contents.remove(amount)
return_air()
return air_contents
/obj/item/weapon/tank/remove_air(amount)
return air_contents.remove(amount)
assume_air(datum/gas_mixture/giver)
air_contents.merge(giver)
/obj/item/weapon/tank/return_air()
return air_contents
check_status()
return 1
/obj/item/weapon/tank/assume_air(datum/gas_mixture/giver)
air_contents.merge(giver)
proc/remove_air_volume(volume_to_return)
if(!air_contents)
return null
check_status()
return 1
var/tank_pressure = air_contents.return_pressure()
if(tank_pressure < distribute_pressure)
distribute_pressure = tank_pressure
/obj/item/weapon/tank/proc/remove_air_volume(volume_to_return)
if(!air_contents)
return null
var/moles_needed = distribute_pressure*volume_to_return/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
var/tank_pressure = air_contents.return_pressure()
if(tank_pressure < distribute_pressure)
distribute_pressure = tank_pressure
return remove_air(moles_needed)
var/moles_needed = distribute_pressure*volume_to_return/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
process()
//Allow for reactions
return remove_air(moles_needed)
/obj/item/weapon/tank/process()
//Allow for reactions
air_contents.react()
check_status()
/obj/item/weapon/tank/proc/check_status()
//Handle exploding, leaking, and rupturing of the tank
if(!air_contents)
return 0
var/pressure = air_contents.return_pressure()
if(pressure > TANK_FRAGMENT_PRESSURE)
if(!istype(src.loc,/obj/item/device/transfer_valve))
message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
//world << "\blue[x],[y] tank is exploding: [pressure] kPa"
//Give the gas a chance to build up more pressure through reacting
air_contents.react()
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)
check_status()
//world << "\blue Exploding Pressure: [pressure] kPa, intensity: [range]"
var/integrity = 3
proc/check_status()
//Handle exploding, leaking, and rupturing of the tank
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5))
del(src)
if(!air_contents)
return 0
var/pressure = air_contents.return_pressure()
if(pressure > TANK_FRAGMENT_PRESSURE)
if(!istype(src.loc,/obj/item/device/transfer_valve))
message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].")
//world << "\blue[x],[y] tank is exploding: [pressure] kPa"
//Give the gas a chance to build up more pressure through reacting
air_contents.react()
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)
//world << "\blue Exploding Pressure: [pressure] kPa, intensity: [range]"
explosion(epicenter, round(range*0.25), round(range*0.5), round(range), round(range*1.5))
else if(pressure > TANK_RUPTURE_PRESSURE)
//world << "\blue[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]"
if(integrity <= 0)
loc.assume_air(air_contents)
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
del(src)
else if(pressure > TANK_RUPTURE_PRESSURE)
//world << "\blue[x],[y] tank is rupturing: [pressure] kPa, integrity [integrity]"
if(integrity <= 0)
loc.assume_air(air_contents)
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
del(src)
else
integrity--
else if(pressure > TANK_LEAK_PRESSURE)
//world << "\blue[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]"
if(integrity <= 0)
var/datum/gas_mixture/leaked_gas = air_contents.remove_ratio(0.25)
loc.assume_air(leaked_gas)
else
integrity--
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
integrity--
/obj/item/weapon/tank/New()
..()
else if(pressure > TANK_LEAK_PRESSURE)
//world << "\blue[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]"
if(integrity <= 0)
var/datum/gas_mixture/leaked_gas = air_contents.remove_ratio(0.25)
loc.assume_air(leaked_gas)
else
integrity--
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
else if(integrity < 3)
integrity++
-301
View File
@@ -1,301 +0,0 @@
/obj/machinery/washing_machine
name = "Washing Machine"
icon = 'icons/obj/machines/washing_machine.dmi'
icon_state = "wm_10"
density = 1
anchored = 1.0
var/state = 1
//1 = empty, open door
//2 = empty, closed door
//3 = full, open door
//4 = full, closed door
//5 = running
//6 = blood, open door
//7 = blood, closed door
//8 = blood, running
var/panel = 0
//0 = closed
//1 = open
var/hacked = 1 //Bleh, screw hacking, let's have it hacked by default.
//0 = not hacked
//1 = hacked
var/gibs_ready = 0
var/obj/crayon
/obj/machinery/washing_machine/verb/start()
set name = "Start Washing"
set category = "Object"
set src in oview(1)
if( state != 4 )
usr << "The washing machine cannot run in this state."
return
if( locate(/mob,contents) )
state = 8
else
state = 5
update_icon()
sleep(200)
for(var/atom/A in contents)
A.clean_blood()
//Tanning!
for(var/obj/item/stack/sheet/hairlesshide/HH in contents)
var/obj/item/stack/sheet/wetleather/WL = new(src)
WL.amount = HH.amount
del(HH)
if(crayon)
var/color
if(istype(crayon,/obj/item/toy/crayon))
var/obj/item/toy/crayon/CR = crayon
color = CR.colourName
else if(istype(crayon,/obj/item/weapon/stamp))
var/obj/item/weapon/stamp/ST = crayon
color = ST.color
if(color)
var/new_jumpsuit_icon_state = ""
var/new_jumpsuit_item_state = ""
var/new_jumpsuit_name = ""
var/new_glove_icon_state = ""
var/new_glove_item_state = ""
var/new_glove_name = ""
var/new_shoe_icon_state = ""
var/new_shoe_name = ""
var/new_sheet_icon_state = ""
var/new_sheet_name = ""
var/new_softcap_icon_state = ""
var/new_softcap_name = ""
var/new_desc = "The colors are a bit dodgy."
for(var/T in typesof(/obj/item/clothing/under))
var/obj/item/clothing/under/J = new T
//world << "DEBUG: [color] == [J.color]"
if(color == J.color)
new_jumpsuit_icon_state = J.icon_state
new_jumpsuit_item_state = J.item_state
new_jumpsuit_name = J.name
del(J)
//world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
break
del(J)
for(var/T in typesof(/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = new T
//world << "DEBUG: [color] == [J.color]"
if(color == G.color)
new_glove_icon_state = G.icon_state
new_glove_item_state = G.item_state
new_glove_name = G.name
del(G)
//world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
break
del(G)
for(var/T in typesof(/obj/item/clothing/shoes))
var/obj/item/clothing/shoes/S = new T
//world << "DEBUG: [color] == [J.color]"
if(color == S.color)
new_shoe_icon_state = S.icon_state
new_shoe_name = S.name
del(S)
//world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
break
del(S)
for(var/T in typesof(/obj/item/weapon/bedsheet))
var/obj/item/weapon/bedsheet/B = new T
//world << "DEBUG: [color] == [J.color]"
if(color == B.color)
new_sheet_icon_state = B.icon_state
new_sheet_name = B.name
del(B)
//world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
break
del(B)
for(var/T in typesof(/obj/item/clothing/head/soft))
var/obj/item/clothing/head/soft/H = new T
//world << "DEBUG: [color] == [J.color]"
if(color == H.color)
new_softcap_icon_state = H.icon_state
new_softcap_name = H.name
del(H)
//world << "DEBUG: YUP! [new_icon_state] and [new_item_state]"
break
del(H)
if(new_jumpsuit_icon_state && new_jumpsuit_item_state && new_jumpsuit_name)
for(var/obj/item/clothing/under/J in contents)
//world << "DEBUG: YUP! FOUND IT!"
J.item_state = new_jumpsuit_item_state
J.icon_state = new_jumpsuit_icon_state
J.color = color
J.name = new_jumpsuit_name
J.desc = new_desc
if(new_glove_icon_state && new_glove_item_state && new_glove_name)
for(var/obj/item/clothing/gloves/G in contents)
//world << "DEBUG: YUP! FOUND IT!"
G.item_state = new_glove_item_state
G.icon_state = new_glove_icon_state
G.color = color
G.name = new_glove_name
G.desc = new_desc
if(new_shoe_icon_state && new_shoe_name)
for(var/obj/item/clothing/shoes/S in contents)
//world << "DEBUG: YUP! FOUND IT!"
S.icon_state = new_shoe_icon_state
S.color = color
S.name = new_shoe_name
S.desc = new_desc
if(new_sheet_icon_state && new_sheet_name)
for(var/obj/item/weapon/bedsheet/B in contents)
//world << "DEBUG: YUP! FOUND IT!"
B.icon_state = new_sheet_icon_state
B.color = color
B.name = new_sheet_name
B.desc = new_desc
if(new_softcap_icon_state && new_softcap_name)
for(var/obj/item/clothing/head/soft/H in contents)
//world << "DEBUG: YUP! FOUND IT!"
H.icon_state = new_softcap_icon_state
H.color = color
H.name = new_softcap_name
H.desc = new_desc
del(crayon)
crayon = null
if( locate(/mob,contents) )
state = 7
gibs_ready = 1
else
state = 4
update_icon()
/obj/machinery/washing_machine/verb/climb_out()
set name = "Climb out"
set category = "Object"
set src in usr.loc
sleep(20)
if(state in list(1,3,6) )
usr.loc = src.loc
/obj/machinery/washing_machine/update_icon()
icon_state = "wm_[state][panel]"
/obj/machinery/washing_machine/attackby(obj/item/weapon/W as obj, mob/user as mob)
/*if(istype(W,/obj/item/weapon/screwdriver))
panel = !panel
user << "\blue you [panel ? "open" : "close"] the [src]'s maintenance panel"*/
if(istype(W,/obj/item/toy/crayon) ||istype(W,/obj/item/weapon/stamp))
if( state in list( 1, 3, 6 ) )
if(!crayon)
user.drop_item()
crayon = W
crayon.loc = src
else
..()
else
..()
else if(istype(W,/obj/item/weapon/grab))
if( (state == 1) && hacked)
var/obj/item/weapon/grab/G = W
if(ishuman(G.assailant) && iscorgi(G.affecting))
G.affecting.loc = src
del(G)
state = 3
else
..()
else if(istype(W,/obj/item/stack/sheet/hairlesshide) || \
istype(W,/obj/item/clothing/under) || \
istype(W,/obj/item/clothing/mask) || \
istype(W,/obj/item/clothing/head) || \
istype(W,/obj/item/clothing/gloves) || \
istype(W,/obj/item/clothing/shoes) || \
istype(W,/obj/item/clothing/suit) || \
istype(W,/obj/item/weapon/bedsheet))
//YES, it's hardcoded... saves a var/can_be_washed for every single clothing item.
if ( istype(W,/obj/item/clothing/suit/space ) )
user << "This item does not fit."
return
if ( istype(W,/obj/item/clothing/suit/syndicatefake ) )
user << "This item does not fit."
return
// if ( istype(W,/obj/item/clothing/suit/powered ) )
// user << "This item does not fit."
// return
if ( istype(W,/obj/item/clothing/suit/cyborg_suit ) )
user << "This item does not fit."
return
if ( istype(W,/obj/item/clothing/suit/bomb_suit ) )
user << "This item does not fit."
return
if ( istype(W,/obj/item/clothing/suit/armor ) )
user << "This item does not fit."
return
if ( istype(W,/obj/item/clothing/suit/armor ) )
user << "This item does not fit."
return
if ( istype(W,/obj/item/clothing/mask/gas ) )
user << "This item does not fit."
return
if ( istype(W,/obj/item/clothing/mask/cigarette ) )
user << "This item does not fit."
return
if ( istype(W,/obj/item/clothing/head/syndicatefake ) )
user << "This item does not fit."
return
// if ( istype(W,/obj/item/clothing/head/powered ) )
// user << "This item does not fit."
// return
if ( istype(W,/obj/item/clothing/head/helmet ) )
user << "This item does not fit."
return
if(contents.len < 5)
if ( state in list(1, 3) )
user.drop_item()
W.loc = src
state = 3
else
user << "\blue You can't put the item in right now."
else
user << "\blue The washing machine is full."
else
..()
update_icon()
/obj/machinery/washing_machine/attack_hand(mob/user as mob)
switch(state)
if(1)
state = 2
if(2)
state = 1
for(var/atom/movable/O in contents)
O.loc = src.loc
if(3)
state = 4
if(4)
state = 3
for(var/atom/movable/O in contents)
O.loc = src.loc
crayon = null
state = 1
if(5)
user << "\red The [src] is busy."
if(6)
state = 7
if(7)
if(gibs_ready)
gibs_ready = 0
if(locate(/mob,contents))
var/mob/M = locate(/mob,contents)
M.gib()
for(var/atom/movable/O in contents)
O.loc = src.loc
crayon = null
state = 1
update_icon()
+2 -190
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
@@ -116,99 +23,4 @@
if (I)
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)
return