mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 13:38:41 +01:00
[MIRROR] Bicycle integrity fixes [MDB IGNORE] (#11729)
* Bicycle integrity fixes (#65129) Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com> * Bicycle integrity fixes Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com> Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
This commit is contained in:
co-authored by
Mothblocks
RandomGamer123
parent
f0acfd0bdb
commit
3836c187be
@@ -2,6 +2,9 @@
|
||||
name = "bicycle"
|
||||
desc = "Keep away from electricity."
|
||||
icon_state = "bicycle"
|
||||
max_integrity = 150
|
||||
integrity_failure = 0.5
|
||||
var/fried = FALSE
|
||||
|
||||
/obj/vehicle/ridden/bicycle/Initialize(mapload)
|
||||
. = ..()
|
||||
@@ -13,6 +16,22 @@
|
||||
desc = "Well spent."
|
||||
color = rgb(63, 23, 4)
|
||||
can_buckle = FALSE
|
||||
fried = TRUE
|
||||
. = ..()
|
||||
for(var/m in buckled_mobs)
|
||||
unbuckle_mob(m,1)
|
||||
|
||||
/obj/vehicle/ridden/bicycle/welder_act(mob/living/user, obj/item/I)
|
||||
if(fried)
|
||||
balloon_alert(user, "it's fried!")
|
||||
return TRUE
|
||||
if(atom_integrity >= max_integrity)
|
||||
return TRUE
|
||||
if(!I.use_tool(src, user, 0, volume=50, amount=1))
|
||||
return TRUE
|
||||
atom_integrity += min(10, max_integrity-atom_integrity)
|
||||
if(atom_integrity == max_integrity)
|
||||
balloon_alert(user, "fully repaired")
|
||||
else
|
||||
balloon_alert(user, "repaired some damages")
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user