mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-28 11:02:41 +00:00
Merge pull request #437 from Yoshax/master
Adds ability to smash drinking bottles on things other than people
This commit is contained in:
@@ -73,6 +73,26 @@
|
||||
qdel(src)
|
||||
return B
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/verb/smash_bottle()
|
||||
set name = "Smash Bottle"
|
||||
set category = "Object"
|
||||
|
||||
var/list/things_to_smash_on = list()
|
||||
for(var/atom/A in range (1, usr))
|
||||
if(A.density && usr.Adjacent(A) && !istype(A, /mob))
|
||||
things_to_smash_on += A
|
||||
|
||||
var/atom/choice = input("Select what you want to smash the bottle on.") as null|anything in things_to_smash_on
|
||||
if(!choice)
|
||||
return
|
||||
if(!(choice.density && usr.Adjacent(choice)))
|
||||
usr << "<span class='warning'>You must stay close to your target! You moved away from \the [choice]</span>"
|
||||
return
|
||||
|
||||
usr.put_in_hands(src.smash(usr.loc, choice))
|
||||
usr.visible_message("<span class='danger'>\The [usr] smashed \the [src] on \the [choice]!</span>")
|
||||
usr << "<span class='danger'>You smash \the [src] on \the [choice]!</span>"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/attackby(obj/item/W, mob/user)
|
||||
if(!rag && istype(W, /obj/item/weapon/reagent_containers/glass/rag))
|
||||
insert_rag(W, user)
|
||||
@@ -452,6 +472,4 @@
|
||||
center_of_mass = list("x"=16, "y"=10)
|
||||
New()
|
||||
..()
|
||||
reagents.add_reagent("ale", 30)
|
||||
|
||||
|
||||
reagents.add_reagent("ale", 30)
|
||||
Reference in New Issue
Block a user