Merge branch 'master' of https://github.com/PolarisSS13/Polaris into polaris-sync

# Conflicts:
#	vorestation.dme
This commit is contained in:
Arokha Sieyes
2016-06-07 18:37:47 -04:00
193 changed files with 3373 additions and 1913 deletions

View File

@@ -86,10 +86,10 @@
/turf/get_alarm_origin()
return get_area(src)
/datum/alarm_handler/proc/register(var/object, var/procName)
/datum/alarm_handler/proc/register_alarm(var/object, var/procName)
listeners[object] = procName
/datum/alarm_handler/proc/unregister(var/object)
/datum/alarm_handler/proc/unregister_alarm(var/object)
listeners -= object
/datum/alarm_handler/proc/notify_listeners(var/alarm, var/was_raised)

View File

@@ -107,7 +107,7 @@ datum/preferences/proc/set_biological_gender(var/gender)
else if(href_list["metadata"])
var/new_metadata = sanitize(input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , pref.metadata) as message|null) as message|null
if(new_metadata && CanUseTopic(user))
pref.metadata = sanitize(new_metadata)
pref.metadata = new_metadata
return TOPIC_REFRESH
return ..()

View File

@@ -5,7 +5,7 @@ var/list/_client_preferences_by_type
/proc/get_client_preferences()
if(!_client_preferences)
_client_preferences = list()
for(var/ct in subtypes(/datum/client_preference))
for(var/ct in subtypesof(/datum/client_preference))
var/datum/client_preference/client_type = ct
if(initial(client_type.description))
_client_preferences += new client_type()

View File

@@ -216,7 +216,7 @@
body_parts_covered = HANDS
slot_flags = SLOT_GLOVES
attack_verb = list("challenged")
species_restricted = list("exclude","Unathi","Tajara")
species_restricted = null
sprite_sheets = list(
"Teshari" = 'icons/mob/species/seromi/gloves.dmi',
)
@@ -238,7 +238,7 @@
/obj/item/clothing/gloves/proc/Touch(var/atom/A, var/proximity)
return 0 // return 1 to cancel attack_hand()
/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user)
/*/obj/item/clothing/gloves/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/weapon/scalpel))
if (clipped)
user << "<span class='notice'>The [src] have already been clipped!</span>"
@@ -255,7 +255,7 @@
species_restricted -= "Unathi"
species_restricted -= "Tajara"
return
*/
///////////////////////////////////////////////////////////////////////
//Head
/obj/item/clothing/head
@@ -406,7 +406,7 @@
slowdown = SHOES_SLOWDOWN
force = 2
var/overshoes = 0
species_restricted = list("exclude","Teshari", "Unathi","Tajara")
species_restricted = list("exclude","Teshari")
sprite_sheets = list(
"Teshari" = 'icons/mob/species/seromi/shoes.dmi',
)

View File

@@ -16,7 +16,7 @@
var/last_process_worldtime = 0
var/report_num = 0
/obj/machinery/dnaforensics/map/New()
/obj/machinery/dnaforensics/New()
circuit = new circuit(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)

View File

@@ -22,7 +22,7 @@
L.force_update = 0
L.needs_update = 0
scheck()
SCHECK
var/list/lighting_update_overlays_old = lighting_update_overlays //Same as above.
lighting_update_overlays = null //Same as above
@@ -32,4 +32,4 @@
O.update_overlay()
O.needs_update = 0
scheck()
SCHECK

View File

@@ -39,7 +39,7 @@
var/need_update_field = 0
var/need_player_check = 0
/obj/machinery/mining/drill/map/New()
/obj/machinery/mining/drill/New()
..()
circuit = new circuit(src)

View File

@@ -56,8 +56,8 @@
/mob/living/carbon/human/Stat()
..()
if(statpanel("Status"))
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
stat("Intent:", "[a_intent]")
stat("Move Mode:", "[m_intent]")
if(emergency_shuttle)
var/eta_status = emergency_shuttle.get_status_panel_eta()
if(eta_status)

View File

@@ -40,7 +40,7 @@
/mob/living/silicon/Destroy()
silicon_mob_list -= src
for(var/datum/alarm_handler/AH in alarm_manager.all_handlers)
AH.unregister(src)
AH.unregister_alarm(src)
..()
/mob/living/silicon/proc/init_id()

View File

@@ -39,7 +39,7 @@
return
for(var/datum/alarm_handler/AH in alarm_manager.all_handlers)
AH.register(src, /mob/living/silicon/proc/receive_alarm)
AH.register_alarm(src, /mob/living/silicon/proc/receive_alarm)
queued_alarms[AH] = list() // Makes sure alarms remain listed in consistent order
/********************

View File

@@ -6,15 +6,16 @@
icon_state = "otherthing"
icon_living = "otherthing"
icon_dead = "otherthing-dead"
health = 40
maxHealth = 40
health = 40
harm_intent_damage = 8
melee_damage_lower = 5
melee_damage_upper = 5
attacktext = "chomped"
attack_sound = 'sound/weapons/bite.ogg'
faction = "creature"
speed = 8
harm_intent_damage = 10
/mob/living/simple_animal/hostile/creature/cult
faction = "cult"
@@ -37,3 +38,35 @@
/mob/living/simple_animal/hostile/creature/cult/Life()
..()
check_horde()
/mob/living/simple_animal/hostile/creature/strong
maxHealth = 160
health = 160
harm_intent_damage = 5
melee_damage_lower = 8
melee_damage_upper = 25
/mob/living/simple_animal/hostile/creature/strong/cult
faction = "cult"
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
minbodytemp = 0
supernatural = 1
/mob/living/simple_animal/hostile/creature/cult/cultify()
return
/mob/living/simple_animal/hostile/creature/cult/Life()
..()
check_horde()

View File

@@ -58,3 +58,26 @@
/mob/living/simple_animal/hostile/faithless/cult/Life()
..()
check_horde()
/mob/living/simple_animal/hostile/faithless/strong
maxHealth = 100
health = 100
harm_intent_damage = 5
melee_damage_lower = 7
melee_damage_upper = 20
/mob/living/simple_animal/hostile/faithless/strong/cult
faction = "cult"
supernatural = 1
/mob/living/simple_animal/hostile/faithless/cult/cultify()
return
/mob/living/simple_animal/hostile/faithless/cult/Life()
..()
check_horde()

View File

@@ -19,7 +19,7 @@
meat_type = /obj/item/weapon/reagent_containers/food/snacks/xenomeat
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "pokes"
response_harm = "punches"
stop_automated_movement_when_pulled = 0
maxHealth = 200
health = 200

View File

@@ -42,7 +42,7 @@
ranged = 1
projectiletype = /obj/item/projectile/bullet
projectilesound = 'sound/weapons/Gunshot.ogg'
casingtype = /obj/item/ammo_casing/a357
casingtype = /obj/item/ammo_casing/spent
/mob/living/simple_animal/hostile/russian/death()

View File

@@ -107,7 +107,7 @@
rapid = 1
icon_state = "syndicateranged"
icon_living = "syndicateranged"
casingtype = /obj/item/ammo_casing/a10mm
casingtype = /obj/item/ammo_casing/spent
projectilesound = 'sound/weapons/Gunshot_light.ogg'
projectiletype = /obj/item/projectile/bullet/pistol/medium

View File

@@ -662,15 +662,13 @@
if(client.holder)
if(statpanel("Status"))
stat("Location:","([x], [y], [z])")
if(statpanel("Processes"))
stat("Location:", "([x], [y], [z]) [loc]")
stat("CPU:","[world.cpu]")
stat("Instances:","[world.contents.len]")
if(processScheduler && processScheduler.getIsRunning())
for(var/datum/controller/process/P in processScheduler.processes)
stat(P.getStatName(), P.getTickTime())
else
stat("processScheduler is not running.")
if(statpanel("Processes"))
if(processScheduler)
processScheduler.statProcesses()
if(listed_turf && client)
if(!TurfAdjacent(listed_turf))

View File

@@ -15,13 +15,13 @@
..()
alarm_handlers = list(camera_alarm, motion_alarm)
/datum/nano_module/alarm_monitor/proc/register(var/object, var/procName)
/datum/nano_module/alarm_monitor/proc/register_alarm(var/object, var/procName)
for(var/datum/alarm_handler/AH in alarm_handlers)
AH.register(object, procName)
AH.register_alarm(object, procName)
/datum/nano_module/alarm_monitor/proc/unregister(var/object)
/datum/nano_module/alarm_monitor/proc/unregister_alarm(var/object)
for(var/datum/alarm_handler/AH in alarm_handlers)
AH.unregister(object)
AH.unregister_alarm(object)
/datum/nano_module/alarm_monitor/proc/all_alarms()
var/list/all_alarms = new()

View File

@@ -14,6 +14,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
use_power = 1
idle_power_usage = 30
active_power_usage = 200
circuit = /obj/item/weapon/circuitboard/fax
var/obj/item/weapon/card/id/scan = null // identification
var/authenticated = 0
@@ -22,21 +23,11 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
var/destination = null // the department we're sending to
/obj/machinery/photocopier/faxmachine/New()
..()
allfaxes += src
if(!destination) destination = "[boss_name]"
if( !(("[department]" in alldepartments) || ("[department]" in admin_departments)) )
alldepartments |= department
/obj/machinery/photocopier/faxmachine/map/New()
..()
circuit = new circuit(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/weapon/stock_parts/motor(src)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(src)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
RefreshParts()
/obj/machinery/photocopier/faxmachine/attack_hand(mob/user as mob)
user.set_machine(src)

View File

@@ -15,7 +15,7 @@
var/toner = 30 //how much toner is left! woooooo~
var/maxcopies = 10 //how many copies can be copied at once- idea shamelessly stolen from bs12's copier!
/obj/machinery/photocopier/map/New()
/obj/machinery/photocopier/New()
circuit = new circuit(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)

View File

@@ -8,7 +8,7 @@
desc = "Computer designed to remotely monitor power levels around the station"
icon = 'icons/obj/computer.dmi'
icon_keyboard = "power_key"
icon_screen = "power"
icon_screen = "power:0"
light_color = "#ffcc33"
//computer stuff
@@ -30,16 +30,12 @@
// Updates icon of this computer according to current status.
/obj/machinery/computer/power_monitor/update_icon()
if(stat & BROKEN)
icon_state = "powerb"
return
if(stat & NOPOWER)
icon_state = "power0"
return
if(alerting)
icon_state = "power_alert"
return
icon_state = "power"
if(!(stat & (NOPOWER|BROKEN)))
if(alerting)
icon_screen = "power:1"
else
icon_screen = "power:0"
..()
// On creation automatically connects to active sensors. This is delayed to ensure sensors already exist.
/obj/machinery/computer/power_monitor/New()

View File

@@ -12,7 +12,7 @@
var/caliber = "" //Which kind of guns it can be loaded into
var/projectile_type //The bullet type to create when New() is called
var/obj/item/projectile/BB = null //The loaded bullet - make it so that the projectiles are created only when needed?
var/spent_icon = null
// var/spent_icon = null
/obj/item/ammo_casing/New()
..()
@@ -46,8 +46,10 @@
BB.name = "[initial(BB.name)] (\"[label_text]\")"
/obj/item/ammo_casing/update_icon()
if(spent_icon && !BB)
icon_state = spent_icon
/* if(spent_icon && !BB)
icon_state = spent_icon*/
if(!BB) // This is really just a much better way of doing this.
icon_state = "[initial(icon_state)]-spent"
/obj/item/ammo_casing/examine(mob/user)
..()
@@ -88,6 +90,7 @@
var/list/ammo_states = list() //values
/obj/item/ammo_magazine/New()
..()
if(multiple_sprites)
initialize_magazine_icondata(src)
@@ -112,6 +115,24 @@
C.loc = src
stored_ammo.Insert(1, C) //add to the head of the list
update_icon()
if(istype(W, /obj/item/ammo_magazine/clip))
var/obj/item/ammo_magazine/clip/L = W
if(L.caliber != caliber)
user << "<span class='warning'>The ammo in [L] does not fit into [src].</span>"
return
if(!L.stored_ammo.len)
user << "<span class='warning'>There's no more ammo [L]!</span>"
return
if(stored_ammo.len >= max_ammo)
user << "<span class='warning'>[src] is full!</span>"
return
var/obj/item/ammo_casing/AC = L.stored_ammo[1] //select the next casing.
L.stored_ammo -= AC //Remove this casing from loaded list of the clip.
AC.loc = src
stored_ammo.Insert(1, AC) //add it to the head of our magazine's list
L.update_icon()
playsound(user.loc, 'sound/weapons/flipblade.ogg', 50, 1)
update_icon()
/obj/item/ammo_magazine/attack_self(mob/user)
if(!stored_ammo.len)

