Merge branch 'incremental_tg' r4967 (27/10/2012) into bs12_with_tgport

Conflicts:
	baystation12.dme
	code/__HELPERS/game.dm
	code/__HELPERS/type2type.dm
	code/datums/helper_datums/getrev.dm
	code/game/atoms.dm
	code/game/gamemodes/events.dm
	code/game/machinery/atmo_control.dm
	code/game/machinery/atmoalter/area_atmos_computer.dm
	code/game/machinery/computer/HolodeckControl.dm
	code/game/machinery/computer/atmos_alert.dm
	code/game/machinery/computer/card.dm
	code/game/machinery/computer/cloning.dm
	code/game/machinery/computer/computer.dm
	code/game/machinery/computer/pod.dm
	code/game/machinery/computer/prisoner.dm
	code/game/machinery/computer/syndicate_shuttle.dm
	code/game/machinery/newscaster.dm
	code/game/machinery/spaceheater.dm
	code/game/machinery/telecomms/broadcaster.dm
	code/game/machinery/telecomms/logbrowser.dm
	code/game/machinery/telecomms/machine_interactions.dm
	code/game/machinery/telecomms/telemonitor.dm
	code/game/machinery/telecomms/traffic_control.dm
	code/game/machinery/wishgranter.dm
	code/game/objects/items/devices/uplinks.dm
	code/game/objects/items/stacks/stack.dm
	code/game/objects/objs.dm
	code/modules/DetectiveWork/detective_work.dm
	code/modules/admin/IsBanned.dm
	code/modules/admin/admin.dm
	code/modules/admin/verbs/adminsay.dm
	code/modules/admin/verbs/getlogs.dm
	code/modules/awaymissions/zlevel.dm
	code/modules/client/client procs.dm
	code/modules/clothing/masks/miscellaneous.dm
	code/modules/clothing/spacesuits/miscellaneous.dm
	code/modules/flufftext/TextFilters.dm
	code/modules/mining/machine_processing.dm
	code/modules/mining/machine_stacking.dm
	code/modules/mining/mine_items.dm
	code/modules/mining/mint.dm
	code/modules/mining/satchel_ore_boxdm.dm
	code/modules/mob/living/carbon/monkey/life.dm
	code/modules/mob/living/living_defense.dm
	code/modules/mob/living/simple_animal/friendly/corgi.dm
	code/modules/mob/mob.dm
	code/modules/paperwork/filingcabinet.dm
	code/modules/paperwork/photocopier.dm
	code/modules/power/gravitygenerator.dm
	html/changelog.html
	icons/mob/head.dmi
	icons/mob/human_face.dmi
	icons/mob/mask.dmi
	icons/mob/suit.dmi
	icons/obj/clothing/hats.dmi
	icons/obj/clothing/masks.dmi
	icons/obj/clothing/suits.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-12-28 01:03:14 +10:00
250 changed files with 9936 additions and 10091 deletions

View File

