Merge branch 'master' of github.com:Baystation12/Baystation12

This commit is contained in:
cib
2012-12-09 15:34:15 +01:00
18 changed files with 283 additions and 126 deletions

View File

@@ -4,8 +4,8 @@
icon_state = "hardhat0_yellow"
flags = FPRINT | TABLEPASS
item_state = "hardhat0_yellow"
var/brightness_on = 4 //luminosity when on
var/on = 0
brightness_on = 4 //luminosity when on
light_on = 0
color = "yellow" //Determines used sprites: hardhat[on]_[color] and hardhat[on]_[color]2 (lying down sprite)
armor = list(melee = 30, bullet = 5, laser = 20,energy = 10, bomb = 20, bio = 10, rad = 20)
flags_inv = 0
@@ -15,24 +15,35 @@
if(!isturf(user.loc))
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
return
on = !on
icon_state = "hardhat[on]_[color]"
item_state = "hardhat[on]_[color]"
light_on = !light_on
icon_state = "hardhat[light_on]_[color]"
item_state = "hardhat[light_on]_[color]"
if(on) user.SetLuminosity(user.luminosity + brightness_on)
else user.SetLuminosity(user.luminosity - brightness_on)
if((light_on) && (user.luminosity < brightness_on))
user.SetLuminosity(brightness_on)
else
user.SetLuminosity(search_light(user, src))
pickup(mob/user)
if(on)
user.SetLuminosity(user.luminosity + brightness_on)
if(light_on)
if (user.luminosity < brightness_on)
user.SetLuminosity(brightness_on)
// user.UpdateLuminosity() //TODO: Carn
SetLuminosity(0)
dropped(mob/user)
if(on)
user.SetLuminosity(user.luminosity - brightness_on)
// user.UpdateLuminosity()
SetLuminosity(brightness_on)
if(light_on)
if ((layer <= 3) || (loc != user.loc))
user.SetLuminosity(search_light(user, src))
SetLuminosity(brightness_on)
// user.UpdateLuminosity()
equipped(mob/user, slot)
if(light_on)
if (user.luminosity < brightness_on)
user.SetLuminosity(brightness_on)
// user.UpdateLuminosity() //TODO: Carn
SetLuminosity(0)
/obj/item/clothing/head/hardhat/orange

View File

@@ -122,32 +122,42 @@
color = "pumpkin"
flags = FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH | BLOCKHAIR
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
var/brightness_on = 2 //luminosity when on
var/on = 0
brightness_on = 2 //luminosity when on
light_on = 0
attack_self(mob/user)
if(!isturf(user.loc))
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
return
on = !on
icon_state = "hardhat[on]_[color]"
item_state = "hardhat[on]_[color]"
light_on = !light_on
icon_state = "hardhat[light_on]_[color]"
item_state = "hardhat[light_on]_[color]"
if(on) user.SetLuminosity(user.luminosity + brightness_on)
else user.SetLuminosity(user.luminosity - brightness_on)
if((light_on) && (user.luminosity < brightness_on))
user.SetLuminosity(brightness_on)
else
user.SetLuminosity(search_light(user, src))
pickup(mob/user)
if(on)
user.SetLuminosity(user.luminosity + brightness_on)
// user.UpdateLuminosity()
if(light_on)
if (user.luminosity < brightness_on)
user.SetLuminosity(brightness_on)
// user.UpdateLuminosity() //TODO: Carn
SetLuminosity(0)
dropped(mob/user)
if(on)
user.SetLuminosity(user.luminosity - brightness_on)
// user.UpdateLuminosity()
SetLuminosity(brightness_on)
if(light_on)
if ((layer <= 3) || (loc != user.loc))
user.SetLuminosity(search_light(user, src))
SetLuminosity(brightness_on)
// user.UpdateLuminosity()
equipped(mob/user, slot)
if(light_on)
if (user.luminosity < brightness_on)
user.SetLuminosity(brightness_on)
// user.UpdateLuminosity() //TODO: Carn
SetLuminosity(0)
/*
* Kitty ears
*/

View File