View File

@@ -1,17 +1,20 @@
///////// .357 /////////
/obj/item/ammo_magazine/a357
//name = "ammo box (.357)"
//desc = "A box of .357 ammo"
//icon_state = "357"
name = "speed loader (.357)"
icon_state = "T38"
name = "speedloader (.357)"
desc = "A speedloader for .357 revolvers."
icon_state = "38"
caliber = "357"
ammo_type = /obj/item/ammo_casing/a357
matter = list(DEFAULT_WALL_MATERIAL = 1260)
max_ammo = 7
max_ammo = 6
multiple_sprites = 1
///////// .38 /////////
/obj/item/ammo_magazine/c38
name = "speed loader (.38)"
name = "speedloader (.38)"
desc = "A speedloader for .38 revolvers."
icon_state = "38"
caliber = "38"
matter = list(DEFAULT_WALL_MATERIAL = 360)
@@ -20,11 +23,13 @@
multiple_sprites = 1
/obj/item/ammo_magazine/c38/rubber
name = "speed loader (.38 rubber)"
name = "speedloader (.38 rubber)"
ammo_type = /obj/item/ammo_casing/c38r
///////// .45 /////////
/obj/item/ammo_magazine/c45m
name = "magazine (.45)"
name = "pistol magazine (.45)"
icon_state = "45"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
@@ -46,17 +51,79 @@
/obj/item/ammo_magazine/c45m/flash
name = "magazine (.45 flash)"
ammo_type = "/obj/item/ammo_casing/c45f"
ammo_type = /obj/item/ammo_casing/c45f
/obj/item/ammo_magazine/c45uzi
name = "stick magazine (.45)"
icon_state = "uzi45"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 1200)
caliber = ".45"
max_ammo = 16
multiple_sprites = 1
/obj/item/ammo_magazine/c45uzi/empty
initial_ammo = 0
/obj/item/ammo_magazine/tommymag
name = "tommygun magazine (.45)"
icon_state = "tommy-mag"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 1500)
caliber = ".45"
max_ammo = 20
/obj/item/ammo_magazine/tommymag/empty
initial_ammo = 0
/obj/item/ammo_magazine/tommydrum
name = "tommygun drum magazine (.45)"
icon_state = "tommy-drum"
w_class = 3 // Bulky ammo doesn't fit in your pockets!
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 3750)
caliber = ".45"
max_ammo = 50
/obj/item/ammo_magazine/tommydrum/empty
initial_ammo = 0
/obj/item/ammo_magazine/clip/c45
name = "ammo clip (.45)"
icon_state = "clip_pistol"
desc = "A stripper clip for reloading .45 rounds into magazines."
caliber = ".45"
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 675) // metal costs very roughly based around one .45 casing = 75 metal
max_ammo = 9
multiple_sprites = 1
/obj/item/ammo_magazine/clip/c45/rubber
name = "ammo clip (.45 rubber)"
ammo_type = /obj/item/ammo_casing/c45r
/obj/item/ammo_magazine/clip/c45/practice
name = "ammo clip (.45 practice)"
ammo_type = /obj/item/ammo_casing/c45p
/obj/item/ammo_magazine/clip/c45/flash
name = "ammo clip (.45 flash)"
ammo_type = /obj/item/ammo_casing/c45f
///////// 9mm /////////
/obj/item/ammo_magazine/mc9mm
name = "magazine (9mm)"
icon_state = "9x19p"
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
matter = list(DEFAULT_WALL_MATERIAL = 600)
matter = list(DEFAULT_WALL_MATERIAL = 480)
caliber = "9mm"
ammo_type = /obj/item/ammo_casing/c9mm
max_ammo = 10
max_ammo = 8
multiple_sprites = 1
/obj/item/ammo_magazine/mc9mm/empty
@@ -65,17 +132,13 @@
/obj/item/ammo_magazine/mc9mm/flash
ammo_type = /obj/item/ammo_casing/c9mmf
/obj/item/ammo_magazine/c9mm
name = "ammunition Box (9mm)"
icon_state = "9mm"
origin_tech = list(TECH_COMBAT = 2)
matter = list(DEFAULT_WALL_MATERIAL = 1800)
caliber = "9mm"
ammo_type = /obj/item/ammo_casing/c9mm
max_ammo = 30
/obj/item/ammo_magazine/mc9mm/rubber
name = "magazine (9mm rubber)"
ammo_type = /obj/item/ammo_casing/c9mmr
/obj/item/ammo_magazine/c9mm/empty
initial_ammo = 0
/obj/item/ammo_magazine/mc9mm/practice
name = "magazine (9mm practice)"
ammo_type = /obj/item/ammo_casing/c9mmp
/obj/item/ammo_magazine/mc9mmt
name = "top mounted magazine (9mm)"
@@ -94,22 +157,85 @@
name = "top mounted magazine (9mm rubber)"
ammo_type = /obj/item/ammo_casing/c9mmr
/obj/item/ammo_magazine/mc9mmt/flash
name = "top mounted magazine (9mm flash)"
ammo_type = /obj/item/ammo_casing/c9mmf
/obj/item/ammo_magazine/mc9mmt/practice
name = "top mounted magazine (9mm practice)"
ammo_type = /obj/item/ammo_casing/c9mmp
/obj/item/ammo_magazine/c45
name = "ammunition Box (.45)"
/obj/item/ammo_magazine/p90
name = "high capacity top mounted magazine (9mm armor-piercing)"
icon_state = "p90"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c9mm/ap
matter = list(DEFAULT_WALL_MATERIAL = 3000)
caliber = "9mm"
max_ammo = 50
multiple_sprites = 1
/obj/item/ammo_magazine/p90/empty
initial_ammo = 0
/obj/item/ammo_magazine/clip/c9mm
name = "ammo clip (9mm)"
icon_state = "clip_pistol"
desc = "A stripper clip for reloading 9mm rounds into magazines."
caliber = "9mm"
ammo_type = /obj/item/ammo_casing/c9mm
matter = list(DEFAULT_WALL_MATERIAL = 540) // metal costs are very roughly based around one 9mm casing = 60 metal
max_ammo = 9
multiple_sprites = 1
/obj/item/ammo_magazine/clip/c9mm/rubber
name = "ammo clip (.45 rubber)"
ammo_type = /obj/item/ammo_casing/c9mmr
/obj/item/ammo_magazine/clip/c9mm/practice
name = "ammo clip (.45 practice)"
ammo_type = /obj/item/ammo_casing/c9mmp
/obj/item/ammo_magazine/clip/c9mm/flash
name = "ammo clip (.45 flash)"
ammo_type = /obj/item/ammo_casing/c9mmf
/obj/item/ammo_magazine/c9mm // Made by RnD for Prototype SMG and should probably be removed because why does it require DIAMONDS to make bullets?
name = "ammunition Box (9mm)"
icon_state = "9mm"
origin_tech = list(TECH_COMBAT = 2)
caliber = ".45"
matter = list(DEFAULT_WALL_MATERIAL = 2250)
ammo_type = /obj/item/ammo_casing/c45
matter = list(DEFAULT_WALL_MATERIAL = 1800)
caliber = "9mm"
ammo_type = /obj/item/ammo_casing/c9mm
max_ammo = 30
/obj/item/ammo_magazine/c9mm/empty
initial_ammo = 0
///////// 5mm /////////
/*
/obj/item/ammo_magazine/c5mm
name = "magazine (5mm)"
icon_state = "fiveseven"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/c5mm
matter = list(DEFAULT_WALL_MATERIAL = 1200)
caliber = "5mm"
max_ammo = 20
//multiple_sprites = 1
/obj/item/ammo_magazine/clip/c5mm
name = "ammo clip (5mm)"
icon_state = "clip_pistol"
desc = "A stripper clip for reloading 5mm rounds into magazines."
caliber = "5mm"
ammo_type = /obj/item/ammo_casing/c5mm
matter = list(DEFAULT_WALL_MATERIAL = 540) // metal costs are very roughly based around one 5mm casing = 60 metal
max_ammo = 9
multiple_sprites = 1
*/
///////// 10mm /////////
/obj/item/ammo_magazine/a10mm
name = "magazine (10mm)"
icon_state = "12mm"
@@ -124,6 +250,18 @@
/obj/item/ammo_magazine/a10mm/empty
initial_ammo = 0
/obj/item/ammo_magazine/clip/a10mm
name = "ammo clip (10mm)"
icon_state = "clip_pistol"
desc = "A stripper clip for reloading 5mm rounds into magazines."
caliber = "10mm"
ammo_type = /obj/item/ammo_casing/a10mm
matter = list(DEFAULT_WALL_MATERIAL = 675) // metal costs are very roughly based around one 10mm casing = 75 metal
max_ammo = 9
multiple_sprites = 1
///////// 5.56mm /////////
/obj/item/ammo_magazine/a556
name = "magazine (5.56mm)"
icon_state = "5.56"
@@ -146,8 +284,49 @@
name = "magazine (5.56mm armor-piercing)"
ammo_type = /obj/item/ammo_casing/a556/ap
/obj/item/ammo_magazine/a556m
name = "20rnd magazine (5.56mm)"
icon_state = "5.56mid"
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
caliber = "a556"
matter = list(DEFAULT_WALL_MATERIAL = 3600)
ammo_type = /obj/item/ammo_casing/a556
max_ammo = 20
multiple_sprites = 1
/obj/item/ammo_magazine/a556m/empty
initial_ammo = 0
/obj/item/ammo_magazine/a556m/ap
name = "20rnd magazine (5.56mm armor-piercing)"
ammo_type = /obj/item/ammo_casing/a556/ap
/obj/item/ammo_magazine/a556m/practice
name = "20rnd magazine (5.56mm practice)"
ammo_type = /obj/item/ammo_casing/a556p
/obj/item/ammo_magazine/clip/a556
name = "ammo clip (5.56mm)"
icon_state = "clip_rifle"
caliber = "a556"
ammo_type = /obj/item/ammo_casing/a556
matter = list(DEFAULT_WALL_MATERIAL = 450) // metal costs are very roughly based around one 10mm casing = 180 metal
max_ammo = 5
multiple_sprites = 1
/obj/item/ammo_magazine/clip/a556/ap
name = "rifle clip (5.56mm armor-piercing)"
ammo_type = /obj/item/ammo_casing/a556/ap
/obj/item/ammo_magazine/clip/a556/practice
name = "rifle clip (5.56mm practice)"
ammo_type = /obj/item/ammo_casing/a556
///////// .50 AE /////////
/obj/item/ammo_magazine/a50
name = "magazine (.50)"
name = "magazine (.50 AE)"
icon_state = "50ae"
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
@@ -160,17 +339,17 @@
/obj/item/ammo_magazine/a50/empty
initial_ammo = 0
/obj/item/ammo_magazine/a75
name = "ammo magazine (20mm)"
icon_state = "75"
mag_type = MAGAZINE
caliber = "75"
ammo_type = /obj/item/ammo_casing/a75
/obj/item/ammo_magazine/clip/a50
name = "ammo clip (.50 AE)"
icon_state = "clip_pistol"
desc = "A stripper clip for reloading .50 Action Express rounds into magazines."
caliber = ".50"
ammo_type = /obj/item/ammo_casing/a50
matter = list(DEFAULT_WALL_MATERIAL = 1620) // metal costs are very roughly based around one .50 casing = 180 metal
max_ammo = 9
multiple_sprites = 1
max_ammo = 4
/obj/item/ammo_magazine/a75/empty
initial_ammo = 0
///////// 7.62mm /////////
/obj/item/ammo_magazine/a762
name = "magazine box (7.62mm)"
@@ -178,8 +357,9 @@
origin_tech = list(TECH_COMBAT = 2)
mag_type = MAGAZINE
caliber = "a762"
matter = list(DEFAULT_WALL_MATERIAL = 4500)
matter = list(DEFAULT_WALL_MATERIAL = 10000)
ammo_type = /obj/item/ammo_casing/a762
w_class = 3 // This should NOT fit in your pocket!!
max_ammo = 50
multiple_sprites = 1
@@ -195,7 +375,7 @@
icon_state = "c762"
mag_type = MAGAZINE
caliber = "a762"
matter = list(DEFAULT_WALL_MATERIAL = 1800)
matter = list(DEFAULT_WALL_MATERIAL = 4000)
ammo_type = /obj/item/ammo_casing/a762
max_ammo = 20
multiple_sprites = 1
@@ -204,19 +384,48 @@
name = "magazine (7.62mm armor-piercing)"
ammo_type = /obj/item/ammo_casing/a762/ap
/obj/item/ammo_magazine/caps
name = "speed loader (caps)"
icon_state = "T38"
caliber = "caps"
color = "#FF0000"
ammo_type = /obj/item/ammo_casing/cap
matter = list(DEFAULT_WALL_MATERIAL = 600)
max_ammo = 7
/obj/item/ammo_magazine/c762/empty
initial_ammo = 0
/obj/item/ammo_magazine/s762 // 's' for small!
name = "magazine (7.62mm)"
icon_state = "SVD"
mag_type = MAGAZINE
caliber = "a762"
matter = list(DEFAULT_WALL_MATERIAL = 2000)
ammo_type = /obj/item/ammo_casing/a762
max_ammo = 10
multiple_sprites = 1
/obj/item/ammo_magazine/s762/empty
initial_ammo = 0
/obj/item/ammo_magazine/s762/ap
name = "magazine (7.62mm armor-piercing)"
ammo_type = /obj/item/ammo_casing/a762/ap
/obj/item/ammo_magazine/clip/a762
name = "ammo clip (7.62mm)"
icon_state = "clip_rifle"
caliber = "a762"
ammo_type = /obj/item/ammo_casing/a762
matter = list(DEFAULT_WALL_MATERIAL = 1000) // metal costs are very roughly based around one 7.62 casing = 200 metal
max_ammo = 5
multiple_sprites = 1
/obj/item/ammo_magazine/clip/a762/ap
name = "rifle clip (7.62mm armor-piercing)"
ammo_type = /obj/item/ammo_casing/a762/ap
/obj/item/ammo_magazine/clip/a762/practice
name = "rifle clip (7.62mm practice)"
ammo_type = /obj/item/ammo_casing/a762p
///////// 12g /////////
/obj/item/ammo_magazine/g12
name = "magazine (12 gauge)"
icon_state = "g12"
icon_state = "12g"
mag_type = MAGAZINE
caliber = "shotgun"
matter = list(DEFAULT_WALL_MATERIAL = 2200)
@@ -237,4 +446,30 @@
ammo_type = /obj/item/ammo_casing/shotgun/flash
/obj/item/ammo_magazine/g12/empty
initial_ammo = 0
initial_ammo = 0
///////// .75 Gyrojet /////////
/obj/item/ammo_magazine/a75
name = "ammo magazine (.75 Gyrojet)"
icon_state = "75"
mag_type = MAGAZINE
caliber = "75"
ammo_type = /obj/item/ammo_casing/a75
multiple_sprites = 1
max_ammo = 4
/obj/item/ammo_magazine/a75/empty
initial_ammo = 0
///////// Misc. /////////
/obj/item/ammo_magazine/caps
name = "speedloader (caps)"
icon_state = "T38"
caliber = "caps"
color = "#FF0000"
ammo_type = /obj/item/ammo_casing/cap
matter = list(DEFAULT_WALL_MATERIAL = 600)
max_ammo = 7
multiple_sprites = 1

