More Crowbar Acts (#24986)

* crowbar acts part 1

* livings checked

* convert istypes to tool behaviour

* solars

* use tool_volume

* Update code/modules/research/server.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: larentoun <31931237+larentoun@users.noreply.github.com>

* Update code/modules/power/generators/portable generators/pacman.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: larentoun <31931237+larentoun@users.noreply.github.com>

* return

* return returns

* Update code/modules/mob/living/simple_animal/bot/mulebot.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Signed-off-by: larentoun <31931237+larentoun@users.noreply.github.com>

* Update code/game/objects/structures/janicart.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Signed-off-by: larentoun <31931237+larentoun@users.noreply.github.com>

---------

Signed-off-by: larentoun <31931237+larentoun@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
larentoun
2024-05-01 13:37:08 +03:00
committed by GitHub
parent a2e7d95306
commit 7daf219ec0
23 changed files with 293 additions and 220 deletions
@@ -30,25 +30,27 @@
return
/obj/structure/largecrate/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/crowbar))
if(manifest)
manifest.forceMove(loc)
manifest = null
update_icon()
new /obj/item/stack/sheet/wood(src)
var/turf/T = get_turf(src)
for(var/O in contents)
var/atom/movable/A = O
A.forceMove(T)
user.visible_message("<span class='notice'>[user] pries \the [src] open.</span>", \
"<span class='notice'>You pry open \the [src].</span>", \
"<span class='notice'>You hear splitting wood.</span>")
qdel(src)
else if(user.a_intent != INTENT_HARM)
if(user.a_intent != INTENT_HARM)
attack_hand(user)
else
return ..()
/obj/structure/largecrate/crowbar_act(mob/living/user, obj/item/I)
. = TRUE
if(manifest)
manifest.forceMove(loc)
manifest = null
update_icon()
new /obj/item/stack/sheet/wood(src)
var/turf/T = get_turf(src)
for(var/O in contents)
var/atom/movable/A = O
A.forceMove(T)
user.visible_message("<span class='notice'>[user] pries [src] open.</span>", \
"<span class='notice'>You pry open [src].</span>", \
"<span class='notice'>You hear splitting wood.</span>")
qdel(src)
/obj/structure/largecrate/Destroy()
var/turf/src_turf = get_turf(src)
for(var/obj/O in contents)
@@ -60,54 +62,60 @@
/obj/structure/largecrate/lisa
icon_state = "lisacrate"
/obj/structure/largecrate/lisa/attackby(obj/item/W as obj, mob/user as mob) //ugly but oh well
if(istype(W, /obj/item/crowbar))
new /mob/living/simple_animal/pet/dog/corgi/Lisa(loc)
/obj/structure/largecrate/lisa/crowbar_act(mob/living/user, obj/item/I)
if(!I.use_tool(src, user, I.tool_volume))
return
new /mob/living/simple_animal/pet/dog/corgi/Lisa(loc)
return ..()
/obj/structure/largecrate/cow
name = "cow crate"
icon_state = "lisacrate"
/obj/structure/largecrate/cow/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/crowbar))
new /mob/living/simple_animal/cow(loc)
/obj/structure/largecrate/cow/crowbar_act(mob/living/user, obj/item/I)
if(!I.use_tool(src, user, I.tool_volume))
return
new /mob/living/simple_animal/cow(loc)
return ..()
/obj/structure/largecrate/goat
name = "goat crate"
icon_state = "lisacrate"
/obj/structure/largecrate/goat/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/crowbar))
new /mob/living/simple_animal/hostile/retaliate/goat(loc)
/obj/structure/largecrate/goat/crowbar_act(mob/living/user, obj/item/I)
if(!I.use_tool(src, user, I.tool_volume))
return
new /mob/living/simple_animal/hostile/retaliate/goat(loc)
return ..()
/obj/structure/largecrate/chick
name = "chicken crate"
icon_state = "lisacrate"
/obj/structure/largecrate/chick/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/crowbar))
var/num = rand(4, 6)
for(var/i in 1 to num)
new /mob/living/simple_animal/chick(loc)
/obj/structure/largecrate/chick/crowbar_act(mob/living/user, obj/item/I)
if(!I.use_tool(src, user, I.tool_volume))
return
var/num = rand(4, 6)
for(var/i in 1 to num)
new /mob/living/simple_animal/chick(loc)
return ..()
/obj/structure/largecrate/cat
name = "cat crate"
icon_state = "lisacrate"
/obj/structure/largecrate/cat/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/crowbar))
new /mob/living/simple_animal/pet/cat(loc)
/obj/structure/largecrate/cat/crowbar_act(mob/living/user, obj/item/I)
if(!I.use_tool(src, user, I.tool_volume))
return
new /mob/living/simple_animal/pet/cat(loc)
return ..()
/obj/structure/largecrate/secway
name = "secway crate"
/obj/structure/largecrate/secway/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/crowbar))
new /obj/vehicle/secway(loc)
new /obj/item/key/security(loc)
/obj/structure/largecrate/secway/crowbar_act(mob/living/user, obj/item/I)
if(!I.use_tool(src, user, I.tool_volume))
return
new /obj/vehicle/secway(loc)
new /obj/item/key/security(loc)
return ..()
+29 -21
View File
@@ -87,32 +87,40 @@
put_in_cart(I, user)
else
to_chat(user, "<span class='notice'>[src] can't hold any more signs.</span>")
else if(istype(I, /obj/item/crowbar))
user.visible_message("<span class='warning'>[user] begins to empty the contents of [src].</span>")
if(do_after(user, 30 * I.toolspeed, target = src))
to_chat(usr, "<span class='notice'>You empty the contents of [src]'s bucket onto the floor.</span>")
reagents.reaction(src.loc)
src.reagents.clear_reagents()
else if(istype(I, /obj/item/wrench))
if(!anchored && !isinspace())
playsound(src.loc, I.usesound, 50, 1)
user.visible_message( \
"[user] tightens \the [src]'s casters.", \
"<span class='notice'> You have tightened \the [src]'s casters.</span>", \
"You hear ratchet.")
anchored = TRUE
else if(anchored)
playsound(src.loc, I.usesound, 50, 1)
user.visible_message( \
"[user] loosens \the [src]'s casters.", \
"<span class='notice'> You have loosened \the [src]'s casters.</span>", \
"You hear ratchet.")
anchored = FALSE
else if(mybag)
mybag.attackby(I, user, params)
else
to_chat(usr, "<span class='warning'>You cannot interface your modules [src]!</span>")
/obj/structure/janitorialcart/crowbar_act(mob/living/user, obj/item/I)
. = TRUE
user.visible_message("<span class='warning'>[user] begins to empty the contents of [src].</span>")
if(!I.use_tool(src, user, 3 SECONDS, I.tool_volume))
return
to_chat(user, "<span class='notice'>You empty the contents of [src]'s bucket onto the floor.</span>")
reagents.reaction(loc)
reagents.clear_reagents()
/obj/structure/janitorialcart/wrench_act(mob/living/user, obj/item/I)
. = TRUE
if(!anchored && !isinspace())
if(!I.use_tool(src, user, I.tool_volume))
return
user.visible_message( \
"[user] tightens [src]'s casters.", \
"<span class='notice'>You have tightened [src]'s casters.</span>", \
"You hear ratchet.")
anchored = TRUE
return
if(anchored)
if(!I.use_tool(src, user, I.tool_volume))
return
user.visible_message( \
"[user] loosens [src]'s casters.", \
"<span class='notice'>You have loosened [src]'s casters.</span>", \
"You hear ratchet.")
anchored = FALSE
/obj/structure/janitorialcart/attack_hand(mob/user)
var/list/cart_items = list()
+11 -10
View File
@@ -68,21 +68,22 @@
..()
/obj/structure/kitchenspike/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/crowbar))
if(!has_buckled_mobs())
playsound(loc, I.usesound, 100, 1)
if(do_after(user, 20 * I.toolspeed, target = src))
to_chat(user, "<span class='notice'>You pry the spikes out of the frame.</span>")
deconstruct(TRUE)
else
to_chat(user, "<span class='notice'>You can't do that while something's on the spike!</span>")
return
else if(istype(I, /obj/item/grab))
if(istype(I, /obj/item/grab))
var/obj/item/grab/G = I
if(G.affecting && isliving(G.affecting))
start_spike(G.affecting, user)
return ..()
/obj/structure/kitchenspike/crowbar_act(mob/living/user, obj/item/I)
. = TRUE
if(has_buckled_mobs())
to_chat(user, "<span class='notice'>You can't do that while something's on the spike!</span>")
return
if(!I.use_tool(src, user, 2 SECONDS, I.tool_volume))
return
to_chat(user, "<span class='notice'>You pry the spikes out of the frame.</span>")
deconstruct(TRUE)
/obj/structure/kitchenspike/MouseDrop_T(mob/living/victim, mob/living/user)
if(!user.Adjacent(src) || !user.Adjacent(victim) || isAI(user) || !ismob(victim))
return
+1 -1
View File
@@ -53,7 +53,7 @@
if(!I.tool_start_check(user, amount = 0))
return
to_chat(user, "<span class='notice'>You begin repairing [src]...</span>")
if(I.use_tool(src, user, 40, volume = 50))
if(I.use_tool(src, user, 4 SECONDS, I.tool_volume))
obj_integrity = max_integrity
to_chat(user, "<span class='notice'>You repair [src].</span>")