Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
rye-rice committed Dec 29, 2024
1 parent 56d9069 commit 145da57
Show file tree
Hide file tree
Showing 13 changed files with 304 additions and 296 deletions.
9 changes: 0 additions & 9 deletions code/modules/projectiles/boxes_magazines/external/rifle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,6 @@
max_ammo = 30
multiple_sprites = AMMO_BOX_FULL_EMPTY

/obj/item/ammo_box/magazine/e40
name = "E-40 magazine (.299 Eoehoma caseless)"
icon_state = "e40_mag-1"
base_icon_state = "e40_mag"
ammo_type = /obj/item/ammo_casing/caseless/c299
caliber = ".299 caseless"
max_ammo = 30
multiple_sprites = AMMO_BOX_FULL_EMPTY

// 8x50mmR En Bloc Clip (Illestren Hunting Rifle)

/obj/item/ammo_box/magazine/illestren_a850r //this is a magazine codewise do nothing breaks
Expand Down
208 changes: 0 additions & 208 deletions code/modules/projectiles/guns/ballistic/assault.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,211 +121,3 @@
/obj/item/gun/ballistic/automatic/assault/swiss_cheese/process_other(atom/target, mob/living/user, message = TRUE, flag, params = null, zone_override = "", bonus_spread = 0)
to_chat(user, "<span class='danger'>You hear a strange sound from the DMA unit. It doesn't appear to be operational.</span>")

/obj/item/gun/ballistic/automatic/assault/e40
name = "\improper E-40 Hybrid Rifle"
desc = "A Hybrid Assault Rifle, best known for being having a dual ballistic/laser system along with an advanced ammo counter. Once an icon for bounty hunters, age has broken most down, so these end up in collector's hands or as shoddy Frontiersmen laser SMG conversions when in their inheritted stockpiles. But if one were to find one in working condition, it would be just as formidable as back then. Chambered in .299 Eoehoma caseless, and uses energy for lasers."
icon = 'icons/obj/guns/manufacturer/eoehoma/48x32.dmi'
lefthand_file = 'icons/obj/guns/manufacturer/eoehoma/lefthand.dmi'
righthand_file = 'icons/obj/guns/manufacturer/eoehoma/righthand.dmi'
mob_overlay_icon = 'icons/obj/guns/manufacturer/eoehoma/onmob.dmi'
icon_state = "e40"
item_state = "e40"
default_ammo_type = /obj/item/ammo_box/magazine/e40
allowed_ammo_types = list(
/obj/item/ammo_box/magazine/e40,
)
var/obj/item/gun/energy/laser/e40_laser_secondary/secondary
fire_select_icon_state_prefix = "e40_"

fire_delay = 0.1 SECONDS
recoil_unwielded = 3

gun_firenames = list(FIREMODE_FULLAUTO = "full auto ballistic", FIREMODE_OTHER = "full auto laser")
gun_firemodes = list(FIREMODE_FULLAUTO, FIREMODE_OTHER)
default_firemode = FIREMODE_OTHER

weapon_weight = WEAPON_MEDIUM
slot_flags = ITEM_SLOT_BACK

show_magazine_on_sprite = TRUE
empty_indicator = TRUE
fire_sound = 'sound/weapons/gun/laser/e40_bal.ogg'
manufacturer = MANUFACTURER_EOEHOMA

/obj/item/gun/ballistic/automatic/assault/e40/Initialize()
. = ..()
secondary = new /obj/item/gun/energy/laser/e40_laser_secondary(src)
RegisterSignal(secondary, COMSIG_ATOM_UPDATE_ICON, PROC_REF(secondary_update_icon))
SEND_SIGNAL(secondary, COMSIG_GUN_DISABLE_AUTOFIRE)
update_appearance()

/obj/item/gun/ballistic/automatic/assault/e40/ComponentInitialize()
. = ..()
AddComponent(/datum/component/ammo_hud/eoehoma) // at long last... the ammo counter on the side of the sprite is functional...

/obj/item/gun/ballistic/automatic/assault/e40/do_autofire(datum/source, atom/target, mob/living/shooter, params)
var/current_firemode = gun_firemodes[firemode_index]
if(current_firemode != FIREMODE_OTHER)
return ..()
return secondary.do_autofire(source, target, shooter, params)