View File

@@ -9,7 +9,7 @@
projectile_type = /obj/item/projectile/bullet/pistol/strong
/obj/item/ammo_casing/a75
desc = "A 20mm bullet casing."
desc = "A .75 gyrojet rocket sheathe."
caliber = "75"
projectile_type = /obj/item/projectile/bullet/gyro
@@ -21,6 +21,7 @@
/obj/item/ammo_casing/c38r
desc = "A .38 rubber bullet casing."
caliber = "38"
icon_state = "r-casing"
projectile_type = /obj/item/projectile/bullet/pistol/rubber
/obj/item/ammo_casing/c9mm
@@ -28,21 +29,34 @@
caliber = "9mm"
projectile_type = /obj/item/projectile/bullet/pistol
/obj/item/ammo_casing/c9mm/ap
desc = "A 9mm armor-piercing bullet casing."
projectile_type = /obj/item/projectile/bullet/pistol/ap
/obj/item/ammo_casing/c9mmf
desc = "A 9mm flash shell casing."
caliber = "9mm"
icon_state = "r-casing"
projectile_type = /obj/item/projectile/energy/flash
/obj/item/ammo_casing/c9mmr
desc = "A 9mm rubber bullet casing."
caliber = "9mm"
icon_state = "r-casing"
projectile_type = /obj/item/projectile/bullet/pistol/rubber
/obj/item/ammo_casing/c9mmp
desc = "A 9mm practice bullet casing."
caliber = "9mm"
icon_state = "r-casing"
projectile_type = /obj/item/projectile/bullet/pistol/practice
/*
/obj/item/ammo_casing/c5mm
desc = "A 5mm bullet casing."
caliber = "5mm"
projectile_type = /obj/item/projectile/bullet/pistol/ap
*/
/obj/item/ammo_casing/c45
desc = "A .45 bullet casing."
@@ -52,16 +66,19 @@
/obj/item/ammo_casing/c45p
desc = "A .45 practice bullet casing."
caliber = ".45"
icon_state = "r-casing"
projectile_type = /obj/item/projectile/bullet/pistol/practice
/obj/item/ammo_casing/c45r
desc = "A .45 rubber bullet casing."
caliber = ".45"
icon_state = "r-casing"
projectile_type = /obj/item/projectile/bullet/pistol/rubber
/obj/item/ammo_casing/c45f
desc = "A .45 flash shell casing."
caliber = ".45"
icon_state = "r-casing"
projectile_type = /obj/item/projectile/energy/flash
/obj/item/ammo_casing/a10mm
@@ -112,7 +129,6 @@
name = "stun shell"
desc = "A 12 gauge taser cartridge."
icon_state = "stunshell"
spent_icon = "stunshell-spent"
projectile_type = /obj/item/projectile/energy/electrode/stunshot
matter = list(DEFAULT_WALL_MATERIAL = 360, "glass" = 720)
@@ -131,18 +147,27 @@
/obj/item/ammo_casing/a762
desc = "A 7.62mm bullet casing."
caliber = "a762"
icon_state = "rifle-casing"
projectile_type = /obj/item/projectile/bullet/rifle/a762
/obj/item/ammo_casing/a762/ap
desc = "A 7.62mm armor-piercing bullet casing."
caliber = "a762"
projectile_type = /obj/item/projectile/bullet/rifle/a762/ap
/obj/item/ammo_casing/a762p
desc = "A 7.62mm practice bullet casing."
caliber = "a762"
icon_state = "rifle-casing" // Need to make an icon for these
projectile_type = /obj/item/projectile/bullet/rifle/practice
/obj/item/ammo_casing/a762/blank
desc = "A blank 7.62mm bullet casing."
projectile_type = /obj/item/projectile/bullet/blank
matter = list(DEFAULT_WALL_MATERIAL = 90)
/obj/item/ammo_casing/a145
name = "shell casing"
desc = "A 14.5mm shell."
icon_state = "lcasing"
spent_icon = "lcasing-spent"
caliber = "14.5mm"
projectile_type = /obj/item/projectile/bullet/rifle/a145
matter = list(DEFAULT_WALL_MATERIAL = 1250)
@@ -150,17 +175,18 @@
/obj/item/ammo_casing/a556
desc = "A 5.56mm bullet casing."
caliber = "a556"
icon_state = "rifle-casing"
projectile_type = /obj/item/projectile/bullet/rifle/a556
/obj/item/ammo_casing/a556/ap
desc = "A 5.56mm armor-piercing bullet casing."
caliber = "a556"
projectile_type = /obj/item/projectile/bullet/rifle/a556/ap
/obj/item/ammo_casing/a556p
desc = "A 5.56mm practice bullet casing."
caliber = "a556"
projectile_type = /obj/item/projectile/bullet/rifle/a556/practice
icon_state = "rifle-casing" // Need to make an icon for these
projectile_type = /obj/item/projectile/bullet/rifle/practice
/obj/item/ammo_casing/rocket
name = "rocket shell"
@@ -173,5 +199,11 @@
name = "cap"
desc = "A cap for children toys."
caliber = "caps"
icon_state = "r-casing"
color = "#FF0000"
projectile_type = /obj/item/projectile/bullet/pistol/cap
/obj/item/ammo_casing/spent // For simple hostile mobs only, so they don't cough up usable bullets when firing. This is for literally nothing else.
icon_state = "s-casing-spent"
BB = null
projectile_type = null