@@ -28,7 +28,7 @@
density = 1
opacity = 1
anchored = 1
var/health = 50
var/health = 200
//var/mob/living/affecting = null
wall
@@ -41,7 +41,17 @@
desc = "Purple slime just thin enough to let light pass through."
icon_state = "resinmembrane"
opacity = 0
health = 20
health = 120
/obj/effect/alien/resin/New()
..()
var/turf/T = get_turf(src)
T.thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
/obj/effect/alien/resin/Del()
var/turf/T = get_turf(src)
T.thermal_conductivity = initial(T.thermal_conductivity)
..()
/obj/effect/alien/resin/proc/healthcheck()
if(health <=0)
@@ -113,7 +123,7 @@
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)
health -= rand(40, 60)
if(health <= 0)
usr << "\green You slice the [name] to pieces."
for(var/mob/O in oviewers(src))
@@ -299,24 +309,49 @@ Alien plants should do something if theres a lot of poison
opacity = 0
anchored = 1
var/obj/target
var/atom/target
var/ticks = 0
var/target_strength = 0
/obj/effect/alien/acid/New(loc, target)
..(loc)
src.target = target
if(isturf(target)) // Turf take twice as long to take down.
target_strength = 8
else
target_strength = 4
tick()
/obj/effect/alien/acid/proc/tick()
if(!target)
del(src)
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))
if(ticks >= target_strength)
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)
if(istype(target, /turf/simulated/wall)) // I hate turf code.
var/turf/simulated/wall/W = target
W.dismantle_wall(1)
else
del(target)
del(src)
return
spawn(rand(200, 400)) tick()
switch(target_strength - ticks)
if(6)
visible_message("\green <B>[src.target] is holding up against the acid!</B>")
if(4)
visible_message("\green <B>[src.target]\s structure is being melted by the acid!</B>")
if(2)
visible_message("\green <B>[src.target] is struggling to withstand the acid!</B>")
if(0 to 1)
visible_message("\green <B>[src.target] begins to crumble under the acid!</B>")
spawn(rand(150, 200)) tick()
/*
* Egg

View File

@@ -240,7 +240,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
//NOTE: graphic resources are loaded on client login
/obj/item/device/pda/attack_self(mob/user as mob)
user.machine = src
user.set_machine(src)
if(active_uplink_check(user))
return
@@ -445,14 +445,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
if ( !(U.stat || U.restrained()) )
add_fingerprint(U)
U.machine = src
U.set_machine(src)
switch(href_list["choice"])
//BASIC FUNCTIONS===================================
if("Close")//Self explanatory
U.machine = null
U.unset_machine()
U << browse(null, "window=pda")
return
if("Refresh")//Refresh, goes to the end of the proc.
@@ -646,7 +646,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
else
U << "PDA not found."
else
U.machine = null
U.unset_machine()
U << browse(null, "window=pda")
return
@@ -667,11 +667,11 @@ var/global/list/obj/item/device/pda/PDAs = list()
cartridge.mode = mode
cartridge.unlock()
else//If can't interact.
U.machine = null
U.unset_machine()
U << browse(null, "window=pda")
return
else//If not in range or not using the pda.
U.machine = null
U.unset_machine()
U << browse(null, "window=pda")
return
@@ -687,7 +687,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(U.machine == src && href_list["skiprefresh"]!="1")//Final safety.
attack_self(U)//It auto-closes the menu prior if the user is not in range and so on.
else
U.machine = null
U.unset_machine()
U << browse(null, "window=pda")
return

View File

@@ -651,7 +651,7 @@ Code:
..()
if (!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
usr.machine = null
usr.unset_machine()
usr << browse(null, "window=pda")
return

View File

@@ -35,7 +35,7 @@
attack_self(mob/user)
if (!in_range(src, user))
return
user.machine = src
user.set_machine(src)
var/dat = "<TT><B>Intelicard</B><BR>"
var/laws
for(var/mob/living/silicon/ai/A in src)
@@ -84,16 +84,16 @@
var/mob/U = usr
if (!in_range(src, U)||U.machine!=src)//If they are not in range of 1 or less or their machine is not the card (ie, clicked on something else).
U << browse(null, "window=aicard")
U.machine = null
U.unset_machine()
return
add_fingerprint(U)
U.machine = src
U.set_machine(src)
switch(href_list["choice"])//Now we switch based on choice.
if ("Close")
U << browse(null, "window=aicard")
U.machine = null
U.unset_machine()
return
if ("Wipe")
@@ -101,7 +101,7 @@
if(confirm == "Yes")
if(isnull(src)||!in_range(src, U)||U.machine!=src)
U << browse(null, "window=aicard")
U.machine = null
U.unset_machine()
return
else
flush = 1

View File

@@ -24,7 +24,7 @@
/obj/item/device/paicard/attack_self(mob/user)
if (!in_range(src, user))
return
user.machine = src
user.set_machine(src)
var/dat = "<TT><B>Personal AI Device</B><BR>"
if(pai && (!pai.master_dna || !pai.master))
dat += "<a href='byond://?src=\ref[src];setdna=1'>Imprint Master DNA</a><br>"

View File

@@ -44,7 +44,7 @@
if(usr.stat || usr.restrained())
return
if(((istype(usr, /mob/living/carbon/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf)))))
usr.machine = src
usr.set_machine(src)
if(href_list["freq"])
var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
set_frequency(new_frequency)
@@ -106,7 +106,7 @@
if(!istype(user, /mob/living/carbon/human))
return
user.machine = src
user.set_machine(src)
var/dat = {"<TT>
<A href='?src=\ref[src];power=1'>Turn [on ? "Off" : "On"]</A><BR>
<B>Frequency/Code</B> for electropack:<BR>

View File

@@ -166,7 +166,7 @@
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.machine = src
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
return

View File

@@ -71,7 +71,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
/obj/item/device/radio/attack_self(mob/user as mob)
user.machine = src
user.set_machine(src)
interact(user)
/obj/item/device/radio/proc/interact(mob/user as mob)
@@ -129,7 +129,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
if (!(issilicon(usr) || (usr.contents.Find(src) || ( in_range(src, usr) && istype(loc, /turf) ))))
usr << browse(null, "window=radio")
return
usr.machine = src
usr.set_machine(src)
if (href_list["track"])
var/mob/target = locate(href_list["track"])
var/mob/living/silicon/ai/A = locate(href_list["track2"])
@@ -663,7 +663,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
user.machine = src
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) ))
return
b_stat = !( b_stat )
@@ -695,7 +695,7 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob)
// ..()
user.machine = src
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
return

View File

@@ -63,7 +63,7 @@
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = {"<B> Valve properties: </B>
<BR> <B> Attachment one:</B> [tank_one] [tank_one ? "<A href='?src=\ref[src];tankone=1'>Remove</A>" : ""]
<BR> <B> Attachment two:</B> [tank_two] [tank_two ? "<A href='?src=\ref[src];tanktwo=1'>Remove</A>" : ""]

View File

@@ -21,7 +21,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
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
ItemList = text2list(src.items, ";") // Parsing the items text string
uses = ticker.mode.uplink_uses
//Let's build a menu!
@@ -314,7 +314,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
return 0
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
usr.machine = src
usr.set_machine(src)
if(href_list["lock"])
toggle()
usr << browse(null, "window=hidden")
@@ -370,3 +370,6 @@ A list of items and costs is stored under the datum of every game mode, alongsid
..()
hidden_uplink = new(src)
hidden_uplink.uses = 10

View File

@@ -202,10 +202,10 @@
for(var/line in song.lines)
//world << line
for(var/beat in dd_text2list(lowertext(line), ","))
for(var/beat in text2list(lowertext(line), ","))
//world << "beat: [beat]"
var/list/notes = dd_text2list(beat, "/")
for(var/note in dd_text2list(notes[1], "-"))
var/list/notes = text2list(beat, "/")
for(var/note in text2list(notes[1], "-"))
//world << "note: [note]"
if(!playing || !isliving(loc))//If the violin is playing, or isn't held by a person
playing = 0
@@ -237,7 +237,7 @@
/obj/item/device/violin/attack_self(mob/user as mob)
if(!isliving(user) || user.stat || user.restrained() || user.lying) return
user.machine = src
user.set_machine(src)
var/dat = "<HEAD><TITLE>Violin</TITLE></HEAD><BODY>"
@@ -367,7 +367,7 @@
//split into lines
spawn()
var/list/lines = dd_text2list(t, "\n")
var/list/lines = text2list(t, "\n")
var/tempo = 5
if(copytext(lines[1],1,6) == "BPM: ")
tempo = 600 / text2num(copytext(lines[1],6))

View File

@@ -39,7 +39,7 @@
return
if (!src || amount<=0)
user << browse(null, "window=stack")
user.machine = src //for correct work of onclose
user.set_machine(src) //for correct work of onclose
var/t1 = text("<HTML><HEAD><title>Constructions from []</title></HEAD><body><TT>Amount Left: []<br>", src, src.amount)
for(var/i=1;i<=recipes.len,i++)
var/datum/stack_recipe/R = recipes[i]

View File

@@ -102,7 +102,7 @@
if ((usr.stat || usr.restrained()))
return
if (usr.contents.Find(src))
usr.machine = src
usr.set_machine(src)
if (href_list["remove"])
var/obj/item/P = locate(href_list["remove"])
if ((P && P.loc == src))

View File

@@ -136,7 +136,7 @@
/obj/item/weapon/flamethrower/attack_self(mob/user as mob)
if(user.stat || user.restrained() || user.lying) return
user.machine = src
user.set_machine(src)
if(!ptank)
user << "<span class='notice'>Attach a plasma tank first!</span>"
return
@@ -148,11 +148,11 @@
/obj/item/weapon/flamethrower/Topic(href,href_list[])
if(href_list["close"])
usr.machine = null
usr.unset_machine()
usr << browse(null, "window=flamethrower")
return
if(usr.stat || usr.restrained() || usr.lying) return
usr.machine = src
usr.set_machine(src)
if(href_list["light"])
if(!ptank) return
if(ptank.air_contents.toxins < 1) return
@@ -168,7 +168,7 @@
usr.put_in_hands(ptank)
ptank = null
lit = 0
usr.machine = null
usr.unset_machine()
usr << browse(null, "window=flamethrower")
for(var/mob/M in viewers(1, loc))
if((M.client && M.machine == src))

View File

@@ -32,7 +32,7 @@
attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
var/health_text = ""
if(src.occupant)
if(src.occupant.health <= -100)
@@ -48,7 +48,7 @@
dat += "<B>Implants:</B> [src.implant_list.len ? "[implant_list.len]" : "<A href='?src=\ref[src];replenish=1'>Replenish</A>"]<BR>"
if(src.occupant)
dat += "[src.ready ? "<A href='?src=\ref[src];implant=1'>Implant</A>" : "Recharging"]<BR>"
user.machine = src
user.set_machine(src)
user << browse(dat, "window=implant")
onclose(user, "implant")

View File

@@ -57,7 +57,7 @@
attack_self(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = "<B>Implant Mini-Computer:</B><HR>"
if (src.case)
if(src.case.imp)
@@ -83,7 +83,7 @@
if (usr.stat)
return
if ((usr.contents.Find(src)) || ((in_range(src, usr) && istype(src.loc, /turf))))
usr.machine = src
usr.set_machine(src)
if (href_list["tracking_id"])
var/obj/item/weapon/implant/tracking/T = src.case.imp
T.id += text2num(href_list["tracking_id"])

View File

@@ -12,7 +12,7 @@
origin_tech = "bluespace=4"
/obj/item/weapon/teleportation_scroll/attack_self(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = "<B>Teleportation Scroll:</B><BR>"
dat += "Number of uses: [src.uses]<BR>"
dat += "<HR>"
@@ -31,7 +31,7 @@
if (!( istype(H, /mob/living/carbon/human)))
return 1
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.machine = src
usr.set_machine(src)
if (href_list["spell_teleport"])
if (src.uses >= 1)
src.uses -= 1

View File

@@ -205,7 +205,7 @@
return
/obj/item/weapon/secstorage/attack_self(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
var/message = "Code"
if ((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))

View File

@@ -118,7 +118,7 @@
/obj/item/weapon/tank/attack_self(mob/user as mob)
if (!(src.air_contents))
return
user.machine = src
user.set_machine(src)
var/using_internal
if(istype(loc,/mob/living/carbon))
@@ -142,7 +142,7 @@
if (usr.stat|| usr.restrained())
return
if (src.loc == usr)
usr.machine = src
usr.set_machine(src)
if (href_list["dist_p"])
var/cp = text2num(href_list["dist_p"])
src.distribute_pressure += cp

View File

@@ -8,7 +8,7 @@
* Locator
*/
/obj/item/weapon/locator/attack_self(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat
if (src.temp)
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
@@ -35,7 +35,7 @@ Frequency:
usr << "The [src] is malfunctioning."
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))))
usr.machine = src
usr.set_machine(src)
if (href_list["refresh"])
src.temp = "<B>Persistent Signal Locator</B><HR>"
var/turf/sr = get_turf(src)

