Skip to content

Commit

Permalink
Merge pull request tgstation#18576 from PKPenguin321/boardsmacked
Browse files Browse the repository at this point in the history
Allows skateboards to be picked up and used as weapons, new sprites
  • Loading branch information
optimumtact authored Jun 21, 2016
2 parents 826c221 + 01d4d02 commit 0fb6d44
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 3 deletions.
16 changes: 14 additions & 2 deletions code/game/objects/items/weapons/weaponry.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


/obj/item/weapon/banhammer
desc = "A banhammer"
name = "banhammer"
Expand Down Expand Up @@ -286,3 +284,17 @@
icon_state = "tailwhip"
origin_tech = "engineering=3;combat=3;biotech=3"
needs_permit = 0

/obj/item/weapon/melee/skateboard
name = "skateboard"
desc = "A skateboard. It can be placed on its wheels and ridden, or used as a strong weapon."
icon_state = "skateboard"
item_state = "skateboard"
force = 12
throwforce = 4
w_class = 5.0
attack_verb = list("smacked", "whacked", "slammed", "smashed")

/obj/item/weapon/melee/skateboard/attack_self(mob/user)
new /obj/vehicle/scooter/skateboard(get_turf(user))
qdel(src)
14 changes: 13 additions & 1 deletion code/modules/vehicles/scooter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
if(WEST)
buckled_mob.pixel_x = 2
if(buckled_mob.get_num_legs() > 0)
buckled_mob.pixel_y = 4
buckled_mob.pixel_y = 5
else
buckled_mob.pixel_y = -4

Expand Down Expand Up @@ -74,6 +74,18 @@
visible_message("<span class='danger'>[src] crashes into [A], sending [H] flying!</span>")
playsound(src, 'sound/effects/bang.ogg', 50, 1)

/obj/vehicle/scooter/skateboard/MouseDrop(atom/over_object)
var/mob/living/carbon/M = usr
if(!istype(M) || M.incapacitated() || !Adjacent(M))
return
if(has_buckled_mobs() && over_object == M)
M << "<span class='warning'>You can't lift this up when somebody's on it.</span>"
return
if(over_object == M)
var/obj/item/weapon/melee/skateboard/board = new /obj/item/weapon/melee/skateboard()
M.put_in_hands(board)
qdel(src)

//CONSTRUCTION
/obj/item/scooter_frame
name = "scooter frame"
Expand Down
Binary file modified icons/mob/inhands/items_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/items_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/vehicles.dmi
Binary file not shown.
Binary file modified icons/obj/weapons.dmi
Binary file not shown.

0 comments on commit 0fb6d44

Please sign in to comment.