mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-24 00:12:07 +00:00
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:
@@ -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()
|
||||
..()
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user