Skip to content

Commit

Permalink
Merge pull request #3 from PsiOmegaDelta/patch-5
Browse files Browse the repository at this point in the history
Pipelayer feedback.
  • Loading branch information
Dennok committed Apr 22, 2015
2 parents d278179 + 4ce1ec1 commit 1ee95de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
21 changes: 10 additions & 11 deletions code/game/machinery/pipe/pipelayer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,35 @@

/obj/machinery/pipelayer/attack_hand(mob/user as mob)
if(!metal&&!on)
user << "\The [src] don't work with no metal."
user << "<span class='warning'>\The [src] doesn't work without metal.</span>"
return
on=!on
user.visible_message("\The [src] [!on?"dea":"a"]ctivated.", "[user] [!on?"dea":"a"]ctivated \the [src].")
user.visible_message("<span class='notice'>[user] has [!on?"de":""]activated \the [src].</span>", "<span class='notice'>You [!on?"de":""]activate \the [src].</span>")
return

/obj/machinery/pipelayer/attackby(var/obj/item/W as obj, var/mob/user as mob)

if (istype(W, /obj/item/weapon/wrench))
P_type_t = input("Choose pipe type", "Pipe type") as null|anything in Pipes
P_type = Pipes[P_type_t]
user.visible_message("[user] has set \the [src] to manufacture [P_type_t] .", "You set \the [src] to manufacture [P_type_t].")
user.visible_message("<span class='notice'>[user] has set \the [src] to manufacture [P_type_t].</span>", "<span class='notice'>You set \the [src] to manufacture [P_type_t].</span>")
return

if(istype(W, /obj/item/weapon/crowbar))
a_dis=!a_dis
visible_message("\The [src] auto dismantle [!a_dis?"dea":"a"]ctivated.")
user.visible_message("<span class='notice'>[user] has [!a_dis?"de":""]activated auto-dismantling.</span>", "<span class='notice'>You [!a_dis?"de":""]activate auto-dismantling.</span>")
return

if(istype(W, /obj/item/stack/sheet/metal))

var/result = load_metal(W)
var/message
if(isnull(result))
message = "Unable to load [W] - no metal found."
user << "<span class='warning'>Unable to load [W] - no metal found.</span>"
else if(!result)
message = "Stack is full."
user << "<span class='notice'>\The [src] is full.</span>"
else
message = "[result] sheets of metal successfully loaded."
user.visible_message("<span class='notice'>[user] has loaded metal into \the [src].</span>", "<span class='notice'>You load metal into \the [src]</span>")

visible_message("[message]")
return

if(istype(W, /obj/item/weapon/screwdriver))
Expand All @@ -74,14 +72,15 @@
use_metal(m)
var/obj/item/stack/sheet/metal/MM = new (get_turf(src))
MM.amount = m
user.visible_message("<span class='notice'>[user] removes [m] sheet\s of metal from the \the [src].</span>", "<span class='notice'>You remove [m] sheet\s of metal from \the [src]</span>")
else
user << "\The [src] is empty."
return
..()

/obj/machinery/pipelayer/examine(mob/user)
..()
user << "\The [src] has [metal] sheet\s, is set to produce [P_type_t], and auto-dismantle is [!on?"de":""]activated."
user << "\The [src] has [metal] sheet\s, is set to produce [P_type_t], and auto-dismantling is [!a_dis?"de":""]activated."

/obj/machinery/pipelayer/proc/reset()
on=0
Expand All @@ -102,7 +101,7 @@

/obj/machinery/pipelayer/proc/use_metal(amount)
if(!metal || metal<amount)
visible_message("Metal depleted. \The [src] deactivated.")
visible_message("\The [src] deactivates as its metal source depletes.")
return
metal-=amount
return 1
Expand Down
2 changes: 1 addition & 1 deletion html/changelogs/Dennok-PR-8838.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ author: Dennok
delete-after: True

changes:
- rscadd: "Added a automatic Pipelayer. Work on pull/putting."
- rscadd: "Added an automatic Pipelayer."

0 comments on commit 1ee95de

Please sign in to comment.