Merge branch 'master' of https://github.com/VOREStation/VOREStation into upstream-merge-8298

This commit is contained in:
MistakeNot4892
2022-08-25 14:26:20 +10:00
1603 changed files with 70496 additions and 61794 deletions
+1 -1
View File
@@ -37,7 +37,7 @@
return
var/tmp_label = ""
var/label_text = sanitizeSafe(input(user, "Inscribe some text into \the [initial(BB.name)]","Inscription",tmp_label), MAX_NAME_LEN)
var/label_text = sanitizeSafe(tgui_input_text(user, "Inscribe some text into \the [initial(BB.name)]","Inscription",tmp_label,MAX_NAME_LEN), MAX_NAME_LEN)
if(length(label_text) > 20)
to_chat(user, "<font color='red'>The inscription can be at most 20 characters long.</font>")
else if(!label_text)
@@ -10,7 +10,7 @@
#
# Use this format, followed by the caliber. For example, a shotgun's caliber
# variable is "12g" as a result. Ergo, a shotgun round's path would have "a12g",
# or a magazine with shotgun shells would be "m12g" instead. To avoid confusion
# or a magazine with shotgun shells would be "m12g" instead. To avoid confusion // Avoid confusion my ass, when ammo is called only shells and suddenly switches to being called some obscure-ass military number
# for developers and in-game admins spawning these items, stick to this format.
# Likewise, when creating new rounds, the caliber variable should match whatever
# the name says.
+7 -1
View File
@@ -652,6 +652,12 @@
if(!isnull(M.accuracy_dispersion))
P.dispersion = max(P.dispersion + M.accuracy_dispersion, 0)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.species)
P.accuracy += H.species.gun_accuracy_mod
P.dispersion = max(P.dispersion + H.species.gun_accuracy_dispersion_mod, 0)
//does the actual launching of the projectile
/obj/item/weapon/gun/proc/process_projectile(obj/projectile, mob/user, atom/target, var/target_zone, var/params=null)
var/obj/item/projectile/P = projectile
@@ -789,7 +795,7 @@
return ..()
/obj/item/weapon/gun/dropped(mob/living/user) // Ditto as above, we remove the HUD. Pending porting TGMC code to clean up this fucking nightmare of spaghetti.
/obj/item/weapon/gun/dropped(mob/living/user) // Ditto as above, we remove the HUD. Pending porting TGMC code to clean up this fucking nightmare of spaghetti.
user.hud_used.remove_ammo_hud(user, src)
..()
@@ -17,6 +17,8 @@
combustion = FALSE
can_miss = FALSE
muzzle_type = /obj/effect/projectile/muzzle/medigun
tracer_type = /obj/effect/projectile/tracer/medigun
impact_type = /obj/effect/projectile/impact/medigun
@@ -1,27 +1,102 @@
/obj/item/weapon/gun/energy/ionrifle/pistol
projectile_type = /obj/item/projectile/ion/pistol // still packs a punch but no AoE
/obj/item/weapon/gun/energy/ionrifle/weak
projectile_type = /obj/item/projectile/ion/small
/obj/item/weapon/gun/energy/medigun //Adminspawn/ERT etc
name = "directed restoration system"
desc = "The BL-3 'Phoenix' is an adaptation on the ML-3 'Medbeam' design that channels the power of the beam into a single healing laser. It is highly energy-inefficient, but its medical power cannot be denied."
force = 5
icon_state = "medbeam"
item_state = "medbeam"
icon = 'icons/obj/gun_vr.dmi'
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_guns_vr.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_guns_vr.dmi',
)
slot_flags = SLOT_BELT
accuracy = 100
fire_delay = 12
fire_sound = 'sound/weapons/eluger.ogg'
projectile_type = /obj/item/projectile/beam/medigun
accept_cell_type = /obj/item/weapon/cell
cell_type = /obj/item/weapon/cell/high
charge_cost = 2500
/obj/item/weapon/gun/energy/ionrifle/pistol
projectile_type = /obj/item/projectile/ion/pistol // still packs a punch but no AoE
/obj/item/weapon/gun/energy/ionrifle/weak
projectile_type = /obj/item/projectile/ion/small
/obj/item/weapon/gun/energy/medigun //Adminspawn/ERT etc
name = "directed restoration system"
desc = "The BL-3 'Phoenix' is an adaptation on the ML-3 'Medbeam' design that channels the power of the beam into a single healing laser. It is highly energy-inefficient, but its medical power cannot be denied."
force = 5
icon_state = "medbeam"
item_state = "medbeam"
icon = 'icons/obj/gun_vr.dmi'
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_guns_vr.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_guns_vr.dmi',
)
slot_flags = SLOT_BELT
accuracy = 100
fire_delay = 12
fire_sound = 'sound/weapons/eluger.ogg'
projectile_type = /obj/item/projectile/beam/medigun
accept_cell_type = /obj/item/weapon/cell
cell_type = /obj/item/weapon/cell/high
charge_cost = 2500
/obj/item/weapon/gun/energy/bfgtaser
name = "9000-series Ball Lightning Taser"
desc = "The brainchild of Hephaestus Industries Civil Pacification Division, the BLT-9000 was intended for riot control but despite enthusiastic interest from law-enforcement agencies across the Commonwealth and beyond, its indiscriminate nature led to it being banned from civilian use in virtually all jurisdictions. As a result, most pieces are found in the hands of collectors."
icon = 'icons/obj/gun_vr.dmi'
icon_state = "BFG"
fire_sound = 'sound/effects/phasein.ogg'
item_state = "mhdhowitzer"
wielded_item_state = "mhdhowitzer-wielded" //Placeholder
slot_flags = SLOT_BELT|SLOT_BACK
projectile_type = /obj/item/projectile/bullet/BFGtaser
fire_delay = 20
w_class = ITEMSIZE_LARGE
one_handed_penalty = 90 // The thing's heavy and huge.
accuracy = 45
charge_cost = 2400 //yes, this bad boy empties an entire weapon cell in one shot. What of it?
var/spinning_up = FALSE
/obj/item/weapon/gun/energy/bfgtaser/Fire(atom/target, mob/living/user, clickparams, pointblank=0, reflex=0)
if(spinning_up)
return
if(!power_supply || !power_supply.check_charge(charge_cost))
handle_click_empty(user)
return
playsound(src, 'sound/weapons/chargeup.ogg', 100, 1)
spinning_up = TRUE
update_icon()
user.visible_message("<span class='notice'>[user] starts charging the [src]!</span>", \
"<span class='notice'>You start charging the [src]!</span>")
if(do_after(user, 8, src))
spinning_up = FALSE
..()
else
spinning_up = FALSE
/obj/item/projectile/beam/stun/weak/BFG
fire_sound = 'sound/effects/sparks6.ogg'
hitsound = 'sound/effects/sparks4.ogg'
hitsound_wall = 'sound/effects/sparks7.ogg'
/obj/item/projectile/bullet/BFGtaser
name = "lightning ball"
icon = 'icons/obj/projectiles_vr.dmi'
icon_state = "minitesla"
speed=5
damage = 100
damage_type = AGONY
check_armour = "energy"
embed_chance = 0
hitsound = 'sound/weapons/zapbang.ogg'
hitsound_wall = 'sound/weapons/effects/searwall.ogg'
var/zaptype = /obj/item/projectile/beam/stun/weak/BFG
/obj/item/projectile/bullet/BFGtaser/process()
var/list/victims = list()
for(var/mob/living/M in living_mobs(world.view))
if(M != firer)
victims += M
if(LAZYLEN(victims))
var/target = pick(victims)
var/obj/item/projectile/P = new zaptype(src.loc)
P.launch_projectile_from_turf(target = target, target_zone = null, user = firer, params = null, angle_override = null, forced_spread = 0)
..()
/obj/item/projectile/bullet/BFGtaser/on_hit()
var/list/victims = list()
for(var/mob/living/M in living_mobs(world.view))
if(M != firer)
victims += M
if(LAZYLEN(victims))
for(var/target in victims)
var/obj/item/projectile/P = new zaptype(src.loc)
P.launch_projectile_from_turf(target = target, target_zone = null, user = firer, params = null, angle_override = null, forced_spread = 0)
..()
@@ -3,4 +3,7 @@
fire_delay = 4
/obj/item/weapon/gun/energy/stunrevolver
charge_cost = 400
charge_cost = 400
/obj/item/weapon/gun/energy/taser/mounted/cyborg
charge_cost = 160
+58
View File
@@ -54,6 +54,19 @@
handle_casings = null
recoil = null //it's a toy
/*
* Moist Nugget
*/
/obj/item/weapon/gun/projectile/shotgun/pump/toy/moistnugget
name = "\improper Donk-Soft mosin-nagant"
desc = "Donk-Soft foam mosin-nagant! It's Donk or Don't! Ages 8 and up."
description_fluff = "A special Donk-Soft rifle originally made to pair with a Soviet Soldier costume. It didn't catch on quite as well as other Donk-Soft products."
icon = 'icons/obj/gun_toy.dmi'
icon_state = "moistnugget"
item_state = "moistnugget"
max_shells = 5
matter = list(MAT_PLASTIC = 2500)
/*
* Pistol
*/
@@ -199,7 +212,52 @@
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)]-e"
/*
* Cyborg
*/
/obj/item/weapon/gun/projectile/cyborgtoy
name = "\improper Donk-Soft Cyborg Blaster"
desc = "Donk-Soft Cyborg Blaster! It's Donk or Don't! Adult supervision required. Use to toggle between battle and cleanup mode."
icon = 'icons/obj/gun_toy.dmi'
icon_state = "smg"
caliber = "foam"
load_method = SINGLE_CASING
max_shells = 15
var/cleanup = 0
ammo_type = /obj/item/ammo_casing/afoam_dart
projectile_type = /obj/item/projectile/bullet/foam_dart
recoil = null
handle_casings = null
/obj/item/weapon/gun/projectile/cyborgtoy/attack_self(var/mob/user)
cleanup = !cleanup
to_chat(user, "The [src] is now on [cleanup ? "cleanup" : "battle"] mode.")
/obj/item/weapon/gun/projectile/cyborgtoy/afterattack(atom/A, mob/living/user, adjacent, params)
if(cleanup)
if(!adjacent)
return 0
collectammo(A, user)
return 0
..()
/obj/item/weapon/gun/projectile/cyborgtoy/proc/collectammo(atom/A, user)
if(loaded.len >= max_shells)
to_chat(user, "The [src] is at max capacity.")
return
var/T = get_turf(A)
var/success = 0
for(var/obj/item/ammo_casing/afoam_dart/D in T)
if(loaded.len >= max_shells)
break
D.loc = src
loaded.Insert(1, D)
success = 1
if(success)
playsound(src, 'sound/machines/hiss.ogg', 50, 0)
to_chat(user, "The [src] vacuums in the darts!")
else
to_chat(user, "No Donk-Soft brand foam darts detected. Aborting.")
/*
* Laser Tag
*/
+3 -2
View File
@@ -40,6 +40,7 @@
var/ricochets = 0
var/ricochets_max = 2
var/ricochet_chance = 30
var/can_miss = TRUE
//Hitscan
var/hitscan = FALSE //Whether this is hitscan. If it is, speed is basically ignored.
@@ -139,7 +140,7 @@
var/impact_effect_type = null
var/list/impacted_mobs = list()
// TGMC Ammo HUD Port
var/hud_state = "unknown" // What HUD state we use when we have ammunition.
var/hud_state_empty = "unknown" // The empty state. DON'T USE _FLASH IN THE NAME OF THE EMPTY STATE STRING, THAT IS ADDED BY THE CODE.
@@ -655,7 +656,7 @@
//roll to-hit
miss_modifier = max(15*(distance-2) - accuracy + miss_modifier + target_mob.get_evasion(), -100)
var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, miss_modifier, ranged_attack=(distance > 1 || original != target_mob)) //if the projectile hits a target we weren't originally aiming at then retain the chance to miss
var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, miss_modifier, ranged_attack=(distance > 1 || original != target_mob), force_hit = !can_miss) //if the projectile hits a target we weren't originally aiming at then retain the chance to miss
var/result = PROJECTILE_FORCE_MISS
if(hit_zone)