Skip to content

Commit

Permalink
Add AI modpack and fix related issues (#1773)
Browse files Browse the repository at this point in the history
Co-authored-by: SuhEugene <[email protected]>
  • Loading branch information
LordNest and SuhEugene authored Jan 11, 2024
1 parent 8ea2270 commit c5d2e54
Show file tree
Hide file tree
Showing 26 changed files with 793 additions and 99 deletions.
4 changes: 4 additions & 0 deletions code/__defines/~mods/~master_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#define LANGUAGE_SIIK_TAJR "Siik'tajr"
// TAJARA - End

// LEGALESE - Start
#define LANGUAGE_LEGALESE "Legalese"
// LEGALESE - End

// UTF8 - Start
#undef show_browser
#define show_browser(target, content, title) to_target(target, browse(utf_8_html(content), title))
Expand Down
8 changes: 8 additions & 0 deletions code/modules/mob/living/silicon/ai/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ var/global/list/ai_verbs_default = list(
/mob/living/silicon/ai/proc/toggle_camera_light,
/mob/living/silicon/ai/proc/multitool_mode,
/mob/living/silicon/ai/proc/toggle_hologram_movement,
// [SIERRA-ADD] - AI - ,
/mob/living/silicon/ai/proc/ai_view_images,
/mob/living/silicon/ai/proc/ai_take_image,
/mob/living/silicon/ai/proc/change_floor,
/mob/living/silicon/ai/proc/show_crew_monitor,
/mob/living/silicon/ai/proc/show_crew_records,
/mob/living/silicon/ai/proc/show_crew_manifest,
// [/SIERRA-ADD] ,
/mob/living/silicon/ai/proc/ai_power_override,
/mob/living/silicon/ai/proc/ai_shutdown,
/mob/living/silicon/ai/proc/ai_reset_radio_keys
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/observer/freelook/chunk.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
var/image/obfuscation = obfuscation_images[T]
if(!obfuscation)
obfuscation = image(icon, T, icon_state)
// [SIERRA-ADD] - AI
obfuscation.plane = EFFECTS_ABOVE_LIGHTING_PLANE
// [/SIERRA-ADD]
obfuscation.layer = OBFUSCATION_LAYER
if(!obfuscation_underlay)
// Creating a new icon of a fairly common icon state, adding some random color to prevent address searching, and hoping being static kills memory locality
Expand Down
56 changes: 55 additions & 1 deletion code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@

var/acc_mod = burst_accuracy[min(burst, length(burst_accuracy))]
var/disp_mod = dispersion[min(burst, length(dispersion))]
// [SIERRA-REMOVE]
/*
var/stood_still = last_handled
//Not keeping gun active will throw off aim (for non-Masters)
if(user.skill_check(SKILL_WEAPONS, SKILL_MASTER))
Expand All @@ -415,7 +417,59 @@
else
acc_mod -= w_class - ITEM_SIZE_NORMAL
acc_mod -= bulk

*/
// [/SIERRA-REMOVE]
// [SIERRA-ADD]
acc_mod -= bulk
switch(bulk)
if(1) //pistols
if(user.skill_check(SKILL_WEAPONS, SKILL_BASIC))
acc_mod += bulk
acc_mod += accuracy
if(2) //revolvers
if(user.skill_check(SKILL_WEAPONS, SKILL_TRAINED) && user.skill_check(SKILL_WEAPONS, SKILL_BASIC))
acc_mod += bulk
acc_mod += accuracy
if(3) //SMGs
if(user.skill_check(SKILL_HAULING, SKILL_BASIC) && user.skill_check(SKILL_WEAPONS, SKILL_TRAINED))
if(user.skill_check(SKILL_HAULING, SKILL_BASIC) && user.skill_check(SKILL_WEAPONS, SKILL_TRAINED))
acc_mod += bulk
acc_mod += accuracy
else
acc_mod += bulk / 2
acc_mod += accuracy * 0.75
if(4 to 5) //carabines and assault rifles
if(user.skill_check(SKILL_HAULING, SKILL_BASIC) && user.skill_check(SKILL_WEAPONS, SKILL_TRAINED))
if(user.skill_check(SKILL_HAULING, SKILL_TRAINED) && user.skill_check(SKILL_WEAPONS, SKILL_TRAINED))
acc_mod += bulk
acc_mod += accuracy
else
acc_mod += bulk / 2
acc_mod += accuracy * 0.75
if(6) //sniper rifles
if (user.skill_check(SKILL_HAULING, SKILL_BASIC) && user.skill_check(SKILL_WEAPONS, SKILL_BASIC))
if(user.skill_check(SKILL_HAULING, SKILL_TRAINED) && user.skill_check(SKILL_WEAPONS, SKILL_TRAINED))
if(user.skill_check(SKILL_HAULING, SKILL_TRAINED) && user.skill_check(SKILL_WEAPONS, SKILL_EXPERIENCED))
acc_mod += bulk
acc_mod += accuracy
else
acc_mod += bulk / 2
acc_mod += accuracy * 0.75
else
acc_mod += bulk / 5
acc_mod += accuracy * 0.25
if(7) //machine gun, RPG
if (user.skill_check(SKILL_HAULING, SKILL_TRAINED) && user.skill_check(SKILL_WEAPONS, SKILL_BASIC))
if(user.skill_check(SKILL_HAULING, SKILL_TRAINED) && user.skill_check(SKILL_WEAPONS, SKILL_TRAINED))
if(user.skill_check(SKILL_HAULING, SKILL_EXPERIENCED) && user.skill_check(SKILL_WEAPONS, SKILL_EXPERIENCED))
acc_mod += bulk
acc_mod += accuracy
else
acc_mod += bulk / 2 //-25%, not 35%
acc_mod += accuracy / 2
else
acc_mod += bulk / 5
// [/SIERRA-ADD]
if(one_hand_penalty >= 4 && !held_twohanded)
acc_mod -= one_hand_penalty/2
disp_mod += one_hand_penalty*0.5 //dispersion per point of two-handedness
Expand Down
8 changes: 6 additions & 2 deletions maps/sierra/areas/z5_sierra_bridge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,16 @@
name = "AI Chamber"
icon_state = "ai_chamber"

/area/turret_protected/ai_maint
name = "AI Chamber - Maintenance"
icon_state = "ai_chamber"

/area/turret_protected/ai_teleport
name = "First Deck - AI Upload"
name = "AI Chamber - Teleporter"
icon_state = "ai_upload"

/area/turret_protected/ai_upload
name = "First Deck - AI Upload"
name = "Third Deck - AI Upload"
icon_state = "ai_upload"

// Heads Quarters
Expand Down
9 changes: 9 additions & 0 deletions maps/sierra/datums/species/species_overrides.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
Various overrides for standart species, which are too tiny to have their own mod
*/

// Skrell

/obj/item/organ/internal/eyes/skrell
eye_icon = 'maps/sierra/icons/mob/human_races/species/skrell/eyes.dmi'
apply_eye_colour = FALSE
2 changes: 1 addition & 1 deletion maps/sierra/datums/supplypacks/security.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
/singleton/hierarchy/supply_pack/security/armory/pdw
name = "Weapons - Ballistic NT41"
contains = list(/obj/item/gun/projectile/automatic/nt41 = 2)
cost = 60
cost = 120
containername = "\improper Ballistic PDW crate"
security_level = SUPPLY_SECURITY_HIGH

Expand Down
Binary file added maps/sierra/icons/obj/shielding.dmi
Binary file not shown.
5 changes: 5 additions & 0 deletions maps/sierra/loadout/loadout_eyes.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
/datum/gear/eyes/science/New()
allowed_roles = RESEARCH_ROLES | EXPLORATION_ROLES
..()

/datum/gear/eyes/security
allowed_roles = SECURITY_ROLES

/datum/gear/eyes/medical/New()
allowed_roles = MEDICAL_ROLES + /datum/job/explorer_medic
..()

/datum/gear/eyes/meson
allowed_roles = list(/datum/job/senior_engineer, /datum/job/engineer, /datum/job/mining, /datum/job/scientist_assistant, /datum/job/rd,/datum/job/senior_scientist, /datum/job/scientist, /datum/job/chief_engineer,/datum/job/engineer_trainee,/datum/job/exploration_leader, /datum/job/explorer, /datum/job/explorer_pilot,/datum/job/explorer_medic, /datum/job/explorer_engineer, /datum/job/qm)

Expand Down
7 changes: 4 additions & 3 deletions maps/sierra/loadout/loadout_suit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@
path = /obj/item/clothing/suit/storage/hooded/wintercoat/science
allowed_roles = list(/datum/job/rd, /datum/job/scientist, /datum/job/scientist_assistant, /datum/job/senior_scientist, /datum/job/roboticist, )

/datum/gear/suit/wintercoat/dais
display_name = "DAIS winter coat"
allowed_roles = list(/datum/job/engineer, /datum/job/scientist, /datum/job/roboticist, /datum/job/infsys)
/datum/gear/suit/wintercoat_dais
display_name = "winter coat, DAIS"
path = /obj/item/clothing/suit/storage/hooded/wintercoat/dais
allowed_roles = list(/datum/job/engineer, /datum/job/scientist, /datum/job/scientist_assistant, /datum/job/roboticist, /datum/job/infsys)
allowed_branches = list(/datum/mil_branch/contractor)

/datum/gear/suit/labcoat
Expand Down
5 changes: 5 additions & 0 deletions maps/sierra/machinery/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,8 @@
/datum/fabricator_recipe/medical/vial
path = /obj/item/reagent_containers/glass/beaker/vial
fabricator_types = list(FABRICATOR_CLASS_MICRO,FABRICATOR_CLASS_GENERAL)

// Shieldgen

/obj/machinery/power/shield_generator
icon = 'maps/sierra/icons/obj/shielding.dmi'
2 changes: 2 additions & 0 deletions maps/sierra/sierra.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
#include "datums/supplypacks/security.dm"
#include "datums/supplypacks/science.dm"

#include "datums/species/species_overrides.dm"

#include "game/languages.dm"
#include "game/lockdown.dm"

Expand Down
1 change: 1 addition & 0 deletions maps/sierra/sierra_unit_testing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/area/maintenance/cistern = 0,
/area/turret_protected/ai_cyborg_station = 0,
/area/turret_protected/ai = NO_SCRUBBER|NO_VENT,
/area/turret_protected/ai_maint = NO_SCRUBBER|NO_VENT,
/area/maintenance/fourthdeck/aft = 0,
/area/maintenance/waterstore = 0,
/area/maintenance/abandoned_hydroponics = 0,
Expand Down
Loading

0 comments on commit c5d2e54

Please sign in to comment.