Makes items used to slice food have the edge flag set, cleans up energy weapons, and adjusts slicable w_class.

This commit is contained in:
mwerezak
2014-11-06 19:50:40 -05:00
committed by mwerezak
parent fba0139ca8
commit 81f8f36874
8 changed files with 183 additions and 157 deletions
+4 -2
View File
@@ -114,8 +114,10 @@
name = "plastic knife"
desc = "The bluntest of blades."
icon_state = "pknife"
force = 10.0
throwforce = 10.0
force = 1
throwforce = 1
sharp = 0
edge = 1 //for cutting pizzas
/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
+132 -16
View File
@@ -1,53 +1,158 @@
/obj/item/weapon/melee/energy
var/active = 0
var/active_force
var/active_throwforce
var/active_w_class
sharp = 0
edge = 0
flags = FPRINT | TABLEPASS | NOBLOODY
suicide_act(mob/user)
/obj/item/weapon/melee/energy/proc/activate()
active = 1
force = active_force
throwforce = active_throwforce
sharp = 1
edge = 1
w_class = active_w_class
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
/obj/item/weapon/melee/energy/proc/deactivate()
active = 0
force = initial(force)
throwforce = initial(throwforce)
sharp = initial(sharp)
edge = initial(edge)
w_class = initial(w_class)
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
/obj/item/weapon/melee/energy/attack_self(mob/living/user as mob)
if (active)
if ((CLUMSY in user.mutations) && prob(50))
user.visible_message("\red [user] accidentally cuts \himself with \the [src].", "\red You accidentally cut yourself with \the [src].")
user.take_organ_damage(5,5)
deactivate()
else
activate()
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
return
/obj/item/weapon/melee/energy/suicide_act(mob/user)
if (active)
viewers(user) << pick("\red <b>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</b>", \
"\red <b>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</b>")
return (BRUTELOSS|FIRELOSS)
/*
* Energy Axe
*/
/obj/item/weapon/melee/energy/axe
name = "energy axe"
desc = "An energised battle axe."
icon_state = "axe0"
force = 40.0
throwforce = 25.0
//active_force = 150 //holy...
active_force = 60
active_throwforce = 35
active_w_class = 5
//force = 40
//throwforce = 25
force = 20
throwforce = 10
throw_speed = 1
throw_range = 5
w_class = 3.0
w_class = 3
flags = FPRINT | CONDUCT | NOSHIELD | TABLEPASS | NOBLOODY
origin_tech = "combat=3"
origin_tech = "magnets=3;combat=4"
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
sharp = 1
edge = 1
suicide_act(mob/user)
viewers(user) << "\red <b>[user] swings the [src.name] towards /his head! It looks like \he's trying to commit suicide.</b>"
return (BRUTELOSS|FIRELOSS)
/obj/item/weapon/melee/energy/axe/activate()
..()
icon_state = "axe1"
user << "\blue \The [src] is now energised."
/obj/item/weapon/melee/energy/axe/deactivate()
..()
icon_state = initial(icon_state)
user << "\blue \The [src] is de-energised. It's just a regular axe now."
/obj/item/weapon/melee/energy/axe/suicide_act(mob/user)
viewers(user) << "\red <b>[user] swings the [src.name] towards /his head! It looks like \he's trying to commit suicide.</b>"
return (BRUTELOSS|FIRELOSS)
/*
* Energy Sword
*/
/obj/item/weapon/melee/energy/sword
color
name = "energy sword"
desc = "May the force be within you."
icon_state = "sword0"
force = 3.0
throwforce = 5.0
active_force = 30
active_throwforce = 20
active_w_class = 4
force = 3
throwforce = 5
throw_speed = 1
throw_range = 5
w_class = 2.0
w_class = 2
flags = FPRINT | TABLEPASS | NOSHIELD | NOBLOODY
origin_tech = "magnets=3;syndicate=4"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharp = 1
edge = 1
var/attack_verb_active = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/melee/energy/sword/New()
item_color = pick("red","blue","green","purple")
/obj/item/weapon/melee/energy/sword/green/New()
item_color = "green"
/obj/item/weapon/melee/energy/sword/red/New()
item_color = "red"
/obj/item/weapon/melee/energy/sword/blue/New()
item_color = "blue"
/obj/item/weapon/melee/energy/sword/purple/New()
item_color = "purple"
/obj/item/weapon/melee/energy/sword/activate()
..()
attack_verb = attack_verb_active
icon_state = "sword[item_color]"
user << "\blue \The [src] is now energised."
/obj/item/weapon/melee/energy/sword/deactivate()
..()
attack_verb = initial(attack_verb)
icon_state = initial(icon_state)
user << "\blue It can now be concealed."
/obj/item/weapon/melee/energy/sword/IsShield()
if(active)
return 1
return 0
/obj/item/weapon/melee/energy/sword/pirate
name = "energy cutlass"
desc = "Arrrr matey."
icon_state = "cutlass0"
/obj/item/weapon/melee/energy/blade
/obj/item/weapon/melee/energy/sword/pirate/activate()
..()
icon_state = "cutlass1"
/*
*Energy Blade
*/
//Can't be activated or deactivated, so not actually a subtype of energy
/obj/item/weapon/melee/energy_blade
name = "energy blade"
desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal."
icon_state = "blade"
@@ -60,4 +165,15 @@
w_class = 4.0//So you can't hide it in your pocket or some such.
flags = FPRINT | TABLEPASS | NOSHIELD | NOBLOODY
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/datum/effect/effect/system/spark_spread/spark_system
var/datum/effect/effect/system/spark_spread/spark_system
/obj/item/weapon/melee/energy_blade/New()
spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
/obj/item/weapon/melee/energy_blade/dropped()
del(src)
/obj/item/weapon/melee/energy_blade/proc/throw()
del(src)
@@ -30,6 +30,10 @@
else
..()
/*
* Energy Shield
*/
/obj/item/weapon/shield/energy
name = "energy combat shield"
desc = "A shield capable of stopping most projectile and melee attacks. It can be retracted, expanded, and stored anywhere."
@@ -45,6 +49,39 @@
attack_verb = list("shoved", "bashed")
var/active = 0
/obj/item/weapon/shield/energy/IsShield()
if(active)
return 1
else
return 0
/obj/item/weapon/shield/energy/attack_self(mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You beat yourself in the head with [src]."
user.take_organ_damage(5)
active = !active
if (active)
force = 10
icon_state = "eshield[active]"
w_class = 4
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
user << "\blue [src] is now active."
else
force = 3
icon_state = "eshield[active]"
w_class = 1
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
user << "\blue [src] can now be concealed."
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
return
/obj/item/weapon/cloaking_device
name = "cloaking device"
desc = "Use this to become invisible to the human eyesocket."
@@ -3,9 +3,6 @@
* Banhammer
* Sword
* Classic Baton
* Energy Blade
* Energy Axe
* Energy Shield
*/
/*
@@ -15,50 +12,6 @@
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()
if(active)
return 1
return 0
/obj/item/weapon/melee/energy/sword/New()
item_color = pick("red","blue","green","purple")
/obj/item/weapon/melee/energy/sword/attack_self(mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You accidentally cut yourself with [src]."
user.take_organ_damage(5,5)
active = !active
if (active)
force = 30
if(istype(src,/obj/item/weapon/melee/energy/sword/pirate))
icon_state = "cutlass1"
else
icon_state = "sword[item_color]"
w_class = 4
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
user << "\blue [src] is now active."
else
force = 3
if(istype(src,/obj/item/weapon/melee/energy/sword/pirate))
icon_state = "cutlass0"
else
icon_state = "sword0"
w_class = 2
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
user << "\blue [src] can now be concealed."
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
return
/*
* Classic Baton
*/
@@ -182,86 +135,3 @@
else
return ..()
/*
*Energy Blade
*/
//Most of the other special functions are handled in their own files.
/obj/item/weapon/melee/energy/sword/green
New()
item_color = "green"
/obj/item/weapon/melee/energy/sword/red
New()
item_color = "red"
/obj/item/weapon/melee/energy/blade/New()
spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src)
spark_system.attach(src)
return
/obj/item/weapon/melee/energy/blade/dropped()
del(src)
return
/obj/item/weapon/melee/energy/blade/proc/throw()
del(src)
return
/*
* Energy Axe
*/
/obj/item/weapon/melee/energy/axe/attack_self(mob/user as mob)
src.active = !( src.active )
if (src.active)
user << "\blue The axe is now energised."
src.force = 150
src.icon_state = "axe1"
src.w_class = 5
else
user << "\blue The axe can now be concealed."
src.force = 40
src.icon_state = "axe0"
src.w_class = 5
src.add_fingerprint(user)
return
/*
* Energy Shield
*/
/obj/item/weapon/shield/energy/IsShield()
if(active)
return 1
else
return 0
/obj/item/weapon/shield/energy/attack_self(mob/living/user as mob)
if ((CLUMSY in user.mutations) && prob(50))
user << "\red You beat yourself in the head with [src]."
user.take_organ_damage(5)
active = !active
if (active)
force = 10
icon_state = "eshield[active]"
w_class = 4
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
user << "\blue [src] is now active."
else
force = 3
icon_state = "eshield[active]"
w_class = 1
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
user << "\blue [src] can now be concealed."
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
H.update_inv_l_hand()
H.update_inv_r_hand()
add_fingerprint(user)
return
+3 -7
View File
@@ -18,14 +18,13 @@
*/
/obj/item/weapon/twohanded
var/wielded = 0
var/force_unwielded = 0
var/force_wielded = 0
var/wieldsound = null
var/unwieldsound = null
/obj/item/weapon/twohanded/proc/unwield()
wielded = 0
force = force_unwielded
force = initial(force)
name = "[initial(name)]"
update_icon()
@@ -108,12 +107,11 @@
icon_state = "fireaxe0"
name = "fire axe"
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
force = 5
force = 10
sharp = 1
edge = 1
w_class = 4.0
slot_flags = SLOT_BACK
force_unwielded = 10
force_wielded = 40
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
@@ -149,7 +147,6 @@
throw_speed = 1
throw_range = 5
w_class = 2.0
force_unwielded = 3
force_wielded = 30
wieldsound = 'sound/weapons/saberon.ogg'
unwieldsound = 'sound/weapons/saberoff.ogg'
@@ -189,11 +186,10 @@
force = 14
w_class = 4.0
slot_flags = SLOT_BACK
force_unwielded = 14
force_wielded = 22 // Was 13, Buffed - RR
throwforce = 20
throw_speed = 3
edge = 1
edge = 0
sharp = 1
flags = NOSHIELD
hitsound = 'sound/weapons/bladeslice.ogg'
+2
View File
@@ -159,6 +159,8 @@
matter = list("metal" = 50)
origin_tech = "materials=1;engineering=1"
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
sharp = 0
edge = 1
/obj/item/weapon/shovel/spade
name = "spade"
@@ -71,7 +71,7 @@
name = lowertext("[fullname] sandwich")
if(length(name) > 80) name = "[pick(list("absurd","colossal","enormous","ridiculous"))] sandwich"
w_class = n_ceil(Clamp((ingredients.len/2),1,3))
w_class = n_ceil(Clamp((ingredients.len/2),2,4))
/obj/item/weapon/reagent_containers/food/snacks/csandwich/Del()
for(var/obj/item/O in ingredients)
@@ -98,4 +98,4 @@
if(H && shard && M == user) //This needs a check for feeding the food to other people, but that could be abusable.
H << "\red You lacerate your mouth on a [shard.name] in the sandwich!"
H.adjustBruteLoss(5) //TODO: Target head if human.
..()
..()
@@ -2154,6 +2154,9 @@
// sliceable is just an organization type path, it doesn't have any additional code or variables tied to it.
/obj/item/weapon/reagent_containers/food/snacks/sliceable
w_class = 3 //Whole pizzas and cakes shouldn't fit in a pocket, you can slice them if you want to do that.
/obj/item/weapon/reagent_containers/food/snacks/sliceable/meatbread
name = "meatbread loaf"
desc = "The culinary base of every self-respecting eloquen/tg/entleman."