Health and Stack Fixes

This commit is contained in:
Fox-McCloud
2015-03-01 01:07:14 -05:00
parent 43783ca583
commit a7f631f364
16 changed files with 67 additions and 72 deletions
+17 -13
View File
@@ -1,42 +1,46 @@
/obj/item/stack/rods
name = "metal rods"
name = "metal rod"
desc = "Some rods. Can be used for building, or something."
singular_name = "metal rod"
icon_state = "rods"
item_state = "rods"
flags = CONDUCT
w_class = 3.0
force = 9.0
throwforce = 15.0
throw_speed = 5
throw_range = 20
m_amt = 1875
throwforce = 10.0
throw_speed = 3
throw_range = 7
m_amt = 1000
max_amount = 60
attack_verb = list("hit", "bludgeoned", "whacked")
hitsound = 'sound/weapons/grenadelaunch.ogg'
/obj/item/stack/rods/New(var/loc, var/amount=null)
..()
update_icon()
return ..()
/obj/item/stack/rods/update_icon()
if(get_amount() <= 5)
icon_state = "rods-[get_amount()]"
var/amount = get_amount()
if((amount <= 5) && (amount > 0))
icon_state = "rods-[amount]"
else
icon_state = "rods"
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if (istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(amount < 2)
user << "\red You need at least two rods to do this."
if(get_amount() < 2)
user << "<span class='warning'>You need at least two rods to do this.</span>"
return
if(WT.remove_fuel(0,user))
var/obj/item/stack/sheet/metal/new_item = new(usr.loc)
new_item.add_to_stacks(usr)
for (var/mob/M in viewers(src))
M.show_message("\red [src] is shaped into metal by [user.name] with the weldingtool.", 3, "\red You hear welding.", 2)
user.visible_message("<span class='warning'>[user.name] shaped [src] into metal with the weldingtool.</span>", \
"<span class='notice'>You shaped [src] into metal with the weldingtool.</span>", \
"<span class='warning'>You hear welding.</span>")
var/obj/item/stack/rods/R = src
src = null
var/replace = (user.get_inactive_hand()==R)
@@ -77,7 +77,7 @@ obj/item/stack/sheet/mineral/iron
origin_tech = "materials=1"
sheettype = "iron"
color = "#333333"
perunit = 3750
perunit = 2000
obj/item/stack/sheet/mineral/iron/New()
..()
@@ -88,7 +88,7 @@ obj/item/stack/sheet/mineral/iron/New()
desc = "This appears to be a combination of both sand and stone."
singular_name = "sandstone brick"
icon_state = "sheet-sandstone"
throw_speed = 4
throw_speed = 3
throw_range = 5
origin_tech = "materials=1"
sheettype = "sandstone"
@@ -101,7 +101,7 @@ obj/item/stack/sheet/mineral/iron/New()
name = "diamond"
icon_state = "sheet-diamond"
origin_tech = "materials=6"
perunit = 3750
perunit = 2000
sheettype = "diamond"
@@ -78,7 +78,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
singular_name = "metal sheet"
icon_state = "sheet-metal"
m_amt = 3750
throwforce = 14.0
throwforce = 10.0
flags = CONDUCT
origin_tech = "materials=1"
@@ -88,7 +88,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
singular_name = "metal sheet"
icon_state = "sheet-metal"
m_amt = 0
throwforce = 14.0
throwforce = 10.0
flags = CONDUCT
/obj/item/stack/sheet/metal/New(var/loc, var/amount=null)
@@ -115,7 +115,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
icon_state = "sheet-plasteel"
item_state = "sheet-metal"
m_amt = 7500
throwforce = 15.0
throwforce = 10.0
flags = CONDUCT
origin_tech = "materials=2"
@@ -4,7 +4,7 @@
force = 5
throwforce = 5
max_amount = 50
throw_speed = 3
throw_speed = 1
throw_range = 3
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed")
var/perunit = MINERAL_MATERIAL_AMOUNT
+2 -2
View File
@@ -184,9 +184,9 @@
continue
oldsrc.attackby(item, usr)
usr << "You add new [item.singular_name] to the stack. It now contains [item.amount] [item.singular_name]\s."
if(!oldsrc)
if(oldsrc.amount <= 0)
break
update_icon()
oldsrc.update_icon()
/obj/item/stack/proc/get_amount()
return amount
@@ -6,9 +6,9 @@
w_class = 3.0
force = 6.0
m_amt = 937.5
throwforce = 15.0
throw_speed = 5
throw_range = 20
throwforce = 10.0
throw_speed = 3
throw_range = 7
flags = CONDUCT
max_amount = 60
+14 -31
View File
@@ -7,33 +7,19 @@
sharp = 1
edge = 1
desc = "Could probably be used as ... a throwing weapon?"
w_class = 2.0
w_class = 1.0
force = 5.0
throwforce = 8.0
throwforce = 10.0
item_state = "shard-glass"
// matter = list("glass" = 3750)
g_amt = MINERAL_MATERIAL_AMOUNT
attack_verb = list("stabbed", "slashed", "sliced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/shard/suicide_act(mob/user)
viewers(user) << pick("\red <b>[user] is slitting \his wrists with \the [src]! It looks like \he's trying to commit suicide.</b>", \
"\red <b>[user] is slitting \his throat with \the [src]! It looks like \he's trying to commit suicide.</b>")
return (BRUTELOSS)
/obj/item/weapon/shard/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/shard/Bump()
spawn( 0 )
if (prob(20))
src.force = 15
else
src.force = 4
..()
return
return
/obj/item/weapon/shard/New()
src.icon_state = pick("large", "medium", "small")
@@ -50,23 +36,20 @@
else
return
/obj/item/weapon/shard/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if ( istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
/obj/item/weapon/shard/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = I
if(WT.remove_fuel(0, user))
var/obj/item/stack/sheet/glass/NG = new (user.loc)
for (var/obj/item/stack/sheet/glass/G in user.loc)
if(G==NG)
for(var/obj/item/stack/sheet/glass/G in user.loc)
if(G == NG)
continue
if(G.amount>=G.max_amount)
if(G.amount >= G.max_amount)
continue
G.attackby(NG, user, params)
usr << "You add the newly-formed glass to the stack. It now contains [NG.amount] sheets."
//SN src = null
del(src)
return
return ..()
G.attackby(NG, user)
user << "<span class='notice'>You add the newly-formed glass to the stack. It now contains [NG.amount] sheet\s.</span>"
qdel(src)
..()
/obj/item/weapon/shard/Crossed(AM as mob|obj)
if(ismob(AM))