Merge pull request #2032 from Markolie/intercom
In-hand update, temperature gun update
@@ -1,3 +1,4 @@
|
||||
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
/*
|
||||
@@ -1765,3 +1766,38 @@ var/mob/dview/dview_mob = new
|
||||
if(orbiting)
|
||||
loc = get_turf(orbiting)
|
||||
orbiting = null
|
||||
|
||||
//Centers an image.
|
||||
//Requires:
|
||||
//The Image
|
||||
//The x dimension of the icon file used in the image
|
||||
//The y dimension of the icon file used in the image
|
||||
// eg: center_image(I, 32,32)
|
||||
// eg2: center_image(I, 96,96)
|
||||
/proc/center_image(var/image/I, x_dimension = 0, y_dimension = 0)
|
||||
if(!I)
|
||||
return
|
||||
|
||||
if(!x_dimension || !y_dimension)
|
||||
return
|
||||
|
||||
//Get out of here, punk ass kids calling procs needlessly
|
||||
if((x_dimension == world.icon_size) && (y_dimension == world.icon_size))
|
||||
return I
|
||||
|
||||
//Offset the image so that it's bottom left corner is shifted this many pixels
|
||||
//This makes it infinitely easier to draw larger inhands/images larger than world.iconsize
|
||||
//but still use them in game
|
||||
var/x_offset = -((x_dimension/world.icon_size)-1)*(world.icon_size*0.5)
|
||||
var/y_offset = -((y_dimension/world.icon_size)-1)*(world.icon_size*0.5)
|
||||
|
||||
//Correct values under world.icon_size
|
||||
if(x_dimension < world.icon_size)
|
||||
x_offset *= -1
|
||||
if(y_dimension < world.icon_size)
|
||||
y_offset *= -1
|
||||
|
||||
I.pixel_x = x_offset
|
||||
I.pixel_y = y_offset
|
||||
|
||||
return I
|
||||
|
||||
@@ -520,7 +520,6 @@
|
||||
throwforce = 20
|
||||
attack_verb = list("smashed", "slammed", "whacked", "thwacked")
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_override = 'icons/mob/in-hand/staff.dmi'
|
||||
icon_state = "bostaff0"
|
||||
|
||||
|
||||
|
||||
@@ -124,7 +124,6 @@
|
||||
icon_state = "arm_blade"
|
||||
item_state = "arm_blade"
|
||||
flags = ABSTRACT | NODROP
|
||||
icon_override = 'icons/mob/in-hand/changeling.dmi'
|
||||
w_class = 5.0
|
||||
sharp = 1
|
||||
edge = 1
|
||||
@@ -206,7 +205,6 @@
|
||||
flags = NODROP
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "ling_shield"
|
||||
icon_override = 'icons/mob/in-hand/changeling.dmi'
|
||||
|
||||
var/remaining_uses //Set by the changeling ability.
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
on_use_sound = "sound/magic/Disintegrate.ogg"
|
||||
icon_state = "disintegrate"
|
||||
item_state = "disintegrate"
|
||||
icon_override = 'icons/mob/in-hand/spells.dmi'
|
||||
|
||||
/obj/item/weapon/melee/touch_attack/disintegrate/afterattack(atom/target, mob/living/carbon/user, proximity)
|
||||
if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //exploding after touching yourself would be bad
|
||||
@@ -64,7 +63,6 @@
|
||||
on_use_sound = "sound/magic/FleshToStone.ogg"
|
||||
icon_state = "fleshtostone"
|
||||
item_state = "fleshtostone"
|
||||
icon_override = 'icons/mob/in-hand/spells.dmi'
|
||||
|
||||
/obj/item/weapon/melee/touch_attack/fleshtostone/afterattack(atom/target, mob/living/carbon/user, proximity)
|
||||
if(!proximity || target == user || !ismob(target) || !iscarbon(user) || user.lying || user.handcuffed) //getting hard after touching yourself would also be bad
|
||||
|
||||
@@ -6,6 +6,14 @@
|
||||
var/image/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
|
||||
var/blood_overlay_color = null
|
||||
var/item_state = null
|
||||
var/lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
var/righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
|
||||
//Dimensions of the lefthand_file and righthand_file vars
|
||||
//eg: 32x32 sprite, 64x64 sprite, etc.
|
||||
var/inhand_x_dimension = 32
|
||||
var/inhand_y_dimension = 32
|
||||
|
||||
var/r_speed = 1.0
|
||||
var/health = null
|
||||
var/hitsound = null
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
icon_state = "camera_bug"
|
||||
w_class = 1.0
|
||||
item_state = "camera_bug"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "A powerful and versatile flashbulb device, with applications ranging from disorienting attackers to acting as visual receptors in robot production."
|
||||
icon_state = "flash"
|
||||
item_state = "flashtool" //looks exactly like a flash (and nothing like a flashbang)
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
throwforce = 0
|
||||
w_class = 1
|
||||
throw_speed = 3
|
||||
|
||||
@@ -95,7 +95,6 @@
|
||||
desc = "A robust flashlight used by security."
|
||||
icon_state = "seclite"
|
||||
item_state = "seclite"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
force = 9 // Not as good as a stun baton.
|
||||
brightness_on = 5 // A little better than the standard flashlight.
|
||||
hitsound = 'sound/weapons/genhit1.ogg'
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
icon = 'icons/obj/musician.dmi'
|
||||
icon_state = "guitar"
|
||||
item_state = "guitar"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
force = 10
|
||||
var/datum/song/handheld/song
|
||||
hitsound = 'sound/effects/guitarsmash.ogg'
|
||||
|
||||
@@ -113,7 +113,6 @@ REAGENT SCANNER
|
||||
name = "Health Analyzer"
|
||||
icon_state = "health"
|
||||
item_state = "healthanalyzer"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
desc = "A hand-held body scanner able to distinguish vital signs of the subject."
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
@@ -76,7 +76,6 @@ effective or pretty fucking useless.
|
||||
name = "Health Analyzer"
|
||||
icon_state = "health2"
|
||||
item_state = "healthanalyzer"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
desc = "A hand-held body scanner able to distinguish vital signs of the subject. A strange microlaser is hooked on to the scanning end."
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "Used by obese officers to save their breath for running."
|
||||
icon_state = "voice0"
|
||||
item_state = "flashtool" //looks exactly like a flash (and nothing like a flashbang)
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
w_class = 1.0
|
||||
flags = CONDUCT
|
||||
|
||||
|
||||
@@ -131,6 +131,8 @@
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "revolver"
|
||||
item_state = "gun"
|
||||
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = 3.0
|
||||
@@ -207,6 +209,8 @@
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "crossbow"
|
||||
item_state = "crossbow"
|
||||
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
|
||||
w_class = 2.0
|
||||
attack_verb = list("attacked", "struck", "hit")
|
||||
var/bullets = 5
|
||||
@@ -1100,7 +1104,6 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
icon = 'icons/obj/toy.dmi'
|
||||
icon_state = "foamblade"
|
||||
item_state = "arm_blade"
|
||||
icon_override = 'icons/mob/in-hand/changeling.dmi'
|
||||
attack_verb = list("pricked", "absorbed", "gored")
|
||||
w_class = 2
|
||||
|
||||
@@ -1113,7 +1116,6 @@ obj/item/toy/cards/deck/syndicate/black
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "flash"
|
||||
item_state = "flashtool"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
w_class = 1
|
||||
|
||||
/obj/item/toy/flash/attack(mob/living/M, mob/user)
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
icon = 'icons/obj/chronos.dmi'
|
||||
icon_state = "chronogun"
|
||||
item_state = "chronogun"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
w_class = 3.0
|
||||
projectile_type = "/obj/item/projectile/energy/chrono_beam"
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "defibunit"
|
||||
item_state = "defibunit"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
slot_flags = SLOT_BACK
|
||||
force = 5
|
||||
throwforce = 6
|
||||
@@ -249,7 +248,6 @@
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "defibpaddles"
|
||||
item_state = "defibpaddles"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
force = 0
|
||||
throwforce = 6
|
||||
w_class = 4
|
||||
|
||||
@@ -8,7 +8,6 @@ var/turf/T
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "banana"
|
||||
item_state = "flashbang"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
var/deliveryamt = 8
|
||||
var/spawner_type = /obj/item/weapon/bananapeel
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
desc = "A do it yourself grenade casing!"
|
||||
icon_state = "chemg"
|
||||
item_state = "flashbang"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
var/bomb_state = "chembomb"
|
||||
var/payload_name = null // used for spawned grenades
|
||||
w_class = 2
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "HONK! brand Bananas. In a special applicator for rapid slipping of wide areas."
|
||||
icon_state = "banana"
|
||||
item_state = "flashbang"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
w_class = 2.0
|
||||
force = 2.0
|
||||
var/stage = 0
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
name = "classic emp grenade"
|
||||
icon_state = "emp"
|
||||
item_state = "emp"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
origin_tech = "materials=2;magnets=3"
|
||||
|
||||
prime()
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
name = "flashbang"
|
||||
icon_state = "flashbang"
|
||||
item_state = "flashbang"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
origin_tech = "materials=2;combat=1"
|
||||
var/banglet = 0
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "improvised_grenade"
|
||||
item_state = "flashbang"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
@@ -72,7 +71,6 @@
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "improvised_grenade"
|
||||
item_state = "flashbang"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
flags = CONDUCT
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "grenade"
|
||||
item_state = "flashbang"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
flags = CONDUCT
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
icon_state = "flashbang"
|
||||
det_time = 20
|
||||
item_state = "flashbang"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
slot_flags = SLOT_BELT
|
||||
var/datum/effect/effect/system/bad_smoke_spread/smoke
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "delivery"
|
||||
item_state = "flashbang"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
origin_tech = "materials=3;magnets=4"
|
||||
var/banglet = 0
|
||||
var/spawner_type = null // must be an object path
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
icon = 'icons/obj/grenade.dmi'
|
||||
icon_state = "syndicate"
|
||||
item_state = "flashbang"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
origin_tech = "materials=3;magnets=4;syndicate=4"
|
||||
|
||||
/obj/item/weapon/grenade/syndieminibomb/prime()
|
||||
|
||||
@@ -110,7 +110,6 @@
|
||||
desc = "An entangling bolas. Throw at your foes to trip them and prevent them from running."
|
||||
gender = NEUTER
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_override = 'icons/mob/in-hand/swords.dmi'
|
||||
icon_state = "bolas"
|
||||
siemens_coefficient = 1
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
name = "energy sword"
|
||||
desc = "May the force be within you."
|
||||
icon_state = "sword0"
|
||||
icon_override = 'icons/mob/in-hand/swords.dmi'
|
||||
force = 3.0
|
||||
throwforce = 5.0
|
||||
throw_speed = 1
|
||||
|
||||
@@ -155,3 +155,9 @@
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/emproof/corrupt()
|
||||
return
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/temperaturegun
|
||||
name = "temperature gun cell"
|
||||
desc = "A specially designed power cell for heating and cooling projectiles"
|
||||
icon_state = "icell"
|
||||
maxcharge = 900
|
||||
@@ -88,7 +88,6 @@
|
||||
desc = "An advanced riot shield made of lightweight materials that collapses for easy storage."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "teleriot0"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
slot_flags = null
|
||||
force = 3
|
||||
throwforce = 3
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/obj/item/weapon/picket_sign
|
||||
icon_state = "picket"
|
||||
item_state = "picket"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
name = "blank picket sign"
|
||||
desc = "It's blank"
|
||||
force = 5
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "broom"
|
||||
item_state = "broom0"
|
||||
icon_override = 'icons/mob/in-hand/staff.dmi'
|
||||
|
||||
/obj/item/weapon/twohanded/staff/broom/attack_self(mob/user as mob)
|
||||
..()
|
||||
@@ -58,7 +57,6 @@
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "horsebroom"
|
||||
item_state = "horsebroom0"
|
||||
icon_override = 'icons/mob/in-hand/staff.dmi'
|
||||
|
||||
/obj/item/weapon/twohanded/staff/broom/horsebroom/attack_self(mob/user as mob)
|
||||
..()
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
desc = "Special mechanical module made to store, sort, and apply standard machine parts."
|
||||
icon_state = "RPED"
|
||||
item_state = "RPED"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
w_class = 5
|
||||
can_hold = list("/obj/item/weapon/stock_parts")
|
||||
storage_slots = 50
|
||||
|
||||
@@ -224,7 +224,6 @@
|
||||
/obj/item/weapon/storage/backpack/duffel
|
||||
name = "duffelbag"
|
||||
desc = "A large grey duffelbag designed to hold more items than a regular bag."
|
||||
icon_override = 'icons/mob/in-hand/duffelbag.dmi'
|
||||
icon_state = "duffel"
|
||||
item_state = "duffel"
|
||||
storage_slots = 9 // Duffelbags can hold more items.
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
name = "first-aid kit"
|
||||
desc = "It's an emergency medical kit for those serious boo-boos."
|
||||
icon_state = "firstaid"
|
||||
icon_override = 'icons/mob/in-hand/medkits.dmi'
|
||||
throw_speed = 2
|
||||
throw_range = 8
|
||||
var/empty = 0
|
||||
|
||||
@@ -205,7 +205,6 @@
|
||||
desc = "A high-tech nitrogen tank designed specifically for Vox."
|
||||
icon_state = "emergency_vox"
|
||||
item_state = "emergency_vox"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
volume = 25
|
||||
|
||||
|
||||
|
||||
@@ -108,7 +108,6 @@
|
||||
icon = 'icons/obj/watertank.dmi'
|
||||
icon_state = "mister"
|
||||
item_state = "mister"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
w_class = 4.0
|
||||
amount_per_transfer_from_this = 50
|
||||
possible_transfer_amounts = list(25,50,100)
|
||||
@@ -210,7 +209,6 @@
|
||||
icon = 'icons/obj/watertank.dmi'
|
||||
icon_state = "atmos_nozzle"
|
||||
item_state = "nozzleatmos"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
safety = 0
|
||||
max_water = 200
|
||||
power = 8
|
||||
|
||||
@@ -199,7 +199,6 @@ obj/item/weapon/twohanded/
|
||||
/obj/item/weapon/twohanded/dualsaber
|
||||
var/hacked = 0
|
||||
var/blade_color
|
||||
icon_override = 'icons/mob/in-hand/swords.dmi'
|
||||
icon_state = "dualsaber0"
|
||||
name = "double-bladed energy sword"
|
||||
desc = "Handle with care."
|
||||
@@ -365,7 +364,6 @@ obj/item/weapon/twohanded/
|
||||
///CHAINSAW///
|
||||
|
||||
/obj/item/weapon/twohanded/chainsaw
|
||||
icon_override = 'icons/mob/in-hand/swords.dmi'
|
||||
icon_state = "chainsaw0"
|
||||
name = "Chainsaw"
|
||||
desc = "Perfect for felling trees or fellow spacemen."
|
||||
@@ -423,8 +421,6 @@ obj/item/weapon/twohanded/
|
||||
/obj/item/weapon/twohanded/singularityhammer
|
||||
name = "singularity hammer"
|
||||
desc = "The pinnacle of close combat technology, the hammer harnesses the power of a miniaturized singularity to deal crushing blows."
|
||||
|
||||
icon_override = 'icons/mob/in-hand/swords.dmi'
|
||||
icon_state = "mjollnir0"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
@@ -498,7 +494,6 @@ obj/item/weapon/twohanded/
|
||||
/obj/item/weapon/twohanded/mjollnir
|
||||
name = "Mjollnir"
|
||||
desc = "A weapon worthy of a god, able to strike with the force of a lightning bolt. It crackles with barely contained energy."
|
||||
icon_override = 'icons/mob/in-hand/swords.dmi'
|
||||
icon_state = "mjollnir0"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
@@ -546,9 +541,7 @@ obj/item/weapon/twohanded/
|
||||
/obj/item/weapon/twohanded/knighthammer
|
||||
name = "singuloth knight's hammer"
|
||||
desc = "A hammer made of sturdy metal with a golden skull adorned with wings on either side of the head. <br>This weapon causes devastating damage to those it hits due to a power field sustained by a mini-singularity inside of the hammer."
|
||||
|
||||
icon_override = 'icons/mob/in-hand/swords.dmi'
|
||||
icon_state = "adrhammer0"
|
||||
icon_state = "knighthammer0"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
no_embed = 1
|
||||
@@ -579,7 +572,7 @@ obj/item/weapon/twohanded/
|
||||
return
|
||||
|
||||
/obj/item/weapon/twohanded/knighthammer/update_icon() //Currently only here to fuck with the on-mob icons.
|
||||
icon_state = "adrhammer[wielded]"
|
||||
icon_state = "knighthammer[wielded]"
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -2,16 +2,14 @@
|
||||
set name = "Broken Sprite List"
|
||||
set category = "Debug"
|
||||
|
||||
var/icon/IL = new('icons/mob/items_lefthand.dmi')
|
||||
var/list/Lstates = IL.IconStates()
|
||||
var/icon/IR = new('icons/mob/items_righthand.dmi')
|
||||
var/list/Rstates = IR.IconStates()
|
||||
|
||||
|
||||
var/text
|
||||
for(var/A in typesof(/obj/item))
|
||||
var/obj/item/O = new A( locate(1,1,1) )
|
||||
if(!O) continue
|
||||
var/icon/IL = new(O.lefthand_file)
|
||||
var/list/Lstates = IL.IconStates()
|
||||
var/icon/IR = new(O.righthand_file)
|
||||
var/list/Rstates = IR.IconStates()
|
||||
var/icon/J = new(O.icon)
|
||||
var/list/istates = J.IconStates()
|
||||
if(!Lstates.Find(O.icon_state) && !Lstates.Find(O.item_state))
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
while sprite_sheets should be used for "flexible" clothing items that do not need to be refitted (e.g. vox wearing jumpsuits).
|
||||
*/
|
||||
var/list/sprite_sheets_refit = null
|
||||
lefthand_file = 'icons/mob/inhands/clothing_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/clothing_righthand.dmi'
|
||||
|
||||
//BS12: Species-restricted clothing check.
|
||||
/obj/item/clothing/mob_can_equip(M as mob, slot)
|
||||
|
||||
@@ -735,7 +735,6 @@
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
icon_state = "lazarus_hypo"
|
||||
item_state = "hypo"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
throwforce = 0
|
||||
w_class = 2.0
|
||||
throw_speed = 3
|
||||
|
||||
@@ -110,7 +110,6 @@
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "Gibtonite ore"
|
||||
item_state = "Gibtonite ore"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
w_class = 4
|
||||
throw_range = 0
|
||||
anchored = 1 //Forces people to carry it by hand, no pulling!
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
var/t_state = r_hand.item_state
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
r_hand.screen_loc = ui_rhand
|
||||
overlays_standing[X_R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = t_state)
|
||||
overlays_standing[X_R_HAND_LAYER] = image("icon" = r_hand.righthand_file, "icon_state" = t_state)
|
||||
else
|
||||
overlays_standing[X_R_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
@@ -153,7 +153,7 @@
|
||||
var/t_state = l_hand.item_state
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
l_hand.screen_loc = ui_lhand
|
||||
overlays_standing[X_L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = t_state)
|
||||
overlays_standing[X_L_HAND_LAYER] = image("icon" = l_hand.lefthand_file, "icon_state" = t_state)
|
||||
else
|
||||
overlays_standing[X_L_HAND_LAYER] = null
|
||||
if(update_icons) update_icons()
|
||||
|
||||
@@ -868,15 +868,10 @@ var/global/list/damage_icon_parts = list()
|
||||
var/t_state = r_hand.item_state
|
||||
if(!t_state) t_state = r_hand.icon_state
|
||||
|
||||
if(r_hand.icon_override)
|
||||
t_state = "[t_state]_r"
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = r_hand.icon_override, "icon_state" = "[t_state]")
|
||||
else if(r_hand.sprite_sheets && r_hand.sprite_sheets[species.name])
|
||||
t_state = "[t_state]_r"
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = r_hand.sprite_sheets[species.name], "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_standing[R_HAND_LAYER] = image("icon" = 'icons/mob/items_righthand.dmi', "icon_state" = "[t_state]")
|
||||
|
||||
var/image/I = image("icon" = r_hand.righthand_file, "icon_state"="[t_state]", "layer"=-R_HAND_LAYER)
|
||||
I = center_image(I, r_hand.inhand_x_dimension, r_hand.inhand_y_dimension)
|
||||
overlays_standing[R_HAND_LAYER] = I
|
||||
|
||||
if (handcuffed) drop_r_hand()
|
||||
else
|
||||
overlays_standing[R_HAND_LAYER] = null
|
||||
@@ -889,14 +884,9 @@ var/global/list/damage_icon_parts = list()
|
||||
var/t_state = l_hand.item_state
|
||||
if(!t_state) t_state = l_hand.icon_state
|
||||
|
||||
if(l_hand.icon_override)
|
||||
t_state = "[t_state]_l"
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = l_hand.icon_override, "icon_state" = "[t_state]")
|
||||
else if(l_hand.sprite_sheets && l_hand.sprite_sheets[species.name])
|
||||
t_state = "[t_state]_l"
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = l_hand.sprite_sheets[species.name], "icon_state" = "[t_state]")
|
||||
else
|
||||
overlays_standing[L_HAND_LAYER] = image("icon" = 'icons/mob/items_lefthand.dmi', "icon_state" = "[t_state]")
|
||||
var/image/I = image("icon" = l_hand.lefthand_file, "icon_state"="[t_state]", "layer"=-L_HAND_LAYER)
|
||||
I = center_image(I, l_hand.inhand_x_dimension, l_hand.inhand_y_dimension)
|
||||
overlays_standing[L_HAND_LAYER] = I
|
||||
|
||||
if (handcuffed) drop_l_hand()
|
||||
else
|
||||
|
||||
@@ -141,26 +141,26 @@
|
||||
loc_temp = loc:air_contents.temperature
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
|
||||
if(loc_temp < 310.15) // a cold place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
else // a hot place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
|
||||
|
||||
//Account for massive pressure differences
|
||||
|
||||
if(bodytemperature < (T0C + 5)) // start calculating temperature damage etc
|
||||
if(bodytemperature <= (T0C - 40)) // stun temperature
|
||||
Tempstun = 1
|
||||
|
||||
if(bodytemperature <= (T0C - 50)) // hurt temperature
|
||||
if(bodytemperature <= 50) // sqrting negative numbers is bad
|
||||
adjustToxLoss(200)
|
||||
else
|
||||
adjustToxLoss(301) //The config.health_threshold_dead is -100 by default, and slimes have 150hp (200hp for adults),
|
||||
else //so the ToxLoss needs to be 300 or above to guarrantee an instant death
|
||||
adjustToxLoss(round(sqrt(bodytemperature)) * 2)
|
||||
|
||||
else
|
||||
Tempstun = 0
|
||||
|
||||
|
||||
/*moved after the temperature damage code so freeze beams can instantly kill slimes -Deity Link*/
|
||||
if(loc_temp < 310.15) // a cold place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
else // a hot place
|
||||
bodytemperature += adjust_body_temperature(bodytemperature, loc_temp, 1)
|
||||
|
||||
updatehealth()
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
if(src.stat != DEAD)
|
||||
src.stat = UNCONSCIOUS
|
||||
|
||||
if(prob(30))
|
||||
if(prob(30)) //I think this is meant to allow slimes to starve to death
|
||||
adjustOxyLoss(-1)
|
||||
adjustToxLoss(-1)
|
||||
adjustFireLoss(-1)
|
||||
|
||||
@@ -544,7 +544,6 @@
|
||||
return
|
||||
H.icon_state = "pai-[icon_state]"
|
||||
H.item_state = "pai-[icon_state]"
|
||||
H.icon_override = 'icons/mob/in-hand/paiheld.dmi'//I have these in diffrent DMI so i am overriding
|
||||
grabber.put_in_active_hand(H)//for some reason unless i call this it dosen't work
|
||||
grabber.update_inv_l_hand()
|
||||
grabber.update_inv_r_hand()
|
||||
|
||||
@@ -402,7 +402,7 @@ datum/preferences
|
||||
if(LAWYER)
|
||||
clothes_s = new /icon(uniform_dmi, "internalaffairs_s")
|
||||
clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "briefcase"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "briefcase"), ICON_UNDERLAY)
|
||||
if(prob(1))
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "suitjacket_blue"), ICON_OVERLAY)
|
||||
switch(backbag)
|
||||
@@ -569,7 +569,7 @@ datum/preferences
|
||||
clothes_s.Blend(new /icon('icons/mob/hands.dmi', "bgloves"), ICON_UNDERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_open"), ICON_OVERLAY)
|
||||
if(prob(1))
|
||||
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "toolbox_blue"), ICON_OVERLAY)
|
||||
switch(backbag)
|
||||
if(2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "backpack"), ICON_OVERLAY)
|
||||
@@ -655,7 +655,7 @@ datum/preferences
|
||||
clothes_s.Blend(new /icon('icons/mob/belt.dmi', "utility"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/head.dmi', "hardhat0_white"), ICON_OVERLAY)
|
||||
if(prob(1))
|
||||
clothes_s.Blend(new /icon('icons/mob/items_righthand.dmi', "blueprints"), ICON_OVERLAY)
|
||||
clothes_s.Blend(new /icon('icons/mob/inhands/items_righthand.dmi', "blueprints"), ICON_OVERLAY)
|
||||
switch(backbag)
|
||||
if(2)
|
||||
clothes_s.Blend(new /icon('icons/mob/back.dmi', "engiepack"), ICON_OVERLAY)
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "A katana infused with a strong energy"
|
||||
icon_state = "energy_katana"
|
||||
item_state = "energy_katana"
|
||||
icon_override = 'icons/mob/in-hand/swords.dmi'
|
||||
force = 40
|
||||
throwforce = 20
|
||||
var/cooldown = 0 // Because spam aint cool, yo.
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "pen"
|
||||
item_state = "pen"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
slot_flags = SLOT_BELT | SLOT_EARS
|
||||
throwforce = 0
|
||||
w_class = 1.0
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "detective"
|
||||
item_state = "gun"
|
||||
lefthand_file = 'icons/mob/inhands/guns_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/guns_righthand.dmi'
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=2000)
|
||||
@@ -210,6 +212,7 @@
|
||||
in_chamber.loc = get_turf(user)
|
||||
in_chamber.starting = get_turf(user)
|
||||
in_chamber.current = curloc
|
||||
in_chamber.OnFired()
|
||||
in_chamber.yo = targloc.y - curloc.y
|
||||
in_chamber.xo = targloc.x - curloc.x
|
||||
if(params)
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
desc = "It's some kind of enormous alien weapon, as long as a man is tall."
|
||||
|
||||
icon = 'icons/obj/gun.dmi' //Actual on-sprite is handled by icon_override.
|
||||
icon_override = 'icons/mob/vox.dmi'
|
||||
icon_state = "noisecannon"
|
||||
item_state = "noisecannon"
|
||||
recoil = 1
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "A hybrid taser designed to fire both short-range high-power electrodes and long-range disabler beams."
|
||||
icon_state = "advtaser"
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell"
|
||||
origin_tech = null
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "This is a modern recreation of the captain's antique laser gun. This gun has several unique fire modes, but lacks the ability to recharge over time."
|
||||
icon_state = "hoslaser"
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
force = 10
|
||||
fire_sound = 'sound/weapons/Taser.ogg'
|
||||
origin_tech = "combat=3;magnets=2"
|
||||
|
||||
@@ -26,7 +26,6 @@ obj/item/weapon/gun/energy/laser/retro
|
||||
name = "\improper QSJ-01 premium laser pistol"
|
||||
icon_state = "caplaser"
|
||||
item_state = "caplaser"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
desc = "This is an antique laser gun. All craftsmanship is of the highest quality. It is decorated with assistant leather and chrome. The object menaces with spikes of energy. On the item is an image of Space Station 13. The station is exploding."
|
||||
force = 10
|
||||
origin_tech = null
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
desc = "A man portable anti-armor weapon designed to disable mechanical threats"
|
||||
icon_state = "ionrifle"
|
||||
item_state = null //so the human update icon uses the icon_state instead.
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
fire_sound = 'sound/weapons/IonRifle.ogg'
|
||||
origin_tech = "combat=2;magnets=4"
|
||||
w_class = 5.0
|
||||
@@ -36,7 +35,7 @@
|
||||
name = "floral somatoray"
|
||||
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."
|
||||
icon_state = "floramut100"
|
||||
item_state = "obj/item/gun.dmi"
|
||||
item_state = "gun"
|
||||
fire_sound = 'sound/effects/stealthoff.ogg'
|
||||
projectile_type = "/obj/item/projectile/energy/floramut"
|
||||
origin_tech = "materials=2;biotech=3;powerstorage=3"
|
||||
@@ -128,6 +127,8 @@
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "pen"
|
||||
item_state = "pen"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
w_class = 1
|
||||
|
||||
|
||||
@@ -231,7 +232,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
desc = "According to Nanotrasen accounting, this is mining equipment. It's been modified for extreme power output to crush rocks, but often serves as a miner's first defense against hostile alien life; it's not very powerful unless used in a low pressure environment."
|
||||
icon_state = "kineticgun"
|
||||
item_state = "kineticgun"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
projectile_type = "/obj/item/projectile/kinetic"
|
||||
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
|
||||
charge_cost = 5000
|
||||
@@ -309,7 +309,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
attack_verb = list("attacked", "slashed", "cut", "sliced")
|
||||
charge_cost = 250
|
||||
fire_delay = 15
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
can_charge = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/plasmacutter/examine(mob/user)
|
||||
@@ -389,7 +388,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
desc = "An extremely high-tech bluespace energy gun capable of teleporting targets to far off locations."
|
||||
icon_state = "telegun"
|
||||
item_state = "ionrifle"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
fire_sound = 'sound/weapons/wave.ogg'
|
||||
origin_tech = "combat=6;materials=7;powerstorage=5;bluespace=5;syndicate=4"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/crap"
|
||||
|
||||
@@ -1,80 +1,182 @@
|
||||
/obj/item/weapon/gun/energy/temperature
|
||||
name = "temperature gun"
|
||||
icon_state = "freezegun"
|
||||
icon = 'icons/obj/gun_temperature.dmi'
|
||||
icon_state = "tempgun_4"
|
||||
item_state = "tempgun_4"
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = 4.0
|
||||
fire_sound = 'sound/weapons/pulse3.ogg'
|
||||
desc = "A gun that changes temperatures."
|
||||
var/temperature = T20C
|
||||
var/current_temperature = T20C
|
||||
charge_cost = 100
|
||||
desc = "A gun that changes the body temperature of its targets."
|
||||
var/temperature = 300
|
||||
var/target_temperature = 300
|
||||
charge_cost = 90
|
||||
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
|
||||
|
||||
projectile_type = "/obj/item/projectile/temp"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/crap"
|
||||
projectile_type = /obj/item/projectile/temp
|
||||
cell_type = /obj/item/weapon/stock_parts/cell/temperaturegun
|
||||
|
||||
var/powercost = ""
|
||||
var/powercostcolor = ""
|
||||
|
||||
var/emagged = 0 //ups the temperature cap from 500 to 1000, targets hit by beams over 500 Kelvin will burst into flames
|
||||
var/dat = ""
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/New()
|
||||
..()
|
||||
update_icon()
|
||||
processing_objects.Add(src)
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
/obj/item/weapon/gun/energy/temperature/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
|
||||
Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
/obj/item/weapon/gun/energy/temperature/attack_self(mob/living/user as mob)
|
||||
user.set_machine(src)
|
||||
update_dat()
|
||||
|
||||
user << browse("<TITLE>Temperature Gun Configuration</TITLE><HR>[dat]", "window=tempgun;size=510x120")
|
||||
onclose(user, "tempgun")
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
user.set_machine(src)
|
||||
var/temp_text = ""
|
||||
if(temperature > (T0C - 50))
|
||||
temp_text = "<FONT color=black>[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)</FONT>"
|
||||
/obj/item/weapon/gun/energy/temperature/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
emagged = 1
|
||||
user << "<span class='caution'>You double the gun's temperature cap! Targets hit by searing beams will burst into flames!</span>"
|
||||
desc = "A gun that changes the body temperature of its targets. Its temperature cap has been hacked."
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/Topic(href, href_list)
|
||||
if (..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
add_fingerprint(usr)
|
||||
|
||||
if(href_list["temp"])
|
||||
var/amount = text2num(href_list["temp"])
|
||||
if(amount > 0)
|
||||
target_temperature = min((500 + 500*emagged), target_temperature+amount)
|
||||
else
|
||||
temp_text = "<FONT color=blue>[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)</FONT>"
|
||||
|
||||
var/dat = {"<B>Freeze Gun Configuration: </B><BR>
|
||||
Current output temperature: [temp_text]<BR>
|
||||
Target output temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
|
||||
"}
|
||||
target_temperature = max(0, target_temperature+amount)
|
||||
if (istype(loc, /mob))
|
||||
attack_self(loc)
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
user << browse(dat, "window=freezegun;size=450x300;can_resize=1;can_close=1;can_minimize=1")
|
||||
onclose(user, "window=freezegun", src)
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
if (..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
src.add_fingerprint(usr)
|
||||
|
||||
|
||||
|
||||
if(href_list["temp"])
|
||||
var/amount = text2num(href_list["temp"])
|
||||
if(amount > 0)
|
||||
src.current_temperature = min(500, src.current_temperature+amount)
|
||||
/obj/item/weapon/gun/energy/temperature/process()
|
||||
switch(temperature)
|
||||
if(0 to 100)
|
||||
charge_cost = 300
|
||||
powercost = "High"
|
||||
if(100 to 250)
|
||||
charge_cost = 180
|
||||
powercost = "Medium"
|
||||
if(251 to 300)
|
||||
charge_cost = 90
|
||||
powercost = "Low"
|
||||
if(301 to 400)
|
||||
charge_cost = 180
|
||||
powercost = "Medium"
|
||||
if(401 to 1000)
|
||||
charge_cost = 300
|
||||
powercost = "High"
|
||||
switch(powercost)
|
||||
if("High") powercostcolor = "orange"
|
||||
if("Medium") powercostcolor = "green"
|
||||
else powercostcolor = "blue"
|
||||
if(target_temperature != temperature)
|
||||
var/difference = abs(target_temperature - temperature)
|
||||
if(difference >= (10 + 40*emagged)) //so emagged temp guns adjust their temperature much more quickly
|
||||
if(target_temperature < temperature)
|
||||
temperature -= (10 + 40*emagged)
|
||||
else
|
||||
src.current_temperature = max(0, src.current_temperature+amount)
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
temperature += (10 + 40*emagged)
|
||||
else
|
||||
temperature = target_temperature
|
||||
update_icon()
|
||||
|
||||
if (istype(loc, /mob/living/carbon))
|
||||
var /mob/living/carbon/M = loc
|
||||
if (src == M.machine)
|
||||
update_dat()
|
||||
M << browse("<TITLE>Temperature Gun Configuration</TITLE><HR>[dat]", "window=tempgun;size=510x102")
|
||||
|
||||
|
||||
process()
|
||||
switch(temperature)
|
||||
if(0 to 100) charge_cost = 1000
|
||||
if(100 to 250) charge_cost = 500
|
||||
if(251 to 300) charge_cost = 100
|
||||
if(301 to 400) charge_cost = 500
|
||||
if(401 to 500) charge_cost = 1000
|
||||
if(power_supply)
|
||||
power_supply.give(50)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(current_temperature != temperature)
|
||||
var/difference = abs(current_temperature - temperature)
|
||||
if(difference >= 10)
|
||||
if(current_temperature < temperature)
|
||||
temperature -= 10
|
||||
else
|
||||
temperature += 10
|
||||
else
|
||||
temperature = current_temperature
|
||||
return
|
||||
/obj/item/weapon/gun/energy/temperature/proc/update_dat()
|
||||
dat = ""
|
||||
dat += "Current output temperature: "
|
||||
if(temperature > 500)
|
||||
dat += "<FONT color=red><B>[temperature]</B> ([round(temperature-T0C)]°C)</FONT>"
|
||||
dat += "<FONT color=red><B> SEARING!</B></FONT>"
|
||||
else if(temperature > (T0C + 50))
|
||||
dat += "<FONT color=red><B>[temperature]</B> ([round(temperature-T0C)]°C)</FONT>"
|
||||
else if(temperature > (T0C - 50))
|
||||
dat += "<FONT color=black><B>[temperature]</B> ([round(temperature-T0C)]°C)</FONT>"
|
||||
else
|
||||
dat += "<FONT color=blue><B>[temperature]</B> ([round(temperature-T0C)]°C)</FONT>"
|
||||
dat += "<BR>"
|
||||
dat += "Target output temperature: " //might be string idiocy, but at least it's easy to read
|
||||
dat += "<A href='?src=\ref[src];temp=-100'>-</A> "
|
||||
dat += "<A href='?src=\ref[src];temp=-10'>-</A> "
|
||||
dat += "<A href='?src=\ref[src];temp=-1'>-</A> "
|
||||
dat += "[target_temperature] "
|
||||
dat += "<A href='?src=\ref[src];temp=1'>+</A> "
|
||||
dat += "<A href='?src=\ref[src];temp=10'>+</A> "
|
||||
dat += "<A href='?src=\ref[src];temp=100'>+</A>"
|
||||
dat += "<BR>"
|
||||
dat += "Power cost: "
|
||||
dat += "<FONT color=[powercostcolor]><B>[powercost]</B></FONT>"
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/proc/update_temperature()
|
||||
switch(temperature)
|
||||
if(501 to INFINITY)
|
||||
item_state = "tempgun_8"
|
||||
if(400 to 500)
|
||||
item_state = "tempgun_7"
|
||||
if(360 to 400)
|
||||
item_state = "tempgun_6"
|
||||
if(335 to 360)
|
||||
item_state = "tempgun_5"
|
||||
if(295 to 335)
|
||||
item_state = "tempgun_4"
|
||||
if(260 to 295)
|
||||
item_state = "tempgun_3"
|
||||
if(200 to 260)
|
||||
item_state = "tempgun_2"
|
||||
if(120 to 260)
|
||||
item_state = "tempgun_1"
|
||||
if(-INFINITY to 120)
|
||||
item_state = "tempgun_0"
|
||||
icon_state = item_state
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/proc/update_charge()
|
||||
var/charge = power_supply.charge
|
||||
switch(charge)
|
||||
if(900 to INFINITY) overlays += "900"
|
||||
if(800 to 900) overlays += "800"
|
||||
if(700 to 800) overlays += "700"
|
||||
if(600 to 700) overlays += "600"
|
||||
if(500 to 600) overlays += "500"
|
||||
if(400 to 500) overlays += "400"
|
||||
if(300 to 400) overlays += "300"
|
||||
if(200 to 300) overlays += "200"
|
||||
if(100 to 200) overlays += "100"
|
||||
if(-INFINITY to 100) overlays += "0"
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/proc/update_user()
|
||||
if (istype(loc,/mob/living/carbon))
|
||||
var/mob/living/carbon/M = loc
|
||||
M.update_inv_back()
|
||||
M.update_inv_l_hand()
|
||||
M.update_inv_r_hand()
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/update_icon()
|
||||
overlays = 0
|
||||
update_temperature()
|
||||
update_user()
|
||||
update_charge()
|
||||
@@ -4,10 +4,12 @@
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "staffofnothing"
|
||||
item_state = "staff"
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
flags = CONDUCT
|
||||
w_class = 5
|
||||
var/projectile_type = "/obj/item/projectile/magic"
|
||||
var/projectile_type = /obj/item/projectile/magic
|
||||
var/max_charges = 6
|
||||
var/charges = 0
|
||||
var/recharge_rate = 4
|
||||
|
||||
@@ -14,7 +14,6 @@ obj/item/weapon/gun/magic/staff/animate
|
||||
projectile_type = "/obj/item/projectile/magic/animate"
|
||||
icon_state = "staffofanimation"
|
||||
item_state = "staffofanimation"
|
||||
icon_override = 'icons/mob/in-hand/staff.dmi'
|
||||
|
||||
obj/item/weapon/gun/magic/staff/healing
|
||||
name = "staff of healing"
|
||||
@@ -22,7 +21,6 @@ obj/item/weapon/gun/magic/staff/healing
|
||||
projectile_type = "/obj/item/projectile/magic/resurrection"
|
||||
icon_state = "staffofhealing"
|
||||
item_state = "staffofhealing"
|
||||
icon_override = 'icons/mob/in-hand/staff.dmi'
|
||||
|
||||
obj/item/weapon/gun/magic/staff/chaos
|
||||
name = "staff of chaos"
|
||||
@@ -30,7 +28,6 @@ obj/item/weapon/gun/magic/staff/chaos
|
||||
projectile_type = "/obj/item/projectile/magic"
|
||||
icon_state = "staffofchaos"
|
||||
item_state = "staffofchaos"
|
||||
icon_override = 'icons/mob/in-hand/staff.dmi'
|
||||
max_charges = 10
|
||||
recharge_rate = 2
|
||||
|
||||
@@ -49,7 +46,6 @@ obj/item/weapon/gun/magic/staff/door
|
||||
projectile_type = "/obj/item/projectile/magic/door"
|
||||
icon_state = "staffofdoor"
|
||||
item_state = "staffofdoor"
|
||||
icon_override = 'icons/mob/in-hand/staff.dmi'
|
||||
max_charges = 10
|
||||
recharge_rate = 2
|
||||
|
||||
|
||||
@@ -168,7 +168,6 @@
|
||||
desc = "A three-round burst 5.56 toploading carbine, designated 'M-90gl'. Has an attached underbarrel grenade launcher which can be toggled on and off."
|
||||
icon_state = "m90"
|
||||
item_state = "m90"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
origin_tech = "combat=5;materials=2;syndicate=8"
|
||||
mag_type = "/obj/item/ammo_box/magazine/m556"
|
||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
name = "multi grenade launcher"
|
||||
icon_state = "bulldog"
|
||||
item_state = "bulldog"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
mag_type = "/obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher/multi"
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/grenadelauncher/multi/cyborg
|
||||
|
||||
@@ -108,7 +108,6 @@
|
||||
desc = "This piece of junk looks like something that could have been used 700 years ago."
|
||||
icon_state = "moistnugget"
|
||||
item_state = "moistnugget"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
slot_flags = 0 //no SLOT_BACK sprite, alas
|
||||
mag_type = "/obj/item/ammo_box/magazine/internal/boltaction"
|
||||
var/bolt_open = 0
|
||||
@@ -244,7 +243,6 @@
|
||||
desc = "A compact, mag-fed semi-automatic shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines."
|
||||
icon_state = "bulldog"
|
||||
item_state = "bulldog"
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
w_class = 3.0
|
||||
origin_tech = "combat=5;materials=4;syndicate=6"
|
||||
mag_type = "/obj/item/ammo_box/magazine/m12g"
|
||||
|
||||
@@ -88,6 +88,9 @@
|
||||
var/mob/living/L = target
|
||||
return L.apply_effects(stun, weaken, paralyze, irradiate, slur, stutter, eyeblur, drowsy, agony, blocked, stamina, jitter)
|
||||
|
||||
proc/OnFired() //if assigned, allows for code when the projectile gets fired
|
||||
return 1
|
||||
|
||||
proc/check_fire(var/mob/living/target as mob, var/mob/living/user as mob) //Checks if you can hit them or not.
|
||||
if(!istype(target) || !istype(user))
|
||||
return 0
|
||||
|
||||
@@ -44,17 +44,59 @@
|
||||
|
||||
/obj/item/projectile/temp
|
||||
name = "freeze beam"
|
||||
icon_state = "ice_2"
|
||||
icon_state = "temp_4"
|
||||
damage = 0
|
||||
damage_type = BURN
|
||||
nodamage = 1
|
||||
flag = "energy"
|
||||
var/temperature = 300
|
||||
var/obj/item/weapon/gun/energy/temperature/T = null
|
||||
|
||||
OnFired()
|
||||
T = shot_from
|
||||
temperature = T.temperature
|
||||
switch(temperature)
|
||||
if(501 to INFINITY)
|
||||
name = "searing beam" //if emagged
|
||||
icon_state = "temp_8"
|
||||
if(400 to 500)
|
||||
name = "burning beam" //temp at which mobs start taking HEAT_DAMAGE_LEVEL_2
|
||||
icon_state = "temp_7"
|
||||
if(360 to 400)
|
||||
name = "hot beam" //temp at which mobs start taking HEAT_DAMAGE_LEVEL_1
|
||||
icon_state = "temp_6"
|
||||
if(335 to 360)
|
||||
name = "warm beam" //temp at which players get notified of their high body temp
|
||||
icon_state = "temp_5"
|
||||
if(295 to 335)
|
||||
name = "ambient beam"
|
||||
icon_state = "temp_4"
|
||||
if(260 to 295)
|
||||
name = "cool beam" //temp at which players get notified of their low body temp
|
||||
icon_state = "temp_3"
|
||||
if(200 to 260)
|
||||
name = "cold beam" //temp at which mobs start taking COLD_DAMAGE_LEVEL_1
|
||||
icon_state = "temp_2"
|
||||
if(120 to 260)
|
||||
name = "ice beam" //temp at which mobs start taking COLD_DAMAGE_LEVEL_2
|
||||
icon_state = "temp_1"
|
||||
if(-INFINITY to 120)
|
||||
name = "freeze beam" //temp at which mobs start taking COLD_DAMAGE_LEVEL_3
|
||||
icon_state = "temp_0"
|
||||
else
|
||||
name = "temperature beam"//failsafe
|
||||
icon_state = "temp_4"
|
||||
|
||||
|
||||
on_hit(var/atom/target, var/blocked = 0)//These two could likely check temp protection on the mob
|
||||
if(istype(target, /mob/living))
|
||||
var/mob/M = target
|
||||
var/mob/living/M = target
|
||||
M.bodytemperature = temperature
|
||||
if(temperature > 500)//emagged
|
||||
M.adjust_fire_stacks(0.5)
|
||||
M.on_fire = 1
|
||||
M.update_icon = 1
|
||||
playsound(M.loc, 'sound/effects/bamf.ogg', 50, 0)
|
||||
return 1
|
||||
|
||||
/obj/item/projectile/meteor
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
/obj/item/weapon/gun/grenadelauncher/piecannon
|
||||
name = "pie cannon"
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_override = 'icons/mob/in-hand/guns.dmi'
|
||||
icon_state = "piecannon1"
|
||||
item_state = "piecannon1"
|
||||
w_class = 4.0
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
icon = 'icons/obj/syringe.dmi'
|
||||
item_state = "hypo"
|
||||
icon_state = "hypo"
|
||||
icon_override = 'icons/mob/in-hand/tools.dmi'
|
||||
amount_per_transfer_from_this = 5
|
||||
volume = 30
|
||||
possible_transfer_amounts = list(1,2,3,4,5,10,15,20,25,30)
|
||||
|
||||
@@ -165,13 +165,12 @@
|
||||
|
||||
/datum/design/temp_gun
|
||||
name = "Temperature Gun"
|
||||
desc = "A gun that shoots temperature bullet energy things to change temperature."//Change it if you want
|
||||
desc = "A gun that changes the body temperature of its targets."
|
||||
id = "temp_gun"
|
||||
req_tech = list("combat" = 3, "materials" = 4, "powerstorage" = 3, "magnets" = 2)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 5000, MAT_GLASS = 500, MAT_SILVER = 3000)
|
||||
build_path = /obj/item/weapon/gun/energy/temperature
|
||||
locked = 1
|
||||
category = list("Weapons")
|
||||
|
||||
/datum/design/suppressor
|
||||
|
||||
|
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 79 KiB |
@@ -1,43 +0,0 @@
|
||||
In-Hand DMI Compile System
|
||||
==========================
|
||||
|
||||
A shitty hack by N3X15
|
||||
|
||||
WHY THE FUCK?
|
||||
-------------
|
||||
|
||||
BYOND 499 limited the number of icon states that can be
|
||||
added to a DMI to 512 states. Why? Who fucking knows.
|
||||
Magically, DM can't edit them but the server doesn't
|
||||
care how big they are, so it's probably a shitty hack
|
||||
so they don't have to change the array's index type.
|
||||
|
||||
Whatever the case, we ran into this wall. You cannot edit
|
||||
items_lefthand and items_righthand with BYOND anymore. We
|
||||
filed a bug report: http://www.byond.com/forum/?post=1507331
|
||||
|
||||
They closed it with "Not a Bug".
|
||||
|
||||
So, here we are. The only way to edit DMIs that big
|
||||
is with third-party tools like OpenBYOND.
|
||||
|
||||
How to Compile
|
||||
--------------
|
||||
|
||||
Simply dump your DMIs into the appropriate folder and run
|
||||
compile.py from within this folder. It'll build the DMIs
|
||||
and jam everything into a single meta-DMI for you.
|
||||
|
||||
Simple.
|
||||
|
||||
Adding More Output Targets
|
||||
--------------------------
|
||||
|
||||
If you've run into the problem mentioned above with another
|
||||
DMI, have no fear: Just edit compile.py and add the new
|
||||
output target to the ToBuild dict as shown in the comments.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
MIT
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 466 B |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 984 B |
|
Before Width: | Height: | Size: 373 B |
|
Before Width: | Height: | Size: 644 B |
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 445 B |
|
Before Width: | Height: | Size: 921 B |
|
Before Width: | Height: | Size: 461 B |
|
Before Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 156 KiB |
|
Before Width: | Height: | Size: 973 B |
|
Before Width: | Height: | Size: 652 B |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 794 B |
@@ -1,83 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
'''
|
||||
Run within icons/mob/in-hand.
|
||||
|
||||
Usage:
|
||||
$ cd icons/mob/in-hands
|
||||
$ python ss13_makeinhands.py
|
||||
|
||||
ss13_makeinhands.py - Generates a large DMI from several smaller DMIs.
|
||||
Specifically used for making icons/mob/items_(left|right)hand.dmi
|
||||
|
||||
Copyright 2013 Rob "N3X15" Nelson <nexis@7chan.org>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
'''
|
||||
import os, sys, logging
|
||||
|
||||
ToBuild = {
|
||||
# ' file to build': 'directory to pull from/',
|
||||
'../items_lefthand.dmi': 'left/',
|
||||
'../items_righthand.dmi': 'right/'
|
||||
}
|
||||
|
||||
# Tell Python where to find BYONDTools.
|
||||
# Assuming we're in icons/mob/in-hand
|
||||
sys.path.append('../../../tools/BYONDTools') # For byond
|
||||
sys.path.append('../../../tools/BYONDTools/scripts') # For dmi
|
||||
|
||||
from byond.DMI import DMI
|
||||
from dmi import compare_all
|
||||
|
||||
def buildDMI(directory, output):
|
||||
dmi = DMI(output)
|
||||
logging.info('Creating {0}...'.format(output))
|
||||
for root, _, files in os.walk(directory):
|
||||
for filename in files:
|
||||
if filename.endswith('.dmi') and not filename.endswith('.new.dmi'):
|
||||
filepath = os.path.join(root, filename)
|
||||
logging.info('Adding {0}...'.format(filename, output))
|
||||
subdmi = DMI(filepath)
|
||||
subdmi.loadAll()
|
||||
if subdmi.icon_height != 32 or subdmi.icon_width != 32:
|
||||
logging.warn('Skipping {0} - Invalid icon size.'.format(filepath))
|
||||
changes = 0
|
||||
for state_name in subdmi.states:
|
||||
if state_name in dmi.states:
|
||||
logging.warn('Skipping state {0}:{1} - State exists.'.format(filepath, subdmi.states[state_name].displayName()))
|
||||
continue
|
||||
dmi.states[state_name] = subdmi.states[state_name]
|
||||
changes += 1
|
||||
logging.info('Added {0} states.'.format(changes))
|
||||
# save
|
||||
logging.info('Saving {0} states to {1}...'.format(len(dmi.states), output))
|
||||
dmi.save(output)
|
||||
|
||||
if __name__ == '__main__':
|
||||
logging.basicConfig(
|
||||
format='%(asctime)s [%(levelname)-8s]: %(message)s',
|
||||
datefmt='%m/%d/%Y %I:%M:%S %p',
|
||||
level=logging.INFO # ,
|
||||
# filename='logs/main.log',
|
||||
# filemode='w'
|
||||
)
|
||||
# Cheating, but useful for checking for unsync'd stuff
|
||||
compare_all('left/', 'right/', 'in-hand_sync_report.txt', None, newfile_theirs=False, newfile_mine=False, check_changed=False)
|
||||
for output, input_dir in ToBuild.items():
|
||||
buildDMI(input_dir, output)
|
||||
|
Before Width: | Height: | Size: 4.7 KiB |