View File

@@ -11,6 +11,7 @@
var/throwforce = 1
var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
var/sharp = 0 // whether this object cuts
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
/obj/proc/process()
processing_objects.Remove(src)
@@ -48,34 +49,57 @@
return
/obj/proc/updateUsrDialog()
var/list/nearby = viewers(1, src)
for(var/mob/M in nearby)
if ((M.client && M.machine == src))
src.attack_hand(M)
if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
if (!(usr in nearby))
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
src.attack_ai(usr)
if(in_use)
var/is_in_use = 0
var/list/nearby = viewers(1, src)
for(var/mob/M in nearby)
if ((M.client && M.machine == src))
is_in_use = 1
src.attack_hand(M)
if (istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
if (!(usr in nearby))
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
is_in_use = 1
src.attack_ai(usr)
// check for TK users
// check for TK users
if (istype(usr, /mob/living/carbon/human))
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
if(!(usr in nearby))
if(usr.client && usr.machine==src)
src.attack_hand(usr)
if (istype(usr, /mob/living/carbon/human))
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
if(!(usr in nearby))
if(usr.client && usr.machine==src)
is_in_use = 1
src.attack_hand(usr)
in_use = is_in_use
/obj/proc/updateDialog()
var/list/nearby = viewers(1, src)
for(var/mob/M in nearby)
if ((M.client && M.machine == src))
src.attack_hand(M)
AutoUpdateAI(src)
// Check that people are actually using the machine. If not, don't update anymore.
if(in_use)
var/list/nearby = viewers(1, src)
var/is_in_use = 0
for(var/mob/M in nearby)
if ((M.client && M.machine == src))
is_in_use = 1
src.attack_hand(M)
var/ai_in_use = AutoUpdateAI(src)
if(!ai_in_use && !is_in_use)
in_use = 0
/obj/proc/update_icon()
return
/mob/proc/unset_machine()
src.machine = null
/mob/proc/set_machine(var/obj/O)
if(src.machine)
unset_machine()
src.machine = O
if(istype(O))
O.in_use = 1
/obj/item/proc/updateSelfDialog()
var/mob/M = src.loc
if(istype(M) && M.client && M.machine == src)

View File

@@ -1,192 +1,183 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/structure/grille
desc = "A piece of metal with evenly spaced gridlike holes in it. Blocks large object but lets small items, gas, or energy beams through. Strangely enough these grilles also lets meteors pass through them, whether they be small or huge station breaking death stones."
desc = "A flimsy lattice of metal rods, with screws to secure it to the floor."
name = "grille"
icon = 'icons/obj/structures.dmi'
icon_state = "grille"
density = 1
anchored = 1.0
anchored = 1
flags = FPRINT | CONDUCT
pressure_resistance = 5*ONE_ATMOSPHERE
layer = 2.9
explosion_resistance = 5
var/health = 10
var/destroyed = 0
explosion_resistance = 5
/obj/structure/grille/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
if(prob(50))
del(src)
return
if(3.0)
if(prob(25))
src.health -= 11
healthcheck()
return
del(src)
/obj/structure/grille/blob_act()
del(src)
return
/obj/structure/grille/meteorhit(var/obj/M)
del(src)
/obj/structure/grille/Bumped(atom/user)
if(ismob(user)) shock(user, 70)
/obj/structure/grille/meteorhit(var/obj/M)
if (M.icon_state == "flaming")
src.health -= 2
healthcheck()
return
/obj/structure/grille/attack_hand(var/mob/user)
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user.name] kicks the [src.name].", \
"You kick the [src.name].", \
"You hear a noise")
if((HULK in usr.mutations) || (SUPRSTR in usr.augmentations))
src.health -= 5
else if(!shock(user, 70))
src.health -= 3
healthcheck()
return
/obj/structure/grille/attack_paw(var/mob/user)
/obj/structure/grille/attack_paw(mob/user as mob)
attack_hand(user)
/obj/structure/grille/attack_hand(mob/user as mob)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
"<span class='warning'>You kick [src].</span>", \
"You hear twisting metal.")
/obj/structure/grille/attack_alien(var/mob/user)
if (istype(usr, /mob/living/carbon/alien/larva)) return
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user.name] mangles the [src.name].", \
"You mangle the [src.name].", \
"You hear a noise")
if(!shock(usr, 70))
src.health -= 5
if(shock(user, 70))
return
if((HULK in user.mutations) || (SUPRSTR in user.augmentations))
health -= 5
else
health -= 3
healthcheck()
/obj/structure/grille/attack_alien(mob/user as mob)
if(istype(user, /mob/living/carbon/alien/larva)) return
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
"<span class='warning'>You mangle [src].</span>", \
"You hear twisting metal.")
if(!shock(user, 70))
health -= 5
healthcheck()
return
/obj/structure/grille/attack_metroid(var/mob/user)
if(!istype(usr, /mob/living/carbon/metroid/adult)) return
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("[user.name] smashes against the [src.name].", \
"You smash against the [src.name].", \
"You hear a noise")
src.health -= rand(2,3)
/obj/structure/grille/attack_metroid(mob/user as mob)
if(!istype(user, /mob/living/carbon/metroid/adult)) return
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] smashes against [src].</span>", \
"<span class='warning'>You smash against [src].</span>", \
"You hear twisting metal.")
health -= rand(2,3)
healthcheck()
return
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0) return
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
M.visible_message("[M.name] smashes against the [src.name].", \
"You smash against the [src.name].", \
"You hear a noise")
src.health -= M.melee_damage_upper
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
M.visible_message("<span class='warning'>[M] smashes against [src].</span>", \
"<span class='warning'>You smash against [src].</span>", \
"You hear twisting metal.")
health -= M.melee_damage_upper
healthcheck()
return
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
if(istype(mover) && mover.checkpass(PASSGRILLE))
return 1
else
if (istype(mover, /obj/item/projectile))
if(istype(mover, /obj/item/projectile))
return prob(30)
else
return !src.density
return !density
/obj/structure/grille/attackby(obj/item/weapon/W, mob/user)
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(iswirecutter(W))
if(!shock(user, 100))
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
src.health = 0
if(!destroyed)
src.health = -100
else if ((isscrewdriver(W)) && (istype(src.loc, /turf/simulated) || src.anchored))
playsound(loc, 'sound/items/Wirecutter.ogg', 100, 1)
new /obj/item/stack/rods(loc)
del(src)
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
if(!shock(user, 90))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
src.anchored = !( src.anchored )
user << (src.anchored ? "You have fastened the grille to the floor." : "You have unfastened the grill.")
for(var/mob/O in oviewers())
O << text("\red [user] [src.anchored ? "fastens" : "unfastens"] the grille.")
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
anchored = !anchored
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] the grille.</span>", \
"<span class='notice'>You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.</span>")
return
//window placing begin
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) )
var/dir_to_set = 1
if(src.loc == usr.loc)
dir_to_set = usr.dir
if(loc == user.loc)
dir_to_set = user.dir
else
if( ( src.x == usr.x ) || (src.y == usr.y) ) //Only supposed to work for cardinal directions.
if( src.x == usr.x )
if( src.y > usr.y )
if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for cardinal directions.
if( x == user.x )
if( y > user.y )
dir_to_set = 2
else
dir_to_set = 1
else if( src.y == usr.y )
if( src.x > usr.x )
else if( y == user.y )
if( x > user.x )
dir_to_set = 8
else
dir_to_set = 4
else
usr << "\red You can't reach there.."
user << "<span class='notice'>You can't reach.</span>"
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
for(var/obj/structure/window/WINDOW in src.loc)
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)
usr << "\red There is already a window facing this way there."
user << "<span class='notice'>There is already a window facing this way there.</span>"
return
usr << "\blue You start placing the window"
user << "<span class='notice'>You start placing the window.</span>"
if(do_after(user,20))
if(!src) return //Grille destroyed while waiting
for(var/obj/structure/window/WINDOW in src.loc)
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
usr << "\red There is already a window facing this way there."
user << "<span class='notice'>There is already a window facing this way there.</span>"
return
var/obj/structure/window/WD
if(istype(W,/obj/item/stack/sheet/rglass))
WD = new/obj/structure/window(src.loc,1) //reinforced window
WD = new/obj/structure/window(loc,1) //reinforced window
else
WD = new/obj/structure/window(src.loc,0) //normal window
WD = new/obj/structure/window(loc,0) //normal window
WD.dir = dir_to_set
WD.ini_dir = dir_to_set
WD.anchored = 0
WD.state = 0
var/obj/item/stack/ST = W
ST.use(1)
usr << "\blue You place the [WD] on the [src]"
user << "<span class='notice'>You place the [WD] on [src].</span>"
return
//window placing end
else if(istype(W, /obj/item/weapon/shard))
src.health -= W.force * 0.1
health -= W.force * 0.1
else if(!shock(user, 70))
playsound(src.loc, 'sound/effects/grillehit.ogg', 80, 1)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
switch(W.damtype)
if("fire")
src.health -= W.force
health -= W.force
if("brute")
src.health -= W.force * 0.1
src.healthcheck()
health -= W.force * 0.1
healthcheck()
..()
return
/obj/structure/grille/proc/healthcheck()
if (src.health <= 0)
if (!( src.destroyed ))
src.icon_state = "brokengrille"
src.density = 0
src.destroyed = 1
new /obj/item/stack/rods( src.loc )
if(health <= 0)
if(!destroyed)
icon_state = "brokengrille"
density = 0
destroyed = 1
new /obj/item/stack/rods(loc)
else
if (src.health <= -10.0)
new /obj/item/stack/rods( src.loc )
//SN src = null
if(health <= -6)
new /obj/item/stack/rods(loc)
del(src)
return
return
@@ -194,17 +185,17 @@
// shock user with probability prb (if all connections & power are working)
// returns 1 if shocked, 0 otherwise
/obj/structure/grille/proc/shock(mob/user, prb)
/obj/structure/grille/proc/shock(mob/user as mob, prb)
if(!anchored || destroyed) // anchored/destroyed grilles are never connected
return 0
if(!prob(prb))
return 0
if(!in_range(src, usr))//To prevent TK and mech users from getting shocked
if(!in_range(src, user))//To prevent TK and mech users from getting shocked
return 0
var/turf/T = get_turf(src)
var/obj/structure/cable/C = T.get_cable_node()
if(C)
if (electrocute_mob(user, C, src))
if(electrocute_mob(user, C, src))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
@@ -216,6 +207,6 @@
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(!destroyed)
if(exposed_temperature > T0C + 1500)
src.health -= 1
health -= 1
healthcheck()
..()

