Merge pull request #33933 from coiax/wizard-late-joining

Late joiners also get summoned guns/magic
This commit is contained in:
oranges
2018-01-10 18:50:14 +13:00
committed by CitadelStationBot
parent dfe39e7a1d
commit 3b9b6f156e
9 changed files with 209 additions and 220 deletions
+9 -5
View File
@@ -86,14 +86,18 @@
return
if(user.transferItemToLoc(A, src))
to_chat(user, "<span class='notice'>You screw [S] onto [src].</span>")
suppressed = A
S.oldsound = fire_sound
fire_sound = 'sound/weapons/gunshot_silenced.ogg'
w_class += A.w_class //so pistols do not fit in pockets when suppressed
update_icon()
install_suppressor(A)
return
return 0
/obj/item/gun/ballistic/proc/install_suppressor(obj/item/suppressor/S)
// this proc assumes that the suppressor is already inside src
suppressed = S
S.oldsound = fire_sound
fire_sound = 'sound/weapons/gunshot_silenced.ogg'
w_class += S.w_class //so pistols do not fit in pockets when suppressed
update_icon()
/obj/item/gun/ballistic/attack_hand(mob/user)
if(loc == user)
if(suppressed && can_unsuppress)
@@ -12,7 +12,11 @@
/obj/item/gun/ballistic/automatic/pistol/update_icon()
..()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
return
/obj/item/gun/ballistic/automatic/pistol/suppressed/Initialize(mapload)
. = ..()
var/obj/item/suppressor/S = new(src)
install_suppressor(S)
/obj/item/gun/ballistic/automatic/pistol/m1911
name = "\improper M1911"