View File

@@ -82,6 +82,13 @@
var/tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them.
var/tmp/lock_time = -100
var/dna_lock = 0 //whether or not the gun is locked to dna
var/list/stored_dna = list() //list of the dna stored in the gun, used to allow users to use it or not
var/safety_level = 0 //either 0 or 1, at 0 the game buzzes and tells the user they can't use it, at 1 it self destructs after 10 seconds
var/controller_dna = null //The dna of the person who is the primary controller of the gun
var/controller_lock = 0 //whether or not the gun is locked by the primar controller, 0 or 1, at 1 it is locked and does not allow
var/exploding = 0
/obj/item/weapon/gun/New()
..()
for(var/i in 1 to firemodes.len)
@@ -90,6 +97,11 @@
if(isnull(scoped_accuracy))
scoped_accuracy = accuracy
if(!dna_lock)
verbs -= /obj/item/weapon/gun/verb/remove_dna
verbs -= /obj/item/weapon/gun/verb/give_dna
verbs -= /obj/item/weapon/gun/verb/allow_dna
/obj/item/weapon/gun/update_held_icon()
if(requires_two_hands)
var/mob/living/M = loc
@@ -114,6 +126,20 @@
return 0
var/mob/living/M = user
if(dna_lock && stored_dna)
if(!authorized_user(user))
if(safety_level == 0)
M << "<span class='danger'>\The [src] buzzes in dissapoint and displays an invalid DNA symbol.</span>"
return 0
if(!exploding)
if(safety_level == 1)
M << "<span class='danger'>\The [src] hisses in dissapointment.</span>"
visible_message("<span class='game say'><span class='name'>\The [src]</span> announces, \"Self-destruct occurring in ten seconds.\"</span>", "<span class='game say'><span class='name'>\The [src]</span> announces, \"Self-destruct occurring in ten seconds.\"</span>")
sleep(100)
explosion(src, -1, 0, 2, 3, 0)
exploding = 1
qdel(src)
return 0
if(HULK in M.mutations)
M << "<span class='danger'>Your fingers are much too large for the trigger guard!</span>"
return 0
@@ -426,4 +452,78 @@
return new_mode
/obj/item/weapon/gun/attack_self(mob/user)
switch_firemodes(user)
switch_firemodes(user)
/obj/item/weapon/gun/proc/get_dna(mob/user)
var/mob/living/M = user
if(!controller_lock)
if(!stored_dna && !(M.dna in stored_dna))
M << "<span class='warning'>\The [src] buzzes and displays a symbol showing the gun already contains your DNA.</span>"
return 0
else
stored_dna += M.dna
M << "<span class='notice'>\The [src] pings and a needle flicks out from the grip, taking a DNA sample from you.</span>"
if(!controller_dna)
controller_dna = M.dna
M << "<span class='notice'>\The [src] processes the dna sample and pings, acknowledging you as the primary controller.</span>"
return 1
else
M << "<span class='warning'>\The [src] buzzes and displays a locked symbol. It is not allowing DNA samples at this time.</span>"
return 0
/obj/item/weapon/gun/verb/give_dna()
set name = "Give DNA"
set category = "Object"
set src in usr
get_dna(usr)
/obj/item/weapon/gun/proc/clear_dna(mob/user)
var/mob/living/M = user
if(!controller_lock)
if(!authorized_user(M))
M << "<span class='warning'>\The [src] buzzes and displays an invalid user symbol.</span>"
return 0
else
stored_dna -= user.dna
M << "<span class='notice'>\The [src] beeps and clears the DNA it has stored.</span>"
if(M.dna == controller_dna)
controller_dna = null
M << "<span class='notice'>\The [src] beeps and removes you as the primary controller.</span>"
if(controller_lock)
controller_lock = 0
return 1
else
M << "<span class='warning'>\The [src] buzzes and displays a locked symbol. It is not allowing DNA modifcation at this time.</span>"
return 0
/obj/item/weapon/gun/verb/remove_dna()
set name = "Remove DNA"
set category = "Object"
set src in usr
clear_dna(usr)
/obj/item/weapon/gun/proc/toggledna(mob/user)
var/mob/living/M = user
if(authorized_user(M) && user.dna == controller_dna)
if(!controller_lock)
controller_lock = 1
M << "<span class='notice'>\The [src] beeps and displays a locked symbol, informing you it will no longer allow DNA samples.</span>"
else
controller_lock = 0
M << "<span class='notice'>\The [src] beeps and displays an unlocked symbol, informing you it will now allow DNA samples.</span>"
else
M << "<span class='warning'>\The [src] buzzes and displays an invalid user symbol.</span>"
/obj/item/weapon/gun/verb/allow_dna()
set name = "Toggle DNA Samples Allowance"
set category = "Object"
set src in usr
toggledna(usr)
/obj/item/weapon/gun/proc/authorized_user(mob/user)
if(!stored_dna || !stored_dna.len)
return 1
if(!(user.dna in stored_dna))
return 0
return 1

View File

@@ -90,7 +90,7 @@ obj/item/weapon/gun/energy/retro
standard photonic beams, resulting in an effective 'anti-armor' energy weapon."
icon_state = "xray"
item_state = "xray"
fire_sound = 'sound/weapons/laser3.ogg'
fire_sound = 'sound/weapons/eluger.ogg'
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3, TECH_MAGNET = 2)
projectile_type = /obj/item/projectile/beam/xray
charge_cost = 100
@@ -101,8 +101,8 @@ obj/item/weapon/gun/energy/retro
desc = "The HI DMR 9E is an older design of Hesphaistos Industries. A designated marksman rifle capable of shooting powerful \
ionized beams, this is a weapon to kill from a distance."
icon_state = "sniper"
item_state = "laser"
fire_sound = 'sound/weapons/marauder.ogg'
item_state = "laser" // placeholder
fire_sound = 'sound/weapons/gauss_shoot.ogg'
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 5, TECH_POWER = 4)
projectile_type = /obj/item/projectile/beam/sniper
slot_flags = SLOT_BACK

View File

@@ -23,12 +23,12 @@
/obj/item/weapon/gun/energy/gun/burst
name = "fm-2t"
name = "burst laser"
desc = "The FM-2t is a versatile energy based small arm, capable of switching between stun or kill with a three round burst option for both settings."
icon_state = "fm-2tstun100"
item_state = null //so the human update icon uses the icon_state instead.
fire_sound = 'sound/weapons/Taser.ogg'
max_shots = 12
max_shots = 21 //7 trigger pulls
projectile_type = /obj/item/projectile/beam/stun/weak
origin_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 2, TECH_ILLEGAL = 3)
@@ -38,10 +38,10 @@
one_handed_penalty = 2
firemodes = list(
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="fm-2tstun", fire_sound='sound/weapons/Taser.ogg'),
list(mode_name="stun 3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0), projectile_type=/obj/item/projectile/beam/stun, modifystate="fm-2tstun", fire_sound='sound/weapons/Taser.ogg'),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam/weaklaser, modifystate="fm-2tkill", fire_sound='sound/weapons/Laser.ogg'),
list(mode_name="lethal 3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0), projectile_type=/obj/item/projectile/beam, modifystate="fm-2tkill", fire_sound='sound/weapons/Laser.ogg'),
list(mode_name="stun", burst=1, projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="fm-2tstun", fire_sound='sound/weapons/Taser.ogg'),
list(mode_name="stun burst", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0), projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="fm-2tstun", fire_sound='sound/weapons/Taser.ogg'),
list(mode_name="lethal", burst=1, projectile_type=/obj/item/projectile/beam/weaklaser, modifystate="fm-2tkill", fire_sound='sound/weapons/Laser.ogg'),
list(mode_name="lethal burst", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0), projectile_type=/obj/item/projectile/beam/weaklaser, modifystate="fm-2tkill", fire_sound='sound/weapons/Laser.ogg'),
)
/obj/item/weapon/gun/energy/gun/nuclear

View File

