mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
TG: - Removed support for the ONBACK and ONBELT flags.
- Replaced them with a whole range of inventory slot flags. These now govern whether an item can or can't be placed in a certain inventory slot. See setup.dm for information on the flags. These flags only affect humans tho, as humans are the only beings with an inventory to talk of. - Standardized some gun code and some other pieces of code as I came accross them. I hate indented variable definitions! This commit should not bring any change whatsoever to the game from a player's perspective. Revision: r3659 Author: baloh.matevz
This commit is contained in:
@@ -3,13 +3,13 @@
|
||||
desc = "A bullet casing."
|
||||
icon = 'ammo.dmi'
|
||||
icon_state = "s-casing"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 1
|
||||
w_class = 1.0
|
||||
var
|
||||
caliber = "" //Which kind of guns it can be loaded into
|
||||
projectile_type = ""//The bullet type to create when New() is called
|
||||
obj/item/projectile/BB = null //The loaded bullet
|
||||
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
|
||||
|
||||
|
||||
New()
|
||||
@@ -28,18 +28,18 @@
|
||||
desc = "A box of ammo"
|
||||
icon_state = "357"
|
||||
icon = 'ammo.dmi'
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT
|
||||
flags = FPRINT | TABLEPASS | CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
item_state = "syringe_kit"
|
||||
m_amt = 50000
|
||||
throwforce = 2
|
||||
w_class = 1.0
|
||||
throw_speed = 4
|
||||
throw_range = 10
|
||||
var
|
||||
list/stored_ammo = list()
|
||||
ammo_type = "/obj/item/ammo_casing"
|
||||
max_ammo = 7
|
||||
multiple_sprites = 0
|
||||
var/list/stored_ammo = list()
|
||||
var/ammo_type = "/obj/item/ammo_casing"
|
||||
var/max_ammo = 7
|
||||
var/multiple_sprites = 0
|
||||
|
||||
|
||||
New()
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
icon = 'gun.dmi'
|
||||
icon_state = "detective"
|
||||
item_state = "gun"
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | ONBELT | USEDELAY
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
slot_flags = SLOT_BELT
|
||||
m_amt = 2000
|
||||
w_class = 3.0
|
||||
throwforce = 5
|
||||
@@ -13,19 +14,18 @@
|
||||
force = 5.0
|
||||
origin_tech = "combat=1"
|
||||
|
||||
var
|
||||
fire_sound = 'Gunshot.ogg'
|
||||
tmp/obj/item/projectile/in_chamber = null
|
||||
caliber = ""
|
||||
silenced = 0
|
||||
recoil = 0
|
||||
ejectshell = 1
|
||||
tmp/list/mob/living/target //List of who yer targeting.
|
||||
tmp/lock_time = -100
|
||||
tmp/mouthshoot = 0 ///To stop people from suiciding twice... >.>
|
||||
automatic = 0 //Used to determine if you can target multiple people.
|
||||
tmp/mob/living/last_moved_mob //Used to fire faster at more than one person.
|
||||
tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them.
|
||||
var/fire_sound = 'Gunshot.ogg'
|
||||
var/tmp/obj/item/projectile/in_chamber = null
|
||||
var/caliber = ""
|
||||
var/silenced = 0
|
||||
var/recoil = 0
|
||||
var/ejectshell = 1
|
||||
var/tmp/list/mob/living/target //List of who yer targeting.
|
||||
var/tmp/lock_time = -100
|
||||
var/tmp/mouthshoot = 0 ///To stop people from suiciding twice... >.>
|
||||
var/automatic = 0 //Used to determine if you can target multiple people.
|
||||
var/tmp/mob/living/last_moved_mob //Used to fire faster at more than one person.
|
||||
var/tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them.
|
||||
|
||||
proc/load_into_chamber()
|
||||
return 0
|
||||
@@ -165,14 +165,16 @@
|
||||
if (!istype(targloc) || !istype(curloc))
|
||||
return
|
||||
|
||||
if(!special_check(user)) return
|
||||
if(!special_check(user))
|
||||
return
|
||||
if(!load_into_chamber())
|
||||
user.visible_message("*click click*", "\red <b>*click*</b>")
|
||||
for(var/mob/K in viewers(usr))
|
||||
K << 'empty.ogg'
|
||||
return
|
||||
|
||||
if(!in_chamber) return
|
||||
if(!in_chamber)
|
||||
return
|
||||
|
||||
in_chamber.firer = user
|
||||
in_chamber.def_zone = user.zone_sel.selecting
|
||||
@@ -191,7 +193,7 @@
|
||||
playsound(user, fire_sound, 10, 1)
|
||||
else
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.visible_message("\red [user] fires the [src]!", "\red You fire the [src]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
||||
user.visible_message("\red [user] fires \the [src]!", "\red You fire \the [src]!", "\blue You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
||||
|
||||
in_chamber.original = targloc
|
||||
in_chamber.loc = get_turf(user)
|
||||
@@ -210,7 +212,8 @@
|
||||
in_chamber.p_y = text2num(mouse_control["icon-y"])
|
||||
|
||||
spawn()
|
||||
if(in_chamber) in_chamber.fired()
|
||||
if(in_chamber)
|
||||
in_chamber.fired()
|
||||
sleep(1)
|
||||
in_chamber = null
|
||||
|
||||
|
||||
@@ -4,12 +4,11 @@
|
||||
desc = "A basic energy-based gun."
|
||||
fire_sound = 'Taser.ogg'
|
||||
|
||||
var
|
||||
obj/item/weapon/cell/power_supply //What type of power cell this uses
|
||||
charge_cost = 100 //How much energy is needed to fire.
|
||||
cell_type = "/obj/item/weapon/cell"
|
||||
projectile_type = "/obj/item/projectile/energy"
|
||||
modifystate
|
||||
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
|
||||
var/charge_cost = 100 //How much energy is needed to fire.
|
||||
var/cell_type = "/obj/item/weapon/cell"
|
||||
var/projectile_type = "/obj/item/projectile/energy"
|
||||
var/modifystate
|
||||
|
||||
emp_act(severity)
|
||||
power_supply.use(round(power_supply.maxcharge / severity))
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
origin_tech = "combat=3;magnets=2"
|
||||
modifystate = "energystun"
|
||||
|
||||
var
|
||||
mode = 0 //0 = stun, 1 = kill
|
||||
var/mode = 0 //0 = stun, 1 = kill
|
||||
|
||||
|
||||
attack_self(mob/living/user as mob)
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
fire_sound = 'Laser.ogg'
|
||||
origin_tech = "combat=2;magnets=4"
|
||||
w_class = 4.0
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
slot_flags = SLOT_BACK
|
||||
charge_cost = 100
|
||||
projectile_type = "/obj/item/projectile/ion"
|
||||
|
||||
@@ -27,7 +28,8 @@ obj/item/weapon/gun/energy/staff
|
||||
icon_state = "staffofchange"
|
||||
item_state = "staffofchange"
|
||||
fire_sound = 'emitter.ogg'
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = 4.0
|
||||
charge_cost = 200
|
||||
projectile_type = "/obj/item/projectile/change"
|
||||
|
||||
@@ -8,12 +8,11 @@
|
||||
m_amt = 1000
|
||||
force = 10 //Pistol whipp'n good. (It was frigging SIXTY on pre-goon code)
|
||||
|
||||
var
|
||||
ammo_type = "/obj/item/ammo_casing/a357"
|
||||
list/loaded = list()
|
||||
max_shells = 7
|
||||
load_method = 0 //0 = Single shells or quick loader, 1 = box, 2 = magazine
|
||||
obj/item/ammo_magazine/empty_mag = null
|
||||
var/ammo_type = "/obj/item/ammo_casing/a357"
|
||||
var/list/loaded = list()
|
||||
var/max_shells = 7
|
||||
var/load_method = 0 //0 = Single shells or quick loader, 1 = box, 2 = magazine
|
||||
var/obj/item/ammo_magazine/empty_mag = null
|
||||
|
||||
|
||||
New()
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
max_shells = 4
|
||||
w_class = 4.0
|
||||
force = 10
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
slot_flags = SLOT_BACK
|
||||
caliber = "shotgun"
|
||||
origin_tech = "combat=4;materials=2"
|
||||
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
|
||||
var
|
||||
recentpump = 0 // to prevent spammage
|
||||
pumped = 0
|
||||
obj/item/ammo_casing/current_shell = null
|
||||
var/recentpump = 0 // to prevent spammage
|
||||
var/pumped = 0
|
||||
var/obj/item/ammo_casing/current_shell = null
|
||||
|
||||
|
||||
load_into_chamber()
|
||||
@@ -66,7 +66,8 @@
|
||||
max_shells = 2
|
||||
w_class = 4.0
|
||||
force = 10
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY | ONBACK
|
||||
flags = FPRINT | TABLEPASS | CONDUCT | USEDELAY
|
||||
slot_flags = SLOT_BACK
|
||||
caliber = "shotgun"
|
||||
origin_tech = "combat=3;materials=1"
|
||||
ammo_type = "/obj/item/ammo_casing/shotgun/beanbag"
|
||||
@@ -124,8 +125,8 @@
|
||||
item_state = "sawnshotgun"
|
||||
w_class = 3.0
|
||||
item_state = "gun"
|
||||
flags &= ~ONBACK //you can't sling it on your back
|
||||
flags |= ONBELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
|
||||
slot_flags &= ~SLOT_BACK //you can't sling it on your back
|
||||
slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally)
|
||||
name = "sawn-off shotgun"
|
||||
desc = "Omar's coming!"
|
||||
user << "<span class='warning'>You shorten the barrel of \the [src]!</span>"
|
||||
Reference in New Issue
Block a user