Improved window code, mostly formatting and styles, but also general improvements.

I've tested it a fair bit, but there may be bugs, so please report those if you run into them.

Added an ismetroidadult() helper

Improved L6 code.
Made the syndie shuttle console impervious to bullets.
Made mirrors breakable.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5187 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
petethegoat@gmail.com
2012-11-25 17:09:38 +00:00
parent 8ae9dfd947
commit dbd759477e
5 changed files with 213 additions and 218 deletions

View File

@@ -99,3 +99,6 @@
add_fingerprint(usr) add_fingerprint(usr)
updateUsrDialog() updateUsrDialog()
return return
/obj/machinery/computer/syndicate_station/bullet_act(var/obj/item/projectile/Proj)
visible_message("[Proj] ricochets off [src]!") //let's not let them fuck themselves in the rear

View File

@@ -6,8 +6,12 @@
icon_state = "mirror" icon_state = "mirror"
density = 0 density = 0
anchored = 1 anchored = 1
var/shattered = 0
/obj/structure/mirror/attack_hand(mob/user as mob) /obj/structure/mirror/attack_hand(mob/user as mob)
if(shattered) return
if(ishuman(user)) if(ishuman(user))
var/mob/living/carbon/human/H = user var/mob/living/carbon/human/H = user
@@ -30,3 +34,62 @@
H.h_style = new_style H.h_style = new_style
H.update_hair() H.update_hair()
/obj/structure/mirror/proc/shatter()
if(shattered) return
shattered = 1
icon_state = "mirror_broke"
playsound(src, "shatter", 70, 1)
desc = "Oh no, seven years of bad luck!"
/obj/structure/mirror/bullet_act(var/obj/item/projectile/Proj)
if(prob(Proj.damage * 2))
if(!shattered)
shatter()
else
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
..()
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
if(prob(I.force * 2))
visible_message("<span class='warning'>[user] smashes [src] with [I]!</span>")
shatter()
else
visible_message("<span class='warning'>[user] hits [src] with [I]!</span>")
playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
/obj/structure/mirror/attack_alien(mob/user as mob)
if(islarva(user)) return
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
shatter()
/obj/structure/mirror/attack_animal(mob/user as mob)
if(!isanimal(user)) return
var/mob/living/simple_animal/M = user
if(M.melee_damage_upper <= 0) return
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
shatter()
/obj/structure/mirror/attack_metroid(mob/user as mob)
if(!ismetroidadult(user)) return
if(shattered)
playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
user.visible_message("<span class='danger'>[user] smashes [src]!</span>")
shatter()

View File