@@ -7,13 +7,14 @@
force = 10
fire_sound='sound/weapons/Laser.ogg'
projectile_type = /obj/item/projectile/beam
charge_cost=100
max_shots = 20 // This is cut in half by "DESTROY" mode.
sel_mode = 2
max_shots = 10
firemodes = list(
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg', fire_delay=null, charge_cost=null),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg', fire_delay=null, charge_cost=null),
list(mode_name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/pulse.ogg', fire_delay=null, charge_cost=100),
list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg', fire_delay=null, charge_cost=100),
list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg', fire_delay=null, charge_cost=100),
list(mode_name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/gauss_shoot.ogg', fire_delay=null, charge_cost=200),
)
/obj/item/weapon/gun/energy/pulse_rifle/mounted
@@ -25,7 +26,7 @@
desc = "A heavy-duty, pulse-based energy weapon. Because of its complexity and cost, it is rarely seen in use except by specialists."
cell_type = /obj/item/weapon/cell/super
fire_delay = 25
fire_sound='sound/weapons/pulse.ogg'
fire_sound='sound/weapons/gauss_shoot.ogg'
projectile_type=/obj/item/projectile/beam/pulse
charge_cost=400

View File

@@ -19,7 +19,7 @@
/obj/item/weapon/gun/energy/ionrifle/update_icon()
..()
if(power_supply.charge < charge_cost)
item_state = "ionrifle-empty"
item_state = "ionrifle0"
else
item_state = initial(item_state)

View File

@@ -60,6 +60,7 @@
grenades.len--
user.put_in_hands(G)
user.visible_message("[user] removes \a [G] from [src].", "<span class='notice'>You remove \a [G] from [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
else
user << "<span class='warning'>[src] is empty.</span>"
@@ -117,6 +118,7 @@
if(chambered)
user.put_in_hands(chambered)
user.visible_message("[user] removes \a [chambered] from [src].", "<span class='notice'>You remove \a [chambered] from [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
chambered = null
else
user << "<span class='warning'>[src] is empty.</span>"

View File

@@ -54,6 +54,7 @@
item_storage.remove_from_storage(removing, src.loc)
user.put_in_hands(removing)
user << "You remove [removing] from the hopper."
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
else
user << "There is nothing to remove in \the [src]."

View File

@@ -10,8 +10,8 @@
flags = CONDUCT
slot_flags = 0
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 5)
fire_sound = 'sound/effects/bang.ogg'
fire_sound = 'sound/weapons/rpg.ogg'
release_force = 15
throw_distance = 30
var/max_rockets = 1

View File

@@ -31,6 +31,7 @@
/obj/item/weapon/syringe_cartridge/attack_self(mob/user)
if(syringe)
user << "<span class='notice'>You remove [syringe] from [src].</span>"
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
user.put_in_hands(syringe)
syringe = null
sharp = initial(sharp)
@@ -114,6 +115,7 @@
darts -= C
user.put_in_hands(C)
user.visible_message("[user] removes \a [C] from [src].", "<span class='notice'>You remove \a [C] from [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
else
..()

View File

@@ -24,6 +24,7 @@
//For MAGAZINE guns
var/magazine_type = null //the type of magazine that the gun comes preloaded with
var/obj/item/ammo_magazine/ammo_magazine = null //stored magazine
var/allowed_magazines //determines list of which magazines will fit in the gun
var/auto_eject = 0 //if the magazine should automatically eject itself when empty.
var/auto_eject_sound = null
//TODO generalize ammo icon states for guns
@@ -96,9 +97,9 @@
/obj/item/weapon/gun/projectile/proc/load_ammo(var/obj/item/A, mob/user)
if(istype(A, /obj/item/ammo_magazine))
var/obj/item/ammo_magazine/AM = A
if(!(load_method & AM.mag_type) || caliber != AM.caliber)
return //incompatible
if(!(load_method & AM.mag_type) || caliber != AM.caliber || allowed_magazines && !is_type_in_list(A, allowed_magazines))
user << "<span class='warning'>[AM] won't load into [src]!</span>"
return
switch(AM.mag_type)
if(MAGAZINE)
if(ammo_magazine)
@@ -167,6 +168,7 @@
loaded.len--
user.put_in_hands(C)
user.visible_message("[user] removes \a [C] from [src].", "<span class='notice'>You remove \a [C] from [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
else
user << "<span class='warning'>[src] is empty.</span>"
update_icon()

View File

@@ -17,21 +17,10 @@
firemodes = list(
list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null),
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0)),
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0))
// list(mode_name="short bursts", burst=5, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1,-2,-2), dispersion=list(0.6, 1.0, 1.0, 1.0, 1.2)),
)
/obj/item/weapon/gun/projectile/automatic/mini_uzi
name = "\improper Uzi"
desc = "The UZI is a lightweight, fast firing gun. For when you want someone dead. Uses .45 rounds."
icon_state = "mini-uzi"
w_class = 3
load_method = SPEEDLOADER //yup. until someone sprites a magazine for it.
max_shells = 15
caliber = ".45"
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
ammo_type = /obj/item/ammo_casing/c45
/obj/item/weapon/gun/projectile/automatic/c20r
name = "submachine gun"
desc = "The C-20r is a lightweight and rapid firing SMG, for when you REALLY need someone dead. Uses 10mm rounds. Has a 'Scarborough Arms - Per falcis, per pravitas' buttstamp."
@@ -45,6 +34,7 @@
fire_sound = 'sound/weapons/Gunshot_light.ogg'
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/a10mm
allowed_magazines = list(/obj/item/ammo_magazine/a10mm)
auto_eject = 1
auto_eject_sound = 'sound/weapons/smg_empty_alarm.ogg'
@@ -71,23 +61,27 @@
slot_flags = SLOT_BACK
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/c762
allowed_magazines = list(/obj/item/ammo_magazine/c762, /obj/item/ammo_magazine/s762)
one_handed_penalty = 4
firemodes = list(
list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null),
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=6, burst_accuracy=list(0,-1,-2), dispersion=list(0.0, 0.6, 0.6)),
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=6, burst_accuracy=list(0,-1,-2), dispersion=list(0.0, 0.6, 0.6))
// list(mode_name="short bursts", burst=5, fire_delay=null, move_delay=6, burst_accuracy=list(0,-1,-2,-2,-3), dispersion=list(0.6, 1.0, 1.0, 1.0, 1.2)),
)
/obj/item/weapon/gun/projectile/automatic/sts35/update_icon(var/ignore_inhands)
..()
icon_state = (ammo_magazine)? "arifle" : "arifle-empty"
if(istype(ammo_magazine,/obj/item/ammo_magazine/s762))
icon_state = "arifle-small"
else
icon_state = (ammo_magazine)? "arifle" : "arifle-empty"
if(!ignore_inhands) update_held_icon()
/obj/item/weapon/gun/projectile/automatic/wt550
name = "machine pistol"
desc = "The W-T 550 Saber is a cheap self-defense weapon, mass-produced by Ward-Takahashi for paramilitary and private use. Uses 9mm rounds."
desc = "The WT550 Saber is a cheap self-defense weapon mass-produced by Ward-Takahashi for paramilitary and private use. Uses 9mm rounds."
icon_state = "wt550"
item_state = "wt550"
w_class = 3
@@ -98,6 +92,7 @@
fire_sound = 'sound/weapons/Gunshot_light.ogg'
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/mc9mmt/rubber
allowed_magazines = list(/obj/item/ammo_magazine/mc9mmt)
/obj/item/weapon/gun/projectile/automatic/wt550/update_icon()
..()
@@ -108,19 +103,20 @@
return
/obj/item/weapon/gun/projectile/automatic/z8
name = "bullpup assault rifle"
desc = "The Z8 Bulldog is an older model bullpup carbine, made by the now defunct Zendai Foundries. Uses armor piercing 5.56mm rounds. Makes you feel like a space marine when you hold it."
icon_state = "carbine"
name = "designated marksman rifle"
desc = "The Z8 Bulldog is an older model designated marksman rifle, made by the now defunct Zendai Foundries. Makes you feel like a space marine when you hold it, even though it can only hold 10 round magazines. Uses 5.56mm rounds and has an under barrel grenade launcher."
icon_state = "carbine" // This isn't a carbine. :T
item_state = "z8carbine"
w_class = 4
force = 10
caliber = "a556"
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 3)
ammo_type = "/obj/item/ammo_casing/a556"
ammo_type = "/obj/item/ammo_casing/a556" // Is this really needed anymore?
fire_sound = 'sound/weapons/Gunshot.ogg'
slot_flags = SLOT_BACK
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/a556
allowed_magazines = list(/obj/item/ammo_magazine/a556)
auto_eject = 1
auto_eject_sound = 'sound/weapons/smg_empty_alarm.ogg'
@@ -180,7 +176,7 @@
name = "light machine gun"
desc = "A rather traditionally made L6 SAW with a pleasantly lacquered wooden pistol grip. Has 'Aussec Armoury- 2531' engraved on the reciever"
icon_state = "l6closed100"
item_state = "l6closedmag"
item_state = "l6closed"
w_class = 4
force = 10
slot_flags = 0
@@ -188,17 +184,18 @@
caliber = "a762"
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 1, TECH_ILLEGAL = 2)
slot_flags = SLOT_BACK
ammo_type = "/obj/item/ammo_casing/a762"
fire_sound = 'sound/weapons/Gunshot_light.ogg'
ammo_type = "/obj/item/ammo_casing/a762" // Is this really needed anymore?
fire_sound = 'sound/weapons/machinegun.ogg'
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/a762
allowed_magazines = list(/obj/item/ammo_magazine/a762, /obj/item/ammo_magazine/c762)
one_handed_penalty = 6
firemodes = list(
list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null),
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0)),
list(mode_name="short bursts", burst=5, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2)),
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0)),
list(mode_name="short bursts", burst=5, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2))
)
var/cover_open = 0
@@ -213,6 +210,7 @@
cover_open = !cover_open
user << "<span class='notice'>You [cover_open ? "open" : "close"] [src]'s cover.</span>"
update_icon()
update_held_icon()
/obj/item/weapon/gun/projectile/automatic/l6_saw/attack_self(mob/user as mob)
if(cover_open)
@@ -227,7 +225,13 @@
return ..() //once open, behave like normal
/obj/item/weapon/gun/projectile/automatic/l6_saw/update_icon()
icon_state = "l6[cover_open ? "open" : "closed"][ammo_magazine ? round(ammo_magazine.stored_ammo.len, 25) : "-empty"]"
if(istype(ammo_magazine,/obj/item/ammo_magazine/c762))
icon_state = "l6[cover_open ? "open" : "closed"]mag"
item_state = icon_state
else
icon_state = "l6[cover_open ? "open" : "closed"][ammo_magazine ? round(ammo_magazine.stored_ammo.len, 25) : "-empty"]"
item_state = "l6[cover_open ? "open" : "closed"][ammo_magazine ? "" : "-empty"]"
update_held_icon()
/obj/item/weapon/gun/projectile/automatic/l6_saw/load_ammo(var/obj/item/A, mob/user)
if(!cover_open)
@@ -242,23 +246,25 @@
..()
/obj/item/weapon/gun/projectile/automatic/as24
name = "\improper AS-24 automatic shotgun"
desc = "A durable, rugged looking automatic weapon of a make popular on the frontier worlds. Uses 12 gauge shells. It is unmarked."
name = "automatic shotgun"
desc = "The AS-24 is a durable, rugged looking automatic weapon of a make popular on the frontier worlds. Uses 12 gauge shells. It is unmarked."
icon_state = "ashot"
item_state = null
w_class = 4
force = 10
caliber = "shotgun"
fire_sound = 'sound/weapons/shotgun.ogg'
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 1, TECH_ILLEGAL = 4)
slot_flags = SLOT_BACK
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/g12
allowed_magazines = list(/obj/item/ammo_magazine/g12)
one_handed_penalty = 4
firemodes = list(
list(mode_name="semiauto", burst=1, fire_delay=0),
list(mode_name="3-round bursts", burst=3, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.0, 0.6, 0.6)),
list(mode_name="3-round bursts", burst=3, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.0, 0.6, 0.6))
// list(mode_name="6-round bursts", burst=6, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2, 1.2)),
)
@@ -270,5 +276,99 @@
icon_state = "ashot"
return
/obj/item/weapon/gun/projectile/automatic/mini_uzi
name = "\improper Uzi"
desc = "A lightweight, compact, fast firing gun, for when you want someone really dead. Uses .45 rounds."
icon_state = "mini-uzi"
w_class = 3
load_method = MAGAZINE
caliber = ".45"
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
magazine_type = /obj/item/ammo_magazine/c45uzi
allowed_magazines = list(/obj/item/ammo_magazine/c45uzi)
firemodes = list(
list(mode_name="semiauto", burst=1, fire_delay=0),
list(mode_name="3-round bursts", burst=3, burst_delay=1, fire_delay=4, move_delay=4, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0))
)
/obj/item/weapon/gun/projectile/automatic/mini_uzi/update_icon()
..()
if(ammo_magazine)
icon_state = "mini-uzi"
else
icon_state = "mini-uzi-empty"
/obj/item/weapon/gun/projectile/automatic/p90
name = "personal defense weapon"
desc = "The H90K is a compact, high capacity submachine gun produced by Hephaistos Industries. Despite its fierce reputation, it still manages to feel like a toy. Uses 9mm rounds."
icon_state = "p90smg"
item_state = "p90"
w_class = 3
caliber = "9mm"
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2)
slot_flags = SLOT_BELT // ToDo: Belt sprite.
fire_sound = 'sound/weapons/Gunshot_light.ogg'
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/p90
allowed_magazines = list(/obj/item/ammo_magazine/p90, /obj/item/ammo_magazine/mc9mmt) // ToDo: New sprite for the different mag.
firemodes = list(
list(mode_name="semiauto", burst=1, fire_delay=0),
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0))
)
/obj/item/weapon/gun/projectile/automatic/p90/update_icon()
icon_state = "p90smg-[ammo_magazine ? round(ammo_magazine.stored_ammo.len, 6) : "empty"]"
/obj/item/weapon/gun/projectile/automatic/tommygun
name = "\improper Tommygun"
desc = "This weapon was made famous by gangsters in the 20th century. Cybersun Industries is currently reproducing these for a target market of historic gun collectors and classy criminals. Uses .45 rounds."
icon_state = "tommygun"
w_class = 3
caliber = ".45"
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ILLEGAL = 5)
slot_flags = SLOT_BELT // ToDo: Belt sprite.
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/tommymag
allowed_magazines = list(/obj/item/ammo_magazine/tommymag, /obj/item/ammo_magazine/tommydrum)
firemodes = list(
list(mode_name="semiauto", burst=1, fire_delay=0),
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0))
)
/obj/item/weapon/gun/projectile/automatic/tommygun/update_icon()
..()
icon_state = (ammo_magazine)? "tommygun" : "tommygun-empty"
// update_held_icon()
/obj/item/weapon/gun/projectile/automatic/carbine
name = "assault carbine"
desc = "The bullpup configured GP3000 is a lightweight, compact, military-grade assault rifle produced by Gurov Projectile Weapons LLC. It is sold almost exclusively to standing armies. The serial number on this one has been scratched off. Uses 5.56mm rounds."
icon_state = "bullpupm"
item_state = "bullpup"
w_class = 4
force = 10
caliber = "a556"
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 1, TECH_ILLEGAL = 4)
slot_flags = SLOT_BACK
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/a556m
allowed_magazines = list(/obj/item/ammo_magazine/a556, /obj/item/ammo_magazine/a556m)
one_handed_penalty = 4
firemodes = list(
list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null),
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=6, burst_accuracy=list(0,-1,-2), dispersion=list(0.0, 0.6, 0.6))
)
/obj/item/weapon/gun/projectile/automatic/carbine/update_icon(var/ignore_inhands)
..()
if(istype(ammo_magazine,/obj/item/ammo_magazine/a556m))
icon_state = "bullpupm"
else
icon_state = (ammo_magazine)? "bullpup" : "bullpup-empty"
item_state = (ammo_magazine)? "bullpup" : "bullpup-empty"
if(!ignore_inhands) update_held_icon()