View File

@@ -250,12 +250,12 @@
updateUsrDialog()
proc/unbayify( var/text )
var/list/partlist = dd_text2list(text, ",")
var/list/partlist = text2list(text, ",")
var/i
for(i=1, i<=partlist.len, i++)
var/part = partlist[i]
var/list/x = dd_text2list(part, "/")
var/list/x = text2list(part, "/")
var/tone = ""
var/tempo = "1"
@@ -334,10 +334,10 @@
strippedsourcestring = unbayify(strippedsourcestring)
for(var/part in dd_text2list(strippedsourcestring, ","))
var/list/x = dd_text2list(part, "/")
for(var/part in text2list(strippedsourcestring, ","))
var/list/x = text2list(part, "/")
var/xlen = x.len
var/list/tones = dd_text2list(x[1], "-")
var/list/tones = text2list(x[1], "-")
var/tempodiv = 1
if(xlen==2)
@@ -425,7 +425,7 @@
if(!anchored)
return
usr.machine = src
usr.set_machine(src)
/*
BPM TO TEMPO
@@ -603,7 +603,7 @@
else if(href_list["export"])
var/output = dd_replacetext(currentsong.sourcestring, "\n", "")
var/list/sourcelist = dd_text2list(output, ",")
var/list/sourcelist = text2list(output, ",")
var/list/outputlist = new()
@@ -684,7 +684,7 @@
var/input = html_encode(input(usr, "", "Import") as message|null)
if(isnull(input)) return
var/list/inputlist = dd_text2list(input, "\n")
var/list/inputlist = text2list(input, "\n")
if(copytext(inputlist[1], 1, 4) == "BPM")
var/newbpm = text2num(copytext(input,5,lentext(inputlist[1])+1))

View File

@@ -40,7 +40,7 @@
/obj/structure/noticeboard/Topic(href, href_list)
..()
usr.machine = src
usr.set_machine(src)
if(href_list["remove"])
if((usr.stat || usr.restrained())) //For when a player is handcuffed while they have the notice window open
return

View File

@@ -73,7 +73,7 @@ FLOOR SAFES
/obj/structure/safe/attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = "<center>"
dat += "<a href='?src=\ref[src];open=1'>[open ? "Close" : "Open"] [src]</a> | <a href='?src=\ref[src];decrement=1'>-</a> [dial * 5] <a href='?src=\ref[src];increment=1'>+</a>"
if(open)

View File

@@ -33,7 +33,7 @@
/obj/structure/dispenser/attack_hand(mob/user as mob)
user.machine = src
user.set_machine(src)
var/dat = "[src]<br><br>"
dat += "Oxygen tanks: [oxygentanks] - [oxygentanks ? "<A href='?src=\ref[src];oxygen=1'>Dispense</A>" : "empty"]<br>"
dat += "Plasma tanks: [plasmatanks] - [plasmatanks ? "<A href='?src=\ref[src];plasma=1'>Dispense</A>" : "empty"]"
@@ -68,7 +68,7 @@
if(usr.stat || usr.restrained())
return
if(get_dist(src, usr) <= 1)
usr.machine = src
usr.set_machine(src)
if(href_list["oxygen"])
if(oxygentanks > 0)
var/obj/item/weapon/tank/oxygen/O