@@ -1,263 +1,195 @@
/obj/structure/window /obj/structure/window
name = "window" name = "window"
icon = 'icons/obj/structures.dmi'
desc = "A window." desc = "A window."
icon = 'icons/obj/structures.dmi'
density = 1 density = 1
layer = 3.2//Just above doors layer = 3.2//Just above doors
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1.0
flags = ON_BORDER
var/health = 14.0 var/health = 14.0
var/ini_dir = null var/ini_dir = null
var/state = 0 var/state = 0
var/reinf = 0 var/reinf = 0
var/silicate = 0 // number of units of silicate // var/silicate = 0 // number of units of silicate
var/icon/silicateIcon = null // the silicated icon // var/icon/silicateIcon = null // the silicated icon
pressure_resistance = 4*ONE_ATMOSPHERE
anchored = 1.0
flags = ON_BORDER
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj) /obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage health -= Proj.damage
..() ..()
if(health <=0) if(health <= 0)
new /obj/item/weapon/shard( src.loc ) new /obj/item/weapon/shard(loc)
new /obj/item/stack/rods( src.loc ) new /obj/item/stack/rods(loc)
src.density = 0
del(src) del(src)
return return
/obj/structure/window/ex_act(severity) /obj/structure/window/ex_act(severity)
switch(severity) switch(severity)
if(1.0) if(1.0)
del(src) del(src)
return return
if(2.0) if(2.0)
new /obj/item/weapon/shard( src.loc ) new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods( src.loc) if(reinf) new /obj/item/stack/rods(loc)
//SN src = null
del(src) del(src)
return return
if(3.0) if(3.0)
if (prob(50)) if(prob(50))
new /obj/item/weapon/shard( src.loc ) new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods( src.loc) if(reinf) new /obj/item/stack/rods(loc)
del(src) del(src)
return return
return
/obj/structure/window/blob_act() /obj/structure/window/blob_act()
if(reinf) new /obj/item/stack/rods( src.loc) new /obj/item/weapon/shard(loc)
density = 0 if(reinf) new /obj/item/stack/rods(loc)
del(src) del(src)
/obj/structure/window/meteorhit()
//world << "glass at [x],[y],[z] Mhit"
new /obj/item/weapon/shard( loc )
if(reinf) new /obj/item/stack/rods( loc)
del(src)
/obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0, air_group=0) /obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(istype(mover) && mover.checkpass(PASSGLASS)) if(istype(mover) && mover.checkpass(PASSGLASS))
return 1 return 1
if (src.dir == SOUTHWEST || src.dir == SOUTHEAST || src.dir == NORTHWEST || src.dir == NORTHEAST) if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
return 0 //full tile window, you can't move into it! return 0 //full tile window, you can't move into it!
if(get_dir(loc, target) == dir) if(get_dir(loc, target) == dir)
return !density return !density
else else
return 1 return 1
/obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf) /obj/structure/window/CheckExit(atom/movable/O as mob|obj, target as turf)
if(istype(O) && O.checkpass(PASSGLASS)) if(istype(O) && O.checkpass(PASSGLASS))
return 1 return 1
if (get_dir(O.loc, target) == dir) if(get_dir(O.loc, target) == dir)
return 0 return 0
return 1 return 1
/obj/structure/window/meteorhit()
//*****RM
//world << "glass at [x],[y],[z] Mhit"
src.health = 0
new /obj/item/weapon/shard( src.loc )
if(reinf) new /obj/item/stack/rods( src.loc)
src.density = 0
del(src)
return
/obj/structure/window/hitby(AM as mob|obj) /obj/structure/window/hitby(AM as mob|obj)
..() ..()
for(var/mob/O in viewers(src, null)) visible_message("<span class='danger'>[src] was hit by [AM].</span>")
O.show_message("\red <B>[src] was hit by [AM].</B>", 1)
var/tforce = 0 var/tforce = 0
if(ismob(AM)) if(ismob(AM))
tforce = 40 tforce = 40
else else if(isobj(AM))
tforce = AM:throwforce var/obj/item/I = AM
if(reinf) tforce /= 4.0 tforce = I.throwforce
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1) if(reinf) tforce *= 0.25
src.health = max(0, src.health - tforce) playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
if (src.health <= 7 && !reinf) health = max(0, health - tforce)
src.anchored = 0 if(health <= 7 && !reinf)
anchored = 0
update_nearby_icons() update_nearby_icons()
step(src, get_dir(AM, src)) step(src, get_dir(AM, src))
if (src.health <= 0) if(health <= 0)
new /obj/item/weapon/shard( src.loc ) new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods( src.loc) if(reinf) new /obj/item/stack/rods(loc)
src.density = 0
del(src) del(src)
return
//..() //Does this really need to be here twice? The parent proc doesn't even do anything yet. - Nodrak
return
//These all need to be rewritten to use visiblemessage()
/obj/structure/window/attack_hand() /obj/structure/window/attack_hand(mob/user as mob)
if ((HULK in usr.mutations) || (SUPRSTR in usr.augmentations)) if((HULK in user.mutations) || (SUPRSTR in user.augmentations))
usr << "\blue You smash through the window." user.say(pick("RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", "GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
usr.say(pick("RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", "GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
for(var/mob/O in oviewers()) new /obj/item/weapon/shard(loc)
if ((O.client && !( O.blinded ))) if(reinf) new /obj/item/stack/rods(loc)
O << "\red [usr] smashes through the window!"
src.health = 0
new /obj/item/weapon/shard( src.loc )
if(reinf) new /obj/item/stack/rods( src.loc)
src.density = 0
del(src) del(src)
return else
user.visible_message("<span class='notice'>[user] knocks on [src].</span>")
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
/obj/structure/window/attack_paw()
if ((HULK in usr.mutations)) /obj/structure/window/attack_paw(mob/user as mob)
usr << "\blue You smash through the window." return attack_hand(user)
usr.say(pick("RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", "GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded ))) /obj/structure/window/proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_metroid
O << "\red [usr] smashes through the window!" health -= damage
src.health = 0 if(health <= 0)
new /obj/item/weapon/shard( src.loc ) user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
if(reinf) new /obj/item/stack/rods( src.loc) new /obj/item/weapon/shard(loc)
src.density = 0 if(reinf) new /obj/item/stack/rods(loc)
del(src) del(src)
return else //for nicer text~
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
/obj/structure/window/attack_alien() playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
if (istype(usr, /mob/living/carbon/alien/larva))//Safety check for larva. /N
return
usr << "\green You smash against the window."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [usr] smashes against the window."
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
src.health -= 15
if(src.health <= 0)
usr << "\green You smash through the window."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [usr] smashes through the window!"
src.health = 0
new /obj/item/weapon/shard(src.loc)
if(reinf)
new /obj/item/stack/rods(src.loc)
src.density = 0
del(src)
return
return
/obj/structure/window/attack_animal(mob/living/simple_animal/M as mob) /obj/structure/window/attack_alien(mob/user as mob)
if (M.melee_damage_upper == 0) if(islarva(user)) return
return attack_generic(user, 15)
M << "\green You smash against the window."
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << "\red [M] smashes against the window."
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
src.health -= M.melee_damage_upper
if(src.health <= 0)
M << "\green You smash through the window."
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O << "\red [M] smashes through the window!"
src.health = 0
new /obj/item/weapon/shard(src.loc)
if(reinf)
new /obj/item/stack/rods(src.loc)
src.density = 0
del(src)
return
return
/obj/structure/window/attack_metroid() /obj/structure/window/attack_animal(mob/user as mob)
if(!istype(usr, /mob/living/carbon/metroid/adult)) if(!isanimal(user)) return
return var/mob/living/simple_animal/M = user
if(M.melee_damage_upper <= 0) return
attack_generic(M, M.melee_damage_upper)
/obj/structure/window/attack_metroid(mob/user as mob)
if(!ismetroidadult(user)) return
attack_generic(user, rand(10, 15))
usr<< "\green You smash against the window."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [usr] smashes against the window."
playsound(src.loc, 'sound/effects/Glasshit.ogg', 100, 1)
src.health -= rand(10,15)
if(src.health <= 0)
usr << "\green You smash through the window."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [usr] smashes through the window!"
src.health = 0
new /obj/item/weapon/shard(src.loc)
if(reinf)
new /obj/item/stack/rods(src.loc)
src.density = 0
del(src)
return
return
/obj/structure/window/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/structure/window/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!istype(W)) return//I really wish I did not need this if(!istype(W)) return//I really wish I did not need this
if (istype(W, /obj/item/weapon/screwdriver)) if(istype(W, /obj/item/weapon/screwdriver))
if(reinf && state >= 1) if(reinf && state >= 1)
state = 3 - state state = 3 - state
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1) playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
usr << ( state==1? "You have unfastened the window from the frame." : "You have fastened the window to the frame." ) user << (state == 1 ? "<span class='notice'>You have unfastened the window from the frame.</span>" : "<span class='notice'>You have fastened the window to the frame.</span>")
else if(reinf && state == 0) else if(reinf && state == 0)
anchored = !anchored anchored = !anchored
update_nearby_icons() update_nearby_icons()
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1) playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (src.anchored ? "You have fastened the frame to the floor." : "You have unfastened the frame from the floor.") user << (anchored ? "<span class='notice'>You have fastened the frame to the floor.</span>" : "<span class='notice'>You have unfastened the frame from the floor.</span>")
else if(!reinf) else if(!reinf)
src.anchored = !( src.anchored ) anchored = !anchored
update_nearby_icons() update_nearby_icons()
playsound(src.loc, 'sound/items/Screwdriver.ogg', 75, 1) playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
user << (src.anchored ? "You have fastened the window to the floor." : "You have unfastened the window.") user << (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>")
else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <=1) else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1)
state = 1-state; state = 1 - state
playsound(src.loc, 'sound/items/Crowbar.ogg', 75, 1) playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
user << (state ? "You have pried the window into the frame." : "You have pried the window out of the frame.") user << (state ? "<span class='notice'>You have pried the window into the frame.</span>" : "<span class='notice'>You have pried the window out of the frame.</span>")
else else
if(W.damtype == BRUTE || W.damtype == BURN) if(W.damtype == BRUTE || W.damtype == BURN)
hit(W.force) hit(W.force)
if (src.health <= 7) if(health <= 7)
src.anchored = 0 anchored = 0
update_nearby_icons() update_nearby_icons()
step(src, get_dir(user, src)) step(src, get_dir(user, src))
else else
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
..() ..()
return return
/obj/structure/window/proc/hit(var/damage, var/sound_effect = 1) /obj/structure/window/proc/hit(var/damage, var/sound_effect = 1)
if(reinf) damage *= 0.5
if(reinf) damage /= 2.0 health = max(0, health - damage)
src.health = max(0, src.health - damage)
if(sound_effect) if(sound_effect)
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
if (src.health <= 0) if(health <= 0)
if (src.dir == SOUTHWEST) if(dir == SOUTHWEST)
var/index = null var/index = null
index = 0 index = 0
while(index < 2) while(index < 2)
new /obj/item/weapon/shard( src.loc ) new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods( src.loc) if(reinf) new /obj/item/stack/rods(loc)
index++ index++
else else
new /obj/item/weapon/shard( src.loc ) new /obj/item/weapon/shard(loc)
if(reinf) new /obj/item/stack/rods( src.loc) if(reinf) new /obj/item/stack/rods(loc)
src.density = 0
del(src) del(src)
return return
@@ -267,44 +199,39 @@
set category = "Object" set category = "Object"
set src in oview(1) set src in oview(1)
if (src.anchored) if(anchored)
usr << "It is fastened to the floor; therefore, you can't rotate it!" usr << "It is fastened to the floor therefore you can't rotate it!"
return 0 return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before update_nearby_tiles(need_rebuild=1) //Compel updates before
dir = turn(dir, 90)
src.dir = turn(src.dir, 90) // updateSilicate()
updateSilicate()
update_nearby_tiles(need_rebuild=1) update_nearby_tiles(need_rebuild=1)
ini_dir = dir
src.ini_dir = src.dir
return return
/obj/structure/window/verb/revrotate() /obj/structure/window/verb/revrotate()
set name = "Rotate Window Clockwise" set name = "Rotate Window Clockwise"
set category = "Object" set category = "Object"
set src in oview(1) set src in oview(1)
if (src.anchored) if(anchored)
usr << "It is fastened to the floor; therefore, you can't rotate it!" usr << "It is fastened to the floor therefore you can't rotate it!"
return 0 return 0
update_nearby_tiles(need_rebuild=1) //Compel updates before update_nearby_tiles(need_rebuild=1) //Compel updates before
dir = turn(dir, 270)
src.dir = turn(src.dir, 270) // updateSilicate()
updateSilicate()
update_nearby_tiles(need_rebuild=1) update_nearby_tiles(need_rebuild=1)
ini_dir = dir
src.ini_dir = src.dir
return return
/*
/obj/structure/window/proc/updateSilicate() /obj/structure/window/proc/updateSilicate()
if(silicateIcon && silicate) if(silicateIcon && silicate)
src.icon = initial(icon) icon = initial(icon)
var/icon/I = icon(icon,icon_state,dir) var/icon/I = icon(icon,icon_state,dir)
@@ -314,13 +241,15 @@
I.SetIntensity(r,g,b) I.SetIntensity(r,g,b)
icon = I icon = I
silicateIcon = I silicateIcon = I
*/
/obj/structure/window/New(Loc,re=0) /obj/structure/window/New(Loc,re=0)
..() ..()
if(re) reinf = re if(re) reinf = re
src.ini_dir = src.dir ini_dir = dir
if(reinf) if(reinf)
icon_state = "rwindow" icon_state = "rwindow"
desc = "A reinforced window." desc = "A reinforced window."
@@ -337,26 +266,21 @@
return return
/obj/structure/window/Del() /obj/structure/window/Del()
density = 0 density = 0
update_nearby_tiles() update_nearby_tiles()
playsound(src, "shatter", 70, 1) playsound(src, "shatter", 70, 1)
update_nearby_icons() update_nearby_icons()
..() ..()
/obj/structure/window/Move() /obj/structure/window/Move()
update_nearby_tiles(need_rebuild=1) update_nearby_tiles(need_rebuild=1)
..() ..()
dir = ini_dir
src.dir = src.ini_dir
update_nearby_tiles(need_rebuild=1) update_nearby_tiles(need_rebuild=1)
return
//This proc has to do with airgroups and atmos, it has nothing to do with smoothwindows, that's update_nearby_tiles(). //This proc has to do with airgroups and atmos, it has nothing to do with smoothwindows, that's update_nearby_tiles().
/obj/structure/window/proc/update_nearby_tiles(need_rebuild) /obj/structure/window/proc/update_nearby_tiles(need_rebuild)
@@ -390,7 +314,7 @@
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc! //This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
/obj/structure/window/proc/update_nearby_icons() /obj/structure/window/proc/update_nearby_icons()
src.update_icon() update_icon()
for(var/direction in cardinal) for(var/direction in cardinal)
for(var/obj/structure/window/W in get_step(src,direction) ) for(var/obj/structure/window/W in get_step(src,direction) )
W.update_icon() W.update_icon()
@@ -402,21 +326,21 @@
//This spawn is here so windows get properly updated when one gets deleted. //This spawn is here so windows get properly updated when one gets deleted.
spawn(2) spawn(2)
if(!src) return if(!src) return
if (!is_fulltile()) if(!is_fulltile())
return return
var/junction = 0 //will be used to determine from which side the window is connected to other windows var/junction = 0 //will be used to determine from which side the window is connected to other windows
if (src.anchored) if(anchored)
for(var/obj/structure/window/W in orange(src,1)) for(var/obj/structure/window/W in orange(src,1))
if (W.anchored && W.density && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows. if(W.anchored && W.density && W.is_fulltile()) //Only counts anchored, not-destroyed fill-tile windows.
if (abs(src.x-W.x)-abs(src.y-W.y) ) //doesn't count windows, placed diagonally to src if(abs(x-W.x)-abs(y-W.y) ) //doesn't count windows, placed diagonally to src
junction |= get_dir(src,W) junction |= get_dir(src,W)
if (opacity) if(opacity)
src.icon_state = "twindow[junction]" icon_state = "twindow[junction]"
else else
if (reinf) if(reinf)
src.icon_state = "rwindow[junction]" icon_state = "rwindow[junction]"
else else
src.icon_state = "window[junction]" icon_state = "window[junction]"
return return
@@ -431,9 +355,9 @@
icon_state = "window" icon_state = "window"
/obj/structure/window/reinforced /obj/structure/window/reinforced
reinf = 1
icon_state = "rwindow"
name = "reinforced window" name = "reinforced window"
icon_state = "rwindow"
reinf = 1
/obj/structure/window/reinforced/tinted /obj/structure/window/reinforced/tinted
name = "tinted window" name = "tinted window"
@@ -441,5 +365,5 @@
opacity = 1 opacity = 1
/obj/structure/window/reinforced/tinted/frosted /obj/structure/window/reinforced/tinted/frosted
icon_state = "fwindow"
name = "frosted window" name = "frosted window"
icon_state = "fwindow"

View File

@@ -35,6 +35,11 @@
return 1 return 1
return 0 return 0
/proc/ismetroidadult(A)
if(istype(A, /mob/living/carbon/metroid/adult))
return 1
return 0
/proc/isrobot(A) /proc/isrobot(A)
if(istype(A, /mob/living/silicon/robot)) if(istype(A, /mob/living/silicon/robot))
return 1 return 1

View File

@@ -11,11 +11,11 @@
/obj/item/weapon/gun/projectile/automatic/mini_uzi /obj/item/weapon/gun/projectile/automatic/mini_uzi
name = "mini-uzi" name = "Uzi"
desc = "A lightweight, fast firing gun, for when you want someone dead. Uses .45 rounds." desc = "A lightweight, fast firing gun, for when you want someone dead. Uses .45 rounds."
icon_state = "mini-uzi" icon_state = "mini-uzi"
w_class = 3.0 w_class = 3.0
max_shells = 20 max_shells = 16
caliber = ".45" caliber = ".45"
origin_tech = "combat=5;materials=2;syndicate=8" origin_tech = "combat=5;materials=2;syndicate=8"
ammo_type = "/obj/item/ammo_casing/c45" ammo_type = "/obj/item/ammo_casing/c45"
@@ -103,7 +103,7 @@
if(loc != user) if(loc != user)
..() ..()
return //let them pick it up return //let them pick it up
if(!cover_open) if(!cover_open || (cover_open && !mag_inserted))
..() ..()
else if(cover_open && mag_inserted) else if(cover_open && mag_inserted)
//drop the mag //drop the mag