View File

@@ -0,0 +1,52 @@
// For all intents and purposes, these work exactly the same as pump shotguns. It's unnecessary to make their own procs for them.
/obj/item/weapon/gun/projectile/shotgun/pump/rifle
name = "bolt action rifle"
desc = "A reproduction of an almost ancient weapon design from the early 20th century. It's still popular among hunters and collectors due to its reliability. Uses 7.62mm rounds."
item_state = "boltaction"
icon_state = "boltaction"
fire_sound = 'sound/weapons/rifleshot.ogg'
max_shells = 5
caliber = "a762"
origin_tech = list(TECH_COMBAT = 1)// Old as shit rifle doesn't have very good tech.
ammo_type = /obj/item/ammo_casing/a762
load_method = SINGLE_CASING|SPEEDLOADER
action_sound = 'sound/weapons/riflebolt.ogg'
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/practice // For target practice
desc = "A bolt-action rifle with a lightweight synthetic wood stock, designed for competitive shooting. Comes shipped with practice rounds pre-loaded into the gun. Popular among professional marksmen. Uses 7.62mm rounds."
ammo_type = /obj/item/ammo_casing/a762p
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/ceremonial
name = "ceremonial bolt-action rifle"
desc = "A bolt-action rifle with a heavy, high-quality wood stock that has a beautiful finish. Clearly not intended to be used in combat. Uses 7.62mm rounds."
ammo_type = /obj/item/ammo_casing/a762/blank
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/mosin
name = "\improper Mosin Nagant"
desc = "Despite its age, the Mosin Nagant continues to be a favorite weapon among colonists, conscripts, and militias across the cosmos. Most today are built by Chen-Iltchenko Firearms, but it's hard to say who built this particular gun, considering the design has been ripped off by just about every arms manufacturer in the galaxy. Uses 7.62mm rounds."
icon_state = "mosin"
item_state = "mosin"
// Stole hacky terrible code from doublebarrel shotgun. -Spades
/obj/item/weapon/gun/projectile/shotgun/pump/rifle/mosin/attackby(var/obj/item/A as obj, mob/user as mob)
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter) && w_class != 3)
user << "<span class='notice'>You begin to shorten the barrel and stock of \the [src].</span>"
if(loaded.len)
afterattack(user, user) //will this work? //it will. we call it twice, for twice the FUN
playsound(user, fire_sound, 50, 1)
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='danger'>The rifle goes off in your face!</span>")
return
if(do_after(user, 30))
icon_state = "obrez"
w_class = 3
recoil = 2 // Owch
accuracy = -1 // You know damn well why.
item_state = "gun"
slot_flags &= ~SLOT_BACK //you can't sling it on your back
slot_flags |= (SLOT_BELT|SLOT_HOLSTER) //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) - or in a holster, why not.
name = "\improper Obrez"
desc = "The firepower of a Mosin, now the size of a pistol, with an effective combat range of about three feet. Uses 7.62mm rounds."
user << "<span class='warning'>You shorten the barrel and stock of \the [src]!</span>"
else
..()

View File

@@ -54,6 +54,7 @@
silenced = 1
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/chemdart
allowed_magazines = list(/obj/item/ammo_magazine/chemdart)
auto_eject = 0
var/list/beakers = list() //All containers inside the gun.

View File

@@ -3,10 +3,11 @@
name = ".45 pistol"
desc = "A cheap Martian knock-off of a Colt M1911. Uses .45 rounds."
magazine_type = /obj/item/ammo_magazine/c45m
allowed_magazines = list(/obj/item/ammo_magazine/c45m)
icon_state = "colt"
caliber = ".45"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
fire_sound = 'sound/weapons/Gunshot_light.ogg'
fire_sound = 'sound/weapons/semiauto.ogg'
load_method = MAGAZINE
/obj/item/weapon/gun/projectile/colt/detective
@@ -54,6 +55,7 @@
options["NT Mk. 58"] = "secguncomp"
options["NT Mk. 58 Custom"] = "secgundark"
options["Colt M1911"] = "colt"
options["FiveSeven"] = "fnseven"
options["USP"] = "usp"
options["H&K VP"] = "VP78"
options["P08 Luger"] = "p08"
@@ -72,7 +74,7 @@
magazine_type = /obj/item/ammo_magazine/c45m/rubber
caliber = ".45"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
fire_sound = 'sound/weapons/Gunshot_light.ogg'
fire_sound = 'sound/weapons/semiauto.ogg'
load_method = MAGAZINE
/obj/item/weapon/gun/projectile/sec/update_icon()
@@ -108,42 +110,62 @@
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/c45m
allowed_magazines = list(/obj/item/ammo_magazine/c45m)
/obj/item/weapon/gun/projectile/deagle
name = "desert eagle"
desc = "A robust handgun that uses .50 AE ammo"
desc = "A robust handgun that uses .50 AE rounds."
icon_state = "deagle"
item_state = "deagle"
force = 14.0
caliber = ".50"
load_method = MAGAZINE
fire_sound = 'sound/weapons/deagle.ogg'
magazine_type = /obj/item/ammo_magazine/a50
auto_eject = 1
allowed_magazines = list(/obj/item/ammo_magazine/a50)
/obj/item/weapon/gun/projectile/deagle/gold
desc = "A gold plated gun folded over a million times by superior martian gunsmiths. Uses .50 AE ammo."
desc = "A gold plated gun folded over a million times by superior martian gunsmiths. Uses .50 AE rounds."
icon_state = "deagleg"
item_state = "deagleg"
/obj/item/weapon/gun/projectile/deagle/camo
desc = "A Deagle brand Deagle for operators operating operationally. Uses .50 AE ammo."
desc = "A Deagle brand Deagle for operators operating operationally. Uses .50 AE rounds."
icon_state = "deaglecamo"
item_state = "deagleg"
auto_eject_sound = 'sound/weapons/smg_empty_alarm.ogg'
/*
/obj/item/weapon/gun/projectile/fiveseven
name = "\improper WT-AP57"
desc = "This tacticool pistol made by Ward-Takahashi trades stopping power for armor piercing and a high capacity. Uses 5mm rounds."
icon_state = "fnseven"
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 2)
caliber = "5mm"
load_method = MAGAZINE
fire_sound = 'sound/weapons/semiauto.ogg'
magazine_type = /obj/item/ammo_magazine/c5mm
allowed_magazines = list(/obj/item/ammo_magazine/c5mm)
/obj/item/weapon/gun/projectile/fiveseven/update_icon()
..()
if(ammo_magazine)
icon_state = "fnseven"
else
icon_state = "fnseven-empty"
*/
/obj/item/weapon/gun/projectile/gyropistol
/obj/item/weapon/gun/projectile/gyropistol // Does this even appear anywhere outside of admin abuse?
name = "gyrojet pistol"
desc = "A bulky pistol designed to fire self propelled rounds"
desc = "Speak softly, and carry a big gun. Fires rare .75 caliber self-propelled exploding bolts--because fuck you and everything around you."
icon_state = "gyropistol"
max_shells = 8
caliber = "75"
fire_sound = 'sound/effects/Explosion1.ogg'
fire_sound = 'sound/weapons/rpg.ogg'
origin_tech = list(TECH_COMBAT = 3)
ammo_type = "/obj/item/ammo_casing/a75"
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/a75
allowed_magazines = list(/obj/item/ammo_magazine/a75)
auto_eject = 1
auto_eject_sound = 'sound/weapons/smg_empty_alarm.ogg'
@@ -163,9 +185,10 @@
caliber = "9mm"
silenced = 0
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 2)
fire_sound = 'sound/weapons/Gunshot_light.ogg'
fire_sound = 'sound/weapons/semiauto.ogg'
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/mc9mm
allowed_magazines = list(/obj/item/ammo_magazine/mc9mm)
/obj/item/weapon/gun/projectile/pistol/flash
name = "holdout signal pistol"
@@ -246,3 +269,36 @@
var/obj/item/ammo_casing/ammo = ammo_type
caliber = initial(ammo.caliber)
..()
/obj/item/weapon/gun/projectile/derringer
name = "derringer"
desc = "It's not size of your gun that matters, just the size of your load. Uses .357 rounds." //OHHH MYYY~
icon_state = "derringer"
item_state = "concealed"
w_class = 2
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 3)
handle_casings = CYCLE_CASINGS //player has to take the old casing out manually before reloading
load_method = SINGLE_CASING
max_shells = 2
ammo_type = /obj/item/ammo_casing/a357
/obj/item/weapon/gun/projectile/luger
name = "\improper P08 Luger"
desc = "Not some cheap Scheisse .45 caliber Martian knockoff! This Luger is an authentic reproduction by RauMauser. Accuracy, easy handling, and its signature appearance make it popular among historic gun collectors. Uses 9mm rounds."
icon_state = "p08"
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 2)
caliber = "9mm"
load_method = MAGAZINE
fire_sound = 'sound/weapons/semiauto.ogg'
magazine_type = /obj/item/ammo_magazine/mc9mm
allowed_magazines = list(/obj/item/ammo_magazine/mc9mm)
/obj/item/weapon/gun/projectile/luger/update_icon()
..()
if(ammo_magazine)
icon_state = "[initial(icon_state)]"
else
icon_state = "[initial(icon_state)]-e"
/obj/item/weapon/gun/projectile/luger/brown
icon_state = "p08b"

