Remove CHOMPEdit codes + _ch files added, given upstream ports in progress

As stated, per maintainer/headmin request (and common sense).
This commit is contained in:
Rykka
2022-04-07 02:16:57 -06:00
parent 0e3b6a9ba9
commit 50b98e7f35
11 changed files with 50 additions and 87 deletions

View File

@@ -452,7 +452,6 @@
//YAWNEDIT: Knockdown code end
// CHOMPEdit: TGMC Ammo HUD insertion:
user.hud_used.update_ammo_hud(user, src)
// Similar to the above proc, but does not require a user, which is ideal for things like turrets.
@@ -778,9 +777,35 @@
var/datum/firemode/new_mode = firemodes[sel_mode]
new_mode.apply_to(src)
to_chat(user, "<span class='notice'>\The [src] is now set to [new_mode.name].</span>")
user.hud_used.update_ammo_hud(user, src) // CHOMPEdit: TGMC Ammo HUD
user.hud_used.update_ammo_hud(user, src)
return new_mode
/obj/item/weapon/gun/attack_self(mob/user)
switch_firemodes(user)
/* TGMC Ammo HUD Port Begin */
/obj/item/weapon/gun
var/hud_enabled = TRUE
/obj/item/weapon/gun/proc/has_ammo_counter()
return FALSE
/obj/item/weapon/gun/proc/get_ammo_type()
return FALSE
/obj/item/weapon/gun/proc/get_ammo_count()
return FALSE
/obj/item/weapon/gun/equipped(mob/living/user, slot) // When a gun is equipped to your hands, we'll add the HUD to the user. Pending porting over TGMC guncode where wielding is far more sensible.
if(slot == slot_l_hand || slot == slot_r_hand)
user.hud_used.add_ammo_hud(user, src)
else
user.hud_used.remove_ammo_hud(user, src)
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.
user.hud_used.remove_ammo_hud(user, src)
..()

View File

@@ -1,28 +1,3 @@
/obj/item/weapon/gun
var/holy = 0 //For Divinely blessed guns
/* TGMC Ammo HUD Port Begin */
/obj/item/weapon/gun
var/hud_enabled = TRUE
/obj/item/weapon/gun/proc/has_ammo_counter()
return FALSE
/obj/item/weapon/gun/proc/get_ammo_type()
return FALSE
/obj/item/weapon/gun/proc/get_ammo_count()
return FALSE
/obj/item/weapon/gun/equipped(mob/living/user, slot) // When a gun is equipped to your hands, we'll add the HUD to the user. Pending porting over TGMC guncode where wielding is far more sensible.
if(slot == slot_l_hand || slot == slot_r_hand)
user.hud_used.add_ammo_hud(user, src)
else
user.hud_used.remove_ammo_hud(user, src)
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.
user.hud_used.remove_ammo_hud(user, src)
..()

View File

@@ -55,8 +55,8 @@
if(handle_casings != HOLD_CASINGS)
ammo_magazine.stored_ammo -= chambered
var/mob/living/M = loc // CHOMPEdit: TGMC Ammo HUD
if(istype(M)) // CHOMPEdit: TGMC Ammo HUD
var/mob/living/M = loc
if(istype(M))
M?.hud_used.update_ammo_hud(M, src)
if (chambered)
@@ -103,8 +103,8 @@
if(handle_casings != HOLD_CASINGS)
chambered = null
var/mob/living/M = loc // CHOMPEdit: TGMC Ammo HUD
if(istype(M)) // CHOMPEdit: TGMC Ammo HUD
var/mob/living/M = loc
if(istype(M))
M?.hud_used.update_ammo_hud(M, src)

View File

@@ -139,6 +139,10 @@
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.
/obj/item/projectile/proc/Range()
range--

View File

@@ -72,33 +72,33 @@
/obj/item/projectile/bullet/pistol // 9mm pistols and most SMGs. Sacrifice power for capacity.
fire_sound = 'sound/weapons/gunshot2.ogg'
damage = 20
hud_state = "pistol" // CHOMPEdit: Putting these here for easier upstream porting.
hud_state_empty = "pistol_empty" // CHOMPEdit: Putting these here for easier upstream porting.
hud_state = "pistol"
hud_state_empty = "pistol_empty"
/obj/item/projectile/bullet/pistol/ap
damage = 15
armor_penetration = 30
hud_state = "pistol_light_ap" // CHOMPEdit: Putting these here for easier upstream porting.
hud_state = "pistol_light_ap"
/obj/item/projectile/bullet/pistol/hp
damage = 25
armor_penetration = -50
hud_state = "pistol_ap" // CHOMPEdit: Putting these here for easier upstream porting.
hud_state = "pistol_ap"
/obj/item/projectile/bullet/pistol/medium // .45 (and maybe .40 if it ever gets added) caliber security pistols. Balance between capacity and power.
fire_sound = 'sound/weapons/gunshot3.ogg' // Snappier sound.
damage = 25
hud_state = "pistol" // CHOMPEdit: Putting these here for easier upstream porting.
hud_state = "pistol"
/obj/item/projectile/bullet/pistol/medium/ap
damage = 20
armor_penetration = 15
hud_state = "pistol_light_ap" // CHOMPEdit: Putting these here for easier upstream porting.
hud_state = "pistol_light_ap"
/obj/item/projectile/bullet/pistol/medium/hp
damage = 30
armor_penetration = -50
hud_state = "pistol_ap" // CHOMPEdit: Putting these here for easier upstream porting.
hud_state = "pistol_ap"
/obj/item/projectile/bullet/pistol/strong // .357 and .44 caliber stuff. High power pistols like the Mateba or Desert Eagle. Sacrifice capacity for power.
fire_sound = 'sound/weapons/gunshot4.ogg'

View File

@@ -1,8 +1,6 @@
/obj/item/projectile
/// If this projectile is holy. Silver bullets, etc. Currently no effects.
var/holy = 0
var/hud_state = "unknown" // TGMC Ammo HUD Port
var/hud_state_empty = "unknown" // TGMC Ammo HUD Port
/obj/item/projectile/bullet/pellet/shotgun/silver
name = "shrapnel"