mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
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:
co-authored by
Luc
Henri215
parent
a2e7d95306
commit
7daf219ec0
@@ -201,38 +201,43 @@
|
||||
addstack.use(amount)
|
||||
SStgui.update_uis(src)
|
||||
return
|
||||
else if(!active)
|
||||
if(istype(O, /obj/item/wrench))
|
||||
|
||||
if(!anchored)
|
||||
connect_to_network()
|
||||
to_chat(user, "<span class='notice'>You secure the generator to the floor.</span>")
|
||||
else
|
||||
disconnect_from_network()
|
||||
to_chat(user, "<span class='notice'>You unsecure the generator from the floor.</span>")
|
||||
|
||||
playsound(src.loc, O.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
|
||||
else if(istype(O, /obj/item/storage/part_replacer) && panel_open)
|
||||
if(!active)
|
||||
if(istype(O, /obj/item/storage/part_replacer) && panel_open)
|
||||
exchange_parts(user, O)
|
||||
return
|
||||
else if(istype(O, /obj/item/crowbar) && panel_open)
|
||||
default_deconstruction_crowbar(user, O)
|
||||
else
|
||||
return ..()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/crowbar_act(mob/living/user, obj/item/I)
|
||||
if(active || !panel_open)
|
||||
return
|
||||
. = TRUE
|
||||
default_deconstruction_crowbar(user, I)
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/screwdriver_act(mob/living/user, obj/item/I)
|
||||
if(active)
|
||||
return
|
||||
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, I.tool_volume))
|
||||
return
|
||||
panel_open = !panel_open
|
||||
I.play_tool_sound(src)
|
||||
if(panel_open)
|
||||
to_chat(user, "<span class='notice'>You open the access panel.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You close the access panel.</span>")
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/wrench_act(mob/living/user, obj/item/I)
|
||||
if(active)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, I.tool_volume))
|
||||
return
|
||||
if(!anchored)
|
||||
connect_to_network()
|
||||
to_chat(user, "<span class='notice'>You secure the generator to the floor.</span>")
|
||||
else
|
||||
disconnect_from_network()
|
||||
to_chat(user, "<span class='notice'>You unsecure the generator from the floor.</span>")
|
||||
anchored = !anchored
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attack_hand(mob/user as mob)
|
||||
..()
|
||||
|
||||
@@ -211,19 +211,7 @@
|
||||
|
||||
/obj/item/solar_assembly/attackby(obj/item/W, mob/user, params)
|
||||
|
||||
if(!anchored && isturf(loc))
|
||||
if(istype(W, /obj/item/wrench))
|
||||
anchored = TRUE
|
||||
user.visible_message("[user] wrenches the solar assembly into place.", "<span class='notice'>You wrench the solar assembly into place.</span>")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
return 1
|
||||
else
|
||||
if(istype(W, /obj/item/wrench))
|
||||
anchored = FALSE
|
||||
user.visible_message("[user] unwrenches the solar assembly from its place.", "<span class='notice'>You unwrench the solar assembly from its place.</span>")
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
return 1
|
||||
|
||||
if(anchored || !isturf(loc))
|
||||
if(istype(W, /obj/item/stack/sheet/glass) || istype(W, /obj/item/stack/sheet/rglass))
|
||||
var/obj/item/stack/sheet/S = W
|
||||
if(S.use(2))
|
||||
@@ -237,25 +225,41 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need two sheets of glass to put them into a solar panel.</span>")
|
||||
return
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
if(!tracker)
|
||||
if(istype(W, /obj/item/tracker_electronics))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
tracker = 1
|
||||
tracker = TRUE
|
||||
qdel(W)
|
||||
user.visible_message("[user] inserts the electronics into the solar assembly.", "<span class='notice'>You insert the electronics into the solar assembly.</span>")
|
||||
return 1
|
||||
else if(istype(W, /obj/item/crowbar))
|
||||
new /obj/item/tracker_electronics(src.loc)
|
||||
tracker = 0
|
||||
playsound(loc, W.usesound, 50, 1)
|
||||
user.visible_message("[user] takes out the electronics from the solar assembly.", "<span class='notice'>You take out the electronics from the solar assembly.</span>")
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/solar_assembly/crowbar_act(mob/living/user, obj/item/I)
|
||||
if(!tracker)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, I.tool_volume))
|
||||
return
|
||||
new /obj/item/tracker_electronics(loc)
|
||||
tracker = FALSE
|
||||
user.visible_message("[user] takes out the electronics from the solar assembly.", "<span class='notice'>You take out the electronics from the solar assembly.</span>")
|
||||
|
||||
/obj/item/solar_assembly/wrench_act(mob/living/user, obj/item/I)
|
||||
if(!anchored && isturf(loc))
|
||||
if(I.use_tool(src, user, I.tool_volume))
|
||||
anchored = TRUE
|
||||
user.visible_message("[user] wrenches the solar assembly into place.", "<span class='notice'>You wrench the solar assembly into place.</span>")
|
||||
return TRUE
|
||||
else
|
||||
if(I.use_tool(src, user, I.tool_volume))
|
||||
anchored = FALSE
|
||||
user.visible_message("[user] unwrenches the solar assembly from its place.", "<span class='notice'>You unwrench the solar assembly from its place.</span>")
|
||||
return TRUE
|
||||
|
||||
//
|
||||
// Solar Control Computer
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user