View File

@@ -1,12 +1,12 @@
/obj/item/weapon/gun/projectile/revolver
name = "revolver"
desc = "The Lumoco Arms HE Colt is a choice revolver for when you absolutely, positively need to put a hole in the other guy. Uses .357 ammo."
desc = "The Lumoco Arms HE Colt is a choice revolver for when you absolutely, positively need to put a hole in the other guy. Uses .357 rounds."
icon_state = "revolver"
item_state = "revolver"
caliber = "357"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
handle_casings = CYCLE_CASINGS
max_shells = 7
max_shells = 6
ammo_type = /obj/item/ammo_casing/a357
var/chamber_offset = 0 //how many empty chambers in the cylinder until you hit a round
@@ -35,6 +35,7 @@
/obj/item/weapon/gun/projectile/revolver/mateba
name = "mateba"
desc = "This unique looking handgun is named after an Italian company famous for the manufacture of these revolvers, and pasta kneading machines. Uses .357 rounds." // Yes I'm serious. -Spades
icon_state = "mateba"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
@@ -42,7 +43,6 @@
name = "revolver"
desc = "A cheap Martian knock-off of a Smith & Wesson Model 10. Uses .38-Special rounds."
icon_state = "detective"
max_shells = 6
caliber = "38"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
fire_sound = 'sound/weapons/Gunshot_light.ogg'
@@ -68,10 +68,9 @@
// Blade Runner pistol.
/obj/item/weapon/gun/projectile/revolver/deckard
name = "Deckard .44"
name = "Deckard .38"
desc = "A custom-built revolver, based off the semi-popular Detective Special model."
icon_state = "deckard-empty"
max_shells = 6
caliber = "38"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2)
fire_sound = 'sound/weapons/Gunshot_light.ogg'
@@ -100,3 +99,15 @@
max_shells = 7
ammo_type = /obj/item/ammo_casing/cap
/obj/item/weapon/gun/projectile/revolver/judge
name = "\"The Judge\""
desc = "A revolving hand-shotgun by Cybersun Industries that packs the power of a 12 guage in the palm of your hand (if you don't break your wrist). Uses 12 shotgun rounds."
icon_state = "judge"
caliber = "shotgun"
origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 4)
max_shells = 5
fire_sound = 'sound/weapons/shotgun.ogg'
recoil = 2 // ow my fucking hand
accuracy = -1 // smooth bore + short barrel = shit accuracy
ammo_type = /obj/item/ammo_casing/shotgun
// ToDo: Remove accuracy debuf in exchange for slightly injuring your hand every time you fire it.

View File

@@ -13,7 +13,9 @@
load_method = SINGLE_CASING
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
handle_casings = HOLD_CASINGS
fire_sound = 'sound/weapons/shotgun.ogg'
var/recentpump = 0 // to prevent spammage
var/action_sound = 'sound/weapons/shotgunpump.ogg'
/obj/item/weapon/gun/projectile/shotgun/pump/consume_next_projectile()
if(chambered)
@@ -26,7 +28,7 @@
recentpump = world.time
/obj/item/weapon/gun/projectile/shotgun/pump/proc/pump(mob/M as mob)
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
playsound(M, action_sound, 60, 1)
if(chambered)//We have a shell in the chamber
chambered.loc = get_turf(src)//Eject casing
@@ -65,7 +67,7 @@
caliber = "shotgun"
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 1)
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
burst_delay = 0
firemodes = list(
list(mode_name="fire one barrel at a time", burst=1),

View File

@@ -1,15 +1,17 @@
////////////// PTR-7 Anti-Materiel Rifle //////////////
/obj/item/weapon/gun/projectile/heavysniper
name = "anti-materiel rifle"
desc = "A portable anti-armour rifle fitted with a scope, the HI PTR-7 Rifle was originally designed to used against armoured exosuits. It is capable of punching through windows and non-reinforced walls with ease. Fires armor piercing 14.5mm shells."
icon_state = "heavysniper"
item_state = "l6closednomag" //placeholder
item_state = "l6closed-empty" // placeholder
w_class = 5 // So it can't fit in a backpack.
force = 10
slot_flags = SLOT_BACK
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
caliber = "14.5mm"
recoil = 2 //extra kickback
//fire_sound = 'sound/weapons/sniper.ogg'
recoil = 3 //extra kickback
fire_sound = 'sound/weapons/sniper.ogg' // extra boom
handle_casings = HOLD_CASINGS
load_method = SINGLE_CASING
max_shells = 1
@@ -65,3 +67,41 @@
toggle_scope(2.0)
////////////// Dragunov Sniper Rifle //////////////
/* // Commented out until it's not worthless. Also might be nice to have a new icon that looks more sci-fi Dragunov-ish.
/obj/item/weapon/gun/projectile/SVD
name = "\improper Dragunov"
desc = "The SVD, also known as the Dragunov, was mass produced with an Optical Sniper Sight so simple that even Ivan can figure out how it works. Too bad for you that it's written in Russian. Uses 7.62mm rounds."
icon_state = "SVD"
item_state = "SVD"
w_class = 5 // So it can't fit in a backpack.
force = 10
slot_flags = SLOT_BACK // Needs a sprite.
origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 2, TECH_ILLEGAL = 8)
recoil = 2 //extra kickback
caliber = "a762"
load_method = MAGAZINE
accuracy = -3 //shooting at the hip
scoped_accuracy = 0
// requires_two_hands = 1
one_handed_penalty = 4 // The weapon itself is heavy, and the long barrel makes it hard to hold steady with just one hand.
fire_sound = 'sound/weapons/SVD_shot.ogg'
magazine_type = /obj/item/ammo_magazine/SVD
allowed_magazines = list(/obj/item/ammo_magazine/SVD, /obj/item/ammo_magazine/c762)
/obj/item/weapon/gun/projectile/SVD/update_icon()
..()
// if(istype(ammo_magazine,/obj/item/ammo_magazine/c762)
// icon_state = "SVD-bigmag" //No icon for this exists yet.
if(ammo_magazine)
icon_state = "SVD"
else
icon_state = "SVD-empty"
/obj/item/weapon/gun/projectile/SVD/verb/scope()
set category = "Object"
set name = "Use Scope"
set popup_menu = 1
toggle_scope(2.0)*/

View File

@@ -42,7 +42,7 @@
damage *= 0.7 //squishy mobs absorb KE
return 1
var/chance = 0
var/chance = damage
if(istype(A, /turf/simulated/wall))
var/turf/simulated/wall/W = A
chance = round(damage/W.material.integrity*180)
@@ -52,8 +52,6 @@
if(D.glass) chance *= 2
else if(istype(A, /obj/structure/girder))
chance = 100
else if(istype(A, /obj/machinery) || istype(A, /obj/structure))
chance = damage
if(prob(chance))
if(A.opacity)
@@ -128,6 +126,10 @@
/obj/item/projectile/bullet/pistol
damage = 20
/obj/item/projectile/bullet/pistol/ap
damage = 20
armor_penetration = 30
/obj/item/projectile/bullet/pistol/medium
damage = 25
@@ -227,8 +229,9 @@
/obj/item/projectile/bullet/pistol/practice
damage = 5
/obj/item/projectile/bullet/rifle/a556/practice
/obj/item/projectile/bullet/rifle/practice
damage = 5
penetrating = 0
/obj/item/projectile/bullet/shotgun/practice
name = "practice"

View File

@@ -107,7 +107,7 @@ var/list/lunchables_ethanol_reagents_ = list(/datum/reagent/ethanol/acid_spit,
/proc/init_lunchable_reagent_list(var/list/banned_reagents, var/reagent_types)
. = list()
for(var/reagent_type in subtypes(reagent_types))
for(var/reagent_type in subtypesof(reagent_types))
if(reagent_type in banned_reagents)
continue
var/datum/reagent/reagent = reagent_type

View File

@@ -38,8 +38,6 @@
operating = 1
setmove()
/obj/machinery/conveyor/map/New()
..()
circuit = new circuit(src)
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/gear(src)

View File

@@ -22,7 +22,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
idle_power_usage = 30
active_power_usage = 2500
/obj/machinery/r_n_d/circuit_imprinter/map/New()
/obj/machinery/r_n_d/circuit_imprinter/New()
..()
circuit = new circuit()
component_parts = list()

View File

@@ -206,6 +206,60 @@ other types of metals and chemistry for reagents).
build_path = /obj/item/weapon/storage/part_replacer
sort_string = "CBAAA"
/datum/design/item/powercell
build_type = PROTOLATHE | MECHFAB
/datum/design/item/powercell/AssembleDesignName()
name = "Power cell model ([item_name])"
/datum/design/item/powercell/AssembleDesignDesc()
if(build_path)
var/obj/item/weapon/cell/C = build_path
desc = "Allows the construction of power cells that can hold [initial(C.maxcharge)] units of energy."
/datum/design/item/powercell/Fabricate()
var/obj/item/weapon/cell/C = ..()
C.charge = 0 //shouldn't produce power out of thin air.
return C
/datum/design/item/powercell/basic
name = "basic"
build_type = PROTOLATHE | MECHFAB
id = "basic_cell"
req_tech = list(TECH_POWER = 1)
materials = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 50)
build_path = /obj/item/weapon/cell
category = "Misc"
sort_string = "DAAAA"
/datum/design/item/powercell/high
name = "high-capacity"
build_type = PROTOLATHE | MECHFAB
id = "high_cell"
req_tech = list(TECH_POWER = 2)
materials = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 60)
build_path = /obj/item/weapon/cell/high
category = "Misc"
sort_string = "DAAAB"
/datum/design/item/powercell/super
name = "super-capacity"
id = "super_cell"
req_tech = list(TECH_POWER = 3, TECH_MATERIAL = 2)
materials = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 70)
build_path = /obj/item/weapon/cell/super
category = "Misc"
sort_string = "DAAAC"
/datum/design/item/powercell/hyper
name = "hyper-capacity"
id = "hyper_cell"
req_tech = list(TECH_POWER = 5, TECH_MATERIAL = 4)
materials = list(DEFAULT_WALL_MATERIAL = 400, "gold" = 150, "silver" = 150, "glass" = 70)
build_path = /obj/item/weapon/cell/hyper
category = "Misc"
sort_string = "DAAAD"
/datum/design/item/hud
materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
@@ -673,17 +727,13 @@ CIRCUITS BELOW
/datum/design/circuit/AssembleDesignName()
..()
if(build_path)
var/obj/item/weapon/circuitboard/C = new build_path()
if(C && istype(C))
if(C.board_type == "machine")
name = "Machine circuit design ([item_name])"
qdel(C)
return
else if(C.board_type == "computer")
name = "Computer circuit design ([item_name])"
qdel(C)
return
name = "Circuit design ([item_name])"
var/obj/item/weapon/circuitboard/C = build_path
if(initial(C.board_type) == "machine")
name = "Machine circuit design ([item_name])"
else if(initial(C.board_type) == "computer")
name = "Computer circuit design ([item_name])"
else
name = "Circuit design ([item_name])"
/datum/design/circuit/AssembleDesignDesc()
if(!desc)