/obj/item/gun/ballistic/automatic/assault/e40/do_autofire_shot(datum/source, atom/target, mob/living/shooter, params)
var/current_firemode = gun_firemodes[firemode_index]
if(current_firemode != FIREMODE_OTHER)
return ..()
return secondary.do_autofire_shot(source, target, shooter, params)

/obj/item/gun/ballistic/automatic/assault/e40/process_fire(atom/target, mob/living/user, message, params, zone_override, bonus_spread)
var/current_firemode = gun_firemodes[firemode_index]
if(current_firemode != FIREMODE_OTHER)
if(!secondary.latch_closed && prob(65))
to_chat(user, span_warning("[src]'s cell falls out!"))
secondary.eject_cell()
return ..()
return secondary.process_fire(target, user, message, params, zone_override, bonus_spread)

/obj/item/gun/ballistic/automatic/assault/e40/can_shoot()
var/current_firemode = gun_firemodes[firemode_index]
if(current_firemode != FIREMODE_OTHER)
return ..()
return secondary.can_shoot()

/obj/item/gun/ballistic/automatic/assault/e40/afterattack(atom/target, mob/living/user, flag, params)
var/current_firemode = gun_firemodes[firemode_index]
if(current_firemode != FIREMODE_OTHER)
return ..()
return secondary.afterattack(target, user, flag, params)

/obj/item/gun/ballistic/automatic/assault/e40/attackby(obj/item/attack_obj, mob/user, params)
if(istype(attack_obj, /obj/item/stock_parts/cell/gun))
return secondary.attackby(attack_obj, user, params)
return ..()

/obj/item/gun/ballistic/automatic/assault/e40/attack_hand(mob/user)
var/current_firemode = gun_firemodes[firemode_index]
if(current_firemode == FIREMODE_OTHER && loc == user && user.is_holding(src) && secondary.cell && !secondary.latch_closed)
secondary.eject_cell(user)
return
if(current_firemode == FIREMODE_OTHER && loc == user && user.is_holding(src) && secondary.cell && secondary.latch_closed)
to_chat(user, span_warning("The cell retainment clip is latched!"))
return
return ..()

/obj/item/gun/ballistic/automatic/assault/e40/AltClick(mob/living/user)
var/current_firemode = gun_firemodes[firemode_index]
if(current_firemode == FIREMODE_OTHER)
if(secondary.latch_closed)
to_chat(user, span_notice("You start to unlatch the [src]'s power cell retainment clip..."))
if(do_after(user, secondary.latch_toggle_delay, src, IGNORE_USER_LOC_CHANGE))
to_chat(user, span_notice("You unlatch [src]'s power cell retainment clip " + "<span class='red'>OPEN</span>" + "."))
playsound(src, 'sound/items/taperecorder/taperecorder_play.ogg', 50, FALSE)
secondary.tac_reloads = TRUE
secondary.latch_closed = FALSE
update_appearance()
return
else
to_chat(user, span_warning("You start to latch the [src]'s power cell retainment clip..."))
if (do_after(user, secondary.latch_toggle_delay, src, IGNORE_USER_LOC_CHANGE))
to_chat(user, span_notice("You latch [src]'s power cell retainment clip " + "<span class='green'>CLOSED</span>" + "."))
playsound(src, 'sound/items/taperecorder/taperecorder_close.ogg', 50, FALSE)
secondary.tac_reloads = FALSE
secondary.latch_closed = TRUE
update_appearance()
return
else
return ..()

/obj/item/gun/ballistic/automatic/assault/e40/on_wield(obj/item/source, mob/user)
wielded = TRUE
secondary.wielded = TRUE
INVOKE_ASYNC(src, PROC_REF(do_wield), user)

/obj/item/gun/ballistic/automatic/assault/e40/do_wield(mob/user)
. = ..()
secondary.wielded_fully = wielded_fully

/// triggered on unwield of two handed item
/obj/item/gun/ballistic/automatic/assault/e40/on_unwield(obj/item/source, mob/user)
. = ..()
secondary.wielded_fully = FALSE
secondary.wielded = FALSE


/obj/item/gun/ballistic/automatic/assault/e40/proc/secondary_update_icon()
update_appearance()
SEND_SIGNAL(src, COMSIG_UPDATE_AMMO_HUD)

