Merge pull request #15 from Aurorastation/master

updates
This commit is contained in:
Duck-
2015-04-01 10:18:55 -04:00
63 changed files with 1093 additions and 367 deletions
+82
View File
@@ -39,6 +39,8 @@
var/armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
var/list/allowed = null //suit storage stuff.
var/obj/item/device/uplink/hidden/hidden_uplink = null // All items can have an uplink hidden inside, just remember to add the triggers.
var/zoomdevicename = null //name used for message when binoculars/scope is used
var/zoom = 0 //1 if item is actively being used to zoom. For scoped guns and binoculars.
/* Species-specific sprites, concept stolen from Paradise//vg/.
ex:
@@ -219,6 +221,11 @@
// apparently called whenever an item is removed from a slot, container, or anything else.
/obj/item/proc/dropped(mob/user as mob)
..()
if(zoom) //binoculars, scope, etc
user.client.view = world.view
user.client.pixel_x = 0
user.client.pixel_y = 0
zoom = 0
// called just as an item is picked up (loc is not yet changed)
/obj/item/proc/pickup(mob/user)
@@ -644,3 +651,78 @@
if(I && !I.abstract)
I.showoff(src)
/*
For zooming with scope or binoculars. This is called from
modules/mob/mob_movement.dm if you move you will be zoomed out
modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
*/
/obj/item/proc/zoom(var/tileoffset = 11,var/viewsize = 12) //tileoffset is client view offset in the direction the user is facing. viewsize is how far out this thing zooms. 7 is normal view
var/devicename
if(zoomdevicename)
devicename = zoomdevicename
else
devicename = src.name
var/cannotzoom
if(usr.stat || !(istype(usr,/mob/living/carbon/human)))
usr << "You are unable to focus through the [devicename]"
cannotzoom = 1
else if(!zoom && global_hud.darkMask[1] in usr.client.screen)
usr << "Your welding equipment gets in the way of you looking through the [devicename]"
cannotzoom = 1
else if(!zoom && usr.get_active_hand() != src)
usr << "You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better"
cannotzoom = 1
if(!zoom && !cannotzoom)
if(!usr.hud_used.hud_shown)
usr.button_pressed_F12(1) // If the user has already limited their HUD this avoids them having a HUD when they zoom in
usr.button_pressed_F12(1)
usr.client.view = viewsize
zoom = 1
var/tilesize = 32
var/viewoffset = tilesize * tileoffset
switch(usr.dir)
if (NORTH)
usr.client.pixel_x = 0
usr.client.pixel_y = viewoffset
if (SOUTH)
usr.client.pixel_x = 0
usr.client.pixel_y = -viewoffset
if (EAST)
usr.client.pixel_x = viewoffset
usr.client.pixel_y = 0
if (WEST)
usr.client.pixel_x = -viewoffset
usr.client.pixel_y = 0
usr.visible_message("[usr] peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"].")
/*
if(istype(usr,/mob/living/carbon/human/))
var/mob/living/carbon/human/H = usr
usr.visible_message("[usr] holds [devicename] up to [H.get_visible_gender() == MALE ? "his" : H.get_visible_gender() == FEMALE ? "her" : "their"] eyes.")
else
usr.visible_message("[usr] holds [devicename] up to its eyes.")
*/
else
usr.client.view = world.view
if(!usr.hud_used.hud_shown)
usr.button_pressed_F12(1)
zoom = 0
usr.client.pixel_x = 0
usr.client.pixel_y = 0
if(!cannotzoom)
usr.visible_message("[zoomdevicename ? "[usr] looks up from the [zoomdevicename] of the [src.name]" : "[usr] lowers the [src.name]"].")
return
@@ -0,0 +1,18 @@
/obj/item/device/binoculars
name = "binoculars"
desc = "A pair of binoculars."
icon_state = "binoculars"
flags = FPRINT | TABLEPASS| CONDUCT
force = 5.0
w_class = 2.0
throwforce = 5.0
throw_range = 15
throw_speed = 3
//matter = list("metal" = 50,"glass" = 50)
/obj/item/device/binoculars/attack_self(mob/user)
zoom()
@@ -4,7 +4,8 @@
w_class = 4
icon = 'icons/obj/device.dmi'
icon_state = "suitcooler0"
slot_flags = SLOT_BACK //you can carry it on your back if you want, but it won't do anything unless attached to suit storage
item_state = "suitcooler0" //hacky, but yeah, works for now.
slot_flags = SLOT_BACK //will now work while on back - Skull132
//copied from tank.dm
flags = FPRINT | TABLEPASS | CONDUCT
@@ -84,10 +85,10 @@
var/mob/living/carbon/human/H = M
if (!H.wear_suit || H.s_store != src)
return 0
if (H.wear_suit && (H.back == src || H.s_store == src))
return 1
return 1
return 0
/obj/item/device/suit_cooling_unit/proc/turn_on()
if(!cell)
+4 -1
View File
@@ -142,6 +142,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
randomItems.Add("/obj/item/weapon/gun/energy/crossbow") //Energy Crossbow
randomItems.Add("/obj/item/device/powersink") //Powersink
randomItems.Add("/obj/item/weapon/cane/syndie")
randomItems.Add("/obj/item/clothing/gloves/force/syndicate")
if(uses > 3)
randomItems.Add("/obj/item/weapon/melee/energy/sword") //Energy Sword
@@ -198,7 +199,7 @@ A list of items and costs is stored under the datum of every game mode, alongsid
uses -= 6
if("/obj/item/weapon/gun/energy/crossbow" , "/obj/item/device/powersink" , "/obj/item/weapon/cane/syndie")
uses -= 5
if("/obj/item/weapon/melee/energy/sword" , "/obj/item/clothing/mask/gas/voice" , "/obj/item/device/chameleon" , "/obj/item/weapon/melee/baton/stunrod/loaded")
if("/obj/item/weapon/melee/energy/sword" , "/obj/item/clothing/mask/gas/voice" , "/obj/item/device/chameleon" , "/obj/item/weapon/melee/baton/stunrod/loaded", "/obj/item/clothing/gloves/force/syndicate")
uses -= 4
if("/obj/item/weapon/storage/box/emps" , "/obj/item/weapon/pen/paralysis" , "/obj/item/weapon/cartridge/syndicate" , "/obj/item/clothing/under/chameleon" , \
"/obj/item/weapon/card/emag" , "/obj/item/weapon/storage/box/syndie_kit/space" , "/obj/item/device/encryptionkey/binary" , \
@@ -278,6 +279,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid
feedback_add_details("traitor_uplink_items_bought","MM")
if("/obj/item/weapon/melee/baton/stunrod/loaded")
feedback_add_details("traitor_uplink_items_bought","SR")
if("/obj/item/clothing/gloves/force/syndicate")
feedback_add_details("traitor_uplink_items_bought","FG")
@@ -111,6 +111,9 @@
if (user)
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/C = M
if (C.species.flags & (IS_SYNTHETIC | NO_SCAN))
return
if(!inuse)
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
@@ -23,7 +23,8 @@
"/obj/item/weapon/photo",
"/obj/item/weapon/reagent_containers/dropper",
"/obj/item/weapon/screwdriver",
"/obj/item/weapon/stamp")
"/obj/item/weapon/stamp",
"/obj/item/clothing/tie/fluff/kane_badge")
slot_flags = SLOT_ID
var/obj/item/weapon/card/id/front_id = null
+8 -6
View File
@@ -173,7 +173,7 @@
attack_verb = list("jabbed","stabbed","ripped")
/obj/item/weapon/canesword
name = "cane sword"
name = "thin sword"
sharp = 1
edge = 1
desc = "A thin, sharp blade with an elegant handle."
@@ -190,7 +190,7 @@
//Using a modified cane, with a storage var, instead of a box. Because the box idea is meh, in terms of the interface.
/obj/item/weapon/cane/syndie
var/sword //For holding the blade
var/obj/item/weapon/canesword/sword //For holding the blade
var/locked //A small lock, so that you can't accidentally unsheathe it
New()
@@ -201,7 +201,9 @@
proc/unsheathe(mob/user as mob)
if(sword)
user.put_in_hands(sword)
user.visible_message("[user] takes the handle and draws a sword from inside the [src].", "You take the [src] by the handle and draw out a sharp blade from it.")
user.visible_message("\blue [user] takes the handle and draws a sword from inside the [src].", "\blue You take the [src] by the handle and draw out a sharp blade from it.")
sword.add_fingerprint(user)
add_fingerprint(user)
sword = null
icon_state = "cane_empty"
update_icon()
@@ -211,10 +213,10 @@
switch(locked)
if(1)
locked = 0
user << "You twist and unlock the sword handle from the [src]."
user << "\blue You twist and unlock the sword handle from the [src]."
if(0)
locked = 1
user << "You twist and lock the sword handle to the [src]."
user << "\blue You twist and lock the sword handle to the [src]."
attack_self(mob/user as mob)
if(iscarbon(user))
@@ -235,7 +237,7 @@
W.add_fingerprint(user)
add_fingerprint(user)
icon_state = "cane"
user << "You sheathe the sword, and lock its handle to the [src]."
user << "\blue You sheathe the sword, and lock its handle to the [src]."
locked = 1
update_icon()