mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Merge pull request #64 from Skyrat-SS13/upstream-merge-52379
[MIRROR] Fixes clothes repair for real
This commit is contained in:
@@ -93,21 +93,28 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/attackby(obj/item/W, mob/user, params)
|
||||
if(damaged_clothes && istype(W, repairable_by))
|
||||
var/obj/item/stack/S = W
|
||||
switch(damaged_clothes)
|
||||
if(CLOTHING_DAMAGED)
|
||||
S.use(1)
|
||||
repair(user, params)
|
||||
if(CLOTHING_SHREDDED)
|
||||
if(S.amount < 3)
|
||||
to_chat(user, "<span class='warning'>You require 3 [S.name] to repair [src].</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin fixing the damage to [src] with [S]...</span>")
|
||||
if(do_after(user, 6 SECONDS, TRUE, src))
|
||||
if(S.use(3))
|
||||
repair(user, params)
|
||||
return 1
|
||||
if(!istype(W, repairable_by))
|
||||
return ..()
|
||||
|
||||
switch(damaged_clothes)
|
||||
if(CLOTHING_PRISTINE)
|
||||
return..()
|
||||
if(CLOTHING_DAMAGED)
|
||||
var/obj/item/stack/cloth_repair = W
|
||||
cloth_repair.use(1)
|
||||
repair(user, params)
|
||||
return TRUE
|
||||
if(CLOTHING_SHREDDED)
|
||||
var/obj/item/stack/cloth_repair = W
|
||||
if(cloth_repair.amount < 3)
|
||||
to_chat(user, "<span class='warning'>You require 3 [cloth_repair.name] to repair [src].</span>")
|
||||
return TRUE
|
||||
to_chat(user, "<span class='notice'>You begin fixing the damage to [src] with [cloth_repair]...</span>")
|
||||
if(!do_after(user, 6 SECONDS, TRUE, src) || !cloth_repair.use(3))
|
||||
return TRUE
|
||||
repair(user, params)
|
||||
return TRUE
|
||||
|
||||
return ..()
|
||||
|
||||
/// Set the clothing's integrity back to 100%, remove all damage to bodyparts, and generally fix it up
|
||||
|
||||
Reference in New Issue
Block a user