mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Fixes renamed wielded items reverting to inital name
This commit is contained in:
@@ -31,7 +31,11 @@
|
||||
if(!wielded || !user) return
|
||||
wielded = 0
|
||||
force = force_unwielded
|
||||
name = "[initial(name)]"
|
||||
var/sf = findtext(name," (Wielded)")
|
||||
if(sf)
|
||||
name = copytext(name,1,sf)
|
||||
else //something wrong
|
||||
name = "[initial(name)]"
|
||||
update_icon()
|
||||
user << "<span class='notice'>You are now carrying the [name] with one hand.</span>"
|
||||
if(unwieldsound)
|
||||
@@ -51,21 +55,21 @@
|
||||
return
|
||||
wielded = 1
|
||||
force = force_wielded
|
||||
name = "[initial(name)] (Wielded)"
|
||||
name = "[name] (Wielded)"
|
||||
update_icon()
|
||||
user << "<span class='notice'>You grab the [initial(name)] with both hands.</span>"
|
||||
user << "<span class='notice'>You grab the [name] with both hands.</span>"
|
||||
if (wieldsound)
|
||||
playsound(loc, wieldsound, 50, 1)
|
||||
var/obj/item/weapon/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
|
||||
O.name = "[initial(name)] - offhand"
|
||||
O.desc = "Your second grip on the [initial(name)]"
|
||||
O.name = "[name] - offhand"
|
||||
O.desc = "Your second grip on the [name]"
|
||||
user.put_in_inactive_hand(O)
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/mob_can_equip(M as mob, slot)
|
||||
//Cannot equip wielded items.
|
||||
if(wielded)
|
||||
M << "<span class='warning'>Unwield the [initial(name)] first!</span>"
|
||||
M << "<span class='warning'>Unwield the [name] first!</span>"
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user