/obj/item/gun/ballistic/automatic/assault/e40/process_other(atom/target, mob/living/user, message = TRUE, flag, params = null, zone_override = "", bonus_spread = 0)
secondary.pre_fire(target, user, message, flag, params, zone_override, bonus_spread)


/obj/item/gun/ballistic/automatic/assault/e40/get_cell()
return secondary.get_cell()

/obj/item/gun/ballistic/automatic/assault/e40/update_overlays()
. = ..()
//handle laser gunn overlays
if(!secondary)
return
var/ratio = secondary.get_charge_ratio()
if(ratio == 0)
. += "[icon_state]_chargeempty"
else
. += "[icon_state]_charge[ratio]"
if(secondary.cell)
. += "[icon_state]_cell"
if(ismob(loc))
var/mutable_appearance/latch_overlay
latch_overlay = mutable_appearance('icons/obj/guns/cell_latch.dmi')
if(secondary.latch_closed)
if(secondary.cell)
latch_overlay.icon_state = "latch-on-full"
else
latch_overlay.icon_state = "latch-on-empty"
else
if(secondary.cell)
latch_overlay.icon_state = "latch-off-full"
else
latch_overlay.icon_state = "latch-off-empty"
. += latch_overlay


/obj/item/gun/ballistic/automatic/assault/e40/toggle_safety(mob/user, silent=FALSE)
. = ..()
secondary.toggle_safety(user, silent=TRUE)

/obj/item/gun/ballistic/automatic/assault/e40/fire_select(mob/living/carbon/human/user)
. = ..()
var/current_firemode = gun_firemodes[firemode_index]
if(current_firemode == FIREMODE_OTHER)
SEND_SIGNAL(src, COMSIG_GUN_ENABLE_AUTOFIRE)
SEND_SIGNAL(src, COMSIG_GUN_SET_AUTOFIRE_SPEED, secondary.fire_delay)
else
SEND_SIGNAL(src, COMSIG_GUN_SET_AUTOFIRE_SPEED, fire_delay)
SEND_SIGNAL(src, COMSIG_UPDATE_AMMO_HUD)

/obj/item/gun/ballistic/automatic/assault/e40/examine(mob/user)
. = ..()
if(!secondary.internal_magazine)
. += "The cell retainment latch is [secondary.latch_closed ? "<span class='green'>CLOSED</span>" : "<span class='red'>OPEN</span>"]. Alt-Click to toggle the latch."
var/obj/item/ammo_casing/energy/shot = secondary.ammo_type[select]
if(secondary.cell)
. += "\The [name]'s cell has [secondary.cell.percent()]% charge remaining."
. += "\The [name] has [round(secondary.cell.charge/shot.e_cost)] shots remaining on <b>[shot.select_name]</b> mode."
else
. += span_notice("\The [name] doesn't seem to have a cell!")

//laser

/obj/item/gun/energy/laser/e40_laser_secondary
name = "secondary e40 laser gun"
desc = "The laser component of a E-40 Hybrid Rifle. You probably shouldn't see this. If you can though, you should probably know lorewise, this is primary, the ballistic compontent in universe is secondary. Unfortunately, we cannot simulate this, So codewise this is secondary."
fire_sound = 'sound/weapons/gun/laser/e40_las.ogg'
w_class = WEIGHT_CLASS_NORMAL
ammo_type = list(/obj/item/ammo_casing/energy/laser/assault)
fire_delay = 0.2 SECONDS
gun_firemodes = list(FIREMODE_FULLAUTO)
default_firemode = FIREMODE_FULLAUTO
latch_toggle_delay = 1.2 SECONDS

spread_unwielded = 20
19 changes: 0 additions & 19 deletions code/modules/projectiles/guns/energy/energy_gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -245,22 +245,3 @@
w_class = WEIGHT_CLASS_BULKY
var/obj/item/modular_computer/integratedNTOS
var/NTOS_type = /obj/item/modular_computer/internal

