Merge branch 'master' of https://github.com/Baystation12/Baystation12 into bs12_with_tgport

Conflicts:
	icons/obj/items.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
This commit is contained in:
Cael_Aislinn
2012-10-22 19:35:03 +10:00
10 changed files with 262 additions and 21 deletions
+56 -1
View File
@@ -89,10 +89,60 @@
icon = 'icons/obj/objects.dmi'
icon_state = "weldtank"
amount_per_transfer_from_this = 10
var/modded = 0
var/obj/item/device/assembly_holder/rig = null
New()
..()
reagents.add_reagent("fuel",1000)
examine()
set src in view()
..()
if (!(usr in view(2)) && usr!=src.loc) return
if (modded)
usr << "\red Fuel faucet is wrenched open, leaking the fuel!"
if(rig)
usr << "<span class='notice'>There is some kind of device rigged to the tank."
attack_hand()
if (rig)
usr.visible_message("[usr] begins to detach [rig] from \the [src].", "You begin to detach [rig] from \the [src]")
if(do_after(usr, 20))
usr.visible_message("\blue [usr] detaches [rig] from \the [src].", "\blue You detach [rig] from \the [src]")
rig.loc = get_turf(usr)
rig = null
overlays = new/list()
attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W,/obj/item/weapon/wrench))
user.visible_message("[user] wrenches [src]'s faucet [modded ? "closed" : "open"].", \
"You wrench [src]'s faucet [modded ? "closed" : "open"]")
modded = modded ? 0 : 1
if (istype(W,/obj/item/device/assembly_holder))
if (rig)
user << "\red There is another device in the way."
return ..()
user.visible_message("[user] begins rigging [W] to \the [src].", "You begin rigging [W] to \the [src]")
if(do_after(user, 20))
user.visible_message("\blue [user] rigs [W] to \the [src].", "\blue You rig [W] to \the [src]")
var/obj/item/device/assembly_holder/H = W
if (istype(H.a_left,/obj/item/device/assembly/igniter) || istype(H.a_right,/obj/item/device/assembly/igniter))
message_admins("[key_name_admin(user)] rigged fueltank at ([loc.x],[loc.y],[loc.z]) for explosion.")
log_game("[key_name(user)] rigged fueltank at ([loc.x],[loc.y],[loc.z]) for explosion.")
rig = W
user.drop_item()
W.loc = src
var/icon/test = getFlatIcon(W)
test.Shift(NORTH,1)
test.Shift(EAST,6)
overlays += test
return ..()
bullet_act(var/obj/item/projectile/Proj)
if(istype(Proj ,/obj/item/projectile/beam)||istype(Proj,/obj/item/projectile/bullet))
explode()
@@ -104,7 +154,12 @@
explode()
proc/explode()
explosion(src.loc,1,2,4)
if (reagents.total_volume > 500)
explosion(src.loc,1,2,4)
else if (reagents.total_volume > 100)
explosion(src.loc,0,1,3)
else
explosion(src.loc,-1,1,2)
if(src)
del(src)