mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-25 08:34:23 +00:00
*TABLEPASS was already totally obsolete. FPRINT was used, but it was on virtually everything anyway. Removes those flags from every instance where they were used. Also assigned and removed other flags where it made sense. If it is desired, I can revive the flag as NOFPRINT, which would retain the original functionality, though inverted. That way it would be be used only where it was intentional (holodeck items could use this for example).
114 lines
3.2 KiB
Plaintext
114 lines
3.2 KiB
Plaintext
/obj/item/weapon/shield
|
|
name = "shield"
|
|
|
|
/obj/item/weapon/shield/riot
|
|
name = "riot shield"
|
|
desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder."
|
|
icon = 'icons/obj/weapons.dmi'
|
|
icon_state = "riot"
|
|
slot_flags = SLOT_BACK
|
|
force = 5.0
|
|
throwforce = 5.0
|
|
throw_speed = 1
|
|
throw_range = 4
|
|
w_class = 4.0
|
|
g_amt = 7500
|
|
m_amt = 1000
|
|
origin_tech = "materials=2"
|
|
attack_verb = list("shoved", "bashed")
|
|
var/cooldown = 0 //shield bash cooldown. based on world.time
|
|
|
|
IsShield()
|
|
return 1
|
|
|
|
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
if(istype(W, /obj/item/weapon/melee/baton))
|
|
if(cooldown < world.time - 25)
|
|
user.visible_message("<span class='warning'>[user] bashes [src] with [W]!</span>")
|
|
playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
|
|
cooldown = world.time
|
|
else
|
|
..()
|
|
/obj/item/weapon/shield/riot/roman
|
|
name = "roman shield"
|
|
desc = "Bears an inscription on the inside: <i>\"Romanes venio domus\"</i>."
|
|
icon_state = "roman_shield"
|
|
|
|
/obj/item/weapon/shield/energy
|
|
name = "energy combat shield"
|
|
desc = "A shield capable of stopping most projectile and melee attacks. Energy projectiles are reflected. It can be retracted, expanded, and stored anywhere."
|
|
icon = 'icons/obj/weapons.dmi'
|
|
icon_state = "eshield0" // eshield1 for expanded
|
|
force = 3.0
|
|
throwforce = 5.0
|
|
throw_speed = 1
|
|
throw_range = 4
|
|
w_class = 1
|
|
origin_tech = "materials=4;magnets=3;syndicate=4"
|
|
attack_verb = list("shoved", "bashed")
|
|
var/active = 0
|
|
|
|
/obj/item/weapon/shield/energy/IsShield()
|
|
return (active)
|
|
|
|
/obj/item/weapon/shield/energy/IsReflect()
|
|
return (active)
|
|
|
|
/obj/item/weapon/shield/energy/attack_self(mob/living/user)
|
|
if((CLUMSY in user.mutations) && prob(50))
|
|
user << "<span class='warning'>You beat yourself in the head with [src].</span>"
|
|
user.take_organ_damage(5)
|
|
active = !active
|
|
|
|
if(active)
|
|
force = 10
|
|
icon_state = "eshield[active]"
|
|
w_class = 4
|
|
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
|
|
user << "<span class='notice'>[src] is now active.</span>"
|
|
reflect_chance = 40
|
|
else
|
|
force = 3
|
|
icon_state = "eshield[active]"
|
|
w_class = 1
|
|
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
|
user << "<span class='notice'>[src] can now be concealed.</span>"
|
|
reflect_chance = 0
|
|
add_fingerprint(user)
|
|
|
|
|
|
|
|
/obj/item/weapon/cloaking_device
|
|
name = "cloaking device"
|
|
desc = "Use this to become invisible to the human eyesocket."
|
|
icon = 'icons/obj/device.dmi'
|
|
icon_state = "shield0"
|
|
var/active = 0.0
|
|
flags = CONDUCT
|
|
item_state = "electronic"
|
|
throwforce = 10.0
|
|
throw_speed = 2
|
|
throw_range = 10
|
|
w_class = 2.0
|
|
origin_tech = "magnets=3;syndicate=4"
|
|
|
|
|
|
/obj/item/weapon/cloaking_device/attack_self(mob/user as mob)
|
|
src.active = !( src.active )
|
|
if (src.active)
|
|
user << "\blue The cloaking device is now active."
|
|
src.icon_state = "shield1"
|
|
else
|
|
user << "\blue The cloaking device is now inactive."
|
|
src.icon_state = "shield0"
|
|
src.add_fingerprint(user)
|
|
user.update_icons()
|
|
return
|
|
|
|
/obj/item/weapon/cloaking_device/emp_act(severity)
|
|
active = 0
|
|
icon_state = "shield0"
|
|
if(ismob(loc))
|
|
loc:update_icons()
|
|
..()
|