/obj/item/gun/energy/e_gun/e11
name = "E-11 hybrid energy rifle"
desc = "A hybrid energy gun fondly remembered as one of the worst weapons ever made. It hurts, but that's only if it manages to hit its target."
icon = 'icons/obj/guns/manufacturer/eoehoma/48x32.dmi'
lefthand_file = 'icons/obj/guns/manufacturer/eoehoma/lefthand.dmi'
righthand_file = 'icons/obj/guns/manufacturer/eoehoma/righthand.dmi'
mob_overlay_icon = 'icons/obj/guns/manufacturer/eoehoma/onmob.dmi'
icon_state = "e11"
ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/laser/eoehoma)
ammo_x_offset = 0
spread = 80
spread_unwielded = 140
dual_wield_spread = 140
shaded_charge = TRUE
manufacturer = MANUFACTURER_EOEHOMA

/obj/item/gun/energy/e_gun/e11/empty_cell
spawn_no_ammo = TRUE
50 changes: 0 additions & 50 deletions code/modules/projectiles/guns/energy/laser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -217,53 +217,3 @@
. += "<span class='notice'>You examine [src] closer. Under the grip is a small inscription: \"NT CN SVALINN 462\".</span>"
else
. += "<span class='warning'>You try to examine [src] closer, but you're too far away.</span>"

/obj/item/gun/energy/laser/e10
name = "E-10 laser pistol"
desc = "A very old laser weapon. Despite the extreme age of some of these weapons, they are sometimes preferred to newer, mass-produced Nanotrasen laser weapons."
icon = 'icons/obj/guns/manufacturer/eoehoma/48x32.dmi'
lefthand_file = 'icons/obj/guns/manufacturer/eoehoma/lefthand.dmi'
righthand_file = 'icons/obj/guns/manufacturer/eoehoma/righthand.dmi'
mob_overlay_icon = 'icons/obj/guns/manufacturer/eoehoma/onmob.dmi'
icon_state = "e10"
w_class = WEIGHT_CLASS_SMALL

wield_delay = 0.2 SECONDS
wield_slowdown = LASER_PISTOL_SLOWDOWN

spread = 2
spread_unwielded = 5

ammo_type = list(/obj/item/ammo_casing/energy/lasergun/eoehoma)
manufacturer = MANUFACTURER_EOEHOMA

/obj/item/gun/energy/laser/e50
name = "E-50 energy emitter"
desc = "A heavy and extremely powerful laser. Sets targets on fire and kicks ass, but it uses a massive amount of energy per shot and is generally awkward to handle."

icon = 'icons/obj/guns/manufacturer/eoehoma/48x32.dmi'
lefthand_file = 'icons/obj/guns/manufacturer/eoehoma/lefthand.dmi'
righthand_file = 'icons/obj/guns/manufacturer/eoehoma/righthand.dmi'
mob_overlay_icon = 'icons/obj/guns/manufacturer/eoehoma/onmob.dmi'
icon_state = "e50"
item_state = "e50"

default_ammo_type = /obj/item/stock_parts/cell/gun/large
allowed_ammo_types = list(
/obj/item/stock_parts/cell/gun/large,
)
ammo_type = list(/obj/item/ammo_casing/energy/laser/eoehoma/e50)
weapon_weight = WEAPON_HEAVY
w_class = WEIGHT_CLASS_BULKY
manufacturer = MANUFACTURER_EOEHOMA

wield_delay = 0.7 SECONDS
wield_slowdown = LASER_SNIPER_SLOWDOWN
spread_unwielded = 20

shaded_charge = FALSE
ammo_x_offset = 4
charge_sections = 2
slot_flags = 0


10 changes: 0 additions & 10 deletions code/modules/projectiles/guns/energy/stun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,3 @@
desc = "An integrated disabler that draws from a cyborg's power cell. This weapon contains a limiter to prevent the cyborg's power cell from overheating."
can_charge = FALSE
use_cyborg_cell = TRUE

/obj/item/gun/energy/disabler/e60
name = "E-60"
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
icon = 'icons/obj/guns/manufacturer/eoehoma/48x32.dmi'
lefthand_file = 'icons/obj/guns/manufacturer/eoehoma/lefthand.dmi'
righthand_file = 'icons/obj/guns/manufacturer/eoehoma/righthand.dmi'
mob_overlay_icon = 'icons/obj/guns/manufacturer/eoehoma/onmob.dmi'
icon_state = "e60"
manufacturer = MANUFACTURER_EOEHOMA
Loading

0 comments on commit 145da57

Please sign in to comment.