@@ -4,10 +4,10 @@
desc = "A special helmet designed for work in a hazardous, low-pressure environment. Has radiation shielding."
icon_state = "rig0-engineering"
item_state = "eng_helm"
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 60)
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 100)
allowed = list(/obj/item/device/flashlight)
var/brightness_on = 4 //luminosity when on
var/on = 0
brightness_on = 4 //luminosity when on
light_on = 0
color = "engineering" //Determines used sprites: rig[on]-[color] and rig[on]-[color]2 (lying down sprite)
icon_action_button = "action_hardhat"
heat_protection = HEAD
@@ -17,24 +17,35 @@
if(!isturf(user.loc))
user << "You cannot turn the light on while in this [user.loc]" //To prevent some lighting anomalities.
return
on = !on
icon_state = "rig[on]-[color]"
light_on = !light_on
icon_state = "rig[light_on]-[color]"
// item_state = "rig[on]-[color]"
if(on) user.SetLuminosity(user.luminosity + brightness_on)
else user.SetLuminosity(user.luminosity - brightness_on)
if((light_on) && (user.luminosity < brightness_on))
user.SetLuminosity(brightness_on)
else
user.SetLuminosity(search_light(user, src))
pickup(mob/user)
if(on)
user.SetLuminosity(user.luminosity + brightness_on)
// user.UpdateLuminosity()
if(light_on)
if (user.luminosity < brightness_on)
user.SetLuminosity(brightness_on)
// user.UpdateLuminosity() //TODO: Carn
SetLuminosity(0)
dropped(mob/user)
if(on)
user.SetLuminosity(user.luminosity - brightness_on)
// user.UpdateLuminosity()
SetLuminosity(brightness_on)
if(light_on)
if ((layer <= 3) || (loc != user.loc))
user.SetLuminosity(search_light(user, src))
SetLuminosity(brightness_on)
// user.UpdateLuminosity()
equipped(mob/user, slot)
if(light_on)
if (user.luminosity < brightness_on)
user.SetLuminosity(brightness_on)
// user.UpdateLuminosity() //TODO: Carn
SetLuminosity(0)
/obj/item/clothing/suit/space/rig
name = "engineering hardsuit"
@@ -42,7 +53,7 @@
icon_state = "rig-engineering"
item_state = "eng_hardsuit"
slowdown = 2
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 60)
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 100)
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/satchel,/obj/item/device/t_scanner,/obj/item/weapon/pickaxe, /obj/item/weapon/rcd)
heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECITON_TEMPERATURE

View File

@@ -529,7 +529,7 @@
desc = "A colorful pair of magboots with the name Susan Harris clearly written on the back."
icon = 'custom_items.dmi'
icon_state = "atmosmagboots0"
verb/toggle()
toggle()
set name = "Toggle Magboots"
set category = "Object"
set src in usr

View File

@@ -421,19 +421,19 @@
if(!item) return //Grab processing has a chance of returning null
item.layer = initial(item.layer)
u_equip(item)
update_icons()
if(src.client)
src.client.screen -= item
//if(src.client)
//src.client.screen -= item
item.loc = src.loc
//item.loc = src.loc
if(istype(item, /obj/item))
item:dropped(src) // let it know it's been dropped
//if(istype(item, /obj/item))
//item:dropped(src) // let it know it's been dropped
//actually throw it!
if (item)
item.layer = initial(item.layer)
src.visible_message("\red [src] has thrown [item].")
if(!src.lastarea)

View File

@@ -159,9 +159,8 @@
client.screen -= W
W.loc = loc
W.dropped(src)
if(W)
W.layer = initial(W.layer)
//if(W)
//W.layer = initial(W.layer)
update_action_buttons()
return 1
@@ -592,7 +591,15 @@ It can still be worn/put on as normal.
target.internals.icon_state = "internal1"
if(slot_to_process)
if(strip_item) //Stripping an item from the mob
target.u_equip(strip_item)
var/obj/item/W = strip_item
target.u_equip(W)
if (target.client)
target.client.screen -= W
if (W)
W.loc = target.loc
W.layer = initial(W.layer)
W.dropped(target)
W.add_fingerprint(source)
if(slot_to_process == slot_l_store) //pockets! Needs to process the other one too. Snowflake code, wooo! It's not like anyone will rewrite this anytime soon. If I'm wrong then... CONGRATULATIONS! ;)
if(target.r_store)
target.u_equip(target.r_store) //At this stage l_store is already processed by the code above, we only need to process r_store.
@@ -601,6 +608,7 @@ It can still be worn/put on as normal.
if(item.mob_can_equip(target, slot_to_process, 0))
source.u_equip(item)
target.equip_to_slot_if_possible(item, slot_to_process, 0, 1, 1)
item.dropped(source)
source.update_icons()
target.update_icons()

View File

@@ -102,8 +102,8 @@
target.client.screen -= W
if (W)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.dropped(target)
W.add_fingerprint(source)
else
if (istype(item, /obj/item))
@@ -112,6 +112,8 @@
item.layer = 20
target.l_hand = item
item.loc = target
item.dropped(source)
item.equipped(target,target.l_hand)
if("r_hand")
if (target.r_hand)
var/obj/item/W = target.r_hand
@@ -120,8 +122,8 @@
target.client.screen -= W
if (W)
W.loc = target.loc
W.dropped(target)
W.layer = initial(W.layer)
W.dropped(target)
W.add_fingerprint(source)
else
if (istype(item, /obj/item))
@@ -130,6 +132,8 @@
item.layer = 20
target.r_hand = item
item.loc = target
item.dropped(source)
item.equipped(target,target.r_hand)
if("back")
if (target.back)
var/obj/item/W = target.back

View File

@@ -179,7 +179,7 @@
src.modules += new /obj/item/weapon/reagent_containers/robodropper(src)
var/obj/item/weapon/lighter/zippo/L = new /obj/item/weapon/lighter/zippo(src)
L.lit = 1
L.light_on = 1
src.modules += L
src.modules += new /obj/item/weapon/tray(src)

View File

@@ -216,8 +216,8 @@
seed = "/obj/item/seeds/glowberryseed"
name = "bunch of glow-berries"
desc = "Nutritious!"
var/on = 1
var/brightness_on = 2 //luminosity when on
light_on = 1
brightness_on = 2 //luminosity when on
icon_state = "glowberrypile"
New()
..()