View File

@@ -16,7 +16,7 @@ Note: Must be placed within 3 tiles of the R&D Console
idle_power_usage = 30
active_power_usage = 2500
/obj/machinery/r_n_d/destructive_analyzer/map/New()
/obj/machinery/r_n_d/destructive_analyzer/New()
..()
circuit = new circuit()
component_parts = list()

View File

@@ -50,7 +50,7 @@
/datum/design/item/prosfab/pros/torso
time = 35
materials = list(DEFAULT_WALL_MATERIAL = 60000, "glass" = 10000, "plasteel" = 2000)
req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 3, TECH_DATA = 3)
// req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 3, TECH_DATA = 3) //Saving the values just in case
var/gender = MALE
/datum/design/item/prosfab/pros/torso/male
@@ -73,7 +73,7 @@
build_path = /obj/item/organ/external/head
time = 30
materials = list(DEFAULT_WALL_MATERIAL = 25000, "glass" = 5000, "plasteel" = 1000)
req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 3, TECH_DATA = 3)
// req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 3, TECH_DATA = 3) //Saving the values just in case
/datum/design/item/prosfab/pros/l_arm
name = "Prosthetic left arm"
@@ -137,7 +137,7 @@
build_path = /obj/item/organ/internal/cell
time = 15
materials = list(DEFAULT_WALL_MATERIAL = 10000, "glass" = 4000, "plasteel" = 2000)
req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2)
// req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2)
/datum/design/item/prosfab/pros/eyes
name = "Prosthetic eyes"
@@ -145,7 +145,7 @@
build_path = /obj/item/organ/internal/eyes/robot
time = 15
materials = list(DEFAULT_WALL_MATERIAL = 7500, "glass" = 7500)
req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2)
// req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2)
//////////////////// Cyborg Parts ////////////////////
/datum/design/item/prosfab/cyborg

View File

@@ -17,7 +17,7 @@
materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "gold" = 0, "silver" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0)
/obj/machinery/r_n_d/protolathe/map/New()
/obj/machinery/r_n_d/protolathe/New()
..()
circuit = new circuit()
component_parts = list()
@@ -76,15 +76,8 @@
speed = T / 2
/obj/machinery/r_n_d/protolathe/dismantle()
for(var/obj/I in component_parts)
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
reagents.trans_to_obj(I, reagents.total_volume)
for(var/f in materials)
if(materials[f] >= SHEET_MATERIAL_AMOUNT)
var/path = getMaterialType(f)
if(path)
var/obj/item/stack/S = new f(loc)
S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT)
eject_materials(f, -1)
..()
/obj/machinery/r_n_d/protolathe/update_icon()
@@ -203,3 +196,36 @@
if(new_item.matter && new_item.matter.len > 0)
for(var/i in new_item.matter)
new_item.matter[i] = new_item.matter[i] * mat_efficiency
/obj/machinery/r_n_d/protolathe/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything
var/recursive = amount == -1 ? 1 : 0
material = lowertext(material)
var/mattype
switch(material)
if(DEFAULT_WALL_MATERIAL)
mattype = /obj/item/stack/material/steel
if("glass")
mattype = /obj/item/stack/material/glass
if("gold")
mattype = /obj/item/stack/material/gold
if("silver")
mattype = /obj/item/stack/material/silver
if("diamond")
mattype = /obj/item/stack/material/diamond
if("phoron")
mattype = /obj/item/stack/material/phoron
if("uranium")
mattype = /obj/item/stack/material/uranium
else
return
var/obj/item/stack/material/S = new mattype(loc)
if(amount <= 0)
amount = S.max_amount
var/ejected = min(round(materials[material] / S.perunit), amount)
S.amount = min(ejected, amount)
if(S.amount <= 0)
qdel(S)
return
materials[material] -= ejected * S.perunit
if(recursive && materials[material] >= S.perunit)
eject_materials(material, -1)

View File

@@ -124,7 +124,7 @@ research holder datum.
// A simple helper proc to find the name of a tech with a given ID.
/proc/CallTechName(var/ID)
for(var/T in subtypes(/datum/tech))
for(var/T in subtypesof(/datum/tech))
var/datum/tech/check_tech = T
if(initial(check_tech.id) == ID)
return initial(check_tech.name)

View File

@@ -17,16 +17,13 @@
/obj/machinery/r_n_d/server/New()
..()
initialize();
/obj/machinery/r_n_d/server/map/New()
circuit = new circuit()
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/stack/cable_coil(src)
component_parts += new /obj/item/stack/cable_coil(src)
RefreshParts()
..()
initialize();
/obj/machinery/r_n_d/server/Destroy()
griefProtection()
@@ -127,15 +124,6 @@
name = "Central R&D Database"
server_id = -1
/obj/machinery/r_n_d/server/centcom/map/New()
circuit = new circuit()
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/stack/cable_coil(src)
component_parts += new /obj/item/stack/cable_coil(src)
RefreshParts()
..()
/obj/machinery/r_n_d/server/centcom/initialize()
..()
var/list/no_id_servers = list()
@@ -319,26 +307,8 @@
id_with_download_string = "1;2"
server_id = 2
/obj/machinery/r_n_d/server/robotics/map/New()
circuit = new circuit()
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/stack/cable_coil(src)
component_parts += new /obj/item/stack/cable_coil(src)
RefreshParts()
..()
/obj/machinery/r_n_d/server/core
name = "Core R&D Server"
id_with_upload_string = "1"
id_with_download_string = "1"
server_id = 1
/obj/machinery/r_n_d/server/core/map/New()
circuit = new circuit()
component_parts = list()
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
component_parts += new /obj/item/stack/cable_coil(src)
component_parts += new /obj/item/stack/cable_coil(src)
RefreshParts()
..()
server_id = 1

View File

@@ -51,8 +51,9 @@
visible_message("<span class='warning'>\The [src] breaks down!</span>")
return break_to_parts() // if we break and form shards, return them to the caller to do !FUN! things with
/obj/structure/table/New()
/obj/structure/table/initialize()
..()
// One table per turf.
for(var/obj/structure/table/T in loc)
if(T != src)
@@ -61,8 +62,6 @@
break_to_parts(full_return = 1)
return
/obj/structure/table/initialize()
..()
// reset color/alpha, since they're set for nice map previews
color = "#ffffff"
alpha = 255

View File

@@ -93,6 +93,12 @@ var/global/list/xenoChemList = list("mutationtoxin",
var/val = traits["[trait]"]
return val
/datum/xeno/traits/proc/copy_traits(var/datum/xeno/traits/target)
target.traits = traits
target.chemlist = chemlist
target.chems = chems
target.source = source
/datum/xeno/traits/New()
..()
set_trait(TRAIT_XENO_COLOR, "#CACACA")

View File

@@ -110,7 +110,8 @@
icon_state = "scanner_1old"
for(var/i=1 to occupant.cores)
var/obj/item/xenoproduct/slime/core/C = new(src)
C.traits = occupant.traitdat
C.traits = new()
occupant.traitdat.copy_traits(C.traits)
C.nameVar = occupant.nameVar

View File

@@ -13,11 +13,10 @@ Slime specific procs go here.
traitdat.traits[TRAIT_XENO_HUNGER] = rand(1, 20)
traitdat.traits[TRAIT_XENO_STARVEDAMAGE] = rand(1, 4)
traitdat.traits[TRAIT_XENO_EATS] = prob(95) //Odds are, that thing'll need to eat.
traitdat.traits[TRAIT_XENO_CHROMATIC] = prob(5)
if(traitdat.traits[TRAIT_XENO_CHROMATIC])
traitdat.traits[TRAIT_XENO_HOSTILE] = prob(60) //Let's increase this probabilty.
if(prob(10))
traitdat.traits[TRAIT_XENO_CHROMATIC] = 1
traitdat.traits[TRAIT_XENO_HOSTILE] = 0
else
traitdat.traits[TRAIT_XENO_HOSTILE] = prob(30)
traitdat.traits[TRAIT_XENO_GLOW_STRENGTH] = round(rand(1,3))
traitdat.traits[TRAIT_XENO_GLOW_RANGE] = round(rand(1,3))
traitdat.traits[TRAIT_XENO_STRENGTH] = round(rand(4,9))

View File

@@ -29,10 +29,8 @@ Procs for targeting
set_light(traitdat.traits[TRAIT_XENO_GLOW_RANGE], traitdat.traits[TRAIT_XENO_GLOW_STRENGTH], traitdat.traits[TRAIT_XENO_BIO_COLOR])
else
set_light(0, 0, "#000000") //Should kill any light that shouldn't be there.
if(chromatic)
hostile = 0 //No. No laser-reflecting hostile creatures. Bad.
else
hostile = traitdat.traits[TRAIT_XENO_HOSTILE]
hostile = traitdat.traits[TRAIT_XENO_HOSTILE]
speed = traitdat.traits[TRAIT_XENO_SPEED]

View File

@@ -111,7 +111,7 @@
dat += "It bears no characters indicating resilience to damage.<br>"
if(growth_max)
if(growth_level < 25)
if(growth_level < 35)
dat += "It appears to be far to growing up.<br>"
else if(growth_level > 40)
dat += "It appears to be close to growing up.<br>"