Merge branch 'master' into premium-kas-for-borgs

This commit is contained in:
shellspeed1
2022-09-23 17:00:02 -07:00
committed by GitHub
68 changed files with 828 additions and 201 deletions

View File

@@ -40,21 +40,19 @@
return FALSE
/turf/proc/ImmediateCalculateAdjacentTurfs()
if(SSair.thread_running())
CALCULATE_ADJACENT_TURFS(src)
return
var/canpass = CANATMOSPASS(src, src)
var/canvpass = CANVERTICALATMOSPASS(src, src)
for(var/direction in GLOB.cardinals_multiz)
var/turf/T = get_step_multiz(src, direction)
if(!istype(T))
continue
var/opp_dir = REVERSE_DIR(direction)
if(isopenturf(T) && !(blocks_air || T.blocks_air) && ((direction & (UP|DOWN))? (canvpass && CANVERTICALATMOSPASS(T, src)) : (canpass && CANATMOSPASS(T, src))) )
LAZYINITLIST(atmos_adjacent_turfs)
LAZYINITLIST(T.atmos_adjacent_turfs)
atmos_adjacent_turfs[T] = direction
T.atmos_adjacent_turfs[src] = opp_dir
atmos_adjacent_turfs[T] = ATMOS_ADJACENT_ANY
T.atmos_adjacent_turfs[src] = ATMOS_ADJACENT_ANY
for(var/obj/machinery/door/firedoor/FD in T)
FD.UpdateAdjacencyFlags()
else
if (atmos_adjacent_turfs)
atmos_adjacent_turfs -= T
@@ -65,7 +63,8 @@
T.__update_auxtools_turf_adjacency_info(isspaceturf(T.get_z_base_turf()), -1)
UNSETEMPTY(atmos_adjacent_turfs)
src.atmos_adjacent_turfs = atmos_adjacent_turfs
set_sleeping(blocks_air)
for(var/obj/machinery/door/firedoor/FD in src)
FD.UpdateAdjacencyFlags()
__update_auxtools_turf_adjacency_info(isspaceturf(get_z_base_turf()))
/turf/proc/set_sleeping(should_sleep)

View File

@@ -280,7 +280,11 @@ we use a hook instead
parse_gas_string(model.initial_gas_mix)
return 1
/datum/gas_mixture/proc/__auxtools_parse_gas_string(gas_string)
/datum/gas_mixture/parse_gas_string(gas_string)
return __auxtools_parse_gas_string(gas_string)
/*
gas_string = SSair.preprocess_gas_string(gas_string)
var/list/gas = params2list(gas_string)
@@ -295,6 +299,7 @@ we use a hook instead
set_moles(id, text2num(gas[id]))
archive()
return 1
*/
/*
/datum/gas_mixture/react(datum/holder)
. = NO_REACTION

View File

@@ -567,7 +567,8 @@
else if(picking_dropoff_turf)
holder.mouse_up_icon = 'icons/effects/mouse_pointers/supplypod_pickturf.dmi' //Icon for when mouse is released
holder.mouse_down_icon = 'icons/effects/mouse_pointers/supplypod_pickturf_down.dmi' //Icon for when mouse is pressed
holder.mouse_pointer_icon = holder.mouse_up_icon //Icon for idle mouse (same as icon for when released)
holder.mouse_override_icon = holder.mouse_up_icon //Icon for idle mouse (same as icon for when released)
holder.mouse_pointer_icon = holder.mouse_override_icon
holder.click_intercept = src //Create a click_intercept so we know where the user is clicking
else
var/mob/holder_mob = holder.mob

View File

@@ -22,6 +22,8 @@
///Contains admin info. Null if client is not an admin.
var/datum/admins/holder = null
var/datum/click_intercept = null // Needs to implement InterceptClickOn(user,params,atom) proc
///Time when the click was intercepted
var/click_intercept_time = 0
var/AI_Interact = 0
var/jobbancache = null //Used to cache this client's jobbans to save on DB queries
@@ -78,6 +80,8 @@
//These two vars are used to make a special mouse cursor, with a unique icon for clicking
var/mouse_up_icon = null
var/mouse_down_icon = null
///used to override the mouse cursor so it doesnt get reset
var/mouse_override_icon = null
var/ip_intel = "Disabled"

View File

@@ -422,7 +422,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if( (world.address == address || !address) && !GLOB.host )
GLOB.host = key
world.update_status()
if(holder)
add_admin_verbs()
var/admin_memo_note = get_message_output("memo")
@@ -871,6 +871,16 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
return
last_activity = world.time
last_click = world.time
//fullauto stuff
/*
if(!control)
return
*/
if(click_intercept_time)
if(click_intercept_time >= world.time)
click_intercept_time = 0 //Reset and return. Next click should work, but not this one.
return
click_intercept_time = 0 //Just reset. Let's not keep re-checking forever.
var/list/L = params2list(params)
if(L["drag"])

View File

@@ -138,7 +138,7 @@ GLOBAL_LIST_INIT(duplicate_forbidden_vars_by_type, typecacheof_assoc_list(list(
if(toupdate.len)
for(var/turf/T1 in toupdate)
CALCULATE_ADJACENT_TURFS(T1)
T1.ImmediateCalculateAdjacentTurfs()
return copiedobjs

View File

@@ -132,7 +132,7 @@
. = list()
var/mob/living/carbon/human/H
var/obj/item/card/id/C
if(ishuman(user))
if(ishuman(user) || iscyborg(user))
H = user
C = H.get_idcard(TRUE)
if(C)

View File

@@ -4,6 +4,7 @@
icon = 'icons/mob/robots.dmi'
icon_state = "robot"
bubble_icon = "robot"
var/obj/item/pda/ai/aiPDA
/mob/living/silicon/robot/get_cell()
return cell
@@ -27,6 +28,12 @@
inv2 = new /atom/movable/screen/robot/module2()
inv3 = new /atom/movable/screen/robot/module3()
if(!shell)
aiPDA = new/obj/item/pda/ai(src)
aiPDA.owner = real_name
aiPDA.ownjob = "Cyborg"
aiPDA.name = real_name + " (" + aiPDA.ownjob + ")"
previous_health = health
if(ispath(cell))
@@ -968,6 +975,9 @@
notify_ai(RENAME, oldname, newname)
if(!QDELETED(builtInCamera))
builtInCamera.c_tag = real_name
if(aiPDA && !shell)
aiPDA.owner = newname
aiPDA.name = newname + " (" + aiPDA.ownjob + ")"
custom_name = newname

View File

@@ -16,6 +16,7 @@
var/list/modules = list() //holds all the usable modules
var/list/added_modules = list() //modules not inherient to the robot module, are kept when the module changes
var/list/storages = list()
var/list/added_channels = list() //Borg radio stuffs
var/cyborg_base_icon = "robot" //produces the icon for the borg and, if no special_light_key is set, the lights
var/special_light_key //if we want specific lights, use this instead of copying lights in the dmi
@@ -236,6 +237,8 @@
R.typing_indicator_state = /obj/effect/overlay/typing_indicator/machine/dogborg
else
R.typing_indicator_state = /obj/effect/overlay/typing_indicator/machine
R.radio.extra_channels = RM.added_channels
R.radio.recalculateChannels()
R.maxHealth = borghealth
R.health = min(borghealth, R.health)
qdel(src)
@@ -322,6 +325,7 @@
/obj/item/robot_module/medical
name = "Medical"
added_channels = list(RADIO_CHANNEL_MEDICAL = 1)
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/extinguisher/mini,
@@ -432,6 +436,7 @@
/obj/item/robot_module/engineering
name = "Engineering"
added_channels = list(RADIO_CHANNEL_ENGINEERING = 1)
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/borg/sight/meson,
@@ -546,6 +551,7 @@
/obj/item/robot_module/security
name = "Security"
added_channels = list(RADIO_CHANNEL_SECURITY = 1)
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/extinguisher/mini,
@@ -648,6 +654,7 @@
/obj/item/robot_module/peacekeeper
name = "Peacekeeper"
added_channels = list(RADIO_CHANNEL_SECURITY = 1)
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/extinguisher/mini,
@@ -734,6 +741,7 @@
/obj/item/robot_module/clown
name = "Clown"
added_channels = list(RADIO_CHANNEL_SERVICE = 1)
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/extinguisher/mini,
@@ -766,6 +774,7 @@
/obj/item/robot_module/butler
name = "Service"
added_channels = list(RADIO_CHANNEL_SERVICE = 1)
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/extinguisher/mini,
@@ -909,6 +918,7 @@
/obj/item/robot_module/miner
name = "Miner"
added_channels = list(RADIO_CHANNEL_SUPPLY = 1)
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/extinguisher/mini,
@@ -999,6 +1009,7 @@
/obj/item/robot_module/syndicate
name = "Syndicate Assault"
added_channels = list(RADIO_CHANNEL_SYNDICATE = 1)
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/extinguisher/mini,
@@ -1029,6 +1040,7 @@
/obj/item/robot_module/syndicate_medical
name = "Syndicate Medical"
added_channels = list(RADIO_CHANNEL_SYNDICATE = 1)
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/extinguisher/mini,
@@ -1061,6 +1073,7 @@
/obj/item/robot_module/saboteur
name = "Syndicate Saboteur"
added_channels = list(RADIO_CHANNEL_SYNDICATE = 1)
basic_modules = list(
/obj/item/assembly/flash/cyborg,
/obj/item/borg/sight/thermal,

View File

@@ -878,10 +878,12 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
if (!client)
return
client.mouse_pointer_icon = initial(client.mouse_pointer_icon)
if (ismecha(loc))
var/obj/vehicle/sealed/mecha/M = loc
if(M.mouse_pointer)
client.mouse_pointer_icon = M.mouse_pointer
if(istype(loc, /obj/vehicle/sealed))
var/obj/vehicle/sealed/mecha/E = loc
if(E.mouse_pointer)
client.mouse_pointer_icon = E.mouse_pointer
if(client.mouse_override_icon)
client.mouse_pointer_icon = client.mouse_override_icon
/mob/proc/is_literate()
return 0

View File

@@ -952,7 +952,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
playsound(T, 'sound/effects/supermatter.ogg', 50, 1)
T.visible_message("<span class='danger'>[T] smacks into [src] and rapidly flashes to ash.</span>",\
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
CALCULATE_ADJACENT_TURFS(T)
T.ImmediateCalculateAdjacentTurfs()
//Do not blow up our internal radio
/obj/machinery/power/supermatter_crystal/contents_explosion(severity, target, origin)

View File

@@ -22,6 +22,7 @@
var/ranged_attack_speed = CLICK_CD_RANGE
var/melee_attack_speed = CLICK_CD_MELEE
var/gun_flags = NONE
var/fire_sound = "gunshot"
var/suppressed = null //whether or not a message is displayed when fired
var/can_suppress = FALSE
@@ -32,6 +33,7 @@
trigger_guard = TRIGGER_GUARD_NORMAL //trigger guard on the weapon, hulks can't fire them with their big meaty fingers
var/sawn_desc = null //description change if weapon is sawn-off
var/sawn_off = FALSE
var/firing_burst = 0 //Prevent the weapon from firing again while already firing
/// can we be put into a turret
var/can_turret = TRUE
@@ -57,6 +59,8 @@
var/burst_spread = 0 //Spread induced by the gun itself during burst fire per iteration. Only checked if spread is 0.
var/randomspread = 1 //Set to 0 for shotguns. This is used for weapons that don't fire all their bullets at once.
var/inaccuracy_modifier = 1
var/semicd = 0 //cooldown handler
var/dual_wield_spread = 24 //additional spread when dual wielding
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
@@ -87,27 +91,64 @@
var/zoom_out_amt = 0
var/datum/action/item_action/toggle_scope_zoom/azoom
//Firemodes
var/datum/action/item_action/toggle_firemode/firemode_action
/// Current fire selection, can choose between burst, single, and full auto.
var/fire_select = SELECT_SEMI_AUTOMATIC
var/fire_select_index = 1
/// What modes does this weapon have? Put SELECT_FULLY_AUTOMATIC in here to enable fully automatic behaviours.
var/list/fire_select_modes = list(SELECT_SEMI_AUTOMATIC)
/// if i`1t has an icon for a selector switch indicating current firemode.
var/selector_switch_icon = FALSE
var/dualwield_spread_mult = 1 //dualwield spread multiplier
/// Just 'slightly' snowflakey way to modify projectile damage for projectiles fired from this gun.
var/projectile_damage_multiplier = 1
var/automatic = 0 //can gun use it, 0 is no, anything above 0 is the delay between clicks in ds
/// directional recoil multiplier
var/dir_recoil_amp = 10
/obj/item/gun/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/toggle_firemode))
fire_select()
else if(istype(action, /datum/action/item_action/toggle_scope_zoom))
zoom(user, user.dir)
else if(istype(action, alight))
toggle_gunlight()
else
..()
/obj/item/gun/Initialize(mapload)
. = ..()
if(no_pin_required)
pin = null
else if(pin)
if(pin)
pin = new pin(src)
if(gun_light)
alight = new (src)
alight = new(src)
if(zoomable)
azoom = new (src)
if(burst_size > 1 && !(SELECT_BURST_SHOT in fire_select_modes))
fire_select_modes.Add(SELECT_BURST_SHOT)
else if(burst_size <= 1 && (SELECT_BURST_SHOT in fire_select_modes))
fire_select_modes.Remove(SELECT_BURST_SHOT)
burst_size = 1
sortList(fire_select_modes, /proc/cmp_numeric_asc)
if(fire_select_modes.len > 1)
firemode_action = new(src)
firemode_action.button_icon_state = "fireselect_[fire_select]"
firemode_action.UpdateButtonIcon()
/obj/item/gun/ComponentInitialize()
. = ..()
if(SELECT_FULLY_AUTOMATIC in fire_select_modes)
AddComponent(/datum/component/automatic_fire, fire_delay)
/obj/item/gun/Destroy()
if(pin)
QDEL_NULL(pin)
@@ -117,6 +158,10 @@
QDEL_NULL(bayonet)
if(chambered)
QDEL_NULL(chambered)
if(azoom)
QDEL_NULL(azoom)
if(firemode_action)
QDEL_NULL(firemode_action)
return ..()
/obj/item/gun/examine(mob/user)
@@ -142,6 +187,41 @@
else if(can_bayonet)
. += "It has a <b>bayonet</b> lug on it."
/obj/item/gun/proc/fire_select()
var/mob/living/carbon/human/user = usr
var/max_mode = fire_select_modes.len
if(max_mode <= 1)
to_chat(user, "<span class='warning'>[src] is not capable of switching firemodes!</span>")
return
fire_select_index = 1 + fire_select_index % max_mode //Magic math to cycle through this shit!
fire_select = fire_select_modes[fire_select_index]
switch(fire_select)
if(SELECT_SEMI_AUTOMATIC)
burst_size = 1
fire_delay = 0
SEND_SIGNAL(src, COMSIG_GUN_AUTOFIRE_DESELECTED, user)
to_chat(user, "<span class='notice'>You switch [src] to semi-automatic.</span>")
if(SELECT_BURST_SHOT)
burst_size = initial(burst_size)
fire_delay = initial(fire_delay)
SEND_SIGNAL(src, COMSIG_GUN_AUTOFIRE_DESELECTED, user)
to_chat(user, "<span class='notice'>You switch [src] to [burst_size]-round burst.</span>")
if(SELECT_FULLY_AUTOMATIC)
burst_size = 1
SEND_SIGNAL(src, COMSIG_GUN_AUTOFIRE_SELECTED, user)
to_chat(user, "<span class='notice'>You switch [src] to automatic.</span>")
playsound(user, 'sound/weapons/empty.ogg', 100, TRUE)
update_appearance()
firemode_action.button_icon_state = "fireselect_[fire_select]"
firemode_action.UpdateButtonIcon()
return TRUE
/obj/item/gun/equipped(mob/living/user, slot)
. = ..()
if(zoomed && user.get_active_held_item() != src)
@@ -567,12 +647,6 @@
gun_light = new_light
/obj/item/gun/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/toggle_scope_zoom))
zoom(user, user.dir)
else if(istype(action, alight))
toggle_gunlight()
/obj/item/gun/proc/toggle_gunlight()
if(!gun_light)
return

View File

@@ -5,8 +5,8 @@
var/automatic_burst_overlay = TRUE
can_suppress = TRUE
burst_size = 3
burst_shot_delay = 2
actions_types = list(/datum/action/item_action/toggle_firemode)
fire_delay = 2
fire_select_modes = list(SELECT_SEMI_AUTOMATIC, SELECT_BURST_SHOT, SELECT_FULLY_AUTOMATIC)
/obj/item/gun/ballistic/automatic/proto
name = "\improper Nanotrasen Saber SMG"
@@ -15,6 +15,7 @@
fire_sound = "sound/weapons/gunshot_smg_alt.ogg"
mag_type = /obj/item/ammo_box/magazine/smgm9mm
pin = null
burst_size = 1
/obj/item/gun/ballistic/automatic/proto/unrestricted
pin = /obj/item/firing_pin
@@ -55,34 +56,6 @@
else
to_chat(user, "<span class='warning'>You cannot seem to get \the [src] out of your hands!</span>")
/obj/item/gun/ballistic/automatic/ui_action_click(mob/user, action)
if(istype(action, /datum/action/item_action/toggle_firemode))
burst_select()
else
return ..()
/obj/item/gun/ballistic/automatic/proc/burst_select()
var/mob/living/carbon/human/user = usr
select = !select
if(!select)
disable_burst()
to_chat(user, "<span class='notice'>You switch to semi-automatic.</span>")
else
enable_burst()
to_chat(user, "<span class='notice'>You switch to [burst_size]-rnd burst.</span>")
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
update_icon()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/gun/ballistic/automatic/proc/enable_burst()
burst_size = initial(burst_size)
/obj/item/gun/ballistic/automatic/proc/disable_burst()
burst_size = 1
/obj/item/gun/ballistic/automatic/can_shoot()
return get_ammo()
@@ -136,18 +109,10 @@
knife_y_offset = 12
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/wt550/enable_burst()
. = ..()
spread = 15
/obj/item/gun/ballistic/automatic/wt550/afterattack()
. = ..()
empty_alarm()
/obj/item/gun/ballistic/automatic/wt550/disable_burst()
. = ..()
spread = 0
/obj/item/gun/ballistic/automatic/wt550/update_icon_state()
icon_state = "wt550[magazine ? "-[CEILING(((get_ammo(FALSE) / magazine.max_ammo) * 20) /4, 1)*4]" : "-0"]" //Sprites only support up to 20.
@@ -211,6 +176,7 @@
/obj/item/gun/ballistic/automatic/m90/update_icon_state()
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
/*
/obj/item/gun/ballistic/automatic/m90/burst_select()
var/mob/living/carbon/human/user = usr
switch(select)
@@ -228,6 +194,7 @@
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
update_icon()
return
*/
/obj/item/gun/ballistic/automatic/tommygun
name = "\improper Thompson SMG"
@@ -304,14 +271,17 @@
slot_flags = 0
mag_type = /obj/item/ammo_box/magazine/mm712x82
weapon_weight = WEAPON_HEAVY
var/cover_open = FALSE
can_suppress = FALSE
burst_size = 3
burst_shot_delay = 1
burst_size = 1
actions_types = list()
spread = 7
pin = /obj/item/firing_pin/implant/pindicate
automatic_burst_overlay = FALSE
var/cover_open = FALSE
/obj/item/gun/ballistic/automatic/l6_saw/Initialize()
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
AddComponent(/datum/component/automatic_fire, 0.2 SECONDS)
/obj/item/gun/ballistic/automatic/l6_saw/unrestricted
pin = /obj/item/firing_pin

View File

@@ -39,7 +39,7 @@
mag_type = /obj/item/ammo_box/magazine/m75
burst_size = 1
fire_delay = 0
actions_types = list()
fire_select_modes = list(SELECT_SEMI_AUTOMATIC)
casing_ejector = FALSE
/obj/item/gun/ballistic/automatic/gyropistol/update_icon_state()

View File

@@ -7,7 +7,7 @@
can_suppress = TRUE
burst_size = 1
fire_delay = 0
actions_types = list()
fire_select_modes = list(SELECT_SEMI_AUTOMATIC)
automatic_burst_overlay = FALSE
/obj/item/gun/ballistic/automatic/pistol/no_mag
@@ -104,7 +104,7 @@
mag_type = /obj/item/ammo_box/magazine/pistolm9mm
burst_size = 3
fire_delay = 2
actions_types = list(/datum/action/item_action/toggle_firemode)
fire_select_modes = list(SELECT_SEMI_AUTOMATIC, SELECT_BURST_SHOT, SELECT_FULLY_AUTOMATIC)
/obj/item/gun/ballistic/automatic/pistol/stickman
name = "flat gun"
@@ -137,7 +137,7 @@
burst_size = 1
can_suppress = FALSE
w_class = WEIGHT_CLASS_NORMAL
actions_types = list()
fire_select_modes = list(SELECT_SEMI_AUTOMATIC)
fire_sound = 'sound/weapons/noscope.ogg'
spread = 20 //damn thing has no rifling.
automatic_burst_overlay = FALSE

View File

@@ -101,8 +101,6 @@
slot_flags = null
w_class = WEIGHT_CLASS_HUGE
custom_materials = null
automatic = 0.5
fire_delay = 2
ammo_type = list(
/obj/item/ammo_casing/energy/laser
)

View File

@@ -75,6 +75,14 @@
build_path = /obj/item/wallframe/newscaster
category = list("initial", "Construction")
/datum/design/posialert
name = "Posialert Frame"
id = "posialert_frame"
build_type = AUTOLATHE
materials = list(/datum/material/iron = 14000, /datum/material/glass = 8000)
build_path = /obj/item/wallframe/posialert
category = list("initial", "Construction")
/datum/design/status_display_frame
name = "Status Display Frame"
id = "status_display_frame"