diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7a38745e0e..2df370e6ea 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,10 +6,10 @@ /code/__DEFINES/clockcult.dm @ChangelingRain /code/datums/antagonists/datum_clockcult.dm @ChangelingRain -/code/game/gamemodes/blob/ @ChangelingRain -/code/game/gamemodes/clock_cult/ @ChangelingRain -/code/game/gamemodes/miniantags/revenant/ @ChangelingRain -/code/game/objects/effects/temporary_visuals/ @ChangelingRain +/code/game/gamemodes/blob/* @ChangelingRain +/code/game/gamemodes/clock_cult/* @ChangelingRain +/code/game/gamemodes/miniantags/revenant* @ChangelingRain +/code/game/objects/effects/temporary_visuals/* @ChangelingRain /code/modules/reagents/chemistry/reagents/blob_reagents.dm @ChangelingRain # Cyberboss @@ -22,26 +22,26 @@ /code/controllers/subsystem/mapping.dm @Cyberboss /code/controllers/globals.dm @Cyberboss /code/datums/helper_datums/getrev.dm @Cyberboss -/code/datums/components/ @Cyberboss +/code/datums/components/* @Cyberboss /code/datums/map_config.dm @Cyberboss /code/datums/forced_movement.dm @Cyberboss /code/datums/holocall.dm @Cyberboss /code/modules/admin/verbs/adminhelp.dm @Cyberboss /code/modules/admin/verbs/adminpm.dm @Cyberboss -/code/modules/server_tools/ @Cyberboss -/code/modules/mapping/ @Cyberboss +/code/modules/server_tools/* @Cyberboss +/code/modules/mapping/* @Cyberboss # duncathan /code/__DEFINES/atmospherics.dm @duncathan /code/controllers/subsystem/air.dm @duncathan -/code/modules/atmospherics/ @duncathan +/code/modules/atmospherics/* @duncathan # Jordie0608 -/SQL/ @Jordie0608 +/SQL/* @Jordie0608 /code/controllers/subsystem/dbcore.dm @Jordie0608 -/tools/SQLAlertEmail/ @Jordie0608 +/tools/SQLAlertEmail/* @Jordie0608 # MrStonedOne @@ -57,10 +57,10 @@ # ninjanomnom /code/controllers/subsystem/shuttle.dm @ninjanomnom -/code/modules/shuttle/ @ninjanomnom +/code/modules/shuttle/* @ninjanomnom # ShizCalev -/_maps/ @ShizCalev -/icons/ @ShizCalev -/sound/ @ShizCalev +/_maps/* @ShizCalev +/icons/* @ShizCalev +/sound/* @ShizCalev diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 949f1c4c44..10f60767bb 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,9 +1,9 @@ -[Round ID]: # (If you discovered this issue from playing tgstation hosted servers:) -[Round ID]: # (**INCLUDE THE ROUND ID**) -[Round ID]: # (It can be found in the Status panel or retrieved from https://atlantaned.space/statbus/round.php ! The round id let's us look up valuable information and logs for the round the bug happened.) +[Directions]: # (If you discovered this issue from playing tgstation hosted servers -[Testmerges]: # (If you believe the issue to be caused by a test merge [OOC tab -> Show Server Revision], report it in the pull request's comment section instead.) -[Reproduction]: # (Explain your issue in detail, including the steps to reproduce it. Issues without proper reproduction steps or explanation are open to being ignored/closed by maintainers.) +INCLUDE THE ROUND ID -[For Admins]: # (Oddities induced by var-edits and other admin tools are not necessarily bugs. Verify that your issues occur under regular circumstances before reporting them.) \ No newline at end of file + +from the Status panel or retrieve it from https://atlantaned.space/statbus/round.php ! If you believe the issue to be caused by a test merge [OOC tab -> Show Server Revision], report it in the pull request's comment section instead. Explain your issue in detail, including the steps to reproduce it.) + +[For Admins]: # (Oddities induced by var-edits and other admin tools are not necessarily bugs. Verify that your issues occur under regular circumstances before reporting them.) diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index 12b9c297fc..335393adac 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -8973,14 +8973,14 @@ /area/maintenance/port/fore) "avT" = ( /obj/docking_port/stationary{ - dheight = 1; - dir = 8; - dwidth = 12; - height = 17; + dheight = 9; + dir = 2; + dwidth = 5; + height = 24; id = "syndicate_ne"; name = "northeast of station"; turf_type = /turf/open/space; - width = 23 + width = 18 }, /turf/open/space, /area/space/nearstation) diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 05a68f83ac..2852c76257 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -3322,14 +3322,14 @@ /area/construction/mining/aux_base) "agO" = ( /obj/docking_port/stationary{ - dheight = 1; - dir = 8; - dwidth = 12; - height = 17; + dheight = 9; + dir = 2; + dwidth = 5; + height = 24; id = "syndicate_ne"; name = "northeast of station"; turf_type = /turf/open/space; - width = 23 + width = 18 }, /turf/open/space, /area/space/nearstation) diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index e31bb2fc08..8ed9acf09f 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -80597,14 +80597,14 @@ /area/shuttle/abandoned) "EDa" = ( /obj/docking_port/stationary{ - dheight = 1; - dir = 8; - dwidth = 12; - height = 17; + dheight = 9; + dir = 2; + dwidth = 5; + height = 24; id = "syndicate_nw"; name = "northwest of station"; turf_type = /turf/open/space; - width = 23 + width = 18 }, /turf/open/space/basic, /area/space/nearstation) diff --git a/_maps/map_files/Mining/Lavaland.dmm b/_maps/map_files/Mining/Lavaland.dmm index 7eade308ce..bbf998aaba 100644 --- a/_maps/map_files/Mining/Lavaland.dmm +++ b/_maps/map_files/Mining/Lavaland.dmm @@ -111,7 +111,6 @@ /obj/item/pickaxe, /obj/item/device/flashlight, /obj/item/clothing/glasses/meson, -/obj/item/device/mining_scanner, /turf/open/floor/plasteel, /area/mine/laborcamp) "av" = ( @@ -120,7 +119,6 @@ /obj/item/device/flashlight, /obj/item/pickaxe, /obj/item/clothing/glasses/meson, -/obj/item/device/mining_scanner, /turf/open/floor/plasteel, /area/mine/laborcamp) "aw" = ( @@ -21565,7 +21563,7 @@ am am am am -ai +ao ab ab ab @@ -22072,7 +22070,7 @@ am am am am -ai +ao ab ab ai @@ -22856,7 +22854,7 @@ ab ab ab ab -ai +ao ab ab ab @@ -24646,7 +24644,7 @@ am am am am -ai +ao ab ab ab @@ -24903,7 +24901,7 @@ am am am am -ai +ao ab ab ab @@ -25180,7 +25178,7 @@ ab ab ab ab -ai +ao am am ai @@ -25424,7 +25422,7 @@ ab ab ab ai -ai +ao ab ab ab @@ -25674,7 +25672,7 @@ am am am am -ai +ao ab ab ab @@ -25958,7 +25956,7 @@ am am am am -ai +ao ab ab ab @@ -26201,7 +26199,7 @@ ab ab ab ab -ai +ao am am am @@ -26215,7 +26213,7 @@ am am am am -ai +ao ab ab ab @@ -26974,7 +26972,7 @@ ab ab ab ab -ai +ao am am am @@ -28513,7 +28511,7 @@ ab ab ab ai -ai +ao ab ab ab @@ -29023,7 +29021,7 @@ ab ab ab ab -ai +ao ab ab ai @@ -29032,13 +29030,13 @@ am am am am -ai +ao ab ab ab ab -ai -ai +ao +ao ab ab ab @@ -29280,8 +29278,8 @@ ab ab ab ab -ai -ai +ao +ao ab ai am @@ -30062,8 +30060,8 @@ ab ab ab ab -ai -ai +ao +ao ab ab ab @@ -30575,7 +30573,7 @@ ai ai ab ab -ai +ao am am am diff --git a/_maps/map_files/OmegaStation/OmegaStation.dmm b/_maps/map_files/OmegaStation/OmegaStation.dmm index 4fc42569fa..ffda1f471d 100644 --- a/_maps/map_files/OmegaStation/OmegaStation.dmm +++ b/_maps/map_files/OmegaStation/OmegaStation.dmm @@ -34669,14 +34669,14 @@ /area/space/nearstation) "sws" = ( /obj/docking_port/stationary{ - dheight = 1; - dir = 8; - dwidth = 12; - height = 17; + dheight = 9; + dir = 2; + dwidth = 5; + height = 24; id = "syndicate_sw"; name = "southwest of station"; turf_type = /turf/open/space; - width = 23 + width = 18 }, /turf/open/space, /area/space/nearstation) diff --git a/_maps/map_files/PubbyStation/PubbyStation.dmm b/_maps/map_files/PubbyStation/PubbyStation.dmm index 54e01bc923..7eb9a7ac7a 100644 --- a/_maps/map_files/PubbyStation/PubbyStation.dmm +++ b/_maps/map_files/PubbyStation/PubbyStation.dmm @@ -3137,14 +3137,14 @@ /area/maintenance/department/crew_quarters/dorms) "ajA" = ( /obj/docking_port/stationary{ - dheight = 1; - dir = 8; - dwidth = 12; - height = 17; + dheight = 9; + dir = 2; + dwidth = 5; + height = 24; id = "syndicate_ne"; name = "northeast of station"; turf_type = /turf/open/space; - width = 23 + width = 18 }, /turf/open/space, /area/space/nearstation) diff --git a/code/__DEFINES/antagonists.dm b/code/__DEFINES/antagonists.dm index 1fba96b1eb..309489742c 100644 --- a/code/__DEFINES/antagonists.dm +++ b/code/__DEFINES/antagonists.dm @@ -9,12 +9,12 @@ #define ANTAG_DATUM_TRAITOR /datum/antagonist/traitor #define ANTAG_DATUM_TRAITOR_HUMAN /datum/antagonist/traitor/human #define ANTAG_DATUM_TRAITOR_AI /datum/antagonist/traitor/AI -#define ANTAG_DATUM_IAA /datum/antagonist/traitor/internal_affairs +#define ANTAG_DATUM_IAA /datum/antagonist/traitor/internal_affairs #define ANTAG_DATUM_IAA_HUMAN /datum/antagonist/traitor/human/internal_affairs -#define ANTAG_DATUM_IAA_AI /datum/antagonist/traitor/AI/internal_affairs +#define ANTAG_DATUM_IAA_AI /datum/antagonist/traitor/AI/internal_affairs #define ANTAG_DATUM_BROTHER /datum/antagonist/brother #define ANTAG_DATUM_ABDUCTOR /datum/antagonist/abductor -#define ANTAG_DATUM_ABDUCTOR_SCIENTIST /datum/antagonist/abductor/scientist -#define ANTAG_DATUM_ABDUCTOR_AGENT /datum/antagonist/abductor/agent +#define ANTAG_DATUM_ABDUCTOR_SCIENTIST /datum/antagonist/abductor/scientist +#define ANTAG_DATUM_ABDUCTOR_AGENT /datum/antagonist/abductor/agent #define ANTAG_DATUM_MONKEY /datum/antagonist/monkey -#define ANTAG_DATUM_MONKEY_LEADER /datum/antagonist/monkey/leader \ No newline at end of file +#define ANTAG_DATUM_MONKEY_LEADER /datum/antagonist/monkey/leader diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 8b3e74b96e..965ee51502 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -22,7 +22,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204 #define ON_BORDER_1 512 // item has priority to check when entering or leaving #define NOSLIP_1 1024 //prevents from slipping on wet floors, in space etc -#define _UNUSED_1 2048 +#define CLEAN_ON_MOVE_1 2048 // BLOCK_GAS_SMOKE_EFFECT_1 only used in masks at the moment. #define BLOCK_GAS_SMOKE_EFFECT_1 4096 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! diff --git a/code/__DEFINES/say.dm b/code/__DEFINES/say.dm index 8f38acb203..74a1669686 100644 --- a/code/__DEFINES/say.dm +++ b/code/__DEFINES/say.dm @@ -17,7 +17,6 @@ #define MODE_HOLOPAD "holopad" #define MODE_CHANGELING "changeling" #define MODE_VOCALCORDS "cords" -#define MODE_MONKEY "monkeyhive" //Spans. Robot speech, italics, etc. Applied in compose_message(). #define SPAN_ROBOT "robot" diff --git a/code/__DEFINES/stat.dm b/code/__DEFINES/stat.dm index 543ac4badf..942a82e73f 100644 --- a/code/__DEFINES/stat.dm +++ b/code/__DEFINES/stat.dm @@ -10,17 +10,17 @@ //mob disabilities stat -#define BLIND "blind" -#define MUTE "mute" -#define DEAF "deaf" -#define NEARSIGHT "nearsighted" -#define FAT "fat" -#define HUSK "husk" -#define NOCLONE "noclone" -#define CLUMSY "clumsy" -#define DUMB "dumb" -#define MONKEYLIKE "monkeylike" //sets IsAdvancedToolUser to FALSE -#define PACIFISM "pacifism" +#define DISABILITY_BLIND "blind" +#define DISABILITY_MUTE "mute" +#define DISABILITY_DEAF "deaf" +#define DISABILITY_NEARSIGHT "nearsighted" +#define DISABILITY_FAT "fat" +#define DISABILITY_HUSK "husk" +#define DISABILITY_NOCLONE "noclone" +#define DISABILITY_CLUMSY "clumsy" +#define DISABILITY_DUMB "dumb" +#define DISABILITY_MONKEYLIKE "monkeylike" //sets IsAdvancedToolUser to FALSE +#define DISABILITY_PACIFISM "pacifism" // common disability sources #define EYE_DAMAGE "eye_damage" @@ -33,7 +33,6 @@ #define GENETICS_SPELL "genetics_spell" #define TRAUMA_DISABILITY "trauma" - // bitflags for machine stat variable #define BROKEN 1 #define NOPOWER 2 diff --git a/code/__HELPERS/roundend.dm b/code/__HELPERS/roundend.dm index d2f67778c1..52dd7c6358 100644 --- a/code/__HELPERS/roundend.dm +++ b/code/__HELPERS/roundend.dm @@ -47,27 +47,6 @@ SSblackbox.record_feedback("associative", "antagonists", 1, antag_info) -/datum/controller/subsystem/ticker/proc/gather_newscaster() - var/json_file = file("[GLOB.log_directory]/newscaster.json") - var/list/file_data = list() - var/pos = 1 - for(var/datum/newscaster/feed_channel/channel in GLOB.news_network.network_channels) - if(!GLOB.news_network.network_channels.len) - break - file_data["[pos]"] = list("channel name" = "[channel.channel_name]", "author" = "[channel.author]", "censored" = channel.censored ? 1 : 0, "author censored" = channel.authorCensor ? 1 : 0, "messages" = list()) - if(!channel.messages.len) - continue - for(var/datum/newscaster/feed_message/message in channel.messages) - file_data["[pos]"]["messages"] |= list("author" = "[message.author]", "time stamp" = "[message.time_stamp]", "censored" = message.bodyCensor ? 1 : 0, "author censored" = message.authorCensor ? 1 : 0, "photo file" = "[message.photo_file]", "photo caption" = "[message.caption]", "body" = "[message.body]", "comments" = list()) - if(!message.comments.len) - continue - for(var/datum/newscaster/feed_comment/comment in message.comments) - file_data["[pos]"]["messages"]["comments"] = list("author" = "[comment.author]", "time stamp" = "[comment.time_stamp]", "body" = "[comment.body]") - pos++ - if(GLOB.news_network.wanted_issue.active) - file_data["wanted"] = list("author" = "[GLOB.news_network.wanted_issue.scannedUser]", "criminal" = "[GLOB.news_network.wanted_issue.criminal]", "description" = "[GLOB.news_network.wanted_issue.body]", "photo file" = "[GLOB.news_network.wanted_issue.photo_file]") - WRITE_FILE(json_file, json_encode(file_data)) - /datum/controller/subsystem/ticker/proc/declare_completion() set waitfor = FALSE @@ -93,6 +72,7 @@ H.add_hud_to(M) CHECK_TICK + //Set news report and mode result mode.set_round_result() diff --git a/code/_onclick/hud/parallax.dm b/code/_onclick/hud/parallax.dm index e3d1af79ed..52319b7866 100755 --- a/code/_onclick/hud/parallax.dm +++ b/code/_onclick/hud/parallax.dm @@ -60,6 +60,8 @@ var/pref = C.prefs.parallax if (isnull(pref)) pref = PARALLAX_HIGH + if (C.byond_version < 511) + pref = PARALLAX_DISABLE switch(C.prefs.parallax) if (PARALLAX_INSANE) C.parallax_throttle = FALSE diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 2dddce8542..ddfbec5935 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -58,7 +58,8 @@ SendSignal(COMSIG_ITEM_ATTACK, M, user) if(flags_1 & NOBLUDGEON_1) return - if(user.disabilities & PACIFISM) + + if(user.has_disability(DISABILITY_PACIFISM)) return if(!force) playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), 1, -1) diff --git a/code/citadel/organs/genitals.dm b/code/citadel/organs/genitals.dm index 1f46778aaf..79784a1eb8 100644 --- a/code/citadel/organs/genitals.dm +++ b/code/citadel/organs/genitals.dm @@ -260,7 +260,7 @@ for(var/L in relevant_layers) //Less hardcode H.remove_overlay(L) - if(H.disabilities & HUSK) + if(H.has_disability(DISABILITY_HUSK)) return //start scanning for genitals //var/list/worn_stuff = H.get_equipped_items()//cache this list so it's not built again diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 54b693d543..0f06caa20d 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -631,7 +631,6 @@ SUBSYSTEM_DEF(ticker) world.Reboot() /datum/controller/subsystem/ticker/Shutdown() - gather_newscaster() //called here so we ensure the log is created even upon admin reboot if(!round_end_sound) round_end_sound = pick(\ 'sound/roundend/newroundsexy.ogg', diff --git a/code/datums/action.dm b/code/datums/action.dm index 80f4789611..a2abe139a4 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -344,19 +344,6 @@ /datum/action/item_action/change name = "Change" -/datum/action/item_action/nano_picket_sign - name = "Retext Nano Picket Sign" - var/obj/item/picket_sign/S - -/datum/action/item_action/nano_picket_sign/New(Target) - ..() - if(istype(Target, /obj/item/picket_sign)) - S = Target - -/datum/action/item_action/nano_picket_sign/Trigger() - if(istype(S)) - S.retext(owner) - /datum/action/item_action/adjust /datum/action/item_action/adjust/New(Target) diff --git a/code/datums/actions/beam_rifle.dm b/code/datums/actions/beam_rifle.dm index 783b93fbdb..3af5d13690 100644 --- a/code/datums/actions/beam_rifle.dm +++ b/code/datums/actions/beam_rifle.dm @@ -1,12 +1,12 @@ - -/datum/action/item_action/zoom_speed_action - name = "Toggle Zooming Speed" - icon_icon = 'icons/mob/actions/actions_spells.dmi' - button_icon_state = "projectile" - background_icon_state = "bg_tech" - -/datum/action/item_action/zoom_lock_action - name = "Switch Zoom Mode" - icon_icon = 'icons/mob/actions/actions_items.dmi' - button_icon_state = "zoom_mode" - background_icon_state = "bg_tech" + +/datum/action/item_action/zoom_speed_action + name = "Toggle Zooming Speed" + icon_icon = 'icons/mob/actions/actions_spells.dmi' + button_icon_state = "projectile" + background_icon_state = "bg_tech" + +/datum/action/item_action/zoom_lock_action + name = "Switch Zoom Mode" + icon_icon = 'icons/mob/actions/actions_items.dmi' + button_icon_state = "zoom_mode" + background_icon_state = "bg_tech" diff --git a/code/datums/actions/flightsuit.dm b/code/datums/actions/flightsuit.dm index cf249fed31..3e78fa5332 100644 --- a/code/datums/actions/flightsuit.dm +++ b/code/datums/actions/flightsuit.dm @@ -1,3 +1,5 @@ + + /datum/action/item_action/flightsuit icon_icon = 'icons/mob/actions/actions_flightsuit.dmi' diff --git a/code/datums/antagonists/changeling.dm b/code/datums/antagonists/changeling.dm index 031e08738f..da7e425ecc 100644 --- a/code/datums/antagonists/changeling.dm +++ b/code/datums/antagonists/changeling.dm @@ -223,7 +223,8 @@ if(verbose) to_chat(user, "[target] is not compatible with our biology.") return - if((target.has_disability(NOCLONE)) || (target.has_disability(NOCLONE))) + + if((target.has_disability(DISABILITY_NOCLONE)) || (target.has_disability(DISABILITY_NOCLONE))) if(verbose) to_chat(user, "DNA of [target] is ruined beyond usability!") return diff --git a/code/datums/antagonists/monkey.dm b/code/datums/antagonists/monkey.dm index 8d7462b567..b1c5642a39 100644 --- a/code/datums/antagonists/monkey.dm +++ b/code/datums/antagonists/monkey.dm @@ -7,14 +7,14 @@ name = "Monkey" job_rank = ROLE_MONKEY roundend_category = "monkeys" - var/datum/objective_team/monkey/monkey_team + var/datum/team/monkey/monkey_team /datum/antagonist/monkey/on_gain() . = ..() SSticker.mode.ape_infectees += owner owner.special_role = "Infected Monkey" - var/datum/disease/D = new /datum/disease/transformation/jungle_fever + var/datum/disease/D = new /datum/disease/transformation/jungle_fever/monkeymode if(!owner.current.HasDisease(D)) D.affected_mob = owner owner.current.viruses += D @@ -38,13 +38,13 @@ if(D) D.cure() -/datum/antagonist/monkey/create_team(datum/objective_team/monkey/new_team) +/datum/antagonist/monkey/create_team(datum/team/monkey/new_team) if(!new_team) for(var/datum/antagonist/monkey/N in get_antagonists(/datum/antagonist/monkey, TRUE)) if(N.monkey_team) monkey_team = N.monkey_team return - monkey_team = new /datum/objective_team/monkey + monkey_team = new /datum/team/monkey monkey_team.update_objectives() return if(!istype(new_team)) @@ -60,9 +60,6 @@ /datum/antagonist/monkey/leader/on_gain() . = ..() - var/datum/disease/D = (/datum/disease/transformation/jungle_fever in owner.current.viruses) - if(D) - D.visibility_flags = HIDDEN_SCANNER|HIDDEN_PANDEMIC var/obj/item/organ/heart/freedom/F = new F.Insert(owner.current, drop_if_replaced = FALSE) SSticker.mode.ape_leaders += owner @@ -99,45 +96,45 @@ return TRUE return FALSE -/datum/objective_team/monkey +/datum/team/monkey name = "Monkeys" -/datum/objective_team/monkey/proc/update_objectives() +/datum/team/monkey/proc/update_objectives() objectives = list() var/datum/objective/monkey/O = new /datum/objective/monkey() O.team = src objectives += O return -/datum/objective_team/monkey/proc/infected_monkeys_alive() +/datum/team/monkey/proc/infected_monkeys_alive() var/datum/disease/D = new /datum/disease/transformation/jungle_fever() for(var/mob/living/carbon/monkey/M in GLOB.alive_mob_list) if(M.HasDisease(D)) return TRUE return FALSE -/datum/objective_team/monkey/proc/infected_monkeys_escaped() +/datum/team/monkey/proc/infected_monkeys_escaped() var/datum/disease/D = new /datum/disease/transformation/jungle_fever() for(var/mob/living/carbon/monkey/M in GLOB.alive_mob_list) if(M.HasDisease(D) && (M.onCentCom() || M.onSyndieBase())) return TRUE return FALSE -/datum/objective_team/monkey/proc/infected_humans_escaped() +/datum/team/monkey/proc/infected_humans_escaped() var/datum/disease/D = new /datum/disease/transformation/jungle_fever() for(var/mob/living/carbon/human/M in GLOB.alive_mob_list) if(M.HasDisease(D) && (M.onCentCom() || M.onSyndieBase())) return TRUE return FALSE -/datum/objective_team/monkey/proc/infected_humans_alive() +/datum/team/monkey/proc/infected_humans_alive() var/datum/disease/D = new /datum/disease/transformation/jungle_fever() for(var/mob/living/carbon/human/M in GLOB.alive_mob_list) if(M.HasDisease(D)) return TRUE return FALSE -/datum/objective_team/monkey/proc/get_result() +/datum/team/monkey/proc/get_result() if(infected_monkeys_escaped()) return MONKEYS_ESCAPED if(infected_monkeys_alive()) @@ -146,7 +143,7 @@ return DISEASE_LIVED return MONKEYS_DIED -/datum/objective_team/monkey/roundend_report() +/datum/team/monkey/roundend_report() var/list/parts = list() switch(get_result()) if(MONKEYS_ESCAPED) @@ -161,10 +158,13 @@ if(MONKEYS_DIED) parts += "Monkey Major Defeat!" parts += "All the monkeys died, and Jungle Fever was wiped out!" - if(LAZYLEN(SSticker.mode.ape_leaders)) + var/list/leaders = get_antagonists(/datum/antagonist/monkey/leader, TRUE) + var/list/monkeys = get_antagonists(/datum/antagonist/monkey, TRUE) + + if(LAZYLEN(leaders)) parts += "The monkey leaders were:" parts += printplayerlist(SSticker.mode.ape_leaders) - if(LAZYLEN(SSticker.mode.ape_infectees)) + if(LAZYLEN(monkeys)) parts += "The monkeys were:" parts += printplayerlist(SSticker.mode.ape_infectees) return "
[parts.Join("
")]
" \ No newline at end of file diff --git a/code/datums/brain_damage/mild.dm b/code/datums/brain_damage/mild.dm index d5ccc71ef9..a28a108365 100644 --- a/code/datums/brain_damage/mild.dm +++ b/code/datums/brain_damage/mild.dm @@ -42,7 +42,7 @@ lose_text = "You feel smart again." /datum/brain_trauma/mild/dumbness/on_gain() - owner.add_disability(DUMB, TRAUMA_DISABILITY) + owner.add_disability(DISABILITY_DUMB, TRAUMA_DISABILITY) ..() /datum/brain_trauma/mild/dumbness/on_life() @@ -54,7 +54,7 @@ ..() /datum/brain_trauma/mild/dumbness/on_lose() - owner.remove_disability(DUMB, TRAUMA_DISABILITY) + owner.remove_disability(DISABILITY_DUMB, TRAUMA_DISABILITY) owner.derpspeech = 0 ..() diff --git a/code/datums/brain_damage/phobia.dm b/code/datums/brain_damage/phobia.dm index 313b693436..a775113491 100644 --- a/code/datums/brain_damage/phobia.dm +++ b/code/datums/brain_damage/phobia.dm @@ -68,7 +68,7 @@ return /datum/brain_trauma/mild/phobia/on_hear(message, speaker, message_language, raw_message, radio_freq) - if(owner.disabilities & DEAF || world.time < next_scare) //words can't trigger you if you can't hear them *taps head* + if(owner.has_disability(DISABILITY_DEAF) || world.time < next_scare) //words can't trigger you if you can't hear them *taps head* return message for(var/word in trigger_words) if(findtext(message, word)) diff --git a/code/datums/brain_damage/severe.dm b/code/datums/brain_damage/severe.dm index a138073040..57fc11710d 100644 --- a/code/datums/brain_damage/severe.dm +++ b/code/datums/brain_damage/severe.dm @@ -12,11 +12,11 @@ lose_text = "You suddenly remember how to speak." /datum/brain_trauma/severe/mute/on_gain() - owner.add_disability(MUTE, TRAUMA_DISABILITY) + owner.add_disability(DISABILITY_MUTE, TRAUMA_DISABILITY) ..() /datum/brain_trauma/severe/mute/on_lose() - owner.remove_disability(MUTE, TRAUMA_DISABILITY) + owner.remove_disability(DISABILITY_MUTE, TRAUMA_DISABILITY) ..() /datum/brain_trauma/severe/aphasia @@ -50,11 +50,17 @@ lose_text = "Your vision returns." /datum/brain_trauma/severe/blindness/on_gain() - owner.become_blind(TRAUMA_DISABILITY) + owner.become_blind() + ..() + +//no fiddling with genetics to get out of this one +/datum/brain_trauma/severe/blindness/on_life() + if(!(owner.disabilities & BLIND)) + on_gain() ..() /datum/brain_trauma/severe/blindness/on_lose() - owner.cure_blind(TRAUMA_DISABILITY) + owner.cure_blind() ..() /datum/brain_trauma/severe/paralysis @@ -120,7 +126,7 @@ stress -= 4 /datum/brain_trauma/severe/monophobia/proc/check_alone() - if(owner.has_disability(BLIND)) + if(owner.has_disability(DISABILITY_BLIND)) return TRUE for(var/mob/M in oview(owner, 7)) if(!isliving(M)) //ghosts ain't people @@ -182,11 +188,11 @@ lose_text = "You feel in control of your hands again." /datum/brain_trauma/severe/discoordination/on_gain() - owner.add_disability(MONKEYLIKE, TRAUMA_DISABILITY) + owner.add_disability(DISABILITY_MONKEYLIKE, TRAUMA_DISABILITY) ..() /datum/brain_trauma/severe/discoordination/on_lose() - owner.remove_disability(MONKEYLIKE, TRAUMA_DISABILITY) + owner.remove_disability(DISABILITY_MONKEYLIKE, TRAUMA_DISABILITY) ..() /datum/brain_trauma/severe/pacifism @@ -197,24 +203,9 @@ lose_text = "You no longer feel compelled to not harm." /datum/brain_trauma/severe/pacifism/on_gain() - owner.add_disability(PACIFISM, TRAUMA_DISABILITY) + owner.add_disability(DISABILITY_PACIFISM, TRAUMA_DISABILITY) ..() /datum/brain_trauma/severe/pacifism/on_lose() - owner.remove_disability(PACIFISM, TRAUMA_DISABILITY) - ..() - -/datum/brain_trauma/severe/pacifism - name = "Traumatic Non-Violence" - desc = "Patient is extremely unwilling to harm others in violent ways." - scan_desc = "pacific syndrome" - gain_text = "You feel oddly peaceful." - lose_text = "You no longer feel compelled to not harm." - -/datum/brain_trauma/severe/pacifism/on_gain() - owner.disabilities |= PACIFISM - ..() - -/datum/brain_trauma/severe/pacifism/on_lose() - owner.disabilities &= ~PACIFISM + owner.remove_disability(DISABILITY_PACIFISM, TRAUMA_DISABILITY) ..() \ No newline at end of file diff --git a/code/datums/brain_damage/split_personality.dm b/code/datums/brain_damage/split_personality.dm index deed1c8406..dcb7fca3d1 100644 --- a/code/datums/brain_damage/split_personality.dm +++ b/code/datums/brain_damage/split_personality.dm @@ -192,7 +192,7 @@ return //no random switching /datum/brain_trauma/severe/split_personality/brainwashing/on_hear(message, speaker, message_language, raw_message, radio_freq) - if(owner.disabilities & DEAF || owner == speaker) + if(owner.has_disability(DISABILITY_DEAF) || owner == speaker) return message if(findtext(message, codeword)) message = replacetext(message, codeword, "[codeword]") diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index 7c08a3908f..ffc20cc9cb 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -3,29 +3,29 @@ for(var/thing in viruses) var/datum/disease/DD = thing if(D.IsSame(DD)) - return 1 - return 0 + return TRUE + return FALSE /mob/proc/CanContractDisease(datum/disease/D) if(stat == DEAD) - return 0 + return FALSE if(D.GetDiseaseID() in resistances) - return 0 + return FALSE if(HasDisease(D)) - return 0 + return FALSE if(!(type in D.viable_mobtypes)) - return 0 + return FALSE - return 1 + return TRUE /mob/proc/ContactContractDisease(datum/disease/D) if(!CanContractDisease(D)) - return 0 + return FALSE AddDisease(D) @@ -53,12 +53,13 @@ else DD.vars[V] = D.vars[V] + DD.after_add() DD.affected_mob.med_hud_set_status() /mob/living/carbon/ContactContractDisease(datum/disease/D, target_zone) if(!CanContractDisease(D)) - return 0 + return FALSE var/obj/item/clothing/Cl = null var/passed = TRUE diff --git a/code/datums/diseases/_disease.dm b/code/datums/diseases/_disease.dm index 951edece23..5d49d7a523 100644 --- a/code/datums/diseases/_disease.dm +++ b/code/datums/diseases/_disease.dm @@ -60,14 +60,14 @@ /datum/disease/proc/has_cure() if(!(disease_flags & CURABLE)) - return 0 + return FALSE . = cures.len for(var/C_id in cures) if(!affected_mob.reagents.has_reagent(C_id)) .-- if(!. || (needs_all_cures && . < cures.len)) - return 0 + return FALSE //Airborne spreading /datum/disease/proc/spread(force_spread = 0) @@ -111,8 +111,8 @@ /datum/disease/proc/IsSame(datum/disease/D) if(istype(src, D.type)) - return 1 - return 0 + return TRUE + return FALSE /datum/disease/proc/Copy() @@ -120,6 +120,9 @@ D.strain_data = strain_data.Copy() return D +/datum/disease/proc/after_add() + return + /datum/disease/proc/GetDiseaseID() return "[type]" diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm index 4f208b826b..104a4c00c2 100644 --- a/code/datums/diseases/advance/symptoms/heal.dm +++ b/code/datums/diseases/advance/symptoms/heal.dm @@ -1,10 +1,10 @@ /datum/symptom/heal name = "Basic Healing (does nothing)" //warning for adminspawn viruses desc = "You should not be seeing this." - stealth = 0 - resistance = 0 - stage_speed = 0 - transmittable = 0 + stealth = 1 + resistance = -4 + stage_speed = -4 + transmittable = -4 level = 0 //not obtainable base_message_chance = 20 //here used for the overlays symptom_delay_min = 1 @@ -22,6 +22,7 @@ /datum/symptom/heal/Activate(datum/disease/advance/A) if(!..()) return + //100% chance to activate for slow but consistent healing var/mob/living/M = A.affected_mob switch(A.stage) if(4, 5) @@ -44,20 +45,20 @@ return TRUE -/datum/symptom/heal/starlight +/datum/symptom/heal/toxin name = "Starlight Condensation" - desc = "The virus reacts to direct starlight, producing regenerative chemicals. Works best against toxin-based damage." - stealth = -1 - resistance = -2 - stage_speed = 0 - transmittable = 1 + desc = "The virus reacts to direct starlight, producing regenerative chemicals that can cure toxin damage." + stealth = 1 + resistance = -3 + stage_speed = -3 + transmittable = -3 level = 6 passive_message = "You miss the feeling of starlight on your skin." var/nearspace_penalty = 0.3 threshold_desc = "Stage Speed 6: Increases healing speed.
\ Transmission 6: Removes penalty for only being close to space." -/datum/symptom/heal/starlight/Start(datum/disease/advance/A) +/datum/symptom/heal/toxin/Start(datum/disease/advance/A) if(!..()) return if(A.properties["transmission"] >= 6) @@ -65,7 +66,7 @@ if(A.properties["stage_rate"] >= 6) power = 2 -/datum/symptom/heal/starlight/CanHeal(datum/disease/advance/A) +/datum/symptom/heal/toxin/CanHeal(datum/disease/advance/A) var/mob/living/M = A.affected_mob if(istype(get_turf(M), /turf/open/space)) return power @@ -74,25 +75,15 @@ if(istype(T, /turf/open/space)) return power * nearspace_penalty -/datum/symptom/heal/starlight/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power) +/datum/symptom/heal/toxin/Heal(mob/living/M, datum/disease/advance/A, actual_power) var/heal_amt = actual_power if(M.getToxLoss() && prob(5)) - to_chat(M, "Your skin tingles as the starlight seems to heal you.") - - M.adjustToxLoss(-(4 * heal_amt)) //most effective on toxins - - var/list/parts = M.get_damaged_bodyparts(1,1) - - if(!parts.len) - return - - for(var/obj/item/bodypart/L in parts) - if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len)) - M.update_damage_overlays() + to_chat(M, "Your skin tingles as the starlight purges toxins from your bloodstream.") + M.adjustToxLoss(-heal_amt) return 1 -/datum/symptom/heal/starlight/passive_message_condition(mob/living/M) - if(M.getBruteLoss() || M.getFireLoss() || M.getToxLoss()) +/datum/symptom/heal/toxin/passive_message_condition(mob/living/M) + if(M.getToxLoss()) return TRUE return FALSE @@ -100,7 +91,7 @@ name = "Toxolysis" stealth = 0 resistance = -2 - stage_speed = 2 + stage_speed = -2 transmittable = -2 level = 7 var/food_conversion = FALSE @@ -162,50 +153,58 @@ to_chat(C, "You feel an odd gurgle in your stomach, as if it was working much faster than normal.") return 1 -/datum/symptom/heal/darkness - name = "Nocturnal Regeneration" - desc = "The virus is able to mend the host's flesh when in conditions of low light, repairing physical damage. More effective against brute damage." - stealth = 2 - resistance = -1 - stage_speed = -2 - transmittable = -1 +/datum/symptom/heal/brute + name = "Cellular Molding" + desc = "The virus is able to shift cells around when in conditions of high heat, repairing existing physical damage." + stealth = 1 + resistance = -3 + stage_speed = -3 + transmittable = -3 level = 6 - passive_message = "You feel tingling on your skin as light passes over it." + passive_message = "You feel the flesh pulsing under your skin for a moment, but it's too cold to move." threshold_desc = "Stage Speed 8: Doubles healing speed." -/datum/symptom/heal/darkness/Start(datum/disease/advance/A) +/datum/symptom/heal/brute/Start(datum/disease/advance/A) if(!..()) return if(A.properties["stage_rate"] >= 8) power = 2 -/datum/symptom/heal/darkness/CanHeal(datum/disease/advance/A) +/datum/symptom/heal/brute/CanHeal(datum/disease/advance/A) var/mob/living/M = A.affected_mob - var/light_amount = 0 - if(isturf(M.loc)) //else, there's considered to be no light - var/turf/T = M.loc - light_amount = min(1,T.get_lumcount()) - 0.5 - if(light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD) - return power + switch(M.bodytemperature) + if(0 to 340) + return FALSE + if(340 to BODYTEMP_HEAT_DAMAGE_LIMIT) + . = 0.3 * power + if(BODYTEMP_HEAT_DAMAGE_LIMIT to 400) + . = 0.75 * power + if(400 to 460) + . = power + else + . = 1.5 * power -/datum/symptom/heal/darkness/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power) + if(M.on_fire) + . *= 2 + +/datum/symptom/heal/brute/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power) var/heal_amt = 2 * actual_power - var/list/parts = M.get_damaged_bodyparts(1,1) + var/list/parts = M.get_damaged_bodyparts(1,0) //brute only if(!parts.len) return if(prob(5)) - to_chat(M, "The darkness soothes and mends your wounds.") + to_chat(M, "You feel your flesh moving beneath your heated skin, mending your wounds.") for(var/obj/item/bodypart/L in parts) - if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len * 0.5)) //more effective on brute + if(L.heal_damage(heal_amt/parts.len, 0)) M.update_damage_overlays() return 1 -/datum/symptom/heal/darkness/passive_message_condition(mob/living/M) - if(M.getBruteLoss() || M.getFireLoss()) +/datum/symptom/heal/brute/passive_message_condition(mob/living/M) + if(M.getBruteLoss()) return TRUE return FALSE @@ -213,8 +212,8 @@ name = "Regenerative Coma" desc = "The virus causes the host to fall into a death-like coma when severely damaged, then rapidly fixes the damage." stealth = 0 - resistance = 2 - stage_speed = -3 + resistance = 0 + stage_speed = -2 transmittable = -2 level = 8 passive_message = "The pain from your wounds makes you feel oddly sleepy..." @@ -284,20 +283,20 @@ return TRUE return FALSE -/datum/symptom/heal/water +/datum/symptom/heal/burn name = "Tissue Hydration" - desc = "The virus uses excess water inside and outside the body to repair damaged tissue cells. More effective against burns." - stealth = 0 - resistance = -1 - stage_speed = 0 - transmittable = 1 + desc = "The virus uses excess water inside and outside the body to repair burned tisue cells." + stealth = 1 + resistance = -3 + stage_speed = -3 + transmittable = -3 level = 6 - passive_message = "Your skin feels oddly dry..." + passive_message = "Your burned skin feels oddly dry..." var/absorption_coeff = 1 threshold_desc = "Resistance 5: Water is consumed at a much slower rate.
\ Stage Speed 7: Increases healing speed." -/datum/symptom/heal/water/Start(datum/disease/advance/A) +/datum/symptom/heal/burn/Start(datum/disease/advance/A) if(!..()) return if(A.properties["stage_rate"] >= 7) @@ -305,7 +304,7 @@ if(A.properties["stealth"] >= 2) absorption_coeff = 0.25 -/datum/symptom/heal/water/CanHeal(datum/disease/advance/A) +/datum/symptom/heal/burn/CanHeal(datum/disease/advance/A) . = 0 var/mob/living/M = A.affected_mob if(M.fire_stacks < 0) @@ -318,33 +317,33 @@ M.reagents.remove_reagent("water", 0.5 * absorption_coeff) . += power * 0.5 -/datum/symptom/heal/water/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power) +/datum/symptom/heal/burn/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power) var/heal_amt = 2 * actual_power - var/list/parts = M.get_damaged_bodyparts(1,1) //more effective on burns + var/list/parts = M.get_damaged_bodyparts(0,1) //burn only if(!parts.len) return if(prob(5)) - to_chat(M, "You feel yourself absorbing the water around you to soothe your damaged skin.") + to_chat(M, "You feel yourself absorbing the water around you to soothe your burned skin.") for(var/obj/item/bodypart/L in parts) - if(L.heal_damage(heal_amt/parts.len * 0.5, heal_amt/parts.len)) + if(L.heal_damage(0, heal_amt/parts.len)) M.update_damage_overlays() return 1 -/datum/symptom/heal/water/passive_message_condition(mob/living/M) - if(M.getBruteLoss() || M.getFireLoss()) +/datum/symptom/heal/burn/passive_message_condition(mob/living/M) + if(M.getFireLoss()) return TRUE return FALSE /datum/symptom/heal/plasma name = "Plasma Fixation" - desc = "The virus draws plasma from the atmosphere and from inside the body to heal and stabilize body temperature." + desc = "The virus draws plasma from the atmosphere and from inside the body to stabilize body temperature and heal burns." stealth = 0 - resistance = 3 + resistance = 0 stage_speed = -2 transmittable = -2 level = 8 @@ -380,6 +379,8 @@ /datum/symptom/heal/plasma/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power) var/heal_amt = 4 * actual_power + var/list/parts = M.get_damaged_bodyparts(0,1) //burn only + if(prob(5)) to_chat(M, "You feel yourself absorbing plasma inside and around you...") @@ -392,25 +393,24 @@ if(prob(5)) to_chat(M, "You feel warmer.") - M.adjustToxLoss(-heal_amt) - - var/list/parts = M.get_damaged_bodyparts(1,1) if(!parts.len) return if(prob(5)) - to_chat(M, "The pain from your wounds fades rapidly.") + to_chat(M, "The pain from your burns fades rapidly.") + for(var/obj/item/bodypart/L in parts) - if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len)) + if(L.heal_damage(0, heal_amt/parts.len)) M.update_damage_overlays() return 1 + /datum/symptom/heal/radiation name = "Radioactive Resonance" desc = "The virus uses radiation to fix damage through dna mutations." stealth = -1 resistance = -2 - stage_speed = 2 + stage_speed = 0 transmittable = -3 level = 6 symptom_delay_min = 1 @@ -450,8 +450,6 @@ if(cellular_damage) M.adjustCloneLoss(-heal_amt * 0.5) - M.adjustToxLoss(-(2 * heal_amt)) - var/list/parts = M.get_damaged_bodyparts(1,1) if(!parts.len) diff --git a/code/datums/diseases/advance/symptoms/vision.dm b/code/datums/diseases/advance/symptoms/vision.dm index 39d853a758..fe4fbe6e9e 100644 --- a/code/datums/diseases/advance/symptoms/vision.dm +++ b/code/datums/diseases/advance/symptoms/vision.dm @@ -58,12 +58,11 @@ Bonus M.blur_eyes(20) M.adjust_eye_damage(5) if(eyes.eye_damage >= 10) - M.become_nearsighted(EYE_DAMAGE) + M.become_nearsighted() if(prob(eyes.eye_damage - 10 + 1)) if(!remove_eyes) - if(!M.has_disability(BLIND)) + if(!M.has_disability(DISABILITY_BLIND)) to_chat(M, "You go blind!") - M.become_blind(EYE_DAMAGE) else M.visible_message("[M]'s eyes fall off their sockets!", "Your eyes fall off their sockets!") eyes.Remove(M) @@ -112,18 +111,16 @@ Bonus return switch(A.stage) if(4, 5) //basically oculine - if(M.has_disability(BLIND, EYE_DAMAGE)) + if(M.has_disability(DISABILITY_BLIND, EYE_DAMAGE)) if(prob(20)) to_chat(M, "Your vision slowly returns...") - M.cure_blind(EYE_DAMAGE) - M.cure_nearsighted(EYE_DAMAGE) + M.cure_blind() + M.cure_nearsighted() M.blur_eyes(35) - - else if(M.has_disability(NEARSIGHT, EYE_DAMAGE)) + else if(M.has_disability(DISABILITY_NEARSIGHT, EYE_DAMAGE)) to_chat(M, "The blackness in your peripheral vision fades.") - M.cure_nearsighted(EYE_DAMAGE) + M.cure_nearsighted() M.blur_eyes(10) - else if(M.eye_blind || M.eye_blurry) M.set_blindness(0) M.set_blurriness(0) diff --git a/code/datums/diseases/gbs.dm b/code/datums/diseases/gbs.dm index 6d77acd3ae..71e4064676 100644 --- a/code/datums/diseases/gbs.dm +++ b/code/datums/diseases/gbs.dm @@ -1,6 +1,6 @@ /datum/disease/gbs name = "GBS" - max_stages = 4 + max_stages = 5 spread_text = "On contact" spread_flags = VIRUS_SPREAD_BLOOD | VIRUS_SPREAD_CONTACT_SKIN | VIRUS_SPREAD_CONTACT_FLUIDS cure_text = "Synaptizine & Sulfur" @@ -16,15 +16,25 @@ ..() switch(stage) if(2) - if(prob(5)) - affected_mob.emote("cough") + if(prob(45)) + affected_mob.adjustToxLoss(5) + affected_mob.updatehealth() + if(prob(1)) + affected_mob.emote("sneeze") if(3) if(prob(5)) + affected_mob.emote("cough") + else if(prob(5)) affected_mob.emote("gasp") if(prob(10)) - to_chat(affected_mob, "Your body hurts all over!") + to_chat(affected_mob, "You're starting to feel very weak...") if(4) - to_chat(affected_mob, "Your body feels as if it's trying to rip itself apart!") + if(prob(10)) + affected_mob.emote("cough") + affected_mob.adjustToxLoss(5) + affected_mob.updatehealth() + if(5) + to_chat(affected_mob, "Your body feels as if it's trying to rip itself open...") if(prob(50)) affected_mob.gib() else diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm index 30bb3d1898..8bce15cf3c 100644 --- a/code/datums/diseases/transformation.dm +++ b/code/datums/diseases/transformation.dm @@ -65,8 +65,8 @@ /datum/disease/transformation/jungle_fever name = "Jungle Fever" - cure_text = "Bananas" - cures = list("banana") + cure_text = "Death." + cures = list("adminordrazine") spread_text = "Monkey Bites" spread_flags = VIRUS_SPREAD_SPECIAL viable_mobtypes = list(/mob/living/carbon/monkey, /mob/living/carbon/human) @@ -113,6 +113,15 @@ remove_monkey(affected_mob.mind) ..() +/datum/disease/transformation/jungle_fever/monkeymode + visibility_flags = HIDDEN_SCANNER|HIDDEN_PANDEMIC + disease_flags = CAN_CARRY //no vaccines! no cure! + +/datum/disease/transformation/jungle_fever/monkeymode/after_add() + if(affected_mob && !is_monkey_leader(affected_mob.mind)) + visibility_flags = NONE + + /datum/disease/transformation/robot diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm index c4ccc4c1fb..ec39bcec67 100644 --- a/code/datums/helper_datums/getrev.dm +++ b/code/datums/helper_datums/getrev.dm @@ -45,8 +45,6 @@ set name = "Show Server Revision" set desc = "Check the current server code revision" - if(GLOB.round_id) - to_chat(src, "Round ID: [GLOB.round_id]") if(GLOB.revdata.originmastercommit) to_chat(src, "Server revision compiled on: [GLOB.revdata.date]") var/prefix = "" diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index 0a4309e708..aeaf477ef1 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -197,7 +197,7 @@ /obj/item/twohanded/bostaff/attack(mob/target, mob/living/user) add_fingerprint(user) - if((user.has_disability(CLUMSY)) && prob(50)) + if((user.has_disability(DISABILITY_CLUMSY)) && prob(50)) to_chat(user, "You club yourself over the head with [src].") user.Knockdown(60) if(ishuman(user)) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index f7f3ef8825..231ce66f28 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -461,27 +461,20 @@ text = uppertext(text) text = "[text]: " if (ishuman(current)) - if(is_monkey_leader(src)) - text += "healthy | infected LEADER | human | other" - else - text += "healthy | infected | leader | HUMAN | other" + text += "healthy | infected | HUMAN | other" else if(ismonkey(current)) var/found = FALSE for(var/datum/disease/transformation/jungle_fever/JF in current.viruses) found = TRUE break - var/isLeader = is_monkey_leader(src) - - if(isLeader) - text += "healthy | infected LEADER | human | other" - else if(found) - text += "healthy | INFECTED | leader | human | other" + if(found) + text += "healthy | INFECTED | human | other" else - text += "HEALTHY | infected | leader | human | other" + text += "HEALTHY | infected | human | other" else - text += "healthy | infected | leader | human | OTHER" + text += "healthy | infected | human | OTHER" if(current && current.client && (ROLE_MONKEY in current.client.prefs.be_special)) text += " | Enabled in Prefs" @@ -1262,17 +1255,11 @@ else if (istype(M) && length(M.viruses)) for(var/thing in M.viruses) var/datum/disease/D = thing - D.cure(FALSE) - if("leader") - if(check_rights(R_ADMIN, 0)) - add_monkey_leader(src) - log_admin("[key_name(usr)] made [key_name(current)] a monkey leader!") - message_admins("[key_name_admin(usr)] made [key_name_admin(current)] a monkey leader!") + D.cure(0) if("infected") - if(check_rights(R_ADMIN, 0)) + if (check_rights(R_ADMIN, 0)) var/mob/living/carbon/human/H = current var/mob/living/carbon/monkey/M = current - add_monkey(src) if (istype(H)) log_admin("[key_name(usr)] attempting to monkeyize and infect [key_name(current)]") message_admins("[key_name_admin(usr)] attempting to monkeyize and infect [key_name_admin(current)]") @@ -1290,7 +1277,6 @@ for(var/datum/disease/transformation/jungle_fever/JF in M.viruses) JF.cure(0) stoplag() //because deleting of virus is doing throught spawn(0) //What - remove_monkey(src) log_admin("[key_name(usr)] attempting to humanize [key_name(current)]") message_admins("[key_name_admin(usr)] attempting to humanize [key_name_admin(current)]") H = M.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPORGANS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_DEFAULTMSG) diff --git a/code/datums/mutations.dm b/code/datums/mutations.dm index a171cf91da..170c0a2a7f 100644 --- a/code/datums/mutations.dm +++ b/code/datums/mutations.dm @@ -8,6 +8,7 @@ GLOBAL_LIST_EMPTY(mutations_list) GLOB.mutations_list[name] = src /datum/mutation/human + var/dna_block var/quality var/get_chance = 100 diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm index 015004eef6..ee75402e03 100644 --- a/code/datums/mutations/body.dm +++ b/code/datums/mutations/body.dm @@ -85,12 +85,12 @@ /datum/mutation/human/clumsy/on_acquiring(mob/living/carbon/human/owner) if(..()) return - owner.add_disability(CLUMSY, GENETIC_MUTATION) + owner.add_disability(DISABILITY_CLUMSY, GENETIC_MUTATION) /datum/mutation/human/clumsy/on_losing(mob/living/carbon/human/owner) if(..()) return - owner.remove_disability(CLUMSY, GENETIC_MUTATION) + owner.remove_disability(DISABILITY_CLUMSY, GENETIC_MUTATION) //Tourettes causes you to randomly stand in place and shout. @@ -124,12 +124,12 @@ /datum/mutation/human/deaf/on_acquiring(mob/living/carbon/human/owner) if(..()) return - owner.add_disability(DEAF, GENETIC_MUTATION) + owner.add_disability(DISABILITY_DEAF, GENETIC_MUTATION) /datum/mutation/human/deaf/on_losing(mob/living/carbon/human/owner) if(..()) return - owner.remove_disability(DEAF, GENETIC_MUTATION) + owner.remove_disability(DISABILITY_DEAF, GENETIC_MUTATION) //Monified turns you into a monkey. diff --git a/code/datums/mutations/sight.dm b/code/datums/mutations/sight.dm index 60f5d75c5e..dee26166dd 100644 --- a/code/datums/mutations/sight.dm +++ b/code/datums/mutations/sight.dm @@ -7,12 +7,12 @@ /datum/mutation/human/nearsight/on_acquiring(mob/living/carbon/human/owner) if(..()) return - owner.become_nearsighted(GENETIC_MUTATION) + owner.become_nearsighted() /datum/mutation/human/nearsight/on_losing(mob/living/carbon/human/owner) if(..()) return - owner.cure_nearsighted(GENETIC_MUTATION) + owner.cure_nearsighted() //Blind makes you blind. Who knew? @@ -24,12 +24,12 @@ /datum/mutation/human/blind/on_acquiring(mob/living/carbon/human/owner) if(..()) return - owner.become_blind(GENETIC_MUTATION) + owner.become_blind() /datum/mutation/human/blind/on_losing(mob/living/carbon/human/owner) if(..()) return - owner.cure_blind(GENETIC_MUTATION) + owner.cure_blind() //X-Ray Vision lets you see through walls. diff --git a/code/datums/mutations/speech.dm b/code/datums/mutations/speech.dm index dc1333024a..989a9221b0 100644 --- a/code/datums/mutations/speech.dm +++ b/code/datums/mutations/speech.dm @@ -30,12 +30,12 @@ /datum/mutation/human/mute/on_acquiring(mob/living/carbon/human/owner) if(..()) return - owner.add_disability(MUTE, GENETIC_MUTATION) + owner.add_disability(DISABILITY_MUTE, GENETIC_MUTATION) /datum/mutation/human/mute/on_losing(mob/living/carbon/human/owner) if(..()) return - owner.remove_disability(MUTE, GENETIC_MUTATION) + owner.remove_disability(DISABILITY_MUTE, GENETIC_MUTATION) /datum/mutation/human/smile diff --git a/code/datums/position_point_vector.dm b/code/datums/position_point_vector.dm index 635ae0bbec..2a98d57efd 100644 --- a/code/datums/position_point_vector.dm +++ b/code/datums/position_point_vector.dm @@ -1,239 +1,239 @@ -//Designed for things that need precision trajectories like projectiles. -//Don't use this for anything that you don't absolutely have to use this with (like projectiles!) because it isn't worth using a datum unless you need accuracy down to decimal places in pixels. - -#define RETURN_PRECISE_POSITION(A) new /datum/position(A) -#define RETURN_PRECISE_POINT(A) new /datum/point(A) - -/datum/position //For positions with map x/y/z and pixel x/y so you don't have to return lists. Could use addition/subtraction in the future I guess. - var/x = 0 - var/y = 0 - var/z = 0 - var/pixel_x = 0 - var/pixel_y = 0 - -/datum/position/proc/valid() - return x && y && z && !isnull(pixel_x) && !isnull(pixel_y) - -/datum/position/New(_x = 0, _y = 0, _z = 0, _pixel_x = 0, _pixel_y = 0) //first argument can also be a /datum/point. - if(istype(_x, /datum/point)) - var/datum/point/P = _x - var/turf/T = P.return_turf() - _x = T.x - _y = T.y - _z = T.z - _pixel_x = P.return_px() - _pixel_y = P.return_py() - else if(isatom(_x)) - var/atom/A = _x - _x = A.x - _y = A.y - _z = A.z - _pixel_x = A.pixel_x - _pixel_y = A.pixel_y - x = _x - y = _y - z = _z - pixel_x = _pixel_x - pixel_y = _pixel_y - -/datum/position/proc/return_turf() - return locate(x, y, z) - -/datum/position/proc/return_px() - return pixel_x - -/datum/position/proc/return_py() - return pixel_y - -/datum/position/proc/return_point() - return new /datum/point(src) - -/proc/point_midpoint_points(datum/point/a, datum/point/b) //Obviously will not support multiZ calculations! Same for the two below. - var/datum/point/P = new - P.x = round(a.x + (b.x - a.x) / 2, 1) - P.y = round(a.y + (b.y - a.y) / 2, 1) - P.z = a.z - return P - -/proc/pixel_length_between_points(datum/point/a, datum/point/b) - return sqrt(((b.x - a.x) ** 2) + ((b.y - a.y) ** 2)) - -/proc/angle_between_points(datum/point/a, datum/point/b) - return ATAN2((b.y - a.y), (b.x - a.x)) - -/datum/point //A precise point on the map in absolute pixel locations based on world.icon_size. Pixels are FROM THE EDGE OF THE MAP! - var/x = 0 - var/y = 0 - var/z = 0 - -/datum/point/proc/valid() - return x && y && z - -/datum/point/proc/copy_to(datum/point/p = new) - p.x = x - p.y = y - p.z = z - return p - -/datum/point/New(_x, _y, _z, _pixel_x = 0, _pixel_y = 0) //first argument can also be a /datum/position or /atom. - if(istype(_x, /datum/position)) - var/datum/position/P = _x - _x = P.x - _y = P.y - _z = P.z - _pixel_x = P.pixel_x - _pixel_y = P.pixel_y - else if(istype(_x, /atom)) - var/atom/A = _x - _x = A.x - _y = A.y - _z = A.z - _pixel_x = A.pixel_x - _pixel_y = A.pixel_y - initialize_location(_x, _y, _z, _pixel_x, _pixel_y) - -/datum/point/proc/initialize_location(tile_x, tile_y, tile_z, p_x = 0, p_y = 0) - if(!isnull(tile_x)) - x = ((tile_x - 1) * world.icon_size) + world.icon_size / 2 + p_x - if(!isnull(tile_y)) - y = ((tile_y - 1) * world.icon_size) + world.icon_size / 2+ p_y - if(!isnull(tile_z)) - z = tile_z - -/datum/point/proc/return_turf() - return locate(CEILING(x / world.icon_size, 1), CEILING(y / world.icon_size, 1), z) - -/datum/point/proc/return_coordinates() //[turf_x, turf_y, z] - return list(CEILING(x / world.icon_size, 1), CEILING(y / world.icon_size, 1), z) - -/datum/point/proc/return_position() - return new /datum/position(src) - -/datum/point/proc/return_px() - return MODULUS(x, world.icon_size) - 16 - -/datum/point/proc/return_py() - return MODULUS(y, world.icon_size) - 16 - -/datum/point/proc/mapcheck() - . = FALSE - var/maxx = world.icon_size * world.maxx - var/maxy = world.icon_size * world.maxy - var/move_zx = 0 - var/move_zy = 0 - if(x < 0) - x += maxx - move_zx -= 1 - if(y < 0) - y += maxy - move_zy -= 1 - if(x > maxx) - x -= maxx - move_zx += 1 - if(y > maxy) - y -= maxy - move_zy += 1 - var/datum/space_level/S = GLOB.z_levels_list["[z]"] - if(move_zx != 0) - var/datum/space_level/L = S.neigbours["[move_zx < 0? WEST : EAST]"] - z = L.z_value - . = TRUE - if(move_zy != 0) - var/datum/space_level/L = S.neigbours["[move_zy < 0? SOUTH : NORTH]"] - z = L.z_value - . = TRUE - -/datum/point/vector - var/speed = 32 //pixels per iteration - var/iteration = 0 - var/angle = 0 - var/mpx = 0 //calculated x/y movement amounts to prevent having to do trig every step. - var/mpy = 0 - var/starting_x = 0 //just like before, pixels from EDGE of map! This is set in initialize_location(). - var/starting_y = 0 - var/starting_z = 0 - -/datum/point/vector/New(_x, _y, _z, _pixel_x = 0, _pixel_y = 0, _angle, _speed) - ..() - initialize_trajectory(_speed, _angle) - -/datum/point/vector/initialize_location(tile_x, tile_y, tile_z, p_x = 0, p_y = 0) - . = ..() - starting_x = x - starting_y = y - starting_z = z - -/datum/point/vector/copy_to(datum/point/vector/v = new) - ..(v) - v.speed = speed - v.iteration = iteration - v.angle = angle - v.mpx = mpx - v.mpy = mpy - v.starting_x = starting_x - v.starting_y = starting_y - v.starting_z = starting_z - return v - -/datum/point/vector/proc/initialize_trajectory(pixel_speed, new_angle) - if(!isnull(pixel_speed)) - speed = pixel_speed - set_angle(new_angle) - -/datum/point/vector/proc/set_angle(new_angle) //calculations use "byond angle" where north is 0 instead of 90, and south is 180 instead of 270. - if(isnull(angle)) - return - angle = new_angle - update_offsets() - -/datum/point/vector/proc/update_offsets() - mpx = sin(angle) * speed - mpy = cos(angle) * speed - -/datum/point/vector/proc/set_speed(new_speed) - if(isnull(new_speed) || speed == new_speed) - return - speed = new_speed - update_offsets() - -/datum/point/vector/proc/increment(multiplier = 1) - iteration++ - x += mpx * 1 - y += mpy * 1 - if(mapcheck()) - on_z_change() - -/datum/point/vector/proc/return_vector_after_increments(amount = 7, multiplier = 1, force_simulate = FALSE) - var/datum/point/vector/v = copy_to() - if(force_simulate) - for(var/i in 1 to amount) - v.increment(multiplier) - else - v.increment(multiplier * amount) - return v - -/datum/point/vector/proc/on_z_change() - return - -/datum/point/vector/processed //pixel_speed is per decisecond. - var/last_process = 0 - var/last_move = 0 - var/paused = FALSE - -/datum/point/vector/processed/Destroy() - STOP_PROCESSING(SSprojectiles, src) - -/datum/point/vector/processed/proc/start() - last_process = world.time - last_move = world.time - START_PROCESSING(SSprojectiles, src) - -/datum/point/vector/processed/process() - if(paused) - last_move += world.time - last_process - last_process = world.time - return - var/needed_time = world.time - last_move - last_process = world.time - last_move = world.time - increment(needed_time) +//Designed for things that need precision trajectories like projectiles. +//Don't use this for anything that you don't absolutely have to use this with (like projectiles!) because it isn't worth using a datum unless you need accuracy down to decimal places in pixels. + +#define RETURN_PRECISE_POSITION(A) new /datum/position(A) +#define RETURN_PRECISE_POINT(A) new /datum/point(A) + +/datum/position //For positions with map x/y/z and pixel x/y so you don't have to return lists. Could use addition/subtraction in the future I guess. + var/x = 0 + var/y = 0 + var/z = 0 + var/pixel_x = 0 + var/pixel_y = 0 + +/datum/position/proc/valid() + return x && y && z && !isnull(pixel_x) && !isnull(pixel_y) + +/datum/position/New(_x = 0, _y = 0, _z = 0, _pixel_x = 0, _pixel_y = 0) //first argument can also be a /datum/point. + if(istype(_x, /datum/point)) + var/datum/point/P = _x + var/turf/T = P.return_turf() + _x = T.x + _y = T.y + _z = T.z + _pixel_x = P.return_px() + _pixel_y = P.return_py() + else if(isatom(_x)) + var/atom/A = _x + _x = A.x + _y = A.y + _z = A.z + _pixel_x = A.pixel_x + _pixel_y = A.pixel_y + x = _x + y = _y + z = _z + pixel_x = _pixel_x + pixel_y = _pixel_y + +/datum/position/proc/return_turf() + return locate(x, y, z) + +/datum/position/proc/return_px() + return pixel_x + +/datum/position/proc/return_py() + return pixel_y + +/datum/position/proc/return_point() + return new /datum/point(src) + +/proc/point_midpoint_points(datum/point/a, datum/point/b) //Obviously will not support multiZ calculations! Same for the two below. + var/datum/point/P = new + P.x = round(a.x + (b.x - a.x) / 2, 1) + P.y = round(a.y + (b.y - a.y) / 2, 1) + P.z = a.z + return P + +/proc/pixel_length_between_points(datum/point/a, datum/point/b) + return sqrt(((b.x - a.x) ** 2) + ((b.y - a.y) ** 2)) + +/proc/angle_between_points(datum/point/a, datum/point/b) + return ATAN2((b.y - a.y), (b.x - a.x)) + +/datum/point //A precise point on the map in absolute pixel locations based on world.icon_size. Pixels are FROM THE EDGE OF THE MAP! + var/x = 0 + var/y = 0 + var/z = 0 + +/datum/point/proc/valid() + return x && y && z + +/datum/point/proc/copy_to(datum/point/p = new) + p.x = x + p.y = y + p.z = z + return p + +/datum/point/New(_x, _y, _z, _pixel_x = 0, _pixel_y = 0) //first argument can also be a /datum/position or /atom. + if(istype(_x, /datum/position)) + var/datum/position/P = _x + _x = P.x + _y = P.y + _z = P.z + _pixel_x = P.pixel_x + _pixel_y = P.pixel_y + else if(istype(_x, /atom)) + var/atom/A = _x + _x = A.x + _y = A.y + _z = A.z + _pixel_x = A.pixel_x + _pixel_y = A.pixel_y + initialize_location(_x, _y, _z, _pixel_x, _pixel_y) + +/datum/point/proc/initialize_location(tile_x, tile_y, tile_z, p_x = 0, p_y = 0) + if(!isnull(tile_x)) + x = ((tile_x - 1) * world.icon_size) + world.icon_size / 2 + p_x + if(!isnull(tile_y)) + y = ((tile_y - 1) * world.icon_size) + world.icon_size / 2+ p_y + if(!isnull(tile_z)) + z = tile_z + +/datum/point/proc/return_turf() + return locate(CEILING(x / world.icon_size, 1), CEILING(y / world.icon_size, 1), z) + +/datum/point/proc/return_coordinates() //[turf_x, turf_y, z] + return list(CEILING(x / world.icon_size, 1), CEILING(y / world.icon_size, 1), z) + +/datum/point/proc/return_position() + return new /datum/position(src) + +/datum/point/proc/return_px() + return MODULUS(x, world.icon_size) - 16 + +/datum/point/proc/return_py() + return MODULUS(y, world.icon_size) - 16 + +/datum/point/proc/mapcheck() + . = FALSE + var/maxx = world.icon_size * world.maxx + var/maxy = world.icon_size * world.maxy + var/move_zx = 0 + var/move_zy = 0 + if(x < 0) + x += maxx + move_zx -= 1 + if(y < 0) + y += maxy + move_zy -= 1 + if(x > maxx) + x -= maxx + move_zx += 1 + if(y > maxy) + y -= maxy + move_zy += 1 + var/datum/space_level/S = GLOB.z_levels_list["[z]"] + if(move_zx != 0) + var/datum/space_level/L = S.neigbours["[move_zx < 0? WEST : EAST]"] + z = L.z_value + . = TRUE + if(move_zy != 0) + var/datum/space_level/L = S.neigbours["[move_zy < 0? SOUTH : NORTH]"] + z = L.z_value + . = TRUE + +/datum/point/vector + var/speed = 32 //pixels per iteration + var/iteration = 0 + var/angle = 0 + var/mpx = 0 //calculated x/y movement amounts to prevent having to do trig every step. + var/mpy = 0 + var/starting_x = 0 //just like before, pixels from EDGE of map! This is set in initialize_location(). + var/starting_y = 0 + var/starting_z = 0 + +/datum/point/vector/New(_x, _y, _z, _pixel_x = 0, _pixel_y = 0, _angle, _speed) + ..() + initialize_trajectory(_speed, _angle) + +/datum/point/vector/initialize_location(tile_x, tile_y, tile_z, p_x = 0, p_y = 0) + . = ..() + starting_x = x + starting_y = y + starting_z = z + +/datum/point/vector/copy_to(datum/point/vector/v = new) + ..(v) + v.speed = speed + v.iteration = iteration + v.angle = angle + v.mpx = mpx + v.mpy = mpy + v.starting_x = starting_x + v.starting_y = starting_y + v.starting_z = starting_z + return v + +/datum/point/vector/proc/initialize_trajectory(pixel_speed, new_angle) + if(!isnull(pixel_speed)) + speed = pixel_speed + set_angle(new_angle) + +/datum/point/vector/proc/set_angle(new_angle) //calculations use "byond angle" where north is 0 instead of 90, and south is 180 instead of 270. + if(isnull(angle)) + return + angle = new_angle + update_offsets() + +/datum/point/vector/proc/update_offsets() + mpx = sin(angle) * speed + mpy = cos(angle) * speed + +/datum/point/vector/proc/set_speed(new_speed) + if(isnull(new_speed) || speed == new_speed) + return + speed = new_speed + update_offsets() + +/datum/point/vector/proc/increment(multiplier = 1) + iteration++ + x += mpx * 1 + y += mpy * 1 + if(mapcheck()) + on_z_change() + +/datum/point/vector/proc/return_vector_after_increments(amount = 7, multiplier = 1, force_simulate = FALSE) + var/datum/point/vector/v = copy_to() + if(force_simulate) + for(var/i in 1 to amount) + v.increment(multiplier) + else + v.increment(multiplier * amount) + return v + +/datum/point/vector/proc/on_z_change() + return + +/datum/point/vector/processed //pixel_speed is per decisecond. + var/last_process = 0 + var/last_move = 0 + var/paused = FALSE + +/datum/point/vector/processed/Destroy() + STOP_PROCESSING(SSprojectiles, src) + +/datum/point/vector/processed/proc/start() + last_process = world.time + last_move = world.time + START_PROCESSING(SSprojectiles, src) + +/datum/point/vector/processed/process() + if(paused) + last_move += world.time - last_process + last_process = world.time + return + var/needed_time = world.time - last_move + last_process = world.time + last_move = world.time + increment(needed_time) diff --git a/code/datums/saymode.dm b/code/datums/saymode.dm index 176c762e9c..e372d5c0b2 100644 --- a/code/datums/saymode.dm +++ b/code/datums/saymode.dm @@ -33,7 +33,7 @@ if(LINGHIVE_LING) var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling) var/msg = "[changeling.changelingID]: [message]" - log_talk(user,"[changeling.changelingID]/[user.key] : [message]",LOGSAY) + log_talk(src,"[changeling.changelingID]/[user.key] : [message]",LOGSAY) for(var/_M in GLOB.mob_list) var/mob/M = _M if(M in GLOB.dead_mob_list) @@ -110,25 +110,3 @@ AI.holopad_talk(message, language) return FALSE return TRUE - -/datum/saymode/monkey - key = "k" - mode = MODE_MONKEY - -/datum/saymode/monkey/handle_message(mob/living/user, message, datum/language/language) - var/datum/mind = user.mind - if(!mind) - return TRUE - if(is_monkey_leader(mind) || (ismonkey(user) && is_monkey(mind))) - log_talk(user, "(MONKEY) [user]/[user.key]: [message]",LOGSAY) - if(prob(75) && ismonkey(user)) - user.visible_message("\The [user] chimpers.") - var/msg = "\[[is_monkey_leader(mind) ? "Monkey Leader" : "Monkey"]\] [user]: [message]" - for(var/_M in GLOB.mob_list) - var/mob/M = _M - if(M in GLOB.dead_mob_list) - var/link = FOLLOW_LINK(M, user) - to_chat(M, "[link] [msg]") - if((is_monkey_leader(M.mind) || ismonkey(M)) && (M.mind in SSticker.mode.ape_infectees)) - to_chat(M, msg) - return FALSE diff --git a/code/game/alternate_appearance.dm b/code/game/alternate_appearance.dm index 712b3425e0..901a8610a6 100644 --- a/code/game/alternate_appearance.dm +++ b/code/game/alternate_appearance.dm @@ -78,7 +78,6 @@ GLOBAL_LIST_EMPTY(active_alternate_appearances) QDEL_NULL(ghost_appearance) /datum/atom_hud/alternate_appearance/basic/add_to_hud(atom/A) - LAZYINITLIST(A.hud_list) A.hud_list[appearance_key] = theImage . = ..() diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 08568660fd..ddb768488a 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -132,12 +132,44 @@ if (orbiting) orbiting.Check() + if(flags_1 & CLEAN_ON_MOVE_1) + clean_on_move() + var/datum/proximity_monitor/proximity_monitor = src.proximity_monitor if(proximity_monitor) proximity_monitor.HandleMove() return 1 +/atom/movable/proc/clean_on_move() + var/turf/tile = loc + if(isturf(tile)) + tile.clean_blood() + for(var/A in tile) + if(is_cleanable(A)) + qdel(A) + else if(istype(A, /obj/item)) + var/obj/item/cleaned_item = A + cleaned_item.clean_blood() + else if(ishuman(A)) + var/mob/living/carbon/human/cleaned_human = A + if(cleaned_human.lying) + if(cleaned_human.head) + cleaned_human.head.clean_blood() + cleaned_human.update_inv_head() + if(cleaned_human.wear_suit) + cleaned_human.wear_suit.clean_blood() + cleaned_human.update_inv_wear_suit() + else if(cleaned_human.w_uniform) + cleaned_human.w_uniform.clean_blood() + cleaned_human.update_inv_w_uniform() + if(cleaned_human.shoes) + cleaned_human.shoes.clean_blood() + cleaned_human.update_inv_shoes() + cleaned_human.clean_blood() + cleaned_human.wash_cream() + to_chat(cleaned_human, "[src] cleans your face!") + /atom/movable/Destroy(force) var/inform_admins = (flags_2 & INFORM_ADMINS_ON_RELOCATE_2) var/stationloving = (flags_2 & STATIONLOVING_2) diff --git a/code/game/gamemodes/changeling/powers/tiny_prick.dm b/code/game/gamemodes/changeling/powers/tiny_prick.dm index e3f486a2f1..807d268cc9 100644 --- a/code/game/gamemodes/changeling/powers/tiny_prick.dm +++ b/code/game/gamemodes/changeling/powers/tiny_prick.dm @@ -90,7 +90,7 @@ /obj/effect/proc_holder/changeling/sting/transformation/can_sting(mob/user, mob/living/carbon/target) if(!..()) return - if((target.has_disability(HUSK)) || !iscarbon(target) || (NOTRANSSTING in target.dna.species.species_traits)) + if((target.has_disability(DISABILITY_HUSK)) || !iscarbon(target) || (NOTRANSSTING in target.dna.species.species_traits)) to_chat(user, "Our sting appears ineffective against its DNA.") return 0 return 1 @@ -131,7 +131,7 @@ return if(isliving(target)) var/mob/living/L = target - if((L.has_disability(HUSK)) || !L.has_dna()) + if((L.has_disability(DISABILITY_HUSK)) || !L.has_dna()) to_chat(user, "Our sting appears ineffective against its DNA.") return 0 return 1 @@ -209,7 +209,7 @@ /obj/effect/proc_holder/changeling/sting/blind/sting_action(mob/user, mob/living/carbon/target) add_logs(user, target, "stung", "blind sting") to_chat(target, "Your eyes burn horrifically!") - target.become_nearsighted(EYE_DAMAGE) + target.become_nearsighted() target.blind_eyes(20) target.blur_eyes(40) return TRUE diff --git a/code/game/gamemodes/clock_cult/clock_items/construct_chassis.dm b/code/game/gamemodes/clock_cult/clock_items/construct_chassis.dm index df9fa45b89..1b2b867aa5 100644 --- a/code/game/gamemodes/clock_cult/clock_items/construct_chassis.dm +++ b/code/game/gamemodes/clock_cult/clock_items/construct_chassis.dm @@ -83,7 +83,6 @@ construct_type = /mob/living/simple_animal/drone/cogscarab w_class = WEIGHT_CLASS_SMALL var/infinite_resources = TRUE - var/static/obj/item/seasonal_hat //Share it with all other scarabs, since we're from the same cult! /obj/item/clockwork/construct_chassis/cogscarab/Initialize() . = ..() @@ -94,12 +93,6 @@ if(infinite_resources) //During rounds where they can't interact with the station, let them experiment with builds construct_type = /mob/living/simple_animal/drone/cogscarab/ratvar - if(!seasonal_hat) - var/obj/item/drone_shell/D = locate() in GLOB.poi_list - if(D && D.possible_seasonal_hats.len) - seasonal_hat = pick(D.possible_seasonal_hats) - else - seasonal_hat = "none" /obj/item/clockwork/construct_chassis/cogscarab/post_spawn(mob/living/construct) if(infinite_resources) //Allow them to build stuff and recite scripture @@ -108,6 +101,3 @@ F.uses_power = FALSE for(var/obj/item/clockwork/slab/S in cached_stuff) S.no_cost = TRUE - if(seasonal_hat && seasonal_hat != "none") - var/obj/item/hat = new seasonal_hat(construct) - construct.equip_to_slot_or_del(hat, slot_head) diff --git a/code/game/gamemodes/clock_cult/clock_items/wraith_spectacles.dm b/code/game/gamemodes/clock_cult/clock_items/wraith_spectacles.dm index b579326fcc..c414ac2cce 100644 --- a/code/game/gamemodes/clock_cult/clock_items/wraith_spectacles.dm +++ b/code/game/gamemodes/clock_cult/clock_items/wraith_spectacles.dm @@ -32,7 +32,7 @@ if(ishuman(loc)) var/mob/living/carbon/human/H = loc if(src == H.glasses && !up) - if(H.has_disability(BLIND)) + if(H.has_disability(DISABILITY_BLIND)) to_chat(H, "\"You're blind, idiot. Stop embarrassing yourself.\"") return if(blind_cultist(H)) @@ -51,7 +51,7 @@ to_chat(victim, "\"It looks like Nar-Sie's dogs really don't value their eyes.\"") to_chat(victim, "Your eyes explode with horrific pain!") victim.emote("scream") - victim.become_blind(EYE_DAMAGE) + victim.become_blind() victim.adjust_blurriness(30) victim.adjust_blindness(30) return TRUE @@ -76,7 +76,7 @@ ..() if(slot != slot_glasses || up) return - if(user.has_disability(BLIND)) + if(user.has_disability(DISABILITY_BLIND)) to_chat(user, "\"You're blind, idiot. Stop embarrassing yourself.\"" ) return if(blind_cultist(user)) //Cultists instantly go blind @@ -115,11 +115,11 @@ var/obj/item/clothing/glasses/wraith_spectacles/WS = L.glasses desc = "[glasses_right && !WS.up ? "":""]You are [glasses_right ? "":"not "]wearing wraith spectacles[glasses_right && !WS.up ? "!":"."]
\ You have taken [W.eye_damage_done] eye damage from them.
" - if(L.has_disability(NEARSIGHT)) + if(L.has_disability(DISABILITY_NEARSIGHT)) desc += "You are nearsighted!
" else if(glasses_right && !WS.up) desc += "You will become nearsighted at [W.nearsight_breakpoint] eye damage.
" - if(L.has_disability(BLIND)) + if(L.has_disability(DISABILITY_BLIND)) desc += "You are blind!" else if(glasses_right && !WS.up) desc += "You will become blind at [W.blind_breakpoint] eye damage." @@ -142,8 +142,8 @@ apply_eye_damage(H) else if(GLOB.ratvar_awakens) - H.cure_nearsighted(list(EYE_DAMAGE)) - H.cure_blind(list(EYE_DAMAGE)) + H.cure_nearsighted() + H.cure_blind() H.adjust_eye_damage(-eye_damage_done) eye_damage_done = 0 else if(prob(50) && eye_damage_done) @@ -153,20 +153,18 @@ qdel(src) /datum/status_effect/wraith_spectacles/proc/apply_eye_damage(mob/living/carbon/human/H) - if(H.has_disability(BLIND)) + if(H.has_disability(DISABILITY_BLIND)) return H.adjust_eye_damage(0.5) eye_damage_done += 0.5 if(eye_damage_done >= 20) H.adjust_blurriness(2) if(eye_damage_done >= nearsight_breakpoint) - if(!H.has_disability(NEARSIGHT)) + if(!H.has_disability(DISABILITY_NEARSIGHT)) to_chat(H, "Your vision doubles, then trembles. Darkness begins to close in. You can't keep this up!") H.become_nearsighted(EYE_DAMAGE) if(eye_damage_done >= blind_breakpoint) - if(!H.has_disability(BLIND)) + if(!H.has_disability(DISABILITY_BLIND)) to_chat(H, "A piercing white light floods your vision. Suddenly, all goes dark!") - H.become_blind(EYE_DAMAGE) - if(prob(min(20, 5 + eye_damage_done))) to_chat(H, "Your eyes continue to burn.") diff --git a/code/game/gamemodes/clock_cult/clock_mobs/_eminence.dm b/code/game/gamemodes/clock_cult/clock_mobs/_eminence.dm index 926a9f1ad5..8416e4651d 100644 --- a/code/game/gamemodes/clock_cult/clock_mobs/_eminence.dm +++ b/code/game/gamemodes/clock_cult/clock_mobs/_eminence.dm @@ -1,7 +1,3 @@ -//Helper proc to get an Eminence mob if it exists -/proc/get_eminence() - return locate(/mob/camera/eminence) in servants_and_ghosts() - //The Eminence is a unique mob that functions like the leader of the cult. It's incorporeal but can interact with the world in several ways. /mob/camera/eminence name = "\the Emininence" @@ -16,7 +12,6 @@ layer = FLY_LAYER faction = list("ratvar") lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE - var/turf/last_failed_turf var/static/superheated_walls = 0 /mob/camera/eminence/CanPass(atom/movable/mover, turf/target) @@ -25,37 +20,25 @@ /mob/camera/eminence/Move(NewLoc, direct) var/OldLoc = loc if(NewLoc && !istype(NewLoc, /turf/open/indestructible/reebe_void)) - var/turf/T = get_turf(NewLoc) - if(T.flags_1 & NOJAUNT_1) - if(last_failed_turf != T) - T.visible_message("[T] suddenly emits a ringing sound!", ignore_mob = src) - playsound(T, 'sound/machines/clockcult/ark_damage.ogg', 75, FALSE) - last_failed_turf = T - to_chat(src, "This turf is consecrated and can't be crossed!") - return - if(!GLOB.ratvar_awakens && istype(get_area(T), /area/chapel)) - to_chat(src, "The Chapel is hallowed ground under a heretical deity, and can't be accessed!") - return - forceMove(T) + forceMove(get_turf(NewLoc)) Moved(OldLoc, direct) if(GLOB.ratvar_awakens) for(var/turf/T in range(5, src)) if(prob(166 - (get_dist(src, T) * 33))) T.ratvar_act() //Causes moving to leave a swath of proselytized area behind the Eminence -/mob/camera/eminence/Process_Spacemove(movement_dir = 0) - return TRUE - /mob/camera/eminence/Login() ..() var/datum/antagonist/clockcult/C = mind.has_antag_datum(/datum/antagonist/clockcult,TRUE) - if(C && C.clock_team) - if(C.clock_team.eminence && C.clock_team.eminence != src) - remove_servant_of_ratvar(src,TRUE) - qdel(src) - return - else - C.clock_team.eminence = src + if(!C) + add_servant_of_ratvar(src, TRUE) + C = mind.has_antag_datum(/datum/antagonist/clockcult,TRUE) + if(C && C.clock_team) + if(C.clock_team.eminence) + remove_servant_of_ratvar(src,TRUE) + qdel(src) + else + C.clock_team.eminence = src to_chat(src, "You have been selected as the Eminence!") to_chat(src, "As the Eminence, you lead the servants. Anything you say will be heard by the entire cult.") to_chat(src, "Though you can move through walls, you're also incorporeal, and largely can't interact with the world except for a few ways.") @@ -70,12 +53,6 @@ E.Grant(src) /mob/camera/eminence/say(message) - if(client) - if(client.prefs.muted & MUTE_IC) - to_chat(src, "You cannot send IC messages (muted).") - return - if(client.handle_spam_prevention(message,MUTE_IC)) - return message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) if(!message) return @@ -83,13 +60,7 @@ if(GLOB.ratvar_awakens) visible_message("You feel light slam into your mind and form words: \"[capitalize(message)]\"") playsound(src, 'sound/machines/clockcult/ark_scream.ogg', 50, FALSE) - message = "The [GLOB.ratvar_awakens ? "Radiance" : "Eminence"]: \"[message]\"" - for(var/mob/M in servants_and_ghosts()) - if(isobserver(M)) - var/link = FOLLOW_LINK(M, src) - to_chat(M, "[link] [message]") - else - to_chat(M, message) + hierophant_message("The Eminence: \"[message]\"") /mob/camera/eminence/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode) if(z == ZLEVEL_CITYOFCOGS || is_servant_of_ratvar(speaker) || GLOB.ratvar_approaches || GLOB.ratvar_awakens) //Away from Reebe, the Eminence can't hear anything diff --git a/code/game/gamemodes/clock_cult/clock_structures/ark_of_the_clockwork_justicar.dm b/code/game/gamemodes/clock_cult/clock_structures/ark_of_the_clockwork_justicar.dm index 21d1159541..63fea1eeb6 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/ark_of_the_clockwork_justicar.dm +++ b/code/game/gamemodes/clock_cult/clock_structures/ark_of_the_clockwork_justicar.dm @@ -113,7 +113,7 @@ /obj/structure/destructible/clockwork/massive/celestial_gateway/proc/mass_recall() for(var/V in SSticker.mode.servants_of_ratvar) var/datum/mind/M = V - if(M.current.stat != DEAD) + if(!M.current.stat) M.current.forceMove(get_turf(src)) M.current.overlay_fullscreen("flash", /obj/screen/fullscreen/flash) M.current.clear_fullscreen("flash", 5) diff --git a/code/game/gamemodes/clock_cult/clock_structures/eminence_spire.dm b/code/game/gamemodes/clock_cult/clock_structures/eminence_spire.dm index 2edaba3b23..495bfaeaa8 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/eminence_spire.dm +++ b/code/game/gamemodes/clock_cult/clock_structures/eminence_spire.dm @@ -38,6 +38,7 @@ /obj/structure/destructible/clockwork/eminence_spire/attack_ghost(mob/user) if(!IsAdminGhost(user)) return + var/datum/antagonist/clockcult/random_cultist = locate() in GLOB.antagonists //if theres no cultists new team without eminence will be created anyway. if(random_cultist && random_cultist.clock_team && random_cultist.clock_team.eminence) to_chat(user, "There's already an Eminence - too late!") diff --git a/code/game/gamemodes/clock_cult/clock_structures/ocular_warden.dm b/code/game/gamemodes/clock_cult/clock_structures/ocular_warden.dm index 76e942037c..7e538765f3 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/ocular_warden.dm +++ b/code/game/gamemodes/clock_cult/clock_structures/ocular_warden.dm @@ -110,7 +110,7 @@ if(!(BI.resistance_flags & ON_FIRE)) BI.fire_act() continue - if(is_servant_of_ratvar(L) || (L.has_disability(BLIND)) || L.null_rod_check()) + if(is_servant_of_ratvar(L) || (L.has_disability(DISABILITY_BLIND)) || L.null_rod_check()) continue if(L.stat || L.restrained() || L.buckled || L.lying) continue diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 98faeae184..ce769737dc 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -115,7 +115,7 @@ structure_check() searches for nearby cultist structures required for the invoca continue if(ishuman(L)) var/mob/living/carbon/human/H = L - if((H.has_disability(MUTE)) || H.silent) + if((H.has_disability(DISABILITY_MUTE)) || H.silent) continue if(L.stat) continue diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 9e2e889047..1c17893a28 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -304,7 +304,7 @@ GLOBAL_LIST_INIT(blacklisted_malf_machines, typecacheof(list( sleep(30) if(!owner || QDELETED(owner)) return - priority_announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", 'sound/ai/aimalf.ogg') + priority_announce("Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.", "Anomaly Alert", 'sound/AI/aimalf.ogg') set_security_level("delta") var/obj/machinery/doomsday_device/DOOM = new(owner_AI) owner_AI.nuking = TRUE diff --git a/code/game/gamemodes/miniantags/monkey/monkey.dm b/code/game/gamemodes/miniantags/monkey/monkey.dm index 682552e2d1..7e6d92d927 100644 --- a/code/game/gamemodes/miniantags/monkey/monkey.dm +++ b/code/game/gamemodes/miniantags/monkey/monkey.dm @@ -22,7 +22,7 @@ var/players_per_carrier = 30 - var/datum/objective_team/monkey/monkey_team + var/datum/team/monkey/monkey_team diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index ef307c95a0..46f96961c9 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -524,7 +524,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) var/list/otherwise = M.GetAllContents() for(var/obj/item/disk/tech_disk/TD in otherwise) TD.stored_research.copy_research_to(checking) - return checking.researched_nodes.len >= target_amount + return checking.researched_nodes.len >= target /datum/objective/capture diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index 02ce509970..e59bb1692e 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -311,9 +311,6 @@ else if(isspaceturf(T)) to_chat(user, "[prob(1) ? "Servant cannot into space." : "You can't teleport into space."]") return - else if(T.flags_1 & NOJAUNT_1) - to_chat(user, "This tile is blessed by holy water and deflects the warp.") - return var/area/AR = get_area(T) if(!AR.clockwork_warp_allowed) to_chat(user, "[AR.clockwork_warp_fail]") diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index c4a4d118b3..944d8d5213 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -449,7 +449,7 @@ scantemp = "Subject's brain is not responding to scanning stimuli." playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0) return - if((mob_occupant.has_disability(NOCLONE)) && (src.scanner.scan_level < 2)) + if((mob_occupant.has_disability(DISABILITY_NOCLONE)) && (src.scanner.scan_level < 2)) scantemp = "Subject no longer contains the fundamental materials required to create a living clone." playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0) return diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 67f79f4c52..37225cbf19 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -81,7 +81,7 @@ if(connected && connected.is_operational()) if(connected.occupant) //set occupant_status message viable_occupant = connected.occupant - if(viable_occupant.has_dna() && (!(RADIMMUNE in viable_occupant.dna.species.species_traits)) && (!(viable_occupant.has_disability(NOCLONE)) || (connected.scan_level == 3))) //occupant is viable for dna modification + if(viable_occupant.has_dna() && (!(RADIMMUNE in viable_occupant.dna.species.species_traits)) && (!(viable_occupant.has_disability(DISABILITY_NOCLONE)) || (connected.scan_level == 3))) //occupant is viable for dna modification occupant_status += "[viable_occupant.name] => " switch(viable_occupant.stat) if(CONSCIOUS) @@ -528,7 +528,7 @@ var/mob/living/carbon/viable_occupant = null if(connected) viable_occupant = connected.occupant - if(!istype(viable_occupant) || !viable_occupant.dna || (viable_occupant.has_disability(NOCLONE))) + if(!istype(viable_occupant) || !viable_occupant.dna || (viable_occupant.has_disability(DISABILITY_NOCLONE))) viable_occupant = null return viable_occupant diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index 29df5e4949..343dd69cb2 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -100,7 +100,7 @@ var/mob/living/mob_occupant = get_mob_or_brainmob(occupant) if(istype(mob_occupant)) if(locate_computer(/obj/machinery/computer/cloning)) - if(!mob_occupant.suiciding && !(mob_occupant.has_disability(NOCLONE)) && !mob_occupant.hellbound) + if(!mob_occupant.suiciding && !(mob_occupant.has_disability(DISABILITY_NOCLONE)) && !mob_occupant.hellbound) mob_occupant.notify_ghost_cloning("Your corpse has been placed into a cloning scanner. Re-enter your corpse if you want to be cloned!", source = src) // DNA manipulators cannot operate on severed heads or brains diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 3d659f104b..53426c83b0 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -251,13 +251,16 @@ note = null update_icon() +/obj/machinery/door/airlock/proc/unzap() //for addtimer + justzap = FALSE + /obj/machinery/door/airlock/bumpopen(mob/living/user) //Airlocks now zap you when you 'bump' them open when they're electrified. --NeoFite if(!issilicon(usr)) if(isElectrified()) if(!justzap) if(shock(user, 100)) justzap = TRUE - addtimer(VARSET_CALLBACK(src, justzap, FALSE) , 10) + addtimer(CALLBACK(src, .proc/unzap), 10) return else return @@ -677,7 +680,7 @@ if(ishuman(user) && prob(40) && src.density) var/mob/living/carbon/human/H = user - if((H.disabilities & DUMB) && Adjacent(user)) + if((H.has_disability(DISABILITY_DUMB)) && Adjacent(user)) playsound(src.loc, 'sound/effects/bang.ogg', 25, 1) if(!istype(H.head, /obj/item/clothing/head/helmet)) H.visible_message("[user] headbutts the airlock.", \ diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index c7a21bf31b..30ae436289 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -195,7 +195,7 @@ /obj/machinery/door/emp_act(severity) if(prob(20/severity) && (istype(src, /obj/machinery/door/airlock) || istype(src, /obj/machinery/door/window)) ) INVOKE_ASYNC(src, .proc/open) - if(prob(severity*10 - 20)) + if(prob(40/severity)) if(secondsElectrified == 0) secondsElectrified = -1 shockedby += "\[[time_stamp()]\]EM Pulse" diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 541c931593..ee9b1ff31a 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -22,7 +22,6 @@ GLOBAL_LIST_EMPTY(allCasters) var/creationTime var/authorCensor var/bodyCensor - var/photo_file /datum/newscaster/feed_message/proc/returnAuthor(censor) if(censor == -1) @@ -98,7 +97,6 @@ GLOBAL_LIST_EMPTY(allCasters) var/scannedUser var/isAdminMsg var/icon/img - var/photo_file /datum/newscaster/feed_network var/list/datum/newscaster/feed_channel/network_channels = list() @@ -128,7 +126,6 @@ GLOBAL_LIST_EMPTY(allCasters) if(photo) newMsg.img = photo.img newMsg.caption = photo.scribble - newMsg.photo_file = save_photo(photo.img) for(var/datum/newscaster/feed_channel/FC in network_channels) if(FC.channel_name == channel_name) FC.messages += newMsg @@ -146,7 +143,6 @@ GLOBAL_LIST_EMPTY(allCasters) wanted_issue.isAdminMsg = adminMsg if(photo) wanted_issue.img = photo.img - wanted_issue.photo_file = save_photo(photo.img) if(newMessage) for(var/obj/machinery/newscaster/N in GLOB.allCasters) N.newsAlert() @@ -161,12 +157,7 @@ GLOBAL_LIST_EMPTY(allCasters) for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters) NEWSCASTER.update_icon() -/datum/newscaster/feed_network/proc/save_photo(icon/photo) - var/photo_file = copytext(md5("\icon[photo]"), 1, 6) - if(!fexists("[GLOB.log_directory]/photos/[photo_file].png")) - var/icon/p = icon(photo, frame = 1) - fcopy(p, "[GLOB.log_directory]/photos/[photo_file].png") - return photo_file + /obj/item/wallframe/newscaster name = "newscaster frame" diff --git a/code/game/objects/effects/landmarks.dm b/code/game/objects/effects/landmarks.dm index 2708e78535..caeb1f168c 100644 --- a/code/game/objects/effects/landmarks.dm +++ b/code/game/objects/effects/landmarks.dm @@ -16,7 +16,7 @@ /obj/effect/landmark/start name = "start" - icon = 'icons/mob/landmarks.dmi' + icon = 'icons/mob/screen_gen.dmi' icon_state = "x" anchored = TRUE var/jobspawn_override = FALSE @@ -40,9 +40,9 @@ // START LANDMARKS FOLLOW. Don't change the names unless // you are refactoring shitty landmark code. + /obj/effect/landmark/start/assistant name = "Assistant" - icon_state = "Assistant" /obj/effect/landmark/start/assistant/override jobspawn_override = TRUE @@ -50,135 +50,102 @@ /obj/effect/landmark/start/janitor name = "Janitor" - icon_state = "Janitor" /obj/effect/landmark/start/cargo_technician name = "Cargo Technician" - icon_state = "Cargo Technician" /obj/effect/landmark/start/bartender name = "Bartender" - icon_state = "Bartender" /obj/effect/landmark/start/clown name = "Clown" - icon_state = "Clown" /obj/effect/landmark/start/mime name = "Mime" - icon_state = "Mime" /obj/effect/landmark/start/quartermaster name = "Quartermaster" - icon_state = "Quartermaster" /obj/effect/landmark/start/atmospheric_technician name = "Atmospheric Technician" - icon_state = "Atmospheric Technician" /obj/effect/landmark/start/cook name = "Cook" - icon_state = "Cook" /obj/effect/landmark/start/shaft_miner name = "Shaft Miner" - icon_state = "Shaft Miner" /obj/effect/landmark/start/security_officer name = "Security Officer" - icon_state = "Security Officer" /obj/effect/landmark/start/botanist name = "Botanist" - icon_state = "Botanist" /obj/effect/landmark/start/head_of_security name = "Head of Security" - icon_state = "Head of Security" - -/obj/effect/landmark/start/captain - name = "Captain" - icon_state = "Captain" - -/obj/effect/landmark/start/detective - name = "Detective" - icon_state = "Detective" - -/obj/effect/landmark/start/warden - name = "Warden" - icon_state = "Warden" - -/obj/effect/landmark/start/chief_engineer - name = "Chief Engineer" - icon_state = "Chief Engineer" - -/obj/effect/landmark/start/head_of_personnel - name = "Head of Personnel" - icon_state = "Head of Personnel" - -/obj/effect/landmark/start/librarian - name = "Curator" - icon_state = "Curator" - -/obj/effect/landmark/start/lawyer - name = "Lawyer" - icon_state = "Lawyer" - -/obj/effect/landmark/start/station_engineer - name = "Station Engineer" - icon_state = "Station Engineer" - -/obj/effect/landmark/start/medical_doctor - name = "Medical Doctor" - icon_state = "Medical Doctor" - -/obj/effect/landmark/start/scientist - name = "Scientist" - icon_state = "Scientist" - -/obj/effect/landmark/start/chemist - name = "Chemist" - icon_state = "Chemist" - -/obj/effect/landmark/start/roboticist - name = "Roboticist" - icon_state = "Roboticist" - -/obj/effect/landmark/start/research_director - name = "Research Director" - icon_state = "Research Director" - -/obj/effect/landmark/start/geneticist - name = "Geneticist" - icon_state = "Geneticist" - -/obj/effect/landmark/start/chief_medical_officer - name = "Chief Medical Officer" - icon_state = "Chief Medical Officer" - -/obj/effect/landmark/start/virologist - name = "Virologist" - icon_state = "Virologist" - -/obj/effect/landmark/start/chaplain - name = "Chaplain" - icon_state = "Chaplain" - -/obj/effect/landmark/start/cyborg - name = "Cyborg" - icon_state = "Cyborg" /obj/effect/landmark/start/ai name = "AI" - icon_state = "AI" delete_after_roundstart = FALSE +/obj/effect/landmark/start/captain + name = "Captain" + +/obj/effect/landmark/start/detective + name = "Detective" + +/obj/effect/landmark/start/warden + name = "Warden" + +/obj/effect/landmark/start/chief_engineer + name = "Chief Engineer" + +/obj/effect/landmark/start/cyborg + name = "Cyborg" + +/obj/effect/landmark/start/head_of_personnel + name = "Head of Personnel" + +/obj/effect/landmark/start/librarian + name = "Curator" + +/obj/effect/landmark/start/lawyer + name = "Lawyer" + +/obj/effect/landmark/start/station_engineer + name = "Station Engineer" + +/obj/effect/landmark/start/medical_doctor + name = "Medical Doctor" + +/obj/effect/landmark/start/scientist + name = "Scientist" + +/obj/effect/landmark/start/chemist + name = "Chemist" + +/obj/effect/landmark/start/roboticist + name = "Roboticist" + +/obj/effect/landmark/start/research_director + name = "Research Director" + +/obj/effect/landmark/start/geneticist + name = "Geneticist" + +/obj/effect/landmark/start/chief_medical_officer + name = "Chief Medical Officer" + +/obj/effect/landmark/start/virologist + name = "Virologist" + +/obj/effect/landmark/start/chaplain + name = "Chaplain" //Department Security spawns /obj/effect/landmark/start/depsec name = "department_sec" - icon_state = "Security Officer" /obj/effect/landmark/start/depsec/New() ..() diff --git a/code/game/objects/effects/temporary_visuals/projectile_beam.dm b/code/game/objects/effects/temporary_visuals/projectile_beam.dm index 8918dc8e27..af621e29da 100644 --- a/code/game/objects/effects/temporary_visuals/projectile_beam.dm +++ b/code/game/objects/effects/temporary_visuals/projectile_beam.dm @@ -1,70 +1,70 @@ -/proc/generate_projectile_beam_between_points(datum/point/starting, datum/point/ending, beam_type, color, qdel_in = 5) //Do not pass z-crossing points as that will not be properly (and likely will never be properly until it's absolutely needed) supported! - if(!istype(starting) || !istype(ending) || !ispath(beam_type)) - return - var/datum/point/midpoint = point_midpoint_points(starting, ending) - var/obj/effect/projectile_beam/PB = new beam_type - PB.apply_vars(angle_between_points(starting, ending), midpoint.return_px(), midpoint.return_py(), color, pixel_length_between_points(starting, ending) / world.icon_size, midpoint.return_turf(), 0) - . = PB - if(qdel_in) - QDEL_IN(PB, qdel_in) - -/obj/effect/projectile_beam - icon = 'icons/obj/projectiles.dmi' - layer = ABOVE_MOB_LAYER - anchored = TRUE - light_power = 1 - light_range = 2 - light_color = "#00ffff" - mouse_opacity = MOUSE_OPACITY_TRANSPARENT - flags_1 = ABSTRACT_1 - appearance_flags = 0 - -/obj/effect/projectile_beam/singularity_pull() - return - -/obj/effect/projectile_beam/singularity_act() - return - -/obj/effect/projectile_beam/proc/scale_to(nx,ny,override=TRUE) - var/matrix/M - if(!override) - M = transform - else - M = new - M.Scale(nx,ny) - transform = M - -/obj/effect/projectile_beam/proc/turn_to(angle,override=TRUE) - var/matrix/M - if(!override) - M = transform - else - M = new - M.Turn(angle) - transform = M - -/obj/effect/projectile_beam/New(angle_override, p_x, p_y, color_override, scaling = 1) - if(angle_override && p_x && p_y && color_override && scaling) - apply_vars(angle_override, p_x, p_y, color_override, scaling) - return ..() - -/obj/effect/projectile_beam/proc/apply_vars(angle_override, p_x = 0, p_y = 0, color_override, scaling = 1, new_loc, increment = 0) - var/mutable_appearance/look = new(src) - look.pixel_x = p_x - look.pixel_y = p_y - if(color_override) - look.color = color_override - appearance = look - scale_to(1,scaling, FALSE) - turn_to(angle_override, FALSE) - if(!isnull(new_loc)) //If you want to null it just delete it... - forceMove(new_loc) - for(var/i in 1 to increment) - pixel_x += round((sin(angle_override)+16*sin(angle_override)*2), 1) - pixel_y += round((cos(angle_override)+16*cos(angle_override)*2), 1) - -/obj/effect/projectile_beam/tracer - icon_state = "tracer_beam" - -/obj/effect/projectile_beam/tracer/aiming - icon_state = "gbeam" +/proc/generate_projectile_beam_between_points(datum/point/starting, datum/point/ending, beam_type, color, qdel_in = 5) //Do not pass z-crossing points as that will not be properly (and likely will never be properly until it's absolutely needed) supported! + if(!istype(starting) || !istype(ending) || !ispath(beam_type)) + return + var/datum/point/midpoint = point_midpoint_points(starting, ending) + var/obj/effect/projectile_beam/PB = new beam_type + PB.apply_vars(angle_between_points(starting, ending), midpoint.return_px(), midpoint.return_py(), color, pixel_length_between_points(starting, ending) / world.icon_size, midpoint.return_turf(), 0) + . = PB + if(qdel_in) + QDEL_IN(PB, qdel_in) + +/obj/effect/projectile_beam + icon = 'icons/obj/projectiles.dmi' + layer = ABOVE_MOB_LAYER + anchored = TRUE + light_power = 1 + light_range = 2 + light_color = "#00ffff" + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + flags_1 = ABSTRACT_1 + appearance_flags = 0 + +/obj/effect/projectile_beam/singularity_pull() + return + +/obj/effect/projectile_beam/singularity_act() + return + +/obj/effect/projectile_beam/proc/scale_to(nx,ny,override=TRUE) + var/matrix/M + if(!override) + M = transform + else + M = new + M.Scale(nx,ny) + transform = M + +/obj/effect/projectile_beam/proc/turn_to(angle,override=TRUE) + var/matrix/M + if(!override) + M = transform + else + M = new + M.Turn(angle) + transform = M + +/obj/effect/projectile_beam/New(angle_override, p_x, p_y, color_override, scaling = 1) + if(angle_override && p_x && p_y && color_override && scaling) + apply_vars(angle_override, p_x, p_y, color_override, scaling) + return ..() + +/obj/effect/projectile_beam/proc/apply_vars(angle_override, p_x = 0, p_y = 0, color_override, scaling = 1, new_loc, increment = 0) + var/mutable_appearance/look = new(src) + look.pixel_x = p_x + look.pixel_y = p_y + if(color_override) + look.color = color_override + appearance = look + scale_to(1,scaling, FALSE) + turn_to(angle_override, FALSE) + if(!isnull(new_loc)) //If you want to null it just delete it... + forceMove(new_loc) + for(var/i in 1 to increment) + pixel_x += round((sin(angle_override)+16*sin(angle_override)*2), 1) + pixel_y += round((cos(angle_override)+16*cos(angle_override)*2), 1) + +/obj/effect/projectile_beam/tracer + icon_state = "tracer_beam" + +/obj/effect/projectile_beam/tracer/aiming + icon_state = "gbeam" diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 1cca673778..e03d8c1a7e 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -539,7 +539,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) M.adjust_blurriness(15) if(M.stat != DEAD) to_chat(M, "Your eyes start to bleed profusely!") - if(!(M.has_disability(BLIND) || M.has_disability(NEARSIGHT))) + if(!(M.has_disability(DISABILITY_BLIND) || M.has_disability(DISABILITY_NEARSIGHT))) to_chat(M, "You become nearsighted!") M.become_nearsighted(EYE_DAMAGE) if(prob(50)) @@ -550,8 +550,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) M.Unconscious(20) M.Knockdown(40) if (prob(eyes.eye_damage - 10 + 1)) - M.become_blind(EYE_DAMAGE) - to_chat(M, "You go blind!") + if(M.become_blind()) + to_chat(M, "You go blind!") /obj/item/clean_blood() . = ..() diff --git a/code/game/objects/items/cosmetics.dm b/code/game/objects/items/cosmetics.dm index 0277ec5371..a3ad685406 100644 --- a/code/game/objects/items/cosmetics.dm +++ b/code/game/objects/items/cosmetics.dm @@ -8,6 +8,7 @@ var/colour = "red" var/open = FALSE + /obj/item/lipstick/purple name = "purple lipstick" colour = "purple" @@ -21,6 +22,7 @@ name = "black lipstick" colour = "black" + /obj/item/lipstick/random name = "lipstick" icon_state = "random_lipstick" @@ -31,6 +33,8 @@ colour = pick("red","purple","lime","black","green","blue","white") name = "[colour] lipstick" + + /obj/item/lipstick/attack_self(mob/user) cut_overlays() to_chat(user, "You twist \the [src] [open ? "closed" : "open"].") @@ -99,6 +103,7 @@ else ..() + /obj/item/razor name = "electric razor" desc = "The latest and greatest power razor born from the science of shaving." @@ -107,6 +112,7 @@ flags_1 = CONDUCT_1 w_class = WEIGHT_CLASS_TINY + /obj/item/razor/proc/shave(mob/living/carbon/human/H, location = "mouth") if(location == "mouth") H.facial_hair_style = "Shaved" diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index a43691cc7b..6ee50f5524 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -393,7 +393,7 @@ /obj/item/twohanded/shockpaddles/proc/can_defib(mob/living/carbon/human/H) var/obj/item/organ/brain/BR = H.getorgan(/obj/item/organ/brain) - return (!H.suiciding && !(H.has_disability(NOCLONE)) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain) + return (!H.suiciding && !(H.has_disability(DISABILITY_NOCLONE)) && !H.hellbound && ((world.time - H.timeofdeath) < tlimit) && (H.getBruteLoss() < 180) && (H.getFireLoss() < 180) && H.getorgan(/obj/item/organ/heart) && BR && !BR.damaged_brain) /obj/item/twohanded/shockpaddles/proc/shock_touching(dmg, mob/H) if(isliving(H.pulledby)) //CLEAR! @@ -514,7 +514,7 @@ shock_touching(30, H) var/failed - if (H.suiciding || (H.has_disability(NOCLONE))) + if (H.suiciding || (H.has_disability(DISABILITY_NOCLONE))) failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Recovery of patient impossible. Further attempts futile." else if (H.hellbound) failed = "[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's soul appears to be on another plane of existence. Further attempts futile." diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 7a40d8f3a2..739ea246b7 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -48,7 +48,7 @@ add_fingerprint(user) if(istype(M) && on && user.zone_selected in list("eyes", "mouth")) - if((user.has_disability(CLUMSY) || user.has_disability(DUMB)) && prob(50)) //too dumb to use flashlight properly + if((user.has_disability(DISABILITY_CLUMSY) || user.has_disability(DISABILITY_DUMB)) && prob(50)) //too dumb to use flashlight properly return ..() //just hit them in the head if(!user.IsAdvancedToolUser()) @@ -82,7 +82,7 @@ else user.visible_message("[user] directs [src] to [M]'s eyes.", \ "You direct [src] to [M]'s eyes.") - if(M.stat == DEAD || (M.has_disability(BLIND)) || !M.flash_act(visual = 1)) //mob is dead or fully blind + if(M.stat == DEAD || (M.has_disability(DISABILITY_BLIND)) || !M.flash_act(visual = 1)) //mob is dead or fully blind to_chat(user, "[M]'s pupils don't react to the light!") else if(M.dna && M.dna.check_mutation(XRAY)) //mob has X-RAY vision to_chat(user, "[M]'s pupils give an eerie glow!") diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 6e67ca886b..33d1c5257a 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -85,7 +85,7 @@ GAS ANALYZER /obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user) // Clumsiness/brain damage check - if ((user.has_disability(CLUMSY) || user.has_disability(DUMB)) && prob(50)) + if ((user.has_disability(DISABILITY_CLUMSY) || user.has_disability(DISABILITY_DUMB)) && prob(50)) to_chat(user, "You stupidly try to analyze the floor's vitals!") user.visible_message("[user] has analyzed the floor's vitals!") to_chat(user, "Analyzing results for The floor:\n\tOverall status: Healthy") @@ -181,10 +181,10 @@ GAS ANALYZER to_chat(user, "\t==EAR STATUS==") if(istype(ears)) var/healthy = TRUE - if(C.has_disability(DEAF, GENETIC_MUTATION)) + if(C.has_disability(DISABILITY_DEAF, GENETIC_MUTATION)) healthy = FALSE to_chat(user, "\tSubject is genetically deaf.") - else if(C.has_disability(DEAF)) + else if(C.has_disability(DISABILITY_DEAF)) healthy = FALSE to_chat(user, "\tSubject is deaf.") else @@ -202,10 +202,10 @@ GAS ANALYZER to_chat(user, "\t==EYE STATUS==") if(istype(eyes)) var/healthy = TRUE - if(C.has_disability(BLIND)) + if(C.has_disability(DISABILITY_BLIND)) to_chat(user, "\tSubject is blind.") healthy = FALSE - if(C.has_disability(NEARSIGHT)) + if(C.has_disability(DISABILITY_NEARSIGHT)) to_chat(user, "\tSubject is nearsighted.") healthy = FALSE if(eyes.eye_damage > 30) diff --git a/code/game/objects/items/dna_injector.dm b/code/game/objects/items/dna_injector.dm index 19008b43a6..f2741e4715 100644 --- a/code/game/objects/items/dna_injector.dm +++ b/code/game/objects/items/dna_injector.dm @@ -31,7 +31,7 @@ /obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user) prepare() - if(M.has_dna() && !(RADIMMUNE in M.dna.species.species_traits) && !(M.has_disability(NOCLONE))) + if(M.has_dna() && !(RADIMMUNE in M.dna.species.species_traits) && !(M.has_disability(DISABILITY_NOCLONE))) M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2)) var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]" for(var/datum/mutation/human/HM in remove_mutations) @@ -313,7 +313,7 @@ to_chat(user, "You can't modify [M]'s DNA while [M.p_theyre()] dead.") return FALSE - if(M.has_dna() && !(M.has_disability(NOCLONE))) + if(M.has_dna() && !(M.has_disability(DISABILITY_NOCLONE))) M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2)) var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]" var/endtime = world.time+duration diff --git a/code/game/objects/items/grenades/grenade.dm b/code/game/objects/items/grenades/grenade.dm index 257007aba9..c19ce4620d 100644 --- a/code/game/objects/items/grenades/grenade.dm +++ b/code/game/objects/items/grenades/grenade.dm @@ -24,7 +24,7 @@ qdel(src) /obj/item/grenade/proc/clown_check(mob/living/carbon/human/user) - if(user.has_disability(CLUMSY) && prob(50)) + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) to_chat(user, "Huh? How does this thing work?") preprime(user, 5, FALSE) return FALSE diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index 7cfc4e220e..f1c41c8f7a 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -1,19 +1,6 @@ /obj/item/restraints breakouttime = 600 -/obj/item/restraints/Destroy() - if(iscarbon(loc)) - var/mob/living/carbon/M = loc - if(M.handcuffed == src) - M.handcuffed = null - M.update_handcuffed() - if(M.buckled && M.buckled.buckle_requires_restraints) - M.buckled.unbuckle_mob(M) - if(M.legcuffed == src) - M.legcuffed = null - M.update_inv_legcuffed() - return ..() - //Handcuffs /obj/item/restraints/handcuffs @@ -39,7 +26,7 @@ /obj/item/restraints/handcuffs/attack(mob/living/carbon/C, mob/living/carbon/human/user) if(!istype(C)) return - if(user.has_disability(CLUMSY) && prob(50)) + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) to_chat(user, "Uh... how do those things work?!") apply_cuffs(user,user) return @@ -392,4 +379,4 @@ B.Crossed(hit_atom) qdel(src) ..() - + diff --git a/code/game/objects/items/kitchen.dm b/code/game/objects/items/kitchen.dm index 0a9e356014..b23ac46823 100644 --- a/code/game/objects/items/kitchen.dm +++ b/code/game/objects/items/kitchen.dm @@ -44,7 +44,7 @@ forkload = null else if(user.zone_selected == "eyes") - if(user.has_disability(CLUMSY) && prob(50)) + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) M = user return eyestab(M,user) else @@ -70,7 +70,7 @@ /obj/item/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user) if(user.zone_selected == "eyes") - if(user.has_disability(CLUMSY) && prob(50)) + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) M = user return eyestab(M,user) else diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 6fb173b905..823def4936 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -99,7 +99,7 @@ return ..() add_fingerprint(user) - if((user.has_disability(CLUMSY)) && prob(50)) + if((user.has_disability(DISABILITY_CLUMSY)) && prob(50)) to_chat(user, "You club yourself over the head.") user.Knockdown(60 * force) if(ishuman(user)) diff --git a/code/game/objects/items/melee/transforming.dm b/code/game/objects/items/melee/transforming.dm index 94f7de09bc..ca0c36f97e 100644 --- a/code/game/objects/items/melee/transforming.dm +++ b/code/game/objects/items/melee/transforming.dm @@ -72,6 +72,6 @@ to_chat(user, "[src] [active ? "is now active":"can now be concealed"].") /obj/item/melee/transforming/proc/clumsy_transform_effect(mob/living/user) - if(user.has_disability(CLUMSY) && prob(50)) + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) to_chat(user, "You accidentally cut yourself with [src], like a doofus!") user.take_bodypart_damage(5,5) diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm index dc0a2fe286..f7b3f72403 100644 --- a/code/game/objects/items/pneumaticCannon.dm +++ b/code/game/objects/items/pneumaticCannon.dm @@ -125,14 +125,14 @@ loadedWeightClass += I.w_class return TRUE -/obj/item/pneumatic_cannon/afterattack(atom/target, mob/living/user, flag, params) +/obj/item/pneumatic_cannon/afterattack(atom/target, mob/living/carbon/human/user, flag, params) if(flag && user.a_intent == INTENT_HARM) //melee attack return if(!istype(user)) return Fire(user, target) -/obj/item/pneumatic_cannon/proc/Fire(mob/living/user, var/atom/target) +/obj/item/pneumatic_cannon/proc/Fire(mob/living/carbon/human/user, var/atom/target) if(!istype(user) && !target) return var/discharge = 0 @@ -147,7 +147,7 @@ if(tank && !tank.air_contents.remove(gasPerThrow * pressureSetting)) to_chat(user, "\The [src] lets out a weak hiss and doesn't react!") return - if(user.has_disability(CLUMSY) && prob(75) && clumsyCheck && iscarbon(user)) + if(user.has_disability(DISABILITY_CLUMSY) && prob(75) && clumsyCheck && iscarbon(user)) var/mob/living/carbon/C = user C.visible_message("[C] loses their grip on [src], causing it to go off!", "[src] slips out of your hands and goes off!") C.dropItemToGround(src, TRUE) @@ -164,10 +164,9 @@ var/turf/T = get_target(target, get_turf(src)) playsound(src.loc, 'sound/weapons/sonic_jackhammer.ogg', 50, 1) fire_items(T, user) - if(pressureSetting >= 3 && iscarbon(user)) - var/mob/living/carbon/C = user - C.visible_message("[C] is thrown down by the force of the cannon!", "[src] slams into your shoulder, knocking you down!") - C.Knockdown(60) + if(pressureSetting >= 3 && user) + user.visible_message("[user] is thrown down by the force of the cannon!", "[src] slams into your shoulder, knocking you down!") + user.Knockdown(60) /obj/item/pneumatic_cannon/proc/fire_items(turf/target, mob/user) if(fire_mode == PCANNON_FIREALL) @@ -273,10 +272,3 @@ selfcharge = TRUE charge_type = /obj/item/reagent_containers/food/snacks/pie/cream maxWeightClass = 60 //20 pies. - -/obj/item/pneumatic_cannon/pie/selfcharge/cyborg - name = "low velocity pie cannon" - automatic = FALSE - charge_type = /obj/item/reagent_containers/food/snacks/pie/cream/nostun - maxWeightClass = 6 //2 pies - charge_ticks = 2 //4 second/pie diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 6c1cf93295..d2f1d2a31b 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -355,9 +355,6 @@ var/hitdamage = 0 var/emaggedhitdamage = 3 -/obj/item/borg/lollipop/clown - emaggedhitdamage = 0 - /obj/item/borg/lollipop/equipped() check_amount() diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index 113bc9755c..e2493ff613 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -1,142 +1,142 @@ -/obj/item/shield - name = "shield" - block_chance = 50 - armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 80, acid = 70) - -/obj/item/shield/riot - name = "riot shield" - desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "riot" - lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' - slot_flags = SLOT_BACK - force = 10 - throwforce = 5 - throw_speed = 2 - throw_range = 3 - w_class = WEIGHT_CLASS_BULKY - materials = list(MAT_GLASS=7500, MAT_METAL=1000) - attack_verb = list("shoved", "bashed") - var/cooldown = 0 //shield bash cooldown. based on world.time - - -/obj/item/shield/riot/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/melee/baton)) - if(cooldown < world.time - 25) - user.visible_message("[user] bashes [src] with [W]!") - playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1) - cooldown = world.time - else - return ..() - -/obj/item/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) - if(attack_type == THROWN_PROJECTILE_ATTACK) - final_block_chance += 30 - if(attack_type == LEAP_ATTACK) - final_block_chance = 100 - return ..() - -/obj/item/shield/riot/roman - name = "roman shield" - desc = "Bears an inscription on the inside: \"Romanes venio domus\"." - icon_state = "roman_shield" - item_state = "roman_shield" - lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' - -/obj/item/shield/riot/buckler - name = "wooden buckler" - desc = "A medieval wooden buckler." - icon_state = "buckler" - item_state = "buckler" - lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' - materials = list() - resistance_flags = FLAMMABLE - block_chance = 30 - -/obj/item/shield/energy - name = "energy combat shield" - desc = "A shield capable of stopping most melee attacks. Protects user from almost all energy projectiles. It can be retracted, expanded, and stored anywhere." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "eshield0" // eshield1 for expanded - lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' - force = 3 - throwforce = 3 - throw_speed = 3 - throw_range = 5 - w_class = WEIGHT_CLASS_TINY - attack_verb = list("shoved", "bashed") - var/active = 0 - -/obj/item/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) - return 0 - -/obj/item/shield/energy/IsReflect() - return (active) - -/obj/item/shield/energy/attack_self(mob/living/carbon/human/user) - if(user.has_disability(CLUMSY) && prob(50)) - to_chat(user, "You beat yourself in the head with [src].") - user.take_bodypart_damage(5) - active = !active - icon_state = "eshield[active]" - - if(active) - force = 10 - throwforce = 8 - throw_speed = 2 - w_class = WEIGHT_CLASS_BULKY - playsound(user, 'sound/weapons/saberon.ogg', 35, 1) - to_chat(user, "[src] is now active.") - else - force = 3 - throwforce = 3 - throw_speed = 3 - w_class = WEIGHT_CLASS_TINY - playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) - to_chat(user, "[src] can now be concealed.") - add_fingerprint(user) - -/obj/item/shield/riot/tele - name = "telescopic shield" - desc = "An advanced riot shield made of lightweight materials that collapses for easy storage." - icon = 'icons/obj/items_and_weapons.dmi' - icon_state = "teleriot0" - lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' - righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' - slot_flags = null - force = 3 - throwforce = 3 - throw_speed = 3 - throw_range = 4 - w_class = WEIGHT_CLASS_NORMAL - var/active = 0 - -/obj/item/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) - if(active) - return ..() - return 0 - -/obj/item/shield/riot/tele/attack_self(mob/living/user) - active = !active - icon_state = "teleriot[active]" - playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1) - - if(active) - force = 8 - throwforce = 5 - throw_speed = 2 - w_class = WEIGHT_CLASS_BULKY - slot_flags = SLOT_BACK - to_chat(user, "You extend \the [src].") - else - force = 3 - throwforce = 3 - throw_speed = 3 - w_class = WEIGHT_CLASS_NORMAL - slot_flags = null - to_chat(user, "[src] can now be concealed.") - add_fingerprint(user) +/obj/item/shield + name = "shield" + block_chance = 50 + armor = list(melee = 50, bullet = 50, laser = 50, energy = 0, bomb = 30, bio = 0, rad = 0, fire = 80, acid = 70) + +/obj/item/shield/riot + name = "riot shield" + desc = "A shield adept at blocking blunt objects from connecting with the torso of the shield wielder." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "riot" + lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' + slot_flags = SLOT_BACK + force = 10 + throwforce = 5 + throw_speed = 2 + throw_range = 3 + w_class = WEIGHT_CLASS_BULKY + materials = list(MAT_GLASS=7500, MAT_METAL=1000) + attack_verb = list("shoved", "bashed") + var/cooldown = 0 //shield bash cooldown. based on world.time + + +/obj/item/shield/riot/attackby(obj/item/W, mob/user, params) + if(istype(W, /obj/item/melee/baton)) + if(cooldown < world.time - 25) + user.visible_message("[user] bashes [src] with [W]!") + playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1) + cooldown = world.time + else + return ..() + +/obj/item/shield/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) + if(attack_type == THROWN_PROJECTILE_ATTACK) + final_block_chance += 30 + if(attack_type == LEAP_ATTACK) + final_block_chance = 100 + return ..() + +/obj/item/shield/riot/roman + name = "roman shield" + desc = "Bears an inscription on the inside: \"Romanes venio domus\"." + icon_state = "roman_shield" + item_state = "roman_shield" + lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' + +/obj/item/shield/riot/buckler + name = "wooden buckler" + desc = "A medieval wooden buckler." + icon_state = "buckler" + item_state = "buckler" + lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' + materials = list() + resistance_flags = FLAMMABLE + block_chance = 30 + +/obj/item/shield/energy + name = "energy combat shield" + desc = "A shield capable of stopping most melee attacks. Protects user from almost all energy projectiles. It can be retracted, expanded, and stored anywhere." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "eshield0" // eshield1 for expanded + lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' + force = 3 + throwforce = 3 + throw_speed = 3 + throw_range = 5 + w_class = WEIGHT_CLASS_TINY + attack_verb = list("shoved", "bashed") + var/active = 0 + +/obj/item/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) + return 0 + +/obj/item/shield/energy/IsReflect() + return (active) + +/obj/item/shield/energy/attack_self(mob/living/carbon/human/user) + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) + to_chat(user, "You beat yourself in the head with [src].") + user.take_bodypart_damage(5) + active = !active + icon_state = "eshield[active]" + + if(active) + force = 10 + throwforce = 8 + throw_speed = 2 + w_class = WEIGHT_CLASS_BULKY + playsound(user, 'sound/weapons/saberon.ogg', 35, 1) + to_chat(user, "[src] is now active.") + else + force = 3 + throwforce = 3 + throw_speed = 3 + w_class = WEIGHT_CLASS_TINY + playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) + to_chat(user, "[src] can now be concealed.") + add_fingerprint(user) + +/obj/item/shield/riot/tele + name = "telescopic shield" + desc = "An advanced riot shield made of lightweight materials that collapses for easy storage." + icon = 'icons/obj/items_and_weapons.dmi' + icon_state = "teleriot0" + lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi' + righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi' + slot_flags = null + force = 3 + throwforce = 3 + throw_speed = 3 + throw_range = 4 + w_class = WEIGHT_CLASS_NORMAL + var/active = 0 + +/obj/item/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) + if(active) + return ..() + return 0 + +/obj/item/shield/riot/tele/attack_self(mob/living/user) + active = !active + icon_state = "teleriot[active]" + playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1) + + if(active) + force = 8 + throwforce = 5 + throw_speed = 2 + w_class = WEIGHT_CLASS_BULKY + slot_flags = SLOT_BACK + to_chat(user, "You extend \the [src].") + else + force = 3 + throwforce = 3 + throw_speed = 3 + w_class = WEIGHT_CLASS_NORMAL + slot_flags = null + to_chat(user, "[src] can now be concealed.") + add_fingerprint(user) diff --git a/code/game/objects/items/signs.dm b/code/game/objects/items/signs.dm index 65716f2f30..350daa0fc3 100644 --- a/code/game/objects/items/signs.dm +++ b/code/game/objects/items/signs.dm @@ -10,23 +10,13 @@ var/label = "" var/last_wave = 0 -/obj/item/picket_sign/cyborg - name = "metallic nano-sign" - desc = "A high tech picket sign used by silicons that can reprogram its surface at will. Probably hurts to get hit by, too." - force = 13 - resistance_flags = NONE - actions_types = list(/datum/action/item_action/nano_picket_sign) - -/obj/item/picket_sign/proc/retext(mob/user) - var/txt = stripped_input(user, "What would you like to write on the sign?", "Sign Label", null , 30) - if(txt && Adjacent(user)) - label = txt - name = "[label] sign" - desc = "It reads: [label]" - /obj/item/picket_sign/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/pen) || istype(W, /obj/item/toy/crayon)) - retext(user) + var/txt = stripped_input(user, "What would you like to write on the sign?", "Sign Label", null , 30) + if(txt) + label = txt + src.name = "[label] sign" + desc = "It reads: [label]" else return ..() diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index cef25a0a36..5e80353db9 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -109,7 +109,7 @@ if (recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list)) var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist] recipe_list = srl.recipes - var/t1 = "Amount Left: [get_amount()]
" + var/t1 = "Amount Left: [amount]
" for(var/i in 1 to length(recipe_list)) var/E = recipe_list[i] if (isnull(E)) @@ -161,8 +161,8 @@ if (href_list["sublist"] && !href_list["make"]) interact(usr, text2num(href_list["sublist"])) if (href_list["make"]) - if (get_amount() < 1 && !is_cyborg) - qdel(src) + if (get_amount() < 1) + qdel(src) //Never should happen var/list/recipes_list = recipes if (href_list["sublist"]) diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index a06d1a509e..4c85a3b0e9 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -93,8 +93,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", if (!user.IsAdvancedToolUser()) to_chat(user, "You don't have the dexterity to do this!") return - - if (user.has_disability(CLUMSY) && prob(50)) + if (user.has_disability(DISABILITY_CLUMSY) && prob(50)) to_chat(user, "[src] slips out of your hand and hits your head.") user.take_bodypart_damage(10) user.Unconscious(400) diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index 128a313525..951d897835 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -108,7 +108,7 @@ add_fingerprint(user) /obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user) - if(status && user.has_disability(CLUMSY) && prob(50)) + if(status && user.has_disability(DISABILITY_CLUMSY) && prob(50)) user.visible_message("[user] accidentally hits themself with [src]!", \ "You accidentally hit yourself with [src]!") user.Knockdown(stunforce*3) diff --git a/code/game/objects/items/teleprod.dm b/code/game/objects/items/teleprod.dm index c780d32917..646c0aa4fb 100644 --- a/code/game/objects/items/teleprod.dm +++ b/code/game/objects/items/teleprod.dm @@ -8,7 +8,7 @@ /obj/item/melee/baton/cattleprod/teleprod/attack(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit ..() - if(status && user.has_disability(CLUMSY) && prob(50)) + if(status && user.has_disability(DISABILITY_CLUMSY) && prob(50)) user.visible_message("[user] accidentally hits themself with [src]!", \ "You accidentally hit yourself with [src]!") if(do_teleport(user, get_turf(user), 50))//honk honk diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index 8fd37a3b38..fb1a9c8787 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -75,7 +75,7 @@ return ..() if(user.zone_selected != "eyes" && user.zone_selected != "head") return ..() - if(user.has_disability(CLUMSY) && prob(50)) + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) M = user return eyestab(M,user) diff --git a/code/game/objects/items/tools/wirecutters.dm b/code/game/objects/items/tools/wirecutters.dm index 910b98b27a..c03469164e 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -14,8 +14,7 @@ materials = list(MAT_METAL=80) attack_verb = list("pinched", "nipped") hitsound = 'sound/items/wirecutter.ogg' - usesound = 'sound/items/wirecutter.ogg' - + usesound = 'sound/items/wirecutter.ogg' tool_behaviour = TOOL_WIRECUTTER toolspeed = 1 armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 30) @@ -33,6 +32,10 @@ if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable)) user.visible_message("[user] cuts [C]'s restraints with [src]!") qdel(C.handcuffed) + C.handcuffed = null + if(C.buckled && C.buckled.buckle_requires_restraints) + C.buckled.unbuckle_mob(C) + C.update_handcuffed() return else ..() @@ -55,8 +58,7 @@ desc = "Extremely sharp wirecutters, made out of a silvery-green metal." icon = 'icons/obj/abductor.dmi' icon_state = "cutters" - toolspeed = 0.1 - + toolspeed = 0.1 random_color = FALSE /obj/item/wirecutters/cyborg @@ -68,8 +70,7 @@ name = "jaws of life" desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head." icon_state = "jaws_cutter" - item_state = "jawsoflife" - + item_state = "jawsoflife" materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25) usesound = 'sound/items/jaws_cut.ogg' toolspeed = 0.25 @@ -91,12 +92,4 @@ var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power to_chat(user, "You attach the pry jaws to [src].") qdel(src) - user.put_in_active_hand(pryjaws) - -/obj/item/wirecutters/power/attack(mob/living/carbon/C, mob/user) - if(istype(C) && C.handcuffed) - user.visible_message("[user] cuts [C]'s restraints with [src]!") - qdel(C.handcuffed) - return - else - ..() + user.put_in_active_hand(pryjaws) \ No newline at end of file diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 293ef46197..b7b48ff043 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -302,7 +302,7 @@ unwield() return ..() - if(user.has_disability(CLUMSY) && (wielded) && prob(40)) + if(user.has_disability(DISABILITY_CLUMSY) && (wielded) && prob(40)) impale(user) return if((wielded) && prob(50)) diff --git a/code/game/objects/structures/petrified_statue.dm b/code/game/objects/structures/petrified_statue.dm index d2bee1af36..02b32c9f80 100644 --- a/code/game/objects/structures/petrified_statue.dm +++ b/code/game/objects/structures/petrified_statue.dm @@ -17,7 +17,7 @@ L.buckled.unbuckle_mob(L,force=1) L.visible_message("[L]'s skin rapidly turns to marble!", "Your body freezes up! Can't... move... can't... think...") L.forceMove(src) - L.add_disability(MUTE, STATUE_MUTE) + L.add_disability(DISABILITY_MUTE, STATUE_MUTE) L.faction += "mimic" //Stops mimics from instaqdeling people in statues L.status_flags |= GODMODE obj_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues @@ -59,7 +59,7 @@ if(petrified_mob) petrified_mob.status_flags &= ~GODMODE petrified_mob.forceMove(loc) - petrified_mob.remove_disability(MUTE, STATUE_MUTE) + petrified_mob.remove_disability(DISABILITY_MUTE, STATUE_MUTE) petrified_mob.take_overall_damage((petrified_mob.health - obj_integrity + 100)) //any new damage the statue incurred is transfered to the mob petrified_mob.faction -= "mimic" petrified_mob = null diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm index a8ca42bff5..1ae513f847 100644 --- a/code/game/objects/structures/reflector.dm +++ b/code/game/objects/structures/reflector.dm @@ -202,7 +202,7 @@ var/new_angle = WRAP(rotation_angle + norm_inc, 180, -180) if(ISINRANGE_EX(norm_inc, -90, 90)) return FALSE - P.setAngle(new_angle) + P.Angle = new_angle return ..() //DOUBLE @@ -229,7 +229,7 @@ var/new_angle = WRAP(rotation_angle + norm_inc, 180, -180) if(ISINRANGE_EX(norm_inc, -90, 90)) new_angle += 180 - P.setAngle(new_angle) + P.Angle = new_angle return ..() //BOX @@ -251,7 +251,7 @@ anchored = TRUE /obj/structure/reflector/box/auto_reflect(obj/item/projectile/P) - P.setAngle(rotation_angle) + P.Angle = rotation_angle return ..() /obj/structure/reflector/ex_act() diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index 634767c98b..3e7540cdf6 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -146,9 +146,6 @@ var/uses_overlay = TRUE var/obj/effect/clockwork/overlay/floor/realappearence -/turf/open/floor/clockwork/Bless() //Who needs holy blessings when you have DADDY RATVAR? - return - /turf/open/floor/clockwork/Initialize() . = ..() if(uses_overlay) diff --git a/code/game/turfs/simulated/wall/misc_walls.dm b/code/game/turfs/simulated/wall/misc_walls.dm index 0dab10ff92..ecc389af88 100644 --- a/code/game/turfs/simulated/wall/misc_walls.dm +++ b/code/game/turfs/simulated/wall/misc_walls.dm @@ -70,10 +70,6 @@ if(realappearence) qdel(realappearence) realappearence = null - if(heated) - var/mob/camera/eminence/E = get_eminence() - if(E) - E.superheated_walls-- return ..() /turf/closed/wall/clockwork/ReplaceWithLattice() diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 14b7ef74b5..00377e4f3f 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -61,7 +61,7 @@ new_angle_s -= 360 while(new_angle_s < -180) new_angle_s += 360 - P.setAngle(new_angle_s) + P.Angle = new_angle_s return TRUE /turf/closed/wall/proc/dismantle_wall(devastated=0, explode=0) diff --git a/code/game/world.dm b/code/game/world.dm index d2ef3498fe..a665b8505d 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -254,4 +254,3 @@ GLOBAL_PROTECT(security_mode) hub_password = "kMZy3U5jJHSiBQjr" else hub_password = "SORRYNOPASSWORD" - diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index daa1d58de5..e2bb78c9ec 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -107,8 +107,6 @@ GLOBAL_VAR(LastAdminCalledTarget) GLOBAL_PROTECT(LastAdminCalledTarget) GLOBAL_VAR(LastAdminCalledProc) GLOBAL_PROTECT(LastAdminCalledProc) -GLOBAL_LIST_EMPTY(AdminProcCallSpamPrevention) -GLOBAL_PROTECT(AdminProcCallSpamPrevention) /proc/WrapAdminProcCall(target, procname, list/arguments) var/current_caller = GLOB.AdminProcCaller @@ -116,14 +114,9 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(!ckey) CRASH("WrapAdminProcCall with no ckey: [target] [procname] [english_list(arguments)]") if(current_caller && current_caller != ckey) - if(!GLOB.AdminProcCallSpamPrevention[ckey]) - to_chat(usr, "Another set of admin called procs are still running, your proc will be run after theirs finish.") - GLOB.AdminProcCallSpamPrevention[ckey] = TRUE - UNTIL(!GLOB.AdminProcCaller) - to_chat(usr, "Running your proc") - GLOB.AdminProcCallSpamPrevention -= ckey - else - UNTIL(!GLOB.AdminProcCaller) + to_chat(usr, "Another set of admin called procs are still running, your proc will be run after theirs finish.") + UNTIL(!GLOB.AdminProcCaller) + to_chat(usr, "Running your proc") GLOB.LastAdminCalledProc = procname if(target != GLOBAL_PROC) GLOB.LastAdminCalledTargetRef = "[REF(target)]" diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index dcb9137416..5d0c2fe833 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -45,8 +45,7 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list( /client/proc/manipulate_organs, /client/proc/start_line_profiling, /client/proc/stop_line_profiling, - /client/proc/show_line_profiling, - /client/proc/create_mapping_job_icons + /client/proc/show_line_profiling )) /obj/effect/debugging/mapfix_marker @@ -266,31 +265,3 @@ GLOBAL_VAR_INIT(say_disabled, FALSE) message_admins("[src.ckey] used 'Disable all communication verbs', killing all communication methods.") else message_admins("[src.ckey] used 'Disable all communication verbs', restoring all communication methods.") - -//This generates the icon states for job starting location landmarks. -/client/proc/create_mapping_job_icons() - set name = "Generate job landmarks icons" - set category = "Mapping" - var/icon/final = icon() - var/mob/living/carbon/human/dummy/D = new(locate(1,1,1)) //spawn on 1,1,1 so we don't have runtimes when items are deleted - D.setDir(SOUTH) - for(var/job in subtypesof(/datum/job)) - var/datum/job/JB = new job - switch(JB.title) - if("AI") - final.Insert(icon('icons/mob/ai.dmi', "ai", SOUTH, 1), "AI") - if("Cyborg") - final.Insert(icon('icons/mob/robots.dmi', "robot", SOUTH, 1), "Cyborg") - else - for(var/obj/item/I in D) - qdel(I) - randomize_human(D) - JB.equip(D, TRUE, FALSE) - COMPILE_OVERLAYS(D) - var/icon/I = icon(getFlatIcon(D), frame = 1) - final.Insert(I, JB.title) - qdel(D) - //Also add the x - for(var/x_number in 1 to 4) - final.Insert(icon('icons/mob/screen_gen.dmi', "x[x_number == 1 ? "" : x_number]"), "x[x_number == 1 ? "" : x_number]") - fcopy(final, "icons/mob/landmarks.dmi") \ No newline at end of file diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 58189e98b0..29d95c639f 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -80,32 +80,14 @@ to_chat(src, "For youtube-dl shortcuts like ytsearch: please use the appropriate full url from the website.") return var/shell_scrubbed_input = shell_url_scrub(web_sound_input) - var/list/output = world.shelleo("[ytdl] --format \"bestaudio\[ext=mp3]/best\[ext=mp4]\[height<=360]/bestaudio\[ext=m4a]/bestaudio\[ext=aac]\" --dump-single-json --no-playlist -- \"[shell_scrubbed_input]\"") + var/list/output = world.shelleo("[ytdl] --format \"bestaudio\[ext=mp3]/best\[ext=mp4]\[height<=360]/bestaudio\[ext=m4a]/bestaudio\[ext=aac]\" --get-url \"[shell_scrubbed_input]\"") var/errorlevel = output[SHELLEO_ERRORLEVEL] var/stdout = output[SHELLEO_STDOUT] var/stderr = output[SHELLEO_STDERR] if(!errorlevel) - var/list/data - try - data = json_decode(stdout) - catch(var/exception/e) - to_chat(src, "Youtube-dl JSON parsing FAILED:") - to_chat(src, "[e]: [stdout]") - return - - if (data["url"]) - web_sound_url = data["url"] - var/title = "[data["title"]]" - var/webpage_url = title - if (data["webpage_url"]) - webpage_url = "[title]" - - var/res = alert(usr, "Show the title of and link to this song to the players?\n[title]",, "No", "Yes", "Cancel") - switch(res) - if("Yes") - to_chat(world, "An admin played: [webpage_url]") - if("Cancel") - return + var/static/regex/content_url_regex = regex("https?://\\S+") + if(content_url_regex.Find(stdout)) + web_sound_url = content_url_regex.match if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) pitch = pick(0.5, 0.7, 0.8, 0.85, 0.9, 0.95, 1.1, 1.2, 1.4, 1.6, 2.0, 2.5) diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index 8feff99df4..0e53ac3555 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -30,7 +30,7 @@ holder.update_icon() /obj/item/device/assembly/flash/proc/clown_check(mob/living/carbon/human/user) - if(user.has_disability(CLUMSY) && prob(50)) + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) flash_carbon(user, user, 15, 0) return 0 return 1 diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index d1b88e68e1..a61eccbb59 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -1,142 +1,142 @@ -/obj/item/device/assembly/mousetrap - name = "mousetrap" - desc = "A handy little spring-loaded trap for catching pesty rodents." - icon_state = "mousetrap" - materials = list(MAT_METAL=100) - attachable = 1 - var/armed = 0 - - -/obj/item/device/assembly/mousetrap/examine(mob/user) - ..() - if(armed) - to_chat(user, "The mousetrap is armed!") - else - to_chat(user, "The mousetrap is not armed.") - -/obj/item/device/assembly/mousetrap/activate() - if(..()) - armed = !armed - if(!armed) - if(ishuman(usr)) - var/mob/living/carbon/human/user = usr - if((user.has_disability(DUMB) || user.has_disability(CLUMSY)) && prob(50)) - to_chat(user, "Your hand slips, setting off the trigger!") - pulse(0) - update_icon() - if(usr) - playsound(usr.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3) - -/obj/item/device/assembly/mousetrap/describe() - return "The pressure switch is [armed?"primed":"safe"]." - -/obj/item/device/assembly/mousetrap/update_icon() - if(armed) - icon_state = "mousetraparmed" - else - icon_state = "mousetrap" - if(holder) - holder.update_icon() - -/obj/item/device/assembly/mousetrap/proc/triggered(mob/target, type = "feet") - if(!armed) - return - var/obj/item/bodypart/affecting = null - if(ishuman(target)) - var/mob/living/carbon/human/H = target - if(PIERCEIMMUNE in H.dna.species.species_traits) - playsound(src.loc, 'sound/effects/snap.ogg', 50, 1) - armed = 0 - update_icon() - pulse(0) - return 0 - switch(type) - if("feet") - if(!H.shoes) - affecting = H.get_bodypart(pick("l_leg", "r_leg")) - H.Knockdown(60) - if("l_hand", "r_hand") - if(!H.gloves) - affecting = H.get_bodypart(type) - H.Stun(60) - if(affecting) - if(affecting.receive_damage(1, 0)) - H.update_damage_overlays() - else if(ismouse(target)) - var/mob/living/simple_animal/mouse/M = target - visible_message("SPLAT!") - M.splat() - playsound(src.loc, 'sound/effects/snap.ogg', 50, 1) - armed = 0 - update_icon() - pulse(0) - - -/obj/item/device/assembly/mousetrap/attack_self(mob/living/carbon/human/user) - if(!armed) - to_chat(user, "You arm [src].") - else - if((user.has_disability(DUMB) || user.has_disability(CLUMSY)) && prob(50)) - var/which_hand = "l_hand" - if(!(user.active_hand_index % 2)) - which_hand = "r_hand" - triggered(user, which_hand) - user.visible_message("[user] accidentally sets off [src], breaking their fingers.", \ - "You accidentally trigger [src]!") - return - to_chat(user, "You disarm [src].") - armed = !armed - update_icon() - playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3) - - -/obj/item/device/assembly/mousetrap/attack_hand(mob/living/carbon/human/user) - if(armed) - if((user.has_disability(DUMB) || user.has_disability(CLUMSY)) && prob(50)) - var/which_hand = "l_hand" - if(!(user.active_hand_index % 2)) - which_hand = "r_hand" - triggered(user, which_hand) - user.visible_message("[user] accidentally sets off [src], breaking their fingers.", \ - "You accidentally trigger [src]!") - return - ..() - - -/obj/item/device/assembly/mousetrap/Crossed(atom/movable/AM as mob|obj) - if(armed) - if(ismob(AM)) - var/mob/MM = AM - if(!(MM.movement_type & FLYING)) - if(ishuman(AM)) - var/mob/living/carbon/H = AM - if(H.m_intent == MOVE_INTENT_RUN) - triggered(H) - H.visible_message("[H] accidentally steps on [src].", \ - "You accidentally step on [src]") - else if(ismouse(MM)) - triggered(MM) - else if(AM.density) // For mousetrap grenades, set off by anything heavy - triggered(AM) - ..() - - -/obj/item/device/assembly/mousetrap/on_found(mob/finder) - if(armed) - finder.visible_message("[finder] accidentally sets off [src], breaking their fingers.", \ - "You accidentally trigger [src]!") - triggered(finder, (finder.active_hand_index % 2 == 0) ? "r_hand" : "l_hand") - return 1 //end the search! - return 0 - - -/obj/item/device/assembly/mousetrap/hitby(A as mob|obj) - if(!armed) - return ..() - visible_message("[src] is triggered by [A].") - triggered(null) - - -/obj/item/device/assembly/mousetrap/armed - icon_state = "mousetraparmed" - armed = 1 +/obj/item/device/assembly/mousetrap + name = "mousetrap" + desc = "A handy little spring-loaded trap for catching pesty rodents." + icon_state = "mousetrap" + materials = list(MAT_METAL=100) + attachable = 1 + var/armed = 0 + + +/obj/item/device/assembly/mousetrap/examine(mob/user) + ..() + if(armed) + to_chat(user, "The mousetrap is armed!") + else + to_chat(user, "The mousetrap is not armed.") + +/obj/item/device/assembly/mousetrap/activate() + if(..()) + armed = !armed + if(!armed) + if(ishuman(usr)) + var/mob/living/carbon/human/user = usr + if((user.has_disability(DISABILITY_DUMB) || user.has_disability(DISABILITY_CLUMSY)) && prob(50)) + to_chat(user, "Your hand slips, setting off the trigger!") + pulse(0) + update_icon() + if(usr) + playsound(usr.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3) + +/obj/item/device/assembly/mousetrap/describe() + return "The pressure switch is [armed?"primed":"safe"]." + +/obj/item/device/assembly/mousetrap/update_icon() + if(armed) + icon_state = "mousetraparmed" + else + icon_state = "mousetrap" + if(holder) + holder.update_icon() + +/obj/item/device/assembly/mousetrap/proc/triggered(mob/target, type = "feet") + if(!armed) + return + var/obj/item/bodypart/affecting = null + if(ishuman(target)) + var/mob/living/carbon/human/H = target + if(PIERCEIMMUNE in H.dna.species.species_traits) + playsound(src.loc, 'sound/effects/snap.ogg', 50, 1) + armed = 0 + update_icon() + pulse(0) + return 0 + switch(type) + if("feet") + if(!H.shoes) + affecting = H.get_bodypart(pick("l_leg", "r_leg")) + H.Knockdown(60) + if("l_hand", "r_hand") + if(!H.gloves) + affecting = H.get_bodypart(type) + H.Stun(60) + if(affecting) + if(affecting.receive_damage(1, 0)) + H.update_damage_overlays() + else if(ismouse(target)) + var/mob/living/simple_animal/mouse/M = target + visible_message("SPLAT!") + M.splat() + playsound(src.loc, 'sound/effects/snap.ogg', 50, 1) + armed = 0 + update_icon() + pulse(0) + + +/obj/item/device/assembly/mousetrap/attack_self(mob/living/carbon/human/user) + if(!armed) + to_chat(user, "You arm [src].") + else + if((user.has_disability(DISABILITY_DUMB) || user.has_disability(DISABILITY_CLUMSY)) && prob(50)) + var/which_hand = "l_hand" + if(!(user.active_hand_index % 2)) + which_hand = "r_hand" + triggered(user, which_hand) + user.visible_message("[user] accidentally sets off [src], breaking their fingers.", \ + "You accidentally trigger [src]!") + return + to_chat(user, "You disarm [src].") + armed = !armed + update_icon() + playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3) + + +/obj/item/device/assembly/mousetrap/attack_hand(mob/living/carbon/human/user) + if(armed) + if((user.has_disability(DISABILITY_DUMB) || user.has_disability(DISABILITY_CLUMSY)) && prob(50)) + var/which_hand = "l_hand" + if(!(user.active_hand_index % 2)) + which_hand = "r_hand" + triggered(user, which_hand) + user.visible_message("[user] accidentally sets off [src], breaking their fingers.", \ + "You accidentally trigger [src]!") + return + ..() + + +/obj/item/device/assembly/mousetrap/Crossed(atom/movable/AM as mob|obj) + if(armed) + if(ismob(AM)) + var/mob/MM = AM + if(!(MM.movement_type & FLYING)) + if(ishuman(AM)) + var/mob/living/carbon/H = AM + if(H.m_intent == MOVE_INTENT_RUN) + triggered(H) + H.visible_message("[H] accidentally steps on [src].", \ + "You accidentally step on [src]") + else if(ismouse(MM)) + triggered(MM) + else if(AM.density) // For mousetrap grenades, set off by anything heavy + triggered(AM) + ..() + + +/obj/item/device/assembly/mousetrap/on_found(mob/finder) + if(armed) + finder.visible_message("[finder] accidentally sets off [src], breaking their fingers.", \ + "You accidentally trigger [src]!") + triggered(finder, (finder.active_hand_index % 2 == 0) ? "r_hand" : "l_hand") + return 1 //end the search! + return 0 + + +/obj/item/device/assembly/mousetrap/hitby(A as mob|obj) + if(!armed) + return ..() + visible_message("[src] is triggered by [A].") + triggered(null) + + +/obj/item/device/assembly/mousetrap/armed + icon_state = "mousetraparmed" + armed = 1 diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index 28875e3dc2..3704494050 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -372,39 +372,3 @@ GLOBAL_LIST_EMPTY(asset_datums) var/meter = icon('icons/obj/atmospherics/pipes/simple.dmi', "meterX", SOUTH, frame, movement_states) if(meter) register_asset(sanitize_filename("[prefix].south.meterX.png"), fcopy_rsc(meter)) - -// Representative icons for each research design -/datum/asset/simple/research_designs/register() - for (var/path in subtypesof(/datum/design)) - var/datum/design/D = path - - // construct the icon and slap it into the resource cache - var/atom/item = initial(D.build_path) - if (!ispath(item, /atom)) - // biogenerator outputs to beakers by default - if (initial(D.build_type) & BIOGENERATOR) - item = /obj/item/reagent_containers/glass/beaker/large - else - continue // shouldn't happen, but just in case - - // circuit boards become their resulting machines or computers - if (ispath(item, /obj/item/circuitboard)) - var/obj/item/circuitboard/C = item - var/machine = initial(C.build_path) - if (machine) - item = machine - var/icon_file = initial(item.icon) - var/icon/I = icon(icon_file, initial(item.icon_state), SOUTH) - - // computers (and snowflakes) get their screen and keyboard sprites - if (ispath(item, /obj/machinery/computer) || ispath(item, /obj/machinery/power/solar_control)) - var/obj/machinery/computer/C = item - var/screen = initial(C.icon_screen) - var/keyboard = initial(C.icon_keyboard) - if (screen) - I.Blend(icon(icon_file, screen, SOUTH), ICON_OVERLAY) - if (keyboard) - I.Blend(icon(icon_file, keyboard, SOUTH), ICON_OVERLAY) - - assets["design_[initial(D.id)].png"] = I - return ..() diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 4c5d8e7a4c..407e9aa37c 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -199,7 +199,9 @@ GLOBAL_LIST(external_rsc_urls) prefs.parent = src prefs.last_ip = address //these are gonna be used for banning prefs.last_id = computer_id //these are gonna be used for banning - fps = prefs.clientfps + if(world.byond_version >= 511 && byond_version >= 511 && prefs.clientfps) + vars["fps"] = prefs.clientfps + sethotkeys(1) //set hoykeys from preferences (from_pref = 1) log_access("Login: [key_name(src)] from [address ? address : "localhost"]-[computer_id] || BYOND v[byond_version]") var/alert_mob_dupe_login = FALSE diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 730b98ede5..0469f31aba 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1282,10 +1282,16 @@ GLOBAL_LIST_EMPTY(preferences_datums) preferred_map = maplist[pickedmap] if ("clientfps") - var/desiredfps = input(user, "Choose your desired fps. (0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps) as null|num + var/version_message + if (user.client && user.client.byond_version < 511) + version_message = "\nYou need to be using byond version 511 or later to take advantage of this feature, your version of [user.client.byond_version] is too low" + if (world.byond_version < 511) + version_message += "\nThis server does not currently support client side fps. You can set now for when it does." + var/desiredfps = input(user, "Choose your desired fps.[version_message]\n(0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps) as null|num if (!isnull(desiredfps)) clientfps = desiredfps - parent.fps = desiredfps + if (world.byond_version >= 511 && user.client && user.client.byond_version >= 511) + user.client.vars["fps"] = clientfps if("ui") var/pickedui = input(user, "Choose your UI style.", "Character Preference") as null|anything in list("Midnight", "Plasmafire", "Retro", "Slimecore", "Operative", "Clockwork") if(pickedui) diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index ddb1cf5545..7dca5d9b3e 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -41,7 +41,7 @@ /obj/item/clothing/glasses/proc/thermal_overload() if(ishuman(src.loc)) var/mob/living/carbon/human/H = src.loc - if(!(H.has_disability(BLIND))) + if(!(H.has_disability(DISABILITY_BLIND))) if(H.glasses == src) to_chat(H, "[src] overloads and blinds you!") H.flash_act(visual = 1) diff --git a/code/modules/clothing/suits/labcoat.dm b/code/modules/clothing/suits/labcoat.dm index 7c7599af3d..f50f6eaf6a 100644 --- a/code/modules/clothing/suits/labcoat.dm +++ b/code/modules/clothing/suits/labcoat.dm @@ -1,49 +1,48 @@ -/obj/item/clothing/suit/toggle/labcoat - name = "labcoat" - desc = "A suit that protects against minor chemical spills." - icon_state = "labcoat" - item_state = "labcoat" - blood_overlay_type = "coat" - body_parts_covered = CHEST|ARMS - allowed = list(/obj/item/device/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/device/healthanalyzer, /obj/item/device/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/pill, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic, /obj/item/soap, /obj/item/device/sensor_device, /obj/item/tank/internals/emergency_oxygen, /obj/item/tank/internals/plasmaman) - armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0, fire = 50, acid = 50) - togglename = "buttons" - species_exception = list(/datum/species/golem) - -/obj/item/clothing/suit/toggle/labcoat/cmo - name = "chief medical officer's labcoat" - desc = "Bluer than the standard model." - icon_state = "labcoat_cmo" - item_state = "labcoat_cmo" - -/obj/item/clothing/suit/toggle/labcoat/emt - name = "EMT's jacket" - desc = "A dark blue jacket with reflective strips for emergency medical technicians." - icon_state = "labcoat_emt" - item_state = "labcoat_cmo" - -/obj/item/clothing/suit/toggle/labcoat/mad - name = "\improper The Mad's labcoat" - desc = "It makes you look capable of konking someone on the noggin and shooting them into space." - icon_state = "labgreen" - item_state = "labgreen" - -/obj/item/clothing/suit/toggle/labcoat/genetics - name = "geneticist labcoat" - desc = "A suit that protects against minor chemical spills. Has a blue stripe on the shoulder." - icon_state = "labcoat_gen" - -/obj/item/clothing/suit/toggle/labcoat/chemist - name = "chemist labcoat" - desc = "A suit that protects against minor chemical spills. Has an orange stripe on the shoulder." - icon_state = "labcoat_chem" - -/obj/item/clothing/suit/toggle/labcoat/virologist - name = "virologist labcoat" - desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Has a green stripe on the shoulder." - icon_state = "labcoat_vir" - -/obj/item/clothing/suit/toggle/labcoat/science - name = "scientist labcoat" - desc = "A suit that protects against minor chemical spills. Has a purple stripe on the shoulder." - icon_state = "labcoat_tox" +/obj/item/clothing/suit/toggle/labcoat + name = "labcoat" + desc = "A suit that protects against minor chemical spills." + icon_state = "labcoat" + item_state = "labcoat" + blood_overlay_type = "coat" + body_parts_covered = CHEST|ARMS + allowed = list(/obj/item/device/analyzer, /obj/item/stack/medical, /obj/item/dnainjector, /obj/item/reagent_containers/dropper, /obj/item/reagent_containers/syringe, /obj/item/reagent_containers/hypospray, /obj/item/device/healthanalyzer, /obj/item/device/flashlight/pen, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/pill, /obj/item/storage/pill_bottle, /obj/item/paper, /obj/item/melee/classic_baton/telescopic, /obj/item/soap, /obj/item/device/sensor_device, /obj/item/tank/internals/emergency_oxygen) + armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 50, rad = 0, fire = 50, acid = 50) + togglename = "buttons" + +/obj/item/clothing/suit/toggle/labcoat/cmo + name = "chief medical officer's labcoat" + desc = "Bluer than the standard model." + icon_state = "labcoat_cmo" + item_state = "labcoat_cmo" + +/obj/item/clothing/suit/toggle/labcoat/emt + name = "EMT's jacket" + desc = "A dark blue jacket with reflective strips for emergency medical technicians." + icon_state = "labcoat_emt" + item_state = "labcoat_cmo" + +/obj/item/clothing/suit/toggle/labcoat/mad + name = "\improper The Mad's labcoat" + desc = "It makes you look capable of konking someone on the noggin and shooting them into space." + icon_state = "labgreen" + item_state = "labgreen" + +/obj/item/clothing/suit/toggle/labcoat/genetics + name = "geneticist labcoat" + desc = "A suit that protects against minor chemical spills. Has a blue stripe on the shoulder." + icon_state = "labcoat_gen" + +/obj/item/clothing/suit/toggle/labcoat/chemist + name = "chemist labcoat" + desc = "A suit that protects against minor chemical spills. Has an orange stripe on the shoulder." + icon_state = "labcoat_chem" + +/obj/item/clothing/suit/toggle/labcoat/virologist + name = "virologist labcoat" + desc = "A suit that protects against minor chemical spills. Offers slightly more protection against biohazards than the standard model. Has a green stripe on the shoulder." + icon_state = "labcoat_vir" + +/obj/item/clothing/suit/toggle/labcoat/science + name = "scientist labcoat" + desc = "A suit that protects against minor chemical spills. Has a purple stripe on the shoulder." + icon_state = "labcoat_tox" \ No newline at end of file diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index 5c28632c89..c1cea8224e 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -13,7 +13,7 @@ var/max_severity = 3 -/datum/round_event/disease_outbreak/announce(fake) +/datum/round_event/disease_outbreak/announce() priority_announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/ai/outbreak7.ogg') /datum/round_event/disease_outbreak/setup() @@ -33,7 +33,7 @@ var/turf/T = get_turf(H) if(!T) continue - if(!(T.z in GLOB.station_z_levels)) + if(T.z != ZLEVEL_STATION_PRIMARY) continue if(!H.client) continue @@ -51,7 +51,7 @@ var/datum/disease/D if(!advanced_virus) if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work. - if(!H.dna || (H.has_disability(BLIND))) //A blindness disease would be the worst. + if(!H.dna || (H.has_disability(DISABILITY_BLIND))) //A blindness disease would be the worst. continue D = new virus_type() var/datum/disease/dnaspread/DS = D diff --git a/code/modules/food_and_drinks/food/snacks_pie.dm b/code/modules/food_and_drinks/food/snacks_pie.dm index 1ec5bb3499..977bd60da1 100644 --- a/code/modules/food_and_drinks/food/snacks_pie.dm +++ b/code/modules/food_and_drinks/food/snacks_pie.dm @@ -27,7 +27,6 @@ list_reagents = list("nutriment" = 6, "banana" = 5, "vitamin" = 2) tastes = list("pie" = 1) foodtype = GRAIN | DAIRY | SUGAR - var/stunning = TRUE /obj/item/reagent_containers/food/snacks/pie/cream/throw_impact(atom/hit_atom) . = ..() @@ -47,18 +46,15 @@ creamoverlay.icon_state = "creampie_lizard" else creamoverlay.icon_state = "creampie_human" - if(stunning) - H.Knockdown(20) //splat! + H.Knockdown(20) //splat! H.adjust_blurriness(1) H.visible_message("[H] is creamed by [src]!", "You've been creamed by [src]!") playsound(H, "desceration", 50, TRUE) - if(!H.creamed) // one layer at a time + if (!H.creamed) // one layer at a time H.add_overlay(creamoverlay) H.creamed = TRUE qdel(src) -/obj/item/reagent_containers/food/snacks/pie/cream/nostun - stunning = FALSE /obj/item/reagent_containers/food/snacks/pie/berryclafoutis name = "berry clafoutis" diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 99a3de90e1..372c085adb 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -1,3 +1,4 @@ + /obj/machinery/gibber name = "gibber" desc = "The name isn't descriptive enough?" @@ -11,10 +12,10 @@ circuit = /obj/item/circuitboard/machine/gibber var/operating = FALSE //Is it on? - var/dirty = FALSE // Does it need cleaning? + var/dirty = 0 // Does it need cleaning? var/gibtime = 40 // Time from starting until meat appears var/meat_produced = 0 - var/ignore_clothing = FALSE + var/ignore_clothing = 0 /obj/machinery/gibber/Initialize() @@ -29,7 +30,7 @@ gib_time -= 5 * M.rating gibtime = gib_time if(M.rating >= 2) - ignore_clothing = TRUE + ignore_clothing = 1 /obj/machinery/gibber/update_icon() cut_overlays() @@ -60,10 +61,6 @@ to_chat(user, "It's locked and running.") return - if(!anchored) - to_chat(user, "[src] cannot be used unless bolted to the ground.") - return - if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling)) var/mob/living/L = user.pulling if(!iscarbon(L)) @@ -73,17 +70,12 @@ if(C.buckled ||C.has_buckled_mobs()) to_chat(user, "[C] is attached to something!") return - - if(!ignore_clothing) - for(var/obj/item/I in C.held_items + C.get_equipped_items()) - if(!(I.flags_1 & NODROP_1)) - to_chat(user, "Subject may not have abiotic items on.") - return + if(C.abiotic(1) && !ignore_clothing) + to_chat(user, "Subject may not have abiotic items on.") + return user.visible_message("[user] starts to put [C] into the gibber!") - - add_fingerprint(user) - + src.add_fingerprint(user) if(do_after(user, gibtime, target = src)) if(C && user.pulling == C && !C.buckled && !C.has_buckled_mobs() && !occupant) user.visible_message("[user] stuffs [C] into the gibber!") diff --git a/code/modules/goonchat/browserassets/css/browserOutput.css b/code/modules/goonchat/browserassets/css/browserOutput.css index a35748e13e..c72f26a4e7 100644 --- a/code/modules/goonchat/browserassets/css/browserOutput.css +++ b/code/modules/goonchat/browserassets/css/browserOutput.css @@ -399,9 +399,6 @@ h1.alert, h2.alert {color: #000000;} .love {color: #FF69Bf;} .lovebold {color: #FF69Bf; font-weight: bold;} -.monkeyhive {color: #774704;} -.monkeylead {color: #774704; font-size: 2;} - .connectionClosed, .fatalError {background: red; color: white; padding: 5px;} .connectionClosed.restored {background: green;} diff --git a/code/modules/holiday/holidays.dm b/code/modules/holiday/holidays.dm index f4734d9506..2b24f02a44 100644 --- a/code/modules/holiday/holidays.dm +++ b/code/modules/holiday/holidays.dm @@ -9,8 +9,6 @@ var/begin_weekday = FALSE //If set to a weekday, then this will trigger the holiday on the above week var/always_celebrate = FALSE // for christmas neverending, or testing. - var/obj/item/drone_hat //If this is defined, drones without a default hat will spawn with this one during the holiday; check drones_as_items.dm to see this used - // This proc gets run before the game starts when the holiday is activated. Do festive shit here. /datum/holiday/proc/celebrate() return @@ -174,13 +172,11 @@ name = "Labor Day" begin_day = 1 begin_month = MAY - drone_hat = /obj/item/clothing/head/hardhat /datum/holiday/firefighter name = "Firefighter's Day" begin_day = 4 begin_month = MAY - drone_hat = /obj/item/clothing/head/hardhat/red /datum/holiday/firefighter/getStationPrefix() return pick("Burning","Blazing","Plasma","Fire") @@ -194,7 +190,6 @@ name = "Doctor's Day" begin_day = 1 begin_month = JULY - drone_hat = /obj/item/clothing/head/nursehat /datum/holiday/UFO name = "UFO Day" @@ -226,7 +221,6 @@ name = "Talk-Like-a-Pirate Day" begin_day = 19 begin_month = SEPTEMBER - drone_hat = /obj/item/clothing/head/pirate /datum/holiday/pirate/greet() return "Ye be talkin' like a pirate today or else ye'r walkin' tha plank, matey!" @@ -327,7 +321,6 @@ begin_week = 4 begin_month = NOVEMBER begin_weekday = THURSDAY - drone_hat = /obj/item/clothing/head/that //This is the closest we can get to a pilgrim's hat /datum/holiday/thanksgiving/canada name = "Thanksgiving in Canada" @@ -391,14 +384,12 @@ Since Ramadan is an entire month that lasts 29.5 days on average, the start and name = "Mayan Doomsday Anniversary" begin_day = 21 begin_month = DECEMBER - drone_hat = /obj/item/clothing/mask/rat/tribal /datum/holiday/xmas name = CHRISTMAS begin_day = 22 begin_month = DECEMBER end_day = 27 - drone_hat = /obj/item/clothing/head/santa /datum/holiday/xmas/greet() return "Have a merry Christmas!" @@ -419,7 +410,6 @@ Since Ramadan is an entire month that lasts 29.5 days on average, the start and begin_day = 1 begin_month = DECEMBER end_day = 31 - drone_hat = /obj/item/clothing/head/santa /datum/holiday/festive_season/greet() return "Have a nice festive season!" @@ -442,7 +432,6 @@ Since Ramadan is an entire month that lasts 29.5 days on average, the start and /datum/holiday/easter name = EASTER - drone_hat = /obj/item/clothing/head/rabbitears var/const/days_early = 1 //to make editing the holiday easier var/const/days_extra = 1 diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 87c860b50e..bb349b7d19 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -45,7 +45,7 @@ min_wrate = FLOOR(10-wratemod,1) // 7,5,2,0 Clamps at 0 and 10 You want this low min_wchance = 67-(ML.rating*16) // 48,35,19,3 Clamps at 0 and 67 You want this low for(var/obj/item/circuitboard/machine/plantgenes/vaultcheck in component_parts) - if(istype(vaultcheck, /obj/item/circuitboard/machine/plantgenes/vault)) // DUMB BOTANY TUTS + if(istype(vaultcheck, /obj/item/circuitboard/machine/plantgenes/vault)) // DISABILITY_DUMB BOTANY TUTS max_potency = 100 max_yield = 10 min_production = 1 diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index dadf077c8a..15456c1e34 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -146,7 +146,7 @@ /obj/item/reagent_containers/food/snacks/grown/on_grind() var/nutriment = reagents.get_reagent_amount("nutriment") - if(grind_results&&grind_results.len) + if(grind_results.len) for(var/i in 1 to grind_results.len) grind_results[grind_results[i]] = nutriment reagents.del_reagent("nutriment") @@ -154,7 +154,7 @@ /obj/item/reagent_containers/food/snacks/grown/on_juice() var/nutriment = reagents.get_reagent_amount("nutriment") - if(juice_results&&juice_results.len) + if(juice_results.len) for(var/i in 1 to juice_results.len) juice_results[juice_results[i]] = nutriment reagents.del_reagent("nutriment") diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm index 637c3bfcee..805cf787f7 100644 --- a/code/modules/integrated_electronics/core/assemblies.dm +++ b/code/modules/integrated_electronics/core/assemblies.dm @@ -20,8 +20,6 @@ var/charge_tick = FALSE var/charge_delay = 4 var/use_cyborg_cell = TRUE - max_integrity = 50 - armor = list(melee = 50, bullet = 70, laser = 70, energy = 100, bomb = 10, bio = 100, rad = 100, fire = 0, acid = 0) /obj/item/device/electronic_assembly/proc/check_interactivity(mob/user) return user.canUseTopic(src,be_close = TRUE) @@ -32,6 +30,8 @@ START_PROCESSING(SScircuit, src) materials[MAT_METAL] = round((max_complexity + max_components) / 4) * SScircuit.cost_multiplier + + /obj/item/device/electronic_assembly/Destroy() STOP_PROCESSING(SScircuit, src) return ..() @@ -273,9 +273,22 @@ /obj/item/device/electronic_assembly/afterattack(atom/target, mob/user, proximity) - for(var/obj/item/integrated_circuit/input/S in assembly_components) - if(S.sense(target,user,proximity)) - visible_message(" [user] waves [src] around [target].") + for(var/obj/item/integrated_circuit/input/sensor/S in assembly_components) + if(!proximity) + if(istype(S,/obj/item/integrated_circuit/input/sensor/ranged)||(!user)) + if(user.client) + if(!(target in view(user.client))) + continue + else + if(!(target in view(user))) + continue + else + continue + S.set_pin_data(IC_OUTPUT, 1, WEAKREF(target)) + S.check_then_do_work() + S.scan(target) + + visible_message(" [user] waves [src] around [target].") /obj/item/device/electronic_assembly/screwdriver_act(mob/living/user, obj/item/S) @@ -313,11 +326,8 @@ interact(user) return TRUE else - for(var/obj/item/integrated_circuit/input/S in assembly_components) - S.attackby_react(I,user,user.a_intent) return ..() - /obj/item/device/electronic_assembly/attack_self(mob/user) if(!check_interactivity(user)) return @@ -381,6 +391,7 @@ /obj/item/device/electronic_assembly/proc/get_object() return src + // Returns the location to be used for dropping items. // Same as the regular drop_location(), but with checks being run on acting_object if necessary. /obj/item/integrated_circuit/drop_location() @@ -395,7 +406,6 @@ /obj/item/device/electronic_assembly/default //The /default electronic_assemblys are to allow the introduction of the new naming scheme without breaking old saves. name = "type-a electronic assembly" - /obj/item/device/electronic_assembly/calc name = "type-b electronic assembly" icon_state = "setup_small_calc" @@ -497,4 +507,4 @@ /obj/item/device/electronic_assembly/drone/arms name = "type-b electronic drone" icon_state = "setup_drone_arms" - desc = "It's a case, for building mobile electronics with. This one is armed and dangerous." + desc = "It's a case, for building mobile electronics with. This one is armed and dangerous." \ No newline at end of file diff --git a/code/modules/integrated_electronics/core/debugger.dm b/code/modules/integrated_electronics/core/debugger.dm index 666fcf00d6..ac6f5c1a1e 100644 --- a/code/modules/integrated_electronics/core/debugger.dm +++ b/code/modules/integrated_electronics/core/debugger.dm @@ -56,7 +56,7 @@ data_to_show = A.name to_chat(user, "You write '[data_to_write ? data_to_show : "NULL"]' to the '[io]' pin of \the [io.holder].") else if(io.io_type == PULSE_CHANNEL) - io.holder.check_then_do_work(io.ord,ignore_power = TRUE) + io.holder.check_then_do_work(ignore_power = TRUE) to_chat(user, "You pulse \the [io.holder]'s [io].") io.holder.interact(user) // This is to update the UI. diff --git a/code/modules/integrated_electronics/core/helpers.dm b/code/modules/integrated_electronics/core/helpers.dm index 773c4f0684..e84823f201 100644 --- a/code/modules/integrated_electronics/core/helpers.dm +++ b/code/modules/integrated_electronics/core/helpers.dm @@ -15,9 +15,9 @@ io_type_override = io_list_copy[io_entry] if(io_type_override) - io_list.Add(new io_type_override(src, io_entry, default_data, pin_type,i)) + io_list.Add(new io_type_override(src, io_entry, default_data, pin_type)) else - io_list.Add(new io_type(src, io_entry, default_data, pin_type,i)) + io_list.Add(new io_type(src, io_entry, default_data, pin_type)) /obj/item/integrated_circuit/proc/set_pin_data(pin_type, pin_number, datum/new_data) diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/code/modules/integrated_electronics/core/integrated_circuit.dm index 0c1a2fdad5..069ca4245c 100644 --- a/code/modules/integrated_electronics/core/integrated_circuit.dm +++ b/code/modules/integrated_electronics/core/integrated_circuit.dm @@ -58,12 +58,6 @@ a creative player the means to solve many problems. Circuits are held inside an /obj/item/integrated_circuit/proc/any_examine(mob/user) return -/obj/item/integrated_circuit/proc/attackby_react(var/atom/movable/A,mob/user) - return - -/obj/item/integrated_circuit/proc/sense(var/atom/movable/A,mob/user,prox) - return - /obj/item/integrated_circuit/proc/check_interactivity(mob/user) if(assembly) return assembly.check_interactivity(user) @@ -297,18 +291,17 @@ a creative player the means to solve many problems. Circuits are held inside an return TRUE // Battery has enough. return FALSE // Not enough power. -/obj/item/integrated_circuit/proc/check_then_do_work(ord,var/ignore_power = FALSE) +/obj/item/integrated_circuit/proc/check_then_do_work(var/ignore_power = FALSE) if(world.time < next_use) // All intergrated circuits have an internal cooldown, to protect from spam. - return FALSE + return if(power_draw_per_use && !ignore_power) if(!check_power()) power_fail() - return FALSE + return next_use = world.time + cooldown_per_use - do_work(ord) - return TRUE + do_work() -/obj/item/integrated_circuit/proc/do_work(ord) +/obj/item/integrated_circuit/proc/do_work() return /obj/item/integrated_circuit/proc/disconnect_all() @@ -376,3 +369,4 @@ a creative player the means to solve many problems. Circuits are held inside an return TRUE return FALSE + diff --git a/code/modules/integrated_electronics/core/pins.dm b/code/modules/integrated_electronics/core/pins.dm index 528281c3b7..bff96b713c 100644 --- a/code/modules/integrated_electronics/core/pins.dm +++ b/code/modules/integrated_electronics/core/pins.dm @@ -25,16 +25,14 @@ D [1]/ || var/list/linked = list() var/io_type = DATA_CHANNEL var/pin_type // IC_INPUT, IC_OUTPUT, IC_ACTIVATOR - used in saving assembly wiring - var/ord -/datum/integrated_io/New(loc, _name, _data, _pin_type,_ord) + +/datum/integrated_io/New(loc, _name, _data, _pin_type) name = _name if(_data) data = _data if(_pin_type) pin_type = _pin_type - if(_ord) - ord = _ord holder = loc @@ -150,7 +148,7 @@ D [1]/ || /datum/integrated_io/activate/push_data() for(var/k in 1 to linked.len) var/datum/integrated_io/io = linked[k] - io.holder.check_then_do_work(io.ord) + io.holder.check_then_do_work() /datum/integrated_io/proc/pull_data() for(var/k in 1 to linked.len) @@ -209,7 +207,7 @@ D [1]/ || write_data_to_pin(new_data) /datum/integrated_io/activate/ask_for_pin_data(mob/user) // This just pulses the pin. - holder.check_then_do_work(ord,ignore_power = TRUE) + holder.check_then_do_work(ignore_power = TRUE) to_chat(user, "You pulse \the [holder]'s [src] pin.") /datum/integrated_io/activate diff --git a/code/modules/integrated_electronics/core/special_pins/index_pin.dm b/code/modules/integrated_electronics/core/special_pins/index_pin.dm index 06267eec61..51b12a0f3a 100644 --- a/code/modules/integrated_electronics/core/special_pins/index_pin.dm +++ b/code/modules/integrated_electronics/core/special_pins/index_pin.dm @@ -1,4 +1,4 @@ -// These pins can only contain integer numbers between 0 and IC_MAX_LIST_LENGTH. Null is allowed. +// These pins can only contain integer numbers between 1 and IC_MAX_LIST_LENGTH. Null is not allowed. /datum/integrated_io/index name = "index pin" data = 1 @@ -11,10 +11,10 @@ /datum/integrated_io/index/write_data_to_pin(new_data) if(isnull(new_data)) - new_data = 0 + new_data = 1 if(isnum(new_data)) - data = CLAMP(round(new_data), 0, IC_MAX_LIST_LENGTH) + data = CLAMP(round(new_data), 1, IC_MAX_LIST_LENGTH) holder.on_data_written() /datum/integrated_io/index/display_pin_type() diff --git a/code/modules/integrated_electronics/subtypes/arithmetic.dm b/code/modules/integrated_electronics/subtypes/arithmetic.dm index e491a34a69..7dec779f83 100644 --- a/code/modules/integrated_electronics/subtypes/arithmetic.dm +++ b/code/modules/integrated_electronics/subtypes/arithmetic.dm @@ -30,9 +30,10 @@ /obj/item/integrated_circuit/arithmetic/addition/do_work() var/result = 0 for(var/k in 1 to inputs.len) - var/I = get_pin_data(IC_INPUT, k) - if(isnum(I)) - result += I + var/datum/integrated_io/I = inputs[k] + I.pull_data() + if(isnum(I.data)) + result = result + I.data set_pin_data(IC_OUTPUT, 1, result) push_data() @@ -55,10 +56,13 @@ return var/result = A.data - for(var/k in 2 to inputs.len) - var/I = get_pin_data(IC_INPUT, k) - if(isnum(I)) - result -= I + for(var/k in 1 to inputs.len) + var/datum/integrated_io/I = inputs[k] + if(I == A) + continue + I.pull_data() + if(isnum(I.data)) + result = result - I.data set_pin_data(IC_OUTPUT, 1, result) push_data() @@ -81,10 +85,13 @@ if(!isnum(A.data)) return var/result = A.data - for(var/k in 2 to inputs.len) - var/I = get_pin_data(IC_INPUT, k) - if(isnum(I)) - result *= I + for(var/k in 1 to inputs.len) + var/datum/integrated_io/I = inputs[k] + if(I == A) + continue + I.pull_data() + if(isnum(I.data)) + result = result * I.data set_pin_data(IC_OUTPUT, 1, result) push_data() @@ -107,12 +114,13 @@ return var/result = A.data - - for(var/k in 2 to inputs.len) - var/I = get_pin_data(IC_INPUT, k) - if(isnum(I) && (I != 0)) - result /= I - + for(var/k in 1 to inputs.len) + var/datum/integrated_io/I = inputs[k] + if(I == A) + continue + I.pull_data() + if(isnum(I.data) && I.data != 0) //No runtimes here. + result = result / I.data set_pin_data(IC_OUTPUT, 1, result) push_data() @@ -220,11 +228,12 @@ /obj/item/integrated_circuit/arithmetic/average/do_work() var/result = 0 var/inputs_used = 0 - for(var/k in 2 to inputs.len) - var/I = get_pin_data(IC_INPUT, k) - if(isnum(I)) + for(var/k in 1 to inputs.len) + var/datum/integrated_io/I = inputs[k] + I.pull_data() + if(isnum(I.data)) inputs_used++ - result += I + result = result + I.data if(inputs_used) result = result / inputs_used @@ -279,10 +288,11 @@ /obj/item/integrated_circuit/arithmetic/square_root/do_work() var/result = 0 - for(var/k in 2 to inputs.len) - var/I = get_pin_data(IC_INPUT, k) - if(isnum(I)) - result += sqrt(I) + for(var/k in 1 to inputs.len) + var/datum/integrated_io/I = inputs[k] + I.pull_data() + if(isnum(I.data)) + result = sqrt(I.data) set_pin_data(IC_OUTPUT, 1, result) push_data() diff --git a/code/modules/integrated_electronics/subtypes/converters.dm b/code/modules/integrated_electronics/subtypes/converters.dm index cd9306d0da..d622ea8ca9 100644 --- a/code/modules/integrated_electronics/subtypes/converters.dm +++ b/code/modules/integrated_electronics/subtypes/converters.dm @@ -160,10 +160,10 @@ /obj/item/integrated_circuit/converter/concatenator/do_work() var/result = null - for(var/k in 1 to inputs.len) - var/I = get_pin_data(IC_INPUT, k) - if(!isnull(I)) - result = result + I + for(var/datum/integrated_io/I in inputs) + I.pull_data() + if(!isnull(I.data)) + result = result + I.data set_pin_data(IC_OUTPUT, 1, result) push_data() diff --git a/code/modules/integrated_electronics/subtypes/input.dm b/code/modules/integrated_electronics/subtypes/input.dm index 91b4b437e3..c39cfeac44 100644 --- a/code/modules/integrated_electronics/subtypes/input.dm +++ b/code/modules/integrated_electronics/subtypes/input.dm @@ -128,7 +128,7 @@ var/mob/living/carbon/human/H = get_pin_data_as_type(IC_INPUT, 1, /mob/living/carbon/human) if(!istype(H)) //Invalid input return - if(H in view(get_turf(src))) // Like medbot's analyzer it can be used in range.. + if(H in view(get_turf(H))) // Like medbot's analyzer it can be used in range.. var/total_health = round(H.health/H.getMaxHealth(), 0.01)*100 var/missing_health = H.getMaxHealth() - H.health @@ -143,49 +143,6 @@ push_data() activate_pin(2) -/obj/item/integrated_circuit/input/slime_scanner - name = "slime_scanner" - desc = "A very small version of the xenobio analyser. This allows the machine to know every needed properties of slime." - icon_state = "medscan_adv" - complexity = 12 - inputs = list("\ target") - outputs = list( - "colour" = IC_PINTYPE_STRING, - "adult" = IC_PINTYPE_BOOLEAN, - "nutrition" = IC_PINTYPE_NUMBER, - "charge" = IC_PINTYPE_NUMBER, - "health" = IC_PINTYPE_NUMBER, - "possible mutation" = IC_PINTYPE_LIST, - "genetic destability"= IC_PINTYPE_NUMBER, - "slime core amount" = IC_PINTYPE_NUMBER, - "Growth progress" = IC_PINTYPE_NUMBER, - ) - activators = list("scan" = IC_PINTYPE_PULSE_IN, "on scanned" = IC_PINTYPE_PULSE_OUT) - spawn_flags = IC_SPAWN_RESEARCH - power_draw_per_use = 80 - -/obj/item/integrated_circuit/input/slime_scanner/do_work() - var/mob/living/simple_animal/slime/T = get_pin_data_as_type(IC_INPUT, 1, /mob/living/simple_animal/slime) - if(!isslime(T)) //Invalid input - return - if(T in view(get_turf(src))) // Like medbot's analyzer it can be used in range.. - - set_pin_data(IC_OUTPUT, 1, T.colour) - set_pin_data(IC_OUTPUT, 2, T.is_adult) - set_pin_data(IC_OUTPUT, 3, T.nutrition/T.get_max_nutrition()) - set_pin_data(IC_OUTPUT, 4, T.powerlevel) - set_pin_data(IC_OUTPUT, 5, round(T.health/T.maxHealth,0.01)*100) - set_pin_data(IC_OUTPUT, 6, uniqueList(T.slime_mutation)) - set_pin_data(IC_OUTPUT, 7, T.mutation_chance) - set_pin_data(IC_OUTPUT, 8, T.cores) - set_pin_data(IC_OUTPUT, 9, T.amount_grown/SLIME_EVOLUTION_THRESHOLD) - - - push_data() - activate_pin(2) - - - /obj/item/integrated_circuit/input/plant_scanner name = "integrated plant analyzer" desc = "A very small version of the plant analyser. This allows the machine to know all valuable params of plants in trays. \ @@ -223,7 +180,7 @@ return for(var/i=1, i<=outputs.len, i++) set_pin_data(IC_OUTPUT, i, null) - if(H in view(get_turf(src))) // Like medbot's analyzer it can be used in range.. + if(H in view(get_turf(H))) // Like medbot's analyzer it can be used in range.. if(H.myseed) set_pin_data(IC_OUTPUT, 1, H.myseed.plantname) set_pin_data(IC_OUTPUT, 2, H.age) @@ -271,7 +228,7 @@ return for(var/i=1, i<=outputs.len, i++) set_pin_data(IC_OUTPUT, i, null) - if(H in view(get_turf(src))) // Like medbot's analyzer it can be used in range.. + if(H in view(get_turf(H))) // Like medbot's analyzer it can be used in range.. if(H.myseed) for(var/datum/plant_gene/reagent/G in H.myseed.genes) greagents.Add(G.get_name()) @@ -714,15 +671,12 @@ spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH power_draw_per_use = 120 -/obj/item/integrated_circuit/input/sensor/sense(var/atom/A,mob/user,prox) - if(!prox) - return FALSE - if(!check_then_do_work()) - return FALSE +/obj/item/integrated_circuit/input/sensor/proc/scan(var/atom/A) var/ignore_bags = get_pin_data(IC_INPUT, 1) if(ignore_bags) if(istype(A, /obj/item/storage)) return FALSE + set_pin_data(IC_OUTPUT, 1, WEAKREF(A)) push_data() activate_pin(1) @@ -740,52 +694,6 @@ spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH power_draw_per_use = 120 -/obj/item/integrated_circuit/input/sensor/ranged/sense(var/atom/A,mob/user) - if(!user) - return FALSE - if(user.client) - if(!(A in view(user.client))) - return FALSE - else - if(!(A in view(user))) - return FALSE - if(!check_then_do_work()) - return FALSE - var/ignore_bags = get_pin_data(IC_INPUT, 1) - if(ignore_bags) - if(istype(A, /obj/item/storage)) - return FALSE - set_pin_data(IC_OUTPUT, 1, WEAKREF(A)) - push_data() - activate_pin(1) - return TRUE - -/obj/item/integrated_circuit/input/objscaner - name = "scaner" - desc = "Scans and obtains a reference for any objects you use on assembly." - extended_desc = "If 'put down' pin is set to true, assembly will take scanned object from your hands to it's location.\ - useful for interaction with grabber. Scaner works only with help intent." - icon_state = "recorder" - complexity = 4 - inputs = list("put down" = IC_PINTYPE_BOOLEAN) - outputs = list("scanned" = IC_PINTYPE_REF) - activators = list("on scanned" = IC_PINTYPE_PULSE_OUT) - spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH - power_draw_per_use = 20 - -/obj/item/integrated_circuit/input/objscaner/attackby_react(var/atom/A,var/mob/user,intent) - if(intent!=INTENT_HELP) - return FALSE - if(!check_then_do_work()) - return FALSE - var/pu = get_pin_data(IC_INPUT, 1) - if(pu) - user.transferItemToLoc(A,drop_location()) - set_pin_data(IC_OUTPUT, 1, WEAKREF(A)) - push_data() - activate_pin(1) - return TRUE - /obj/item/integrated_circuit/input/internalbm name = "internal battery monitor" desc = "This monitors the charge level of an internal battery." @@ -852,38 +760,3 @@ activate_pin(2) push_data() return - -/obj/item/integrated_circuit/input/ntnetsc - name = "NTnet scaner" - desc = "This can return NTnet id of component insi given object, if there is any." - icon_state = "signalsc" - w_class = WEIGHT_CLASS_TINY - complexity = 2 - inputs = list("target" = IC_PINTYPE_REF) - outputs = list( - "id" = IC_PINTYPE_STRING - ) - activators = list("read" = IC_PINTYPE_PULSE_IN, "found" = IC_PINTYPE_PULSE_OUT,"not found" = IC_PINTYPE_PULSE_OUT) - spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH - power_draw_per_use = 1 - -/obj/item/integrated_circuit/input/ntnetsc/do_work() - - var/atom/AM = get_pin_data_as_type(IC_INPUT, 1, /atom) - var/list/processing_list = list(AM) - var/datum/component/ntnet_interface/net = null - set_pin_data(IC_OUTPUT, 1, null) - while(processing_list.len && !net) - var/atom/A = processing_list[1] - processing_list.Cut(1, 2) - //Byond does not allow things to be in multiple contents, or double parent-child hierarchies, so only += is needed - //This is also why we don't need to check against assembled as we go along - processing_list += A.contents - net = A.GetComponent(/datum/component/ntnet_interface) - if(net) - set_pin_data(IC_OUTPUT, 1, net.hardware_id) - activate_pin(2) - else - activate_pin(3) - push_data() - return diff --git a/code/modules/integrated_electronics/subtypes/logic.dm b/code/modules/integrated_electronics/subtypes/logic.dm index f8e858ef94..627301ef10 100644 --- a/code/modules/integrated_electronics/subtypes/logic.dm +++ b/code/modules/integrated_electronics/subtypes/logic.dm @@ -2,7 +2,7 @@ name = "logic gate" desc = "This tiny chip will decide for you!" extended_desc = "Logic circuits will treat a null, 0, and a \"\" string value as FALSE and anything else as TRUE." - complexity = 1 + complexity = 3 outputs = list("result") activators = list("compare" = IC_PINTYPE_PULSE_IN) category_text = "Logic" diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm index 5099547197..f32f414fbb 100644 --- a/code/modules/integrated_electronics/subtypes/manipulation.dm +++ b/code/modules/integrated_electronics/subtypes/manipulation.dm @@ -155,11 +155,9 @@ if(isnum(wanted_dir.data)) if(step(assembly, wanted_dir.data)) activate_pin(2) - return else activate_pin(3) return FALSE - return FALSE /obj/item/integrated_circuit/manipulation/grenade name = "grenade primer" @@ -249,14 +247,9 @@ /obj/item/integrated_circuit/manipulation/plant_module/do_work() ..() var/turf/T = get_turf(src) - var/obj/OM = get_pin_data_as_type(IC_INPUT, 1, /obj) - if(istype(OM,/obj/structure/spacevine) && get_pin_data(IC_INPUT, 2) == 2) - qdel(OM) - activate_pin(2) - return - var/obj/machinery/hydroponics/AM = OM + var/obj/machinery/hydroponics/AM = get_pin_data_as_type(IC_INPUT, 1, /obj/machinery/hydroponics) if(!istype(AM)) //Invalid input - return FALSE + return var/mob/living/M = get_turf(AM) if(!M.Adjacent(T)) return //Can't reach @@ -283,7 +276,6 @@ qdel(AM.myseed) AM.myseed = null AM.weedlevel = 0 //Has a side effect of cleaning up those nasty weeds - AM.dead = 0 AM.update_icon() else activate_pin(2) @@ -292,7 +284,7 @@ /obj/item/integrated_circuit/manipulation/grabber name = "grabber" - desc = "A circuit with it's own inventory for tiny/small items, used to grab and store things." + desc = "A circuit with it's own inventory for small/medium items, used to grab and store things." icon_state = "grabber" extended_desc = "The circuit accepts a reference to thing to be grabbed. It can store up to 10 things. Modes: 1 for grab. 0 for eject the first thing. -1 for eject all." w_class = WEIGHT_CLASS_SMALL @@ -315,7 +307,7 @@ var/mode = get_pin_data(IC_INPUT, 2) if(mode == 1) - if(check_target(AM)) + if(check_target(AM, exclude_contents = TRUE)) if((contents.len < max_items) && (!max_w_class || AM.w_class <= max_w_class)) AM.forceMove(src) if(mode == 0) diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm index 0c66c3a943..33f92c3646 100644 --- a/code/modules/integrated_electronics/subtypes/reagents.dm +++ b/code/modules/integrated_electronics/subtypes/reagents.dm @@ -9,11 +9,6 @@ . = ..() if(volume) create_reagents(volume) - push_vol() - -/obj/item/integrated_circuit/reagent/proc/push_vol() - set_pin_data(IC_OUTPUT, 1, reagents.total_volume) - push_data() /obj/item/integrated_circuit/reagent/smoke name = "smoke generator" @@ -34,8 +29,7 @@ ) activators = list( "create smoke" = IC_PINTYPE_PULSE_IN, - "on smoked" = IC_PINTYPE_PULSE_OUT, - "push ref" = IC_PINTYPE_PULSE_IN + "on smoked" = IC_PINTYPE_PULSE_OUT ) spawn_flags = IC_SPAWN_RESEARCH power_draw_per_use = 20 @@ -46,27 +40,24 @@ //reset warning only if we have reagents now if(changetype == ADD_REAGENT) notified = FALSE - push_vol() + set_pin_data(IC_OUTPUT, 1, reagents.total_volume) + push_data() -/obj/item/integrated_circuit/reagent/smoke/do_work(ord) - switch(ord) - if(1) - if(!reagents || (reagents.total_volume < IC_SMOKE_REAGENTS_MINIMUM_UNITS)) - return - var/location = get_turf(src) - var/datum/effect_system/smoke_spread/chem/S = new - S.attach(location) - playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3) - if(S) - S.set_up(reagents, smoke_radius, location, notified) - if(!notified) - notified = TRUE - S.start() - reagents.clear_reagents() - activate_pin(2) - if(3) - set_pin_data(IC_OUTPUT, 2, WEAKREF(src)) - push_data() +/obj/item/integrated_circuit/reagent/smoke/do_work() + if(!reagents || (reagents.total_volume < IC_SMOKE_REAGENTS_MINIMUM_UNITS)) + return + var/location = get_turf(src) + var/datum/effect_system/smoke_spread/chem/S = new + S.attach(location) + playsound(location, 'sound/effects/smoke.ogg', 50, 1, -3) + if(S) + S.set_up(reagents, smoke_radius, location, notified) + if(!notified) + notified = TRUE + S.start() + + reagents.clear_reagents() + activate_pin(2) /obj/item/integrated_circuit/reagent/injector name = "integrated hypo-injector" @@ -94,9 +85,7 @@ activators = list( "inject" = IC_PINTYPE_PULSE_IN, "on injected" = IC_PINTYPE_PULSE_OUT, - "on fail" = IC_PINTYPE_PULSE_OUT, - "push ref" = IC_PINTYPE_PULSE_IN - + "on fail" = IC_PINTYPE_PULSE_OUT ) spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH power_draw_per_use = 15 @@ -104,8 +93,15 @@ var/transfer_amount = 10 var/busy = FALSE +/obj/item/integrated_circuit/reagent/injector/interact(mob/user) + set_pin_data(IC_OUTPUT, 2, WEAKREF(src)) + push_data() + ..() + + /obj/item/integrated_circuit/reagent/injector/on_reagent_change(changetype) - push_vol() + set_pin_data(IC_OUTPUT, 1, reagents.total_volume) + push_data() /obj/item/integrated_circuit/reagent/injector/on_data_written() var/new_amount = get_pin_data(IC_INPUT, 2) @@ -131,15 +127,7 @@ temp_reagents.clear_reagents() qdel(temp_reagents) -/obj/item/integrated_circuit/reagent/injector/do_work(ord) - switch(ord) - if(1) - inject() - if(4) - set_pin_data(IC_OUTPUT, 2, WEAKREF(src)) - push_data() - -/obj/item/integrated_circuit/reagent/injector/proc/inject() +/obj/item/integrated_circuit/reagent/injector/do_work() set waitfor = FALSE // Don't sleep in a proc that is called by a processor without this set, otherwise it'll delay the entire thing var/atom/movable/AM = get_pin_data_as_type(IC_INPUT, 1, /atom/movable) var/atom/movable/acting_object = get_object() @@ -293,15 +281,17 @@ "volume used" = IC_PINTYPE_NUMBER, "self reference" = IC_PINTYPE_REF ) - activators = list("push ref" = IC_PINTYPE_PULSE_OUT) + activators = list() spawn_flags = IC_SPAWN_DEFAULT|IC_SPAWN_RESEARCH -/obj/item/integrated_circuit/reagent/storage/do_work() +/obj/item/integrated_circuit/reagent/storage/interact(mob/user) set_pin_data(IC_OUTPUT, 2, WEAKREF(src)) push_data() + ..() /obj/item/integrated_circuit/reagent/storage/on_reagent_change(changetype) - push_vol() + set_pin_data(IC_OUTPUT, 1, reagents.total_volume) + push_data() /obj/item/integrated_circuit/reagent/storage/cryo name = "cryo reagent storage" @@ -316,7 +306,6 @@ . = ..() reagents.set_reacting(FALSE) - /obj/item/integrated_circuit/reagent/storage/big name = "big reagent storage" desc = "Stores liquid inside, and away from electrical components. Can store up to 180u." @@ -328,99 +317,6 @@ complexity = 16 spawn_flags = IC_SPAWN_RESEARCH -/obj/item/integrated_circuit/reagent/storage/grinder - name = "reagent grinder" - desc = "This is reagent grinder.It accepts ref to something and refines it into reagents. Can store up to 100u." - icon_state = "blender" - extended_desc = "" - inputs = list( - "target" = IC_PINTYPE_REF, - ) - outputs = list( - "volume used" = IC_PINTYPE_NUMBER, - "self reference" = IC_PINTYPE_REF - ) - activators = list( - "grind" = IC_PINTYPE_PULSE_IN, - "on grind" = IC_PINTYPE_PULSE_OUT, - "on fail" = IC_PINTYPE_PULSE_OUT, - "push ref" = IC_PINTYPE_PULSE_IN - ) - volume = 100 - power_draw_per_use = 150 - complexity = 16 - spawn_flags = IC_SPAWN_RESEARCH - - -/obj/item/integrated_circuit/reagent/storage/grinder/do_work(ord) - switch(ord) - if(1) - grind() - if(4) - set_pin_data(IC_OUTPUT, 2, WEAKREF(src)) - push_data() - -/obj/item/integrated_circuit/reagent/storage/grinder/proc/grind() - if(reagents.total_volume >= reagents.maximum_volume) - activate_pin(3) - return FALSE - var/obj/item/I = get_pin_data_as_type(IC_INPUT, 1, /obj/item) - if(istype(I)&&(I.grind_results)&&check_target(I)&&(I.on_grind(src) != -1)) - reagents.add_reagent_list(I.grind_results) - if(I.reagents) - I.reagents.trans_to(src, I.reagents.total_volume) - qdel(I) - activate_pin(2) - return TRUE - activate_pin(3) - return FALSE - -obj/item/integrated_circuit/reagent/storage/juicer - name = "reagent juicer" - desc = "This is reagent juicer.It accepts ref to something and refines it into reagents. Can store up to 100u." - icon_state = "blender" - extended_desc = "" - inputs = list( - "target" = IC_PINTYPE_REF, - ) - outputs = list( - "volume used" = IC_PINTYPE_NUMBER, - "self reference" = IC_PINTYPE_REF - ) - activators = list( - "juice" = IC_PINTYPE_PULSE_IN, - "on juice" = IC_PINTYPE_PULSE_OUT, - "on fail" = IC_PINTYPE_PULSE_OUT, - "push ref" = IC_PINTYPE_PULSE_IN - ) - volume = 100 - power_draw_per_use = 150 - complexity = 16 - spawn_flags = IC_SPAWN_RESEARCH - -/obj/item/integrated_circuit/reagent/storage/juicer/do_work(ord) - switch(ord) - if(1) - juice() - if(4) - set_pin_data(IC_OUTPUT, 2, WEAKREF(src)) - push_data() - -/obj/item/integrated_circuit/reagent/storage/juicer/proc/juice() - if(reagents.total_volume >= reagents.maximum_volume) - activate_pin(3) - return FALSE - var/obj/item/I = get_pin_data_as_type(IC_INPUT, 1, /obj/item) - if(istype(I)&&check_target(I)&&(I.juice_results)&&(I.on_juice() != -1)) - reagents.add_reagent_list(I.juice_results) - qdel(I) - activate_pin(2) - return TRUE - activate_pin(3) - return FALSE - - - /obj/item/integrated_circuit/reagent/storage/scan name = "reagent scanner" desc = "Stores liquid inside, and away from electrical components. Can store up to 60u. On pulse this beaker will send list of contained reagents." @@ -434,22 +330,17 @@ obj/item/integrated_circuit/reagent/storage/juicer "list of reagents" = IC_PINTYPE_LIST ) activators = list( - "scan" = IC_PINTYPE_PULSE_IN, - "push ref" = IC_PINTYPE_PULSE_IN + "scan" = IC_PINTYPE_PULSE_IN ) spawn_flags = IC_SPAWN_RESEARCH -/obj/item/integrated_circuit/reagent/storage/scan/do_work(ord) - switch(ord) - if(1) - var/cont[0] - for(var/datum/reagent/RE in reagents.reagent_list) - cont += RE.id - set_pin_data(IC_OUTPUT, 3, cont) - push_data() - if(2) - set_pin_data(IC_OUTPUT, 2, WEAKREF(src)) - push_data() +/obj/item/integrated_circuit/reagent/storage/scan/do_work() + var/cont[0] + for(var/datum/reagent/RE in reagents.reagent_list) + cont += RE.id + set_pin_data(IC_OUTPUT, 3, cont) + push_data() + /obj/item/integrated_circuit/reagent/filter name = "reagent filter" @@ -503,8 +394,7 @@ obj/item/integrated_circuit/reagent/storage/juicer if(!source.reagents || !target.reagents) return - // FALSE in those procs makes mobs invalid targets. - if(!source.is_drawable(FALSE) || !target.is_injectable(FALSE)) + if(!source.is_drainable() || !target.is_refillable()) return if(target.reagents.maximum_volume - target.reagents.total_volume <= 0) @@ -520,45 +410,3 @@ obj/item/integrated_circuit/reagent/storage/juicer activate_pin(2) push_data() -/obj/item/integrated_circuit/reagent/storage/heater - name = "chemical heater" - desc = "Stores liquid inside, and away from electrical components. Can store up to 60u. Will heat or freeze reagents \ - to target temperature, when turned on." - icon_state = "heater" - container_type = OPENCONTAINER - complexity = 8 - inputs = list( - "target temperature" = IC_PINTYPE_NUMBER, - "on" = IC_PINTYPE_BOOLEAN - ) - inputs_default = list("1" = 300) - outputs = list("volume used" = IC_PINTYPE_NUMBER,"self reference" = IC_PINTYPE_REF,"temperature" = IC_PINTYPE_NUMBER) - spawn_flags = IC_SPAWN_RESEARCH - var/heater_coefficient = 0.1 - -/obj/item/integrated_circuit/reagent/storage/heater/on_data_written() - if(get_pin_data(IC_INPUT, 2)) - power_draw_idle = 30 - else - power_draw_idle = 0 - -/obj/item/integrated_circuit/reagent/storage/heater/Initialize() - .=..() - START_PROCESSING(SScircuit, src) - -/obj/item/integrated_circuit/reagent/storage/heater/Destroy() - STOP_PROCESSING(SScircuit, src) - return ..() - -/obj/item/integrated_circuit/reagent/storage/heater/process() - if(power_draw_idle) - var/target_temperature = get_pin_data(IC_INPUT, 1) - if(reagents.chem_temp > target_temperature) - reagents.chem_temp += min(-1, (target_temperature - reagents.chem_temp) * heater_coefficient) - if(reagents.chem_temp < target_temperature) - reagents.chem_temp += max(1, (target_temperature - reagents.chem_temp) * heater_coefficient) - - reagents.chem_temp = round(reagents.chem_temp) - reagents.handle_reactions() - set_pin_data(IC_OUTPUT, 3, reagents.chem_temp) - push_data() diff --git a/code/modules/integrated_electronics/subtypes/smart.dm b/code/modules/integrated_electronics/subtypes/smart.dm index 37a38677b0..ec59c3cab1 100644 --- a/code/modules/integrated_electronics/subtypes/smart.dm +++ b/code/modules/integrated_electronics/subtypes/smart.dm @@ -27,6 +27,6 @@ push_data() return // Can't see the target. - set_pin_data(IC_OUTPUT, 1, get_dir(get_turf(src), get_step_towards2(get_turf(src),A))) + set_pin_data(IC_OUTPUT, 1, get_dir(get_turf(src), get_turf(A))) push_data() activate_pin(2) diff --git a/code/modules/library/soapstone.dm b/code/modules/library/soapstone.dm index fd75ba4351..cee4665f07 100644 --- a/code/modules/library/soapstone.dm +++ b/code/modules/library/soapstone.dm @@ -142,7 +142,7 @@ hidden_message = newmessage creator_name = user.real_name creator_key = user.ckey - realdate = world.realtime + realdate = world.timeofday map = SSmapping.config.map_name update_icon() diff --git a/code/modules/mining/aux_base.dm b/code/modules/mining/aux_base.dm index 4e419646bc..6b364e63e7 100644 --- a/code/modules/mining/aux_base.dm +++ b/code/modules/mining/aux_base.dm @@ -1,10 +1,9 @@ ///Mining Base//// -#define ZONE_SET 0 #define BAD_ZLEVEL 1 #define BAD_AREA 2 #define BAD_COORDS 3 -#define BAD_TURF 4 +#define ZONE_SET 4 /area/shuttle/auxillary_base name = "Auxillary Base" @@ -135,31 +134,21 @@ interface with the mining shuttle at the landing site if a mobile beacon is also possible_destinations = "mining_home;mining_away;landing_zone_dock;mining_public" /obj/machinery/computer/auxillary_base/proc/set_landing_zone(turf/T, mob/user, var/no_restrictions) + var/obj/docking_port/mobile/auxillary_base/base_dock = locate(/obj/docking_port/mobile/auxillary_base) in SSshuttle.mobile if(!base_dock) //Not all maps have an Aux base. This object is useless in that case. to_chat(user, "This station is not equipped with an auxillary base. Please contact your Nanotrasen contractor.") return if(!no_restrictions) - var/static/list/disallowed_turf_types = typecacheof(list( - /turf/open/lava, - /turf/closed/indestructible, - /turf/open/indestructible, - )) - if(T.z != ZLEVEL_MINING) return BAD_ZLEVEL + var/colony_radius = max(base_dock.width, base_dock.height)*0.5 + if(T.x - colony_radius < 1 || T.x + colony_radius >= world.maxx || T.y - colony_radius < 1 || T.y + colony_radius >= world.maxx) + return BAD_COORDS //Avoid dropping the base too close to map boundaries, as it results in parts of it being left in space - var/colony_radius = CEILING(max(base_dock.width, base_dock.height)*0.5, 1) - var/list/colony_turfs = block(locate(T.x - colony_radius, T.y - colony_radius, T.z), locate(T.x + colony_radius, T.y + colony_radius, T.z)) - for(var/i in 1 to colony_turfs.len) - CHECK_TICK - var/turf/place = colony_turfs[i] - if(!place) - return BAD_COORDS - if(!istype(place.loc, /area/lavaland/surface)) - return BAD_AREA - if(disallowed_turf_types[place.type]) - return BAD_TURF + var/list/area_counter = get_areas_in_range(colony_radius, T) + if(area_counter.len > 1) //Avoid smashing ruins unless you are inside a really big one + return BAD_AREA var/area/A = get_area(T) @@ -219,16 +208,14 @@ interface with the mining shuttle at the landing site if a mobile beacon is also return switch(AB.set_landing_zone(T, user, no_restrictions)) - if(ZONE_SET) - qdel(src) if(BAD_ZLEVEL) to_chat(user, "This uplink can only be used in a designed mining zone.") if(BAD_AREA) to_chat(user, "Unable to acquire a targeting lock. Find an area clear of stuctures or entirely within one.") if(BAD_COORDS) to_chat(user, "Location is too close to the edge of the station's scanning range. Move several paces away and try again.") - if(BAD_TURF) - to_chat(user, "The landing zone contains turfs unsuitable for a base.") + if(ZONE_SET) + qdel(src) /obj/item/device/assault_pod/mining/unrestricted name = "omni-locational landing field designator" @@ -361,8 +348,7 @@ obj/docking_port/stationary/public_mining_dock /obj/structure/mining_shuttle_beacon/attack_robot(mob/user) return attack_hand(user) //So borgies can help -#undef ZONE_SET #undef BAD_ZLEVEL #undef BAD_AREA #undef BAD_COORDS -#undef BAD_TURF +#undef ZONE_SET diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm index d655ed6e94..c081ff4bb3 100644 --- a/code/modules/mining/lavaland/necropolis_chests.dm +++ b/code/modules/mining/lavaland/necropolis_chests.dm @@ -656,7 +656,7 @@ playsound(user, 'sound/magic/clockwork/fellowship_armory.ogg', 35, TRUE, frequency = 90000 - (active * 30000)) /obj/item/melee/transforming/cleaving_saw/clumsy_transform_effect(mob/living/user) - if(user.has_disability(CLUMSY) && prob(50)) + if(user.has_disability(DISABILITY_CLUMSY) && prob(50)) to_chat(user, "You accidentally cut yourself with [src], like a doofus!") user.take_bodypart_damage(10) diff --git a/code/modules/mob/dead/observer/say.dm b/code/modules/mob/dead/observer/say.dm index d2224a5965..ad64c53fc7 100644 --- a/code/modules/mob/dead/observer/say.dm +++ b/code/modules/mob/dead/observer/say.dm @@ -1,27 +1,25 @@ -/mob/dead/observer/say(message) - message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) - - if (!message) - return - +/mob/dead/observer/say(message) + message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) + + if (!message) + return + log_talk(src,"Ghost/[src.key] : [message]", LOGSAY) - - if(check_emote(message)) - return - - . = say_dead(message) - -/mob/dead/observer/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode) - var/atom/movable/to_follow = speaker - if(radio_freq) - var/atom/movable/virtualspeaker/V = speaker - - if(isAI(V.source)) - var/mob/living/silicon/ai/S = V.source - to_follow = S.eyeobj - else - to_follow = V.source - var/link = FOLLOW_LINK(src, to_follow) - // Recompose the message, because it's scrambled by default - message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode) - to_chat(src, "[link] [message]") + + . = src.say_dead(message) + +/mob/dead/observer/Hear(message, atom/movable/speaker, message_language, raw_message, radio_freq, list/spans, message_mode) + var/atom/movable/to_follow = speaker + if(radio_freq) + var/atom/movable/virtualspeaker/V = speaker + + if(isAI(V.source)) + var/mob/living/silicon/ai/S = V.source + to_follow = S.eyeobj + else + to_follow = V.source + var/link = FOLLOW_LINK(src, to_follow) + // Recompose the message, because it's scrambled by default + message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode) + to_chat(src, "[link] [message]") + diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index c1ea547b34..efb7887da2 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -16,7 +16,7 @@ /mob/living/carbon/monkey/handle_blood() - if(bodytemperature >= 225 && !(has_disability(NOCLONE))) //cryosleep or husked people do not pump the blood. + if(bodytemperature >= 225 && !(has_disability(DISABILITY_NOCLONE))) //cryosleep or husked people do not pump the blood. //Blood regeneration if there is some space if(blood_volume < BLOOD_VOLUME_NORMAL) blood_volume += 0.1 // regenerate blood VERY slowly @@ -27,8 +27,7 @@ if(NOBLOOD in dna.species.species_traits) bleed_rate = 0 return - - if(bodytemperature >= 225 && !(has_disability(NOCLONE))) //cryosleep or husked people do not pump the blood. + if(bodytemperature >= 225 && !(has_disability(DISABILITY_NOCLONE))) //cryosleep or husked people do not pump the blood. //Blood regeneration if there is some space if(blood_volume < BLOOD_VOLUME_NORMAL && !(NOHUNGER in dna.species.species_traits)) @@ -201,13 +200,13 @@ return "blood" /mob/living/carbon/monkey/get_blood_id() - if(!(has_disability(NOCLONE))) + if(!(has_disability(DISABILITY_NOCLONE))) return "blood" /mob/living/carbon/human/get_blood_id() if(dna.species.exotic_blood) return dna.species.exotic_blood - else if((NOBLOOD in dna.species.species_traits) || (has_disability(NOCLONE))) + else if((NOBLOOD in dna.species.species_traits) || (has_disability(DISABILITY_NOCLONE))) return return "blood" diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm index 90c70d00eb..e3b9f247f8 100644 --- a/code/modules/mob/living/brain/brain_item.dm +++ b/code/modules/mob/living/brain/brain_item.dm @@ -79,8 +79,8 @@ if(!brainmob.stored_dna) brainmob.stored_dna = new /datum/dna/stored(brainmob) C.dna.copy_dna(brainmob.stored_dna) - if(L.has_disability(NOCLONE)) - brainmob.disabilities[NOCLONE] = L.disabilities[NOCLONE] + if(L.has_disability(DISABILITY_NOCLONE)) + brainmob.disabilities[DISABILITY_NOCLONE] = L.disabilities[DISABILITY_NOCLONE] var/obj/item/organ/zombie_infection/ZI = L.getorganslot(ORGAN_SLOT_ZOMBIE) if(ZI) brainmob.set_species(ZI.old_species) //For if the brain is cloned diff --git a/code/modules/mob/living/brain/status_procs.dm b/code/modules/mob/living/brain/status_procs.dm index 2baea2e7cd..735a0186bf 100644 --- a/code/modules/mob/living/brain/status_procs.dm +++ b/code/modules/mob/living/brain/status_procs.dm @@ -1,6 +1,6 @@ //Here are the procs used to modify status effects of a mob. //The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness -// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability. +// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability. /////////////////////////////////// EYE_BLIND //////////////////////////////////// diff --git a/code/modules/mob/living/carbon/alien/status_procs.dm b/code/modules/mob/living/carbon/alien/status_procs.dm index 33ba8fea1d..86b7f3508c 100644 --- a/code/modules/mob/living/carbon/alien/status_procs.dm +++ b/code/modules/mob/living/carbon/alien/status_procs.dm @@ -1,6 +1,6 @@ //Here are the procs used to modify status effects of a mob. //The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage, -// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability. +// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability. /////////////////////////////////// STUN //////////////////////////////////// diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 8b1b47612b..2bca491c40 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -157,7 +157,7 @@ if(!throwable_mob.buckled) thrown_thing = throwable_mob stop_pulling() - if(has_disability(PACIFISM)) + if(has_disability(DISABILITY_PACIFISM)) to_chat(src, "You gently let go of [throwable_mob].") var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors var/turf/end_T = get_turf(target) @@ -170,7 +170,7 @@ thrown_thing = I dropItemToGround(I) - if(has_disability(PACIFISM) && I.throwforce) + if(has_disability(DISABILITY_PACIFISM) && I.throwforce) to_chat(src, "You set [I] down gently on the ground.") return @@ -365,9 +365,16 @@ to_chat(src, "You successfully [cuff_break ? "break" : "remove"] [I].") if(cuff_break) - . = !((I == handcuffed) || (I == legcuffed)) qdel(I) - return + if(I == handcuffed) + handcuffed = null + update_handcuffed() + return + else if(I == legcuffed) + legcuffed = null + update_inv_legcuffed() + return + return TRUE else if(I == handcuffed) @@ -402,7 +409,7 @@ dropItemToGround(I) var/modifier = 0 - if(has_disability(CLUMSY)) + if(has_disability(DISABILITY_CLUMSY)) modifier -= 40 //Clumsy people are more likely to hit themselves -Honk! switch(rand(1,100)+modifier) //91-100=Nothing special happens @@ -511,7 +518,7 @@ health = maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute update_stat() if(((maxHealth - total_burn) < HEALTH_THRESHOLD_DEAD) && stat == DEAD ) - become_husk("burn") + become_husk() med_hud_set_health() /mob/living/carbon/update_sight() @@ -767,7 +774,7 @@ reagents.addiction_list = list() cure_all_traumas(TRUE, TRUE) ..() - // heal ears after healing disabilities, since ears check DEAF disability + // heal ears after healing disabilities, since ears check DISABILITY_DEAF disability // when healing. restoreEars() diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index a6d4f3536b..90502eae40 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -306,15 +306,11 @@ if(eyes.eye_damage > 20) if(prob(eyes.eye_damage - 20)) - if(!has_disability(NEARSIGHT)) + if(!has_disability(DISABILITY_NEARSIGHT)) to_chat(src, "Your eyes start to burn badly!") - become_nearsighted(EYE_DAMAGE) - else if(prob(eyes.eye_damage - 25)) - if(!has_disability(BLIND)) + if(!has_disability(DISABILITY_BLIND)) to_chat(src, "You can't see anything!") - become_blind(EYE_DAMAGE) - else to_chat(src, "Your eyes are really starting to hurt. This can't be good for you!") if(has_bane(BANE_LIGHT)) diff --git a/code/modules/mob/living/carbon/examine.dm b/code/modules/mob/living/carbon/examine.dm index b8d9d510fd..5ef14d5d09 100644 --- a/code/modules/mob/living/carbon/examine.dm +++ b/code/modules/mob/living/carbon/examine.dm @@ -70,7 +70,7 @@ else msg += "[t_He] [t_is] severely deformed!\n" - if(disabilities & DUMB) + if(has_disability(DISABILITY_DUMB)) msg += "[t_He] seem[p_s()] to be clumsy and unable to think.\n" if(fire_stacks > 0) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 4453c33436..95788da39d 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -49,6 +49,6 @@ /mob/living/carbon/proc/Drain() become_husk(CHANGELING_DRAIN) - add_disability(NOCLONE, CHANGELING_DRAIN) + add_disability(DISABILITY_NOCLONE, CHANGELING_DRAIN) blood_volume = 0 return 1 diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 39caec803b..bc4fd83334 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -273,7 +273,7 @@ msg += "[t_He] look[p_s()] like a drunken mess.\n" if(91.01 to INFINITY) msg += "[t_He] [t_is] a shitfaced, slobbering wreck.\n" - + for (var/I in src.vore_organs) var/datum/belly/B = vore_organs[I] msg += B.get_examine_msg() @@ -285,7 +285,7 @@ if(stat == UNCONSCIOUS) msg += "[t_He] [t_is]n't responding to anything around [t_him] and seem[p_s()] to be asleep.\n" else - if(disabilities & DUMB) + if(has_disability(DISABILITY_DUMB)) msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n" if(InCritical()) msg += "[t_He] [t_is] barely conscious.\n" @@ -350,7 +350,7 @@ msg += "\[Add comment\]\n" if(print_flavor_text() && get_visible_name() != "Unknown")//Are we sure we know who this is? Don't show flavor text unless we can recognize them. Prevents certain metagaming with impersonation. msg += "[print_flavor_text()]\n" - + msg += "*---------*
" to_chat(user, msg) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b153f914f3..f0c630421d 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -847,8 +847,7 @@ return TRUE /mob/living/carbon/human/update_gravity(has_gravity,override = 0) - if(dna && dna.species) //prevents a runtime while a human is being monkeyfied - override = dna.species.override_float + override = dna.species.override_float ..() /mob/living/carbon/human/vomit(lost_nutrition = 10, blood = 0, stun = 1, distance = 0, message = 1, toxic = 0) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index f0835ed7bf..7b0f50041d 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -44,10 +44,7 @@ if(mind.martial_art && mind.martial_art.deflection_chance) //Some martial arts users can deflect projectiles! if(prob(mind.martial_art.deflection_chance)) if(!lying && dna && !dna.check_mutation(HULK)) //But only if they're not lying down, and hulks can't do it - if(mind.martial_art.deflection_chance >= 100) //if they can NEVER be hit, lets clue sec in ;) - visible_message("[src] deflects the projectile; [p_they()] can't be hit with ranged weapons!", "You deflect the projectile!") - else - visible_message("[src] deflects the projectile!", "You deflect the projectile!") + visible_message("[src] deflects the projectile; [p_they()] can't be hit with ranged weapons!", "You deflect the projectile!") playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1) return 0 @@ -143,7 +140,7 @@ return ..() /mob/living/carbon/human/grabbedby(mob/living/carbon/user, supress_message = 0) - if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && (has_disability(FAT)) && ismonkey(pulling)) + if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && (has_disability(DISABILITY_FAT)) && ismonkey(pulling)) devour_mob(pulling) else ..() diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 84da846bfd..7f1d9560e0 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -91,8 +91,19 @@ return wear_id.GetID() +/mob/living/carbon/human/abiotic(full_body = 0) + var/abiotic_hands = FALSE + for(var/obj/item/I in held_items) + if(!(I.flags_1 & NODROP_1)) + abiotic_hands = TRUE + break + if(full_body && abiotic_hands && ((back && !(back.flags_1&NODROP_1)) || (wear_mask && !(wear_mask.flags_1&NODROP_1)) || (head && !(head.flags_1&NODROP_1)) || (shoes && !(shoes.flags_1&NODROP_1)) || (w_uniform && !(w_uniform.flags_1&NODROP_1)) || (wear_suit && !(wear_suit.flags_1&NODROP_1)) || (glasses && !(glasses.flags_1&NODROP_1)) || (ears && !(ears.flags_1&NODROP_1)) || (gloves && !(gloves.flags_1&NODROP_1)) ) ) + return TRUE + return abiotic_hands + + /mob/living/carbon/human/IsAdvancedToolUser() - if(has_disability(MONKEYLIKE)) + if(has_disability(DISABILITY_MONKEYLIKE)) return FALSE return TRUE//Humans can use guns and such diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 6e5d8c7373..c90d1a0231 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -23,7 +23,7 @@ . = 1 /mob/living/carbon/human/mob_negates_gravity() - return ((shoes && shoes.negates_gravity()) || (dna.species.negates_gravity(src))) + return ((shoes && shoes.negates_gravity()) || dna.species.negates_gravity(src)) /mob/living/carbon/human/Move(NewLoc, direct) . = ..() diff --git a/code/modules/mob/living/carbon/human/interactive.dm b/code/modules/mob/living/carbon/human/interactive.dm index 8c913349c5..9d4b7a8420 100644 --- a/code/modules/mob/living/carbon/human/interactive.dm +++ b/code/modules/mob/living/carbon/human/interactive.dm @@ -339,7 +339,7 @@ if(TRAITS & TRAIT_SMART) smartness = 75 else if(TRAITS & TRAIT_DUMB) - add_disability(CLUMSY, GENETIC_MUTATION) + add_disability(DISABILITY_CLUMSY, GENETIC_MUTATION) smartness = 25 if(TRAITS & TRAIT_MEAN) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 640447fc4d..4dd26ebe6b 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -187,7 +187,7 @@ if(G.tint) update_tint() if(G.vision_correction) - if(has_disability(NEARSIGHT)) + if(has_disability(DISABILITY_NEARSIGHT)) overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1) adjust_eye_damage(0) if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha)) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 80db28b99d..a84683c5ae 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -93,18 +93,19 @@ failed_last_breath = 1 - var/datum/species/S = dna.species + if(dna && dna.species) + var/datum/species/S = dna.species - if(S.breathid == "o2") - throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy) - else if(S.breathid == "tox") - throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox) - else if(S.breathid == "co2") - throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2) - else if(S.breathid == "n2") - throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro) + if(S.breathid == "o2") + throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy) + else if(S.breathid == "tox") + throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox) + else if(S.breathid == "co2") + throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2) + else if(S.breathid == "n2") + throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro) - return FALSE + return 0 else if(istype(L, /obj/item/organ/lungs)) var/obj/item/organ/lungs/lun = L @@ -237,10 +238,10 @@ /mob/living/carbon/human/proc/get_cold_protection(temperature) if(dna.check_mutation(COLDRES)) - return TRUE //Fully protected from the cold. + return 1 //Fully protected from the cold. - if(RESISTCOLD in dna.species.species_traits) - return TRUE + if(dna && (RESISTCOLD in dna.species.species_traits)) + return 1 if(istype(loc, /obj/item/device/dogborg/sleeper)) return 1 //freezing to death in sleepers ruins fun. diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 451fadab62..c7dc99720f 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -125,7 +125,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) randname += " [pick(GLOB.last_names)]" return randname - + //Called when cloning, copies some vars that should be kept /datum/species/proc/copy_properties_from(datum/species/old_species) return @@ -312,7 +312,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(!HD) //Decapitated return - if(H.has_disability(HUSK)) + if(H.has_disability(DISABILITY_HUSK)) return var/datum/sprite_accessory/S var/list/standing = list() @@ -452,8 +452,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/list/standing = list() var/obj/item/bodypart/head/HD = H.get_bodypart("head") - - if(HD && !(H.has_disability(HUSK))) + if(HD && !(H.has_disability(DISABILITY_HUSK))) // lipstick if(H.lip_style && (LIPS in species_traits)) var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/human_face.dmi', "lips_[H.lip_style]", -BODY_LAYER) @@ -724,7 +723,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) if(S.center) accessory_overlay = center_image(accessory_overlay, S.dimension_x, S.dimension_y) - if(!(H.has_disability(HUSK))) + if(!(H.has_disability(DISABILITY_HUSK))) if(!forced_colour) switch(S.color_src) if(MUTCOLORS) @@ -1101,18 +1100,17 @@ GLOBAL_LIST_EMPTY(roundstart_races) //////// /datum/species/proc/handle_digestion(mob/living/carbon/human/H) - - //The fucking FAT mutation is the dumbest shit ever. It makes the code so difficult to work with - if(H.has_disability(FAT))//I share your pain, past coder. + //The fucking DISABILITY_FAT mutation is the dumbest shit ever. It makes the code so difficult to work with + if(H.has_disability(DISABILITY_FAT))//I share your pain, past coder. if(H.overeatduration < 100) to_chat(H, "You feel fit again!") - H.remove_disability(FAT, OBESITY) + H.remove_disability(DISABILITY_FAT, OBESITY) H.update_inv_w_uniform() H.update_inv_wear_suit() else if(H.overeatduration > 500) to_chat(H, "You suddenly feel blubbery!") - H.add_disability(FAT, OBESITY) + H.add_disability(DISABILITY_FAT, OBESITY) H.update_inv_w_uniform() H.update_inv_wear_suit() @@ -1269,7 +1267,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) . += (health_deficiency / 25) if((hungry >= 70) && !flight) //Being hungry won't stop you from using flightpack controls/flapping your wings although it probably will in the wing case but who cares. . += hungry / 50 - if(H.has_disability(FAT)) + if(H.has_disability(DISABILITY_FAT)) . += (1.5 - flight) if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT) . += (BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR @@ -1315,7 +1313,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) /datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) - if(user.has_disability(PACIFISM)) + if(user.has_disability(DISABILITY_PACIFISM)) to_chat(user, "You don't want to harm [target]!") return FALSE if(target.check_block()) @@ -1388,7 +1386,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) return 1 else user.do_attack_animation(target, ATTACK_EFFECT_DISARM) - + if(target.w_uniform) target.w_uniform.add_fingerprint(user) var/randomized_zone = ran_zone(user.zone_selected) diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm index 34859a257f..90ab0cfceb 100644 --- a/code/modules/mob/living/carbon/human/species_types/golems.dm +++ b/code/modules/mob/living/carbon/human/species_types/golems.dm @@ -725,7 +725,7 @@ /obj/structure/cloth_pile/proc/revive() if(QDELETED(src) || QDELETED(cloth_golem)) //QDELETED also checks for null, so if no cloth golem is set this won't runtime return - if(cloth_golem.suiciding || cloth_golem.has_disability(NOCLONE)) + if(cloth_golem.suiciding || cloth_golem.has_disability(DISABILITY_NOCLONE)) QDEL_NULL(cloth_golem) return diff --git a/code/modules/mob/living/carbon/human/status_procs.dm b/code/modules/mob/living/carbon/human/status_procs.dm index cf3d676e90..aca6973355 100644 --- a/code/modules/mob/living/carbon/human/status_procs.dm +++ b/code/modules/mob/living/carbon/human/status_procs.dm @@ -11,12 +11,12 @@ amount = dna.species.spec_stun(src,amount) return ..() -/mob/living/carbon/human/cure_husk(list/sources) +/mob/living/carbon/human/cure_husk() . = ..() if(.) update_hair() -/mob/living/carbon/human/become_husk(source) +/mob/living/carbon/human/become_husk() if(istype(dna.species, /datum/species/skeleton)) //skeletons shouldn't be husks. cure_husk() return diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 14f294fd90..5684d8eb68 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -609,7 +609,7 @@ generate/load female uniform sprites matching all previously decided variables if(BP.dmg_overlay_type) . += "-[BP.dmg_overlay_type]" - if(has_disability(HUSK)) + if(has_disability(DISABILITY_HUSK)) . += "-husk" /mob/living/carbon/human/load_limb_from_cache() diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm index 3e6b7f3ddd..052e8eeaf5 100644 --- a/code/modules/mob/living/carbon/monkey/combat.dm +++ b/code/modules/mob/living/carbon/monkey/combat.dm @@ -121,8 +121,10 @@ if(L == src) return FALSE - if(has_disability(PACIFISM)) + + if(has_disability(DISABILITY_PACIFISM)) return FALSE + if(enemies[L]) return TRUE diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 59a19c7b84..7c65e4a604 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -11,7 +11,7 @@ butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/monkey = 5, /obj/item/stack/sheet/animalhide/monkey = 1) type_of_meat = /obj/item/reagent_containers/food/snacks/meat/slab/monkey gib_type = /obj/effect/decal/cleanable/blood/gibs - unique_name = TRUE + unique_name = 1 bodyparts = list(/obj/item/bodypart/chest/monkey, /obj/item/bodypart/head/monkey, /obj/item/bodypart/l_arm/monkey, /obj/item/bodypart/r_arm/monkey, /obj/item/bodypart/r_leg/monkey, /obj/item/bodypart/l_leg/monkey) devourable = TRUE @@ -62,7 +62,7 @@ if (bodytemperature < 283.222) . += (283.222 - bodytemperature) / 10 * 1.75 - + var/static/config_monkey_delay if(isnull(config_monkey_delay)) config_monkey_delay = CONFIG_GET(number/monkey_delay) @@ -89,15 +89,13 @@ /mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools - if(mind && is_monkey(mind)) - return TRUE - return FALSE + return 0 /mob/living/carbon/monkey/reagent_check(datum/reagent/R) //can metabolize all reagents - return FALSE + return 0 /mob/living/carbon/monkey/canBeHandcuffed() - return TRUE + return 1 /mob/living/carbon/monkey/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) if(judgement_criteria & JUDGE_EMAGGED) diff --git a/code/modules/mob/living/carbon/monkey/monkey_defense.dm b/code/modules/mob/living/carbon/monkey/monkey_defense.dm index 3d7619b6d2..96cafa4501 100644 --- a/code/modules/mob/living/carbon/monkey/monkey_defense.dm +++ b/code/modules/mob/living/carbon/monkey/monkey_defense.dm @@ -160,13 +160,13 @@ if(!bodyzone_hit || bodyzone_hit == "head") if(wear_mask) if(!(wear_mask.resistance_flags & UNACIDABLE)) - wear_mask.acid_act(acidpwr, acid_volume) + wear_mask.acid_act(acidpwr) else to_chat(src, "Your mask protects you from the acid.") return if(head) if(!(head.resistance_flags & UNACIDABLE)) - head.acid_act(acidpwr, acid_volume) + head.acid_act(acidpwr) else to_chat(src, "Your hat protects you from the acid.") return diff --git a/code/modules/mob/living/carbon/monkey/update_icons.dm b/code/modules/mob/living/carbon/monkey/update_icons.dm index 87058ce76d..1bb4400087 100644 --- a/code/modules/mob/living/carbon/monkey/update_icons.dm +++ b/code/modules/mob/living/carbon/monkey/update_icons.dm @@ -19,7 +19,7 @@ if(!HD) //Decapitated return - if(has_disability(HUSK)) + if(has_disability(DISABILITY_HUSK)) return var/hair_hidden = 0 diff --git a/code/modules/mob/living/carbon/status_procs.dm b/code/modules/mob/living/carbon/status_procs.dm index 1d5525edd9..efde375227 100644 --- a/code/modules/mob/living/carbon/status_procs.dm +++ b/code/modules/mob/living/carbon/status_procs.dm @@ -1,6 +1,6 @@ //Here are the procs used to modify status effects of a mob. //The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage, -// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, NEARSIGHT disability, and HUSK disability. +// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, DISABILITY_NEARSIGHT disability, and DISABILITY_HUSK disability. /mob/living/carbon/damage_eyes(amount) var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES) diff --git a/code/modules/mob/living/carbon/update_icons.dm b/code/modules/mob/living/carbon/update_icons.dm index 5034abfbbe..147f14c945 100644 --- a/code/modules/mob/living/carbon/update_icons.dm +++ b/code/modules/mob/living/carbon/update_icons.dm @@ -290,7 +290,7 @@ else . += "-robotic" - if(has_disability(HUSK)) + if(has_disability(DISABILITY_HUSK)) . += "-husk" diff --git a/code/modules/mob/living/emote.dm b/code/modules/mob/living/emote.dm index fd3c521cd1..9f541aaf67 100644 --- a/code/modules/mob/living/emote.dm +++ b/code/modules/mob/living/emote.dm @@ -1,3 +1,18 @@ +//The code execution of the emote datum is located at code/datums/emotes.dm +/mob/living/emote(act, m_type = null, message = null) + act = lowertext(act) + var/param = message + var/custom_param = findchar(act, " ") + if(custom_param) + param = copytext(act, custom_param + 1, length(act) + 1) + act = copytext(act, 1, custom_param) + + var/datum/emote/E + E = E.emote_list[act] + if(!E) + to_chat(src, "Unusable emote '[act]'. Say *help for a list.") + return + E.run_emote(src, param, m_type) /* EMOTE DATUMS */ /datum/emote/living @@ -128,6 +143,16 @@ restraint_check = TRUE wing_time = 10 +/datum/emote/living/flip + key = "flip" + key_third_person = "flips" + restraint_check = TRUE + +/datum/emote/living/flip/run_emote(mob/user, params) + . = ..() + if(.) + user.SpinAnimation(7,1) + /datum/emote/living/frown key = "frown" key_third_person = "frowns" @@ -457,6 +482,25 @@ message_param = "beeps at %t." sound = 'sound/machines/twobeep.ogg' +/datum/emote/living/spin + key = "spin" + key_third_person = "spins" + restraint_check = TRUE + +/datum/emote/living/spin/run_emote(mob/user) + . = ..() + if(.) + user.spin(20, 1) + if(iscyborg(user) && user.has_buckled_mobs()) + var/mob/living/silicon/robot/R = user + GET_COMPONENT_FROM(riding_datum, /datum/component/riding, R) + if(riding_datum) + for(var/mob/M in R.buckled_mobs) + riding_datum.force_dismount(M) + else + R.unbuckle_all_mobs() + + /datum/emote/living/circle key = "circle" key_third_person = "circles" diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 41c4572103..0fc19e3882 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -54,7 +54,7 @@ handle_environment(environment) handle_fire() - + // Vore code for belly processes handle_internal_contents() @@ -126,7 +126,7 @@ /mob/living/proc/handle_disabilities() //Eyes if(eye_blind) //blindness, heals slowly over time - if(!stat && !(has_disability(BLIND))) + if(!stat && !(has_disability(DISABILITY_BLIND))) eye_blind = max(eye_blind-1,0) if(client && !eye_blind) clear_alert("blind") @@ -137,7 +137,7 @@ eye_blurry = max(eye_blurry-1, 0) if(client && !eye_blurry) clear_fullscreen("blurry") - if(has_disability(PACIFISM) && a_intent == INTENT_HARM) + if(has_disability(DISABILITY_PACIFISM) && a_intent == INTENT_HARM) to_chat(src, "You don't feel like harming anybody.") a_intent_change(INTENT_HELP) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index fc9a7a5a17..b54dfb9c32 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -413,6 +413,7 @@ cure_nearsighted() cure_blind() cure_husk() + disabilities = 0 hallucination = 0 heal_overall_damage(100000, 100000, 0, 0, 1) //heal brute and burn dmg on both organic and robotic limbs, and update health right away. ExtinguishMob() @@ -818,7 +819,7 @@ if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser()) to_chat(src, "You don't have the dexterity to do this!") return FALSE - if(has_disability(PACIFISM)) + if(has_disability(DISABILITY_PACIFISM)) to_chat(src, "You don't want to risk harming anyone!") return FALSE return TRUE diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 4800d9fb26..cfb700d9d7 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -135,9 +135,11 @@ if(!(status_flags & CANPUSH)) to_chat(user, "[src] can't be grabbed more aggressively!") return FALSE - if(user.has_disability(PACIFISM)) + + if(user.has_disability(DISABILITY_PACIFISM)) to_chat(user, "You don't want to risk hurting [src]!") return FALSE + grippedby(user) //proc to upgrade a simple pull into a more aggressive grab. @@ -191,9 +193,10 @@ M.Feedstop() return // can't attack while eating! - if(has_disability(PACIFISM)) + if(has_disability(DISABILITY_PACIFISM)) to_chat(M, "You don't want to hurt anyone!") return FALSE + if (stat != DEAD) add_logs(M, src, "attacked") M.do_attack_animation(src) @@ -207,9 +210,10 @@ M.visible_message("\The [M] [M.friendly] [src]!") return FALSE else - if(M.has_disability(PACIFISM)) + if(M.has_disability(DISABILITY_PACIFISM)) to_chat(M, "You don't want to hurt anyone!") return FALSE + if(M.attack_sound) playsound(loc, M.attack_sound, 50, 1, 1) M.do_attack_animation(src) @@ -225,9 +229,10 @@ return FALSE if (M.a_intent == INTENT_HARM) - if(M.has_disability(PACIFISM)) + if(M.has_disability(DISABILITY_PACIFISM)) to_chat(M, "You don't want to hurt anyone!") return FALSE + if(M.is_muzzled() || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSMOUTH)) to_chat(M, "You can't bite with your mouth covered!") return FALSE @@ -250,9 +255,10 @@ return FALSE else - if(L.has_disability(PACIFISM)) + if(L.has_disability(DISABILITY_PACIFISM)) to_chat(L, "You don't want to hurt anyone!") return + L.do_attack_animation(src) if(prob(90)) add_logs(L, src, "attacked") @@ -274,7 +280,7 @@ grabbedby(M) return FALSE if("harm") - if(M.has_disability(PACIFISM)) + if(M.has_disability(DISABILITY_PACIFISM)) to_chat(M, "You don't want to hurt anyone!") return FALSE M.do_attack_animation(src) @@ -364,7 +370,7 @@ //called when the mob receives a bright flash /mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash) - if(get_eye_protection() < intensity && (override_blindness_check || !(has_disability(BLIND)))) + if(get_eye_protection() < intensity && (override_blindness_check || !(has_disability(DISABILITY_BLIND)))) overlay_fullscreen("flash", type) addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25) return 1 diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 904e9b9c21..9e45693fdc 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -26,8 +26,6 @@ var/incorporeal_move = FALSE //FALSE is off, INCORPOREAL_MOVE_BASIC is normal, INCORPOREAL_MOVE_SHADOW is for ninjas //and INCORPOREAL_MOVE_JAUNT is blocked by holy water/salt - var/list/disabilities = list() - var/list/surgeries = list() //a list of surgery datums. generally empty, they're added when the player wants them. var/now_pushing = null //used by living/Collide() and living/PushAM() to prevent potential infinite loop. diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 4e731567f1..fa315068ac 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -72,7 +72,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( /mob/living/say(message, bubble_type,var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE) var/static/list/crit_allowed_modes = list(MODE_WHISPER = TRUE, MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE) var/static/list/unconscious_allowed_modes = list(MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE) - var/key = get_key(message) + var/talk_key = get_key(message) var/static/list/one_character_prefix = list(MODE_HEADSET = TRUE, MODE_ROBOT = TRUE, MODE_WHISPER = TRUE) @@ -135,11 +135,9 @@ GLOBAL_LIST_INIT(department_radio_keys, list( // AIs use inherent channels for the holopad. Most inherent channels // ignore the language argument however. - var/datum/saymode/SM = SSradio.saymodes[key] - if(key && SM) - if(!SM.handle_message(src, message, language) && !message_mode) - return - + var/datum/saymode/SM = SSradio.saymodes[talk_key] + if(SM && !SM.handle_message(src, message, language)) + return if(!can_speak_vocal(message)) to_chat(src, "You find yourself unable to speak!") @@ -285,7 +283,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( return 1 /mob/living/proc/can_speak_vocal(message) //Check AFTER handling of xeno and ling channels - if(has_disability(MUTE)) + if(has_disability(DISABILITY_MUTE)) return 0 if(is_muzzled()) @@ -296,6 +294,11 @@ GLOBAL_LIST_INIT(department_radio_keys, list( return 1 +/mob/living/proc/check_emote(message) + if(copytext(message, 1, 2) == "*") + emote(copytext(message, 2)) + return 1 + /mob/living/proc/get_message_mode(message) var/key = copytext(message, 1, 2) if(key == "#") diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index b5b1bd082b..1d2598c63d 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -16,6 +16,7 @@ // It will also stream the chunk that the new loc is in. /mob/camera/aiEye/proc/setLoc(T) + if(ai) if(!isturf(ai.loc)) return @@ -33,8 +34,6 @@ if(istype(ai.current, /obj/machinery/holopad)) var/obj/machinery/holopad/H = ai.current H.move_hologram(ai, T) - if(ai.camera_light_on) - ai.light_cameras() /mob/camera/aiEye/Move() return 0 @@ -86,6 +85,11 @@ if(!user.tracking) user.cameraFollow = null + //user.unset_machine() //Uncomment this if it causes problems. + //user.lightNearbyCamera() + if(user.camera_light_on) + user.light_cameras() + // Return to the Core. /mob/living/silicon/ai/proc/view_core() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 3fe0b2f824..5ac72d0ba3 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -812,9 +812,6 @@ /mob/living/silicon/robot/modules/security set_module = /obj/item/robot_module/security -/mob/living/silicon/robot/modules/clown - set_module = /obj/item/robot_module/clown - /mob/living/silicon/robot/modules/peacekeeper set_module = /obj/item/robot_module/peacekeeper @@ -1018,9 +1015,9 @@ status_flags &= ~CANPUSH if(module.clean_on_move) - AddComponent(/datum/component/cleaning) + flags_1 |= CLEAN_ON_MOVE_1 else - qdel(GetComponent(/datum/component/cleaning)) + flags_1 &= ~CLEAN_ON_MOVE_1 hat_offset = module.hat_offset diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index b3fc0ba4ed..b7cb412927 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -435,37 +435,6 @@ if(CL) CL.reagents.add_reagent("lube", 2 * coeff) -/obj/item/robot_module/clown - name = "Clown" - basic_modules = list( - /obj/item/device/assembly/flash/cyborg, - /obj/item/toy/crayon/rainbow, - /obj/item/device/instrument/bikehorn, - /obj/item/stamp/clown, - /obj/item/bikehorn, - /obj/item/bikehorn/airhorn, - /obj/item/paint/anycolor, - /obj/item/soap/nanotrasen, - /obj/item/pneumatic_cannon/pie/selfcharge/cyborg, - /obj/item/razor, //killbait material - /obj/item/lipstick/purple, - /obj/item/reagent_containers/spray/waterflower/cyborg, - /obj/item/borg/cyborghug/peacekeeper, - /obj/item/borg/lollipop/clown, - /obj/item/picket_sign/cyborg, - /obj/item/reagent_containers/borghypo/clown, - /obj/item/extinguisher/mini) - emag_modules = list( - /obj/item/reagent_containers/borghypo/clown/hacked, - /obj/item/reagent_containers/spray/waterflower/cyborg/hacked) - ratvar_modules = list( - /obj/item/clockwork/slab/cyborg, - /obj/item/clockwork/weapon/ratvarian_spear, - /obj/item/clockwork/replica_fabricator/cyborg) - moduleselect_icon = "service" - cyborg_base_icon = "clown" - hat_offset = -2 - /obj/item/robot_module/butler name = "Service" basic_modules = list( diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index 186d0c5a41..efe289b222 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -125,7 +125,7 @@ if(!target) //Search for decals then. target = scan(/obj/effect/decal/cleanable) - + if(!target) //Checks for remains target = scan(/obj/effect/decal/remains) @@ -242,7 +242,7 @@ say(phrase) victim.emote("scream") playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6) - victim.acid_act(5, 100) + victim.acid_act(5, 2, 100) else if(A == src) // Wets floors and spawns foam randomly if(prob(75)) var/turf/open/T = loc diff --git a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm index 0ef3250e74..45b188c5ef 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/drones_as_items.dm @@ -12,8 +12,6 @@ icon = 'icons/mob/drone.dmi' icon_state = "drone_maint_hat"//yes reuse the _hat state. var/drone_type = /mob/living/simple_animal/drone //Type of drone that will be spawned - var/seasonal_hats = TRUE //If TRUE, and there are no default hats, different holidays will grant different hats - var/static/list/possible_seasonal_hats //This is built automatically in build_seasonal_hats() but can also be edited by admins! /obj/item/drone_shell/New() ..() @@ -21,17 +19,6 @@ if(A) notify_ghosts("A drone shell has been created in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE) GLOB.poi_list |= src - if(isnull(possible_seasonal_hats)) - build_seasonal_hats() - -/obj/item/drone_shell/proc/build_seasonal_hats() - possible_seasonal_hats = list() - if(!SSevents.holidays.len) - return //no holidays, no hats; we'll keep the empty list so we never call this proc again - for(var/V in SSevents.holidays) - var/datum/holiday/holiday = SSevents.holidays[V] - if(holiday.drone_hat) - possible_seasonal_hats += holiday.drone_hat /obj/item/drone_shell/Destroy() GLOB.poi_list -= src @@ -53,10 +40,6 @@ if(be_drone == "No" || QDELETED(src) || !isobserver(user)) return var/mob/living/simple_animal/drone/D = new drone_type(get_turf(loc)) - if(!D.default_hatmask && seasonal_hats && possible_seasonal_hats.len) - var/hat_type = pick(possible_seasonal_hats) - var/obj/item/new_hat = new hat_type(D) - D.equip_to_slot_or_del(new_hat, slot_head) D.admin_spawned = admin_spawned D.key = user.key qdel(src) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 79bedbe264..9bf2c8c430 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -558,7 +558,7 @@ Difficulty: Very Hard H.regenerate_limbs() H.regenerate_organs() H.revive(1,0) - H.add_disability(NOCLONE, MAGIC_DISABILITY) //Free revives, but significantly limits your options for reviving except via the crystal + H.add_disability(DISABILITY_NOCLONE, MAGIC_DISABILITY) //Free revives, but significantly limits your options for reviving except via the crystal H.grab_ghost(force = TRUE) /obj/machinery/anomalous_crystal/helpers //Lets ghost spawn as helpful creatures that can only heal people slightly. Incredibly fragile and they can't converse with humans @@ -719,7 +719,7 @@ Difficulty: Very Hard if(isliving(A) && holder_animal) var/mob/living/L = A L.notransform = 1 - L.add_disability(MUTE, STASIS_MUTE) + L.add_disability(DISABILITY_MUTE, STASIS_MUTE) L.status_flags |= GODMODE L.mind.transfer_to(holder_animal) var/obj/effect/proc_holder/spell/targeted/exit_possession/P = new /obj/effect/proc_holder/spell/targeted/exit_possession @@ -729,7 +729,7 @@ Difficulty: Very Hard /obj/structure/closet/stasis/dump_contents(var/kill = 1) STOP_PROCESSING(SSobj, src) for(var/mob/living/L in src) - L.remove_disability(MUTE, STASIS_MUTE) + L.remove_disability(DISABILITY_MUTE, STASIS_MUTE) L.status_flags &= ~GODMODE L.notransform = 0 if(holder_animal) diff --git a/code/modules/mob/living/status_procs.dm b/code/modules/mob/living/status_procs.dm index 0149c98a3e..95033b1459 100644 --- a/code/modules/mob/living/status_procs.dm +++ b/code/modules/mob/living/status_procs.dm @@ -1,6 +1,6 @@ //Here are the procs used to modify status effects of a mob. //The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, -// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability. +// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability. ////////////////////////////// STUN //////////////////////////////////// @@ -150,6 +150,9 @@ if(!disabilities[disability]) return + if(!islist(sources)) + sources = list(sources) + if(LAZYLEN(sources)) for(var/S in sources) if(S in disabilities[disability]) @@ -180,33 +183,33 @@ /////////////////////////////////// DISABILITY PROCS //////////////////////////////////// /mob/living/proc/cure_blind(list/sources) - remove_disability(BLIND, sources) - if(!has_disability(BLIND)) + remove_disability(DISABILITY_BLIND, sources) + if(!has_disability(DISABILITY_BLIND)) adjust_blindness(-1) /mob/living/proc/become_blind(source) - if(!has_disability(BLIND)) + if(!has_disability(DISABILITY_BLIND)) blind_eyes(1) - add_disability(BLIND, source) + add_disability(DISABILITY_BLIND, source) /mob/living/proc/cure_nearsighted(list/sources) - remove_disability(NEARSIGHT, sources) - if(!has_disability(NEARSIGHT)) + remove_disability(DISABILITY_NEARSIGHT, sources) + if(!has_disability(DISABILITY_NEARSIGHT)) clear_fullscreen("nearsighted") /mob/living/proc/become_nearsighted(source) - if(!has_disability(NEARSIGHT)) + if(!has_disability(DISABILITY_NEARSIGHT)) overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1) - add_disability(NEARSIGHT, source) + add_disability(DISABILITY_NEARSIGHT, source) /mob/living/proc/cure_husk(list/sources) - remove_disability(HUSK, sources) - if(!has_disability(HUSK)) + remove_disability(DISABILITY_HUSK, sources) + if(!has_disability(DISABILITY_HUSK)) status_flags &= ~DISFIGURED update_body() /mob/living/proc/become_husk(source) - if(!has_disability(HUSK)) + if(!has_disability(DISABILITY_HUSK)) status_flags |= DISFIGURED //makes them unknown update_body() - add_disability(HUSK, source) \ No newline at end of file + add_disability(DISABILITY_HUSK, source) \ No newline at end of file diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index ecbaea015f..edbf11654b 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -32,6 +32,7 @@ var/obj/machinery/machine = null var/other_mobs = null + var/disabilities = 0 //Carbon var/atom/movable/pulling = null var/grab_state = 0 diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 10c9a04a6e..747d589c05 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -285,6 +285,11 @@ It's fairly easy to fix if dealing with single letters but not so much with comp firstname.Find(real_name) return firstname.match +/mob/proc/abiotic(full_body = 0) + for(var/obj/item/I in held_items) + if(!(I.flags_1 & NODROP_1)) + return 1 + return 0 //change a mob's act-intent. Input the intent as a string such as "help" or use "right"/"left /mob/verb/a_intent_change(input as text) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index f9ee14b638..1ee7f27452 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -1,88 +1,82 @@ -//Speech verbs. -/mob/verb/say_verb(message as text) - set name = "Say" - set category = "IC" - if(GLOB.say_disabled) //This is here to try to identify lag problems - to_chat(usr, "Speech is currently admin-disabled.") - return - if(message) - say(message) - - -/mob/verb/whisper_verb(message as text) - set name = "Whisper" - set category = "IC" - if(GLOB.say_disabled) //This is here to try to identify lag problems - to_chat(usr, "Speech is currently admin-disabled.") - return - whisper(message) - -/mob/proc/whisper(message, datum/language/language=null) - say(message, language) //only living mobs actually whisper, everything else just talks - -/mob/verb/me_verb(message as text) - set name = "Me" - set category = "IC" - - if(GLOB.say_disabled) //This is here to try to identify lag problems - to_chat(usr, "Speech is currently admin-disabled.") - return - - message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) - - usr.emote("me",1,message) - -/mob/proc/say_dead(var/message) - var/name = real_name - var/alt_name = "" - - if(GLOB.say_disabled) //This is here to try to identify lag problems - to_chat(usr, "Speech is currently admin-disabled.") - return - - if(jobban_isbanned(src, "OOC")) - to_chat(src, "You have been banned from deadchat.") - return - - if (src.client) - if(src.client.prefs.muted & MUTE_DEADCHAT) - to_chat(src, "You cannot talk in deadchat (muted).") - return - - if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT)) - return - - var/mob/dead/observer/O = src - if(isobserver(src) && O.deadchat_name) - name = "[O.deadchat_name]" - else - if(mind && mind.name) - name = "[mind.name]" - else - name = real_name - if(name != real_name) - alt_name = " (died as [real_name])" - - var/K - - if(key) - K = src.key - - message = src.say_quote(message, get_spans()) - var/rendered = "DEAD: [name][alt_name] [message]" - - deadchat_broadcast(rendered, follow_target = src, speaker_key = K) - -/mob/proc/check_emote(message) - if(copytext(message, 1, 2) == "*") - emote(copytext(message, 2)) - return 1 - -/mob/proc/emote(var/act) - return - -/mob/proc/hivecheck() - return 0 - -/mob/proc/lingcheck() - return LINGHIVE_NONE +//Speech verbs. +/mob/verb/say_verb(message as text) + set name = "Say" + set category = "IC" + if(GLOB.say_disabled) //This is here to try to identify lag problems + to_chat(usr, "Speech is currently admin-disabled.") + return + usr.say(message) + + +/mob/verb/whisper_verb(message as text) + set name = "Whisper" + set category = "IC" + if(GLOB.say_disabled) //This is here to try to identify lag problems + to_chat(usr, "Speech is currently admin-disabled.") + return + whisper(message) + +/mob/proc/whisper(message, datum/language/language=null) + say(message, language) //only living mobs actually whisper, everything else just talks + +/mob/verb/me_verb(message as text) + set name = "Me" + set category = "IC" + + if(GLOB.say_disabled) //This is here to try to identify lag problems + to_chat(usr, "Speech is currently admin-disabled.") + return + + message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) + + usr.emote("me",1,message) + +/mob/proc/say_dead(var/message) + var/name = real_name + var/alt_name = "" + + if(GLOB.say_disabled) //This is here to try to identify lag problems + to_chat(usr, "Speech is currently admin-disabled.") + return + + if(jobban_isbanned(src, "OOC")) + to_chat(src, "You have been banned from deadchat.") + return + + if (src.client) + if(src.client.prefs.muted & MUTE_DEADCHAT) + to_chat(src, "You cannot talk in deadchat (muted).") + return + + if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT)) + return + + var/mob/dead/observer/O = src + if(isobserver(src) && O.deadchat_name) + name = "[O.deadchat_name]" + else + if(mind && mind.name) + name = "[mind.name]" + else + name = real_name + if(name != real_name) + alt_name = " (died as [real_name])" + + var/K + + if(key) + K = src.key + + message = src.say_quote(message, get_spans()) + var/rendered = "DEAD: [name][alt_name] [message]" + + deadchat_broadcast(rendered, follow_target = src, speaker_key = K) + +/mob/proc/emote(var/act) + return + +/mob/proc/hivecheck() + return 0 + +/mob/proc/lingcheck() + return LINGHIVE_NONE diff --git a/code/modules/mob/status_procs.dm b/code/modules/mob/status_procs.dm index 8dfadf70f5..591498c084 100644 --- a/code/modules/mob/status_procs.dm +++ b/code/modules/mob/status_procs.dm @@ -1,7 +1,7 @@ //Here are the procs used to modify status effects of a mob. //The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage, -// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability. +// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability. /////////////////////////////////// STUN //////////////////////////////////// @@ -164,7 +164,7 @@ blind_minimum = 1 if(isliving(src)) var/mob/living/L = src - if(L.has_disability(BLIND)) + if(L.has_disability(DISABILITY_BLIND)) blind_minimum = 1 eye_blind = max(eye_blind+amount, blind_minimum) if(!eye_blind) @@ -185,7 +185,7 @@ blind_minimum = 1 if(isliving(src)) var/mob/living/L = src - if(L.has_disability(BLIND)) + if(L.has_disability(DISABILITY_BLIND)) blind_minimum = 1 eye_blind = blind_minimum if(!eye_blind) diff --git a/code/modules/paperwork/contract.dm b/code/modules/paperwork/contract.dm index 3f23b8ba22..1597b7a810 100644 --- a/code/modules/paperwork/contract.dm +++ b/code/modules/paperwork/contract.dm @@ -202,7 +202,7 @@ if(!user.mind.hasSoul) to_chat(user, "You do not possess a soul.") return 0 - if(user.disabilities & DUMB) + if(user.has_disability(DISABILITY_DUMB)) to_chat(user, "You quickly scrawl 'your name' on the contract.") signIncorrectly() return 0 diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 00fbcdc6f7..9d5b7ce0d5 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -93,7 +93,7 @@ return if(ishuman(usr)) var/mob/living/carbon/human/H = usr - if(H.has_disability(CLUMSY) && prob(25)) + if(H.has_disability(DISABILITY_CLUMSY) && prob(25)) to_chat(H, "You cut yourself on the paper! Ahhhh! Ahhhhh!") H.damageoverlaytemp = 9001 H.update_damage_hud() @@ -317,7 +317,7 @@ to_chat(user, "You stamp the paper with your rubber stamp.") if(P.is_hot()) - if(user.has_disability(CLUMSY) && prob(10)) + if(user.has_disability(DISABILITY_CLUMSY) && prob(10)) user.visible_message("[user] accidentally ignites themselves!", \ "You miss the paper and accidentally light yourself on fire!") user.dropItemToGround(P) diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index 17e2fe2a00..af33dfb28c 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -65,7 +65,7 @@ update_icon() else if(P.is_hot()) - if(user.has_disability(CLUMSY) && prob(10)) + if(user.has_disability(DISABILITY_CLUMSY) && prob(10)) user.visible_message("[user] accidentally ignites themselves!", \ "You miss [src] and accidentally light yourself on fire!") user.dropItemToGround(P) diff --git a/code/modules/projectiles/boxes_magazines/internal_mag.dm b/code/modules/projectiles/boxes_magazines/internal_mag.dm index 07ce388abb..f486be732d 100644 --- a/code/modules/projectiles/boxes_magazines/internal_mag.dm +++ b/code/modules/projectiles/boxes_magazines/internal_mag.dm @@ -2,7 +2,6 @@ /obj/item/ammo_box/magazine/internal desc = "Oh god, this shouldn't be here" - flags_1 = CONDUCT_1|ABSTRACT_1 //internals magazines are accessible, so replace spent ammo if full when trying to put a live one in /obj/item/ammo_box/magazine/internal/give_round(obj/item/ammo_casing/R) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 97a907031c..5321a8b300 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -155,10 +155,10 @@ return - //Exclude lasertag guns from the CLUMSY check. + //Exclude lasertag guns from the DISABILITY_CLUMSY check. if(clumsy_check) if(istype(user)) - if (user.has_disability(CLUMSY) && prob(40)) + if (user.has_disability(DISABILITY_CLUMSY) && prob(40)) to_chat(user, "You shoot yourself in the foot with [src]!") var/shot_leg = pick("l_leg", "r_leg") process_fire(user,user,0,params, zone_override = shot_leg) @@ -400,8 +400,7 @@ /obj/item/gun/dropped(mob/user) ..() - if(zoomed) - zoom(user,FALSE) + zoom(user,FALSE) if(azoom) azoom.Remove(user) if(alight) diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index b98bdaf957..32b490a8e6 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -349,7 +349,7 @@ clumsy_check = 0 /obj/item/gun/ballistic/revolver/reverse/can_trigger_gun(mob/living/user) - if((user.has_disability(CLUMSY)) || (user.mind && user.mind.assigned_role == "Clown")) + if((user.has_disability(DISABILITY_CLUMSY)) || (user.mind && user.mind.assigned_role == "Clown")) return ..() if(process_fire(user, user, 0, zone_override = "head")) user.visible_message("[user] somehow manages to shoot [user.p_them()]self in the face!", "You somehow shoot yourself in the face! How the hell?!") diff --git a/code/modules/projectiles/guns/beam_rifle.dm b/code/modules/projectiles/guns/beam_rifle.dm index a2ea7dfb59..3b2a7cff08 100644 --- a/code/modules/projectiles/guns/beam_rifle.dm +++ b/code/modules/projectiles/guns/beam_rifle.dm @@ -4,6 +4,9 @@ #define ZOOM_LOCK_CENTER_VIEW 2 #define ZOOM_LOCK_OFF 3 +#define ZOOM_SPEED_STEP 0 +#define ZOOM_SPEED_INSTANT 1 + #define AUTOZOOM_PIXEL_STEP_FACTOR 48 #define AIMING_BEAM_ANGLE_CHANGE_THRESHOLD 0.1 @@ -42,7 +45,7 @@ var/lastangle = 0 var/aiming_lastangle = 0 var/mob/current_user = null - var/list/obj/effect/projectile_beam/current_tracers + var/obj/effect/projectile_beam/current_tracer var/structure_piercing = 2 //Amount * 2. For some reason structures aren't respecting this unless you have it doubled. Probably with the objects in question's Bump() code instead of this but I'll deal with this later. var/structure_bleed_coeff = 0.7 @@ -60,14 +63,15 @@ var/projectile_setting_pierce = TRUE var/delay = 65 var/lastfire = 0 - + var/lastprocess = 0 //ZOOMING var/zoom_current_view_increase = 0 var/zoom_target_view_increase = 10 + var/zoom_speed = ZOOM_SPEED_STEP var/zooming = FALSE - var/zoom_lock = ZOOM_LOCK_OFF + var/zoom_lock = ZOOM_LOCK_AUTOZOOM_FREEMOVE var/zooming_angle var/current_zoom_x = 0 var/current_zoom_y = 0 @@ -76,6 +80,7 @@ var/static/image/charged_overlay = image(icon = 'icons/obj/guns/energy.dmi', icon_state = "esniper_charged") var/static/image/drained_overlay = image(icon = 'icons/obj/guns/energy.dmi', icon_state = "esniper_empty") + var/datum/action/item_action/zoom_speed_action/zoom_speed_action var/datum/action/item_action/zoom_lock_action/zoom_lock_action /obj/item/gun/energy/beam_rifle/debug @@ -98,6 +103,15 @@ . = ..() /obj/item/gun/energy/beam_rifle/ui_action_click(owner, action) + if(istype(action, /datum/action/item_action/zoom_speed_action)) + zoom_speed++ + if(zoom_speed > 1) + zoom_speed = ZOOM_SPEED_STEP + switch(zoom_speed) + if(ZOOM_SPEED_STEP) + to_chat(owner, "You switch [src]'s digital zoom to stepper mode.") + if(ZOOM_SPEED_INSTANT) + to_chat(owner, "You switch [src]'s digital zoom to instant mode.") if(istype(action, /datum/action/item_action/zoom_lock_action)) zoom_lock++ if(zoom_lock > 3) @@ -121,6 +135,8 @@ var/total_time = SSfastprocess.wait if(delay_override) total_time = delay_override + if(zoom_speed == ZOOM_SPEED_INSTANT) + total_time = 0 zoom_animating = total_time animate(current_user.client, pixel_x = current_zoom_x, pixel_y = current_zoom_y , total_time, SINE_EASING, ANIMATION_PARALLEL) zoom_animating = 0 @@ -134,10 +150,18 @@ /obj/item/gun/energy/beam_rifle/proc/handle_zooming() if(!zooming || !check_user()) return - current_user.client.change_view(world.view + zoom_target_view_increase) - zoom_current_view_increase = zoom_target_view_increase + if(zoom_speed == ZOOM_SPEED_INSTANT) + current_user.client.change_view(world.view + zoom_target_view_increase) + zoom_current_view_increase = zoom_target_view_increase + set_autozoom_pixel_offsets_immediate(zooming_angle) + smooth_zooming() + return + if(zoom_current_view_increase > zoom_target_view_increase) + return + zoom_current_view_increase++ + current_user.client.change_view(zoom_current_view_increase + world.view) set_autozoom_pixel_offsets_immediate(zooming_angle) - smooth_zooming() + smooth_zooming(SSfastprocess.wait * zoom_target_view_increase * zoom_speed) /obj/item/gun/energy/beam_rifle/proc/start_zooming() if(zoom_lock == ZOOM_LOCK_OFF) @@ -145,9 +169,8 @@ zooming = TRUE /obj/item/gun/energy/beam_rifle/proc/stop_zooming() - if(zooming) - zooming = FALSE - reset_zooming() + zooming = FALSE + reset_zooming() /obj/item/gun/energy/beam_rifle/proc/reset_zooming() if(!check_user(FALSE)) @@ -181,14 +204,14 @@ /obj/item/gun/energy/beam_rifle/Initialize() . = ..() - current_tracers = list() START_PROCESSING(SSprojectiles, src) + zoom_speed_action = new(src) zoom_lock_action = new(src) /obj/item/gun/energy/beam_rifle/Destroy() STOP_PROCESSING(SSfastprocess, src) set_user(null) - QDEL_LIST(current_tracers) + QDEL_NULL(current_tracer) return ..() /obj/item/gun/energy/beam_rifle/emp_act(severity) @@ -222,7 +245,6 @@ /obj/item/gun/energy/beam_rifle/process() if(!aiming) - last_process = world.time return check_user() handle_zooming() @@ -277,7 +299,7 @@ set waitfor = FALSE aiming_time_left = aiming_time aiming = FALSE - QDEL_LIST(current_tracers) + QDEL_NULL(current_tracer) stop_zooming() /obj/item/gun/energy/beam_rifle/proc/set_user(mob/user) @@ -319,7 +341,7 @@ sync_ammo() afterattack(M.client.mouseObject, M, FALSE, M.client.mouseParams, passthrough = TRUE) stop_aiming() - QDEL_LIST(current_tracers) + QDEL_NULL(current_tracer) return ..() /obj/item/gun/energy/beam_rifle/afterattack(atom/target, mob/living/user, flag, params, passthrough = FALSE) @@ -533,103 +555,136 @@ handle_impact(target) /obj/item/projectile/beam/beam_rifle/Collide(atom/target) + paused = TRUE if(check_pierce(target)) permutated += target return FALSE if(!QDELETED(target)) cached = get_turf(target) + paused = FALSE . = ..() /obj/item/projectile/beam/beam_rifle/on_hit(atom/target, blocked = FALSE) + paused = TRUE if(!QDELETED(target)) cached = get_turf(target) handle_hit(target) + paused = FALSE . = ..() /obj/item/projectile/beam/beam_rifle/hitscan icon_state = "" var/tracer_type = /obj/effect/projectile_beam/tracer - var/list/beam_segments //assoc list of datum/point or datum/point/vector, start = end. + var/starting_z + var/starting_p_x + var/starting_p_y var/constant_tracer = FALSE - var/beam_index + var/travelled_p_x = 0 + var/travelled_p_y = 0 + var/tracer_spawned = FALSE /obj/item/projectile/beam/beam_rifle/hitscan/Destroy() - if(loc) - var/datum/point/pcache = trajectory.copy_to() - beam_segments[beam_index] = pcache - generate_tracers(constant_tracer) + paused = TRUE //STOP HITTING WHEN YOU'RE ALREADY BEING DELETED! + spawn_tracer(constant_tracer) return ..() -/obj/item/projectile/beam/beam_rifle/hitscan/Collide(atom/target) - var/datum/point/pcache = trajectory.copy_to() - . = ..() - if(. && !QDELETED(src)) //successful touch and not destroyed. - beam_segments[beam_index] = pcache - beam_index = pcache - beam_segments[beam_index] = null - -/obj/item/projectile/beam/beam_rifle/hitscan/before_z_change(turf/oldloc, turf/newloc) - var/datum/point/pcache = trajectory.copy_to() - beam_segments[beam_index] = pcache - beam_index = RETURN_PRECISE_POINT(newloc) - beam_segments[beam_index] = null - return ..() - -/obj/item/projectile/beam/beam_rifle/hitscan/proc/generate_tracers(highlander = FALSE, cleanup = TRUE) - set waitfor = FALSE - if(highlander && istype(gun)) - QDEL_LIST(gun.current_tracers) - for(var/datum/point/p in beam_segments) - gun.current_tracers += generate_projectile_beam_between_points(p, beam_segments[p], tracer_type, color, 0) +/obj/item/projectile/beam/beam_rifle/hitscan/proc/spawn_tracer(put_in_rifle = FALSE) + if(tracer_spawned) + return + tracer_spawned = TRUE + //Remind me to port baystation trajectories so this shit isn't needed... + var/pixels_travelled = round(sqrt(travelled_p_x**2 + travelled_p_y**2),1) + var/scaling = pixels_travelled/world.icon_size + var/midpoint_p_x = round(starting_p_x + (travelled_p_x / 2)) + var/midpoint_p_y = round(starting_p_y + (travelled_p_y / 2)) + var/tracer_px = midpoint_p_x % world.icon_size + var/tracer_py = midpoint_p_y % world.icon_size + var/tracer_lx = (midpoint_p_x - tracer_px) / world.icon_size + var/tracer_ly = (midpoint_p_y - tracer_py) / world.icon_size + var/obj/effect/projectile_beam/PB = new tracer_type(src) + PB.apply_vars(Angle, tracer_px, tracer_py, color, scaling, locate(tracer_lx,tracer_ly,starting_z)) + if(put_in_rifle && istype(gun)) + if(gun.current_tracer) + QDEL_NULL(gun.current_tracer) + gun.current_tracer = PB else - for(var/datum/point/p in beam_segments) - generate_projectile_beam_between_points(p, beam_segments[p], tracer_type, color, 5) - if(cleanup) - QDEL_LIST(beam_segments) - beam_segments = null - QDEL_NULL(beam_index) + QDEL_IN(PB, 5) + +/obj/item/projectile/beam/beam_rifle/hitscan/proc/check_for_turf_edge(turf/T) + if(!istype(T)) + return TRUE + var/tx = T.x + var/ty = T.y + if(tx < 10 || tx > (world.maxx - 10) || ty < 10 || ty > (world.maxy-10)) + return TRUE + return FALSE /obj/item/projectile/beam/beam_rifle/hitscan/fire(setAngle, atom/direct_target) //oranges didn't let me make this a var the first time around so copypasta time - set waitfor = FALSE - var/turf/starting = get_turf(src) - trajectory = new(starting.x, starting.y, starting.z, 0, 0, setAngle? setAngle : Angle, 33) + set waitfor = 0 if(!log_override && firer && original) add_logs(firer, original, "fired at", src, " [get_area(src)]") - fired = TRUE if(setAngle) Angle = setAngle + var/next_run = world.time + var/old_pixel_x = pixel_x + var/old_pixel_y = pixel_y var/safety = 0 //The code works fine, but... just in case... var/turf/c2 - beam_segments = list() //initialize segment list with the list for the first segment - beam_index = RETURN_PRECISE_POINT(src) - beam_segments[beam_index] = null //record start. - if(spread) - Angle += (rand() - 0.5) * spread + var/starting_x = loc.x + var/starting_y = loc.y + starting_z = loc.z + starting_p_x = starting_x * world.icon_size + pixel_x + starting_p_y = starting_y * world.icon_size + pixel_y while(loc) - if(paused || QDELETED(src)) - return if(++safety > (range * 3)) //If it's looping for way, way too long... - qdel(src) - stack_trace("WARNING: [type] projectile encountered infinite recursion in [__FILE__]/[__LINE__]!") return //Kill! + if(spread) + Angle += (rand() - 0.5) * spread var/matrix/M = new M.Turn(Angle) transform = M - trajectory.increment() - var/turf/T = trajectory.return_turf() - if(T.z != loc.z) - before_z_change(loc, T) - trajectory_ignore_forcemove = TRUE - forceMove(T) - trajectory_ignore_forcemove = FALSE + var/Pixel_x=sin(Angle)+16*sin(Angle)*2 + var/Pixel_y=cos(Angle)+16*cos(Angle)*2 + travelled_p_x += Pixel_x + travelled_p_y += Pixel_y + var/pixel_x_offset = old_pixel_x + Pixel_x + var/pixel_y_offset = old_pixel_y + Pixel_y + var/new_x = x + var/new_y = y + while(pixel_x_offset > 16) + pixel_x_offset -= 32 + old_pixel_x -= 32 + new_x++// x++ + while(pixel_x_offset < -16) + pixel_x_offset += 32 + old_pixel_x += 32 + new_x-- + while(pixel_y_offset > 16) + pixel_y_offset -= 32 + old_pixel_y -= 32 + new_y++ + while(pixel_y_offset < -16) + pixel_y_offset += 32 + old_pixel_y += 32 + new_y-- + pixel_x = old_pixel_x + pixel_y = old_pixel_y + step_towards(src, locate(new_x, new_y, z)) + next_run += max(world.tick_lag, speed) + var/delay = next_run - world.time + if(delay <= world.tick_lag*2) + pixel_x = pixel_x_offset + pixel_y = pixel_y_offset else - step_towards(src, T) - animate(src, pixel_x = trajectory.return_px(), pixel_y = trajectory.return_py(), time = 1, flags = ANIMATION_END_NOW) - + animate(src, pixel_x = pixel_x_offset, pixel_y = pixel_y_offset, time = max(1, (delay <= 3 ? delay - 1 : delay)), flags = ANIMATION_END_NOW) + old_pixel_x = pixel_x_offset + old_pixel_y = pixel_y_offset if(can_hit_target(original, permutated)) Collide(original) + c2 = loc Range() - c2 = get_turf(src) + if(check_for_turf_edge(loc)) + spawn_tracer(constant_tracer) if(istype(c2)) cached = c2 @@ -649,3 +704,38 @@ /obj/item/projectile/beam/beam_rifle/hitscan/aiming_beam/on_hit() qdel(src) return FALSE + +/obj/effect/projectile_beam + icon = 'icons/obj/projectiles.dmi' + layer = ABOVE_MOB_LAYER + anchored = TRUE + light_power = 1 + light_range = 2 + light_color = "#00ffff" + mouse_opacity = MOUSE_OPACITY_TRANSPARENT + flags_1 = ABSTRACT_1 + appearance_flags = 0 + +/obj/effect/projectile_beam/tracer + icon_state = "tracer_beam" + +/obj/effect/projectile_beam/tracer/aiming + icon_state = "gbeam" + +/datum/action/item_action/zoom_speed_action + name = "Toggle Zooming Speed" + icon_icon = 'icons/mob/actions/actions_spells.dmi' + button_icon_state = "projectile" + background_icon_state = "bg_tech" + +/datum/action/item_action/zoom_lock_action + name = "Switch Zoom Mode" + icon_icon = 'icons/mob/actions/actions_items.dmi' + button_icon_state = "zoom_mode" + background_icon_state = "bg_tech" + +/obj/effect/projectile_beam/singularity_pull() + return + +/obj/effect/projectile_beam/singularity_act() + return diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index 6cbe2de450..92b2f8c0d4 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -129,7 +129,7 @@ // A gun with ultra-honk pin is useful for clown and useless for everyone else. /obj/item/device/firing_pin/clown/ultra/pin_auth(mob/living/user) playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1) - if(!(user.has_disability(CLUMSY)) && !(user.mind && user.mind.assigned_role == "Clown")) + if(!(user.has_disability(DISABILITY_CLUMSY)) && !(user.mind && user.mind.assigned_role == "Clown")) return 0 return 1 diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 08142f1e8d..79e2fdf903 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -31,11 +31,16 @@ var/last_projectile_move = 0 var/last_process = 0 var/time_offset = 0 - var/datum/point/vector/trajectory - var/trajectory_ignore_forcemove = FALSE //instructs forceMove to NOT reset our trajectory to the new location! + var/old_pixel_x = 0 + var/old_pixel_y = 0 + var/pixel_x_increment = 0 + var/pixel_y_increment = 0 + var/pixel_x_offset = 0 + var/pixel_y_offset = 0 + var/new_x = 0 + var/new_y = 0 var/speed = 0.8 //Amount of deciseconds it takes for projectile to travel - var/pixel_speed = 33 //pixels per move - DO NOT FUCK WITH THIS UNLESS YOU ABSOLUTELY KNOW WHAT YOU ARE DOING OR UNEXPECTED THINGS /WILL/ HAPPEN! var/Angle = 0 var/nondirectional_sprite = FALSE //Set TRUE to prevent projectiles from having their sprites rotated based on firing angle var/spread = 0 //amount (in degrees) of projectile spread @@ -43,9 +48,6 @@ var/ricochets = 0 var/ricochets_max = 2 var/ricochet_chance = 30 - - var/colliding = FALSE //pause processing.. - var/ignore_source_check = FALSE var/damage = 10 @@ -166,28 +168,20 @@ /obj/item/projectile/proc/vol_by_damage() if(src.damage) - return CLAMP((src.damage) * 0.67, 30, 100)// Multiply projectile damage by 0.67, then CLAMP the value between 30 and 100 + return CLAMP((src.damage) * 0.67, 30, 100)// Multiply projectile damage by 0.67, then clamp the value between 30 and 100 else return 50 //if the projectile doesn't do damage, play its hitsound at 50% volume -/obj/item/projectile/proc/on_ricochet(atom/A) - return - /obj/item/projectile/Collide(atom/A) - colliding = TRUE if(check_ricochet(A) && check_ricochet_flag(A) && ricochets < ricochets_max) ricochets++ if(A.handle_ricochet(src)) - on_ricochet(A) ignore_source_check = TRUE range = initial(range) - return TRUE + return FALSE if(firer && !ignore_source_check) if(A == firer || (A == firer.loc && ismecha(A))) //cannot shoot yourself or your mech - trajectory_ignore_forcemove = TRUE - forceMove(get_turf(A)) - trajectory_ignore_forcemove = FALSE - colliding = FALSE + loc = A.loc return FALSE var/distance = get_dist(get_turf(A), starting) // Get the distance between the turf shot from and the mob we hit and use that for the calculations. @@ -203,32 +197,25 @@ if(!prehit(A)) if(forcedodge) - trajectory_ignore_forcemove = TRUE - forceMove(target_turf) - trajectory_ignore_forcemove = FALSE - colliding = FALSE + loc = target_turf return FALSE var/permutation = A.bullet_act(src, def_zone) // searches for return value, could be deleted after run so check A isn't null if(permutation == -1 || forcedodge)// the bullet passes through a dense object! - trajectory_ignore_forcemove = TRUE - forceMove(target_turf) - trajectory_ignore_forcemove = FALSE + loc = target_turf if(A) permutated.Add(A) - colliding = FALSE return FALSE else var/atom/alt = select_target(A) if(alt) if(!prehit(alt)) - colliding = FALSE return FALSE alt.bullet_act(src, def_zone) qdel(src) - colliding = FALSE return TRUE + /obj/item/projectile/proc/select_target(atom/A) //Selects another target from a wall if we hit a wall. if(!A || !A.density || (A.flags_1 & ON_BORDER_1) || ismob(A) || A == original) //if we hit a dense non-border obj or dense turf then we also hit one of the mobs or machines/structures on that tile. return @@ -259,30 +246,12 @@ return TRUE return FALSE -/obj/item/projectile/proc/return_predicted_turf_after_moves(moves, forced_angle) //I say predicted because there's no telling that the projectile won't change direction/location in flight. - if(!trajectory && isnull(forced_angle) && isnull(Angle)) - return FALSE - var/datum/point/vector/current = trajectory - if(!current) - var/turf/T = get_turf(src) - current = new(T.x, T.y, T.z, pixel_x, pixel_y, isnull(forced_angle)? Angle : forced_angle, pixel_speed) - var/datum/point/vector/v = current.return_vector_after_increments(moves) - return v.return_turf() - -/obj/item/projectile/proc/return_pathing_turfs_in_moves(moves, forced_angle) - var/turf/current = get_turf(src) - var/turf/ending = return_predicted_turf_after_moves(moves, forced_angle) - return getline(current, ending) - -/obj/item/projectile/proc/before_z_change(turf/oldloc, turf/newloc) - return - /obj/item/projectile/Process_Spacemove(var/movement_dir = 0) return TRUE //Bullets don't drift in space /obj/item/projectile/process() last_process = world.time - if(!loc || !fired || !trajectory) + if(!loc || !fired) fired = FALSE return PROCESS_KILL if(paused || !isturf(loc)) @@ -316,70 +285,73 @@ setAngle(angle) if(spread) setAngle(Angle + ((rand() - 0.5) * spread)) - var/turf/starting = get_turf(src) if(isnull(Angle)) //Try to resolve through offsets if there's no angle set. - if(isnull(xo) || isnull(yo)) - stack_trace("WARNING: Projectile [type] deleted due to being unable to resolve a target after angle was null!") - qdel(src) - return + var/turf/starting = get_turf(src) var/turf/target = locate(CLAMP(starting + xo, 1, world.maxx), CLAMP(starting + yo, 1, world.maxy), starting.z) setAngle(Get_Angle(src, target)) if(!nondirectional_sprite) var/matrix/M = new M.Turn(Angle) transform = M - trajectory = new(starting.x, starting.y, starting.z, 0, 0, Angle, pixel_speed) + old_pixel_x = pixel_x + old_pixel_y = pixel_y last_projectile_move = world.time fired = TRUE if(!isprocessing) START_PROCESSING(SSprojectiles, src) - pixel_move(1) //move it now! /obj/item/projectile/proc/setAngle(new_angle) //wrapper for overrides. Angle = new_angle - if(!nondirectional_sprite) - var/matrix/M = new - M.Turn(Angle) - transform = M - if(trajectory) - trajectory.set_angle(new_angle) return TRUE -/obj/item/projectile/forceMove(atom/target) - . = ..() - if(trajectory && !trajectory_ignore_forcemove && isturf(target)) - trajectory.initialize_location(target.x, target.y, target.z, 0, 0) - -/obj/item/projectile/proc/pixel_move(moves, trajectory_multiplier = 1) - if(!loc || !trajectory) - return - last_projectile_move = world.time +/obj/item/projectile/proc/pixel_move(moves) if(!nondirectional_sprite) var/matrix/M = new M.Turn(Angle) transform = M - trajectory.increment(trajectory_multiplier) - var/turf/T = trajectory.return_turf() - if(T.z != loc.z) - before_z_change(loc, T) - trajectory_ignore_forcemove = TRUE - forceMove(T) - trajectory_ignore_forcemove = FALSE - pixel_x = trajectory.return_px() - pixel_y = trajectory.return_py() - else - step_towards(src, T) - pixel_x = trajectory.return_px() - trajectory.mpx * trajectory_multiplier - pixel_y = trajectory.return_py() - trajectory.mpy * trajectory_multiplier - animate(src, pixel_x = trajectory.return_px(), pixel_y = trajectory.return_py(), time = 1, flags = ANIMATION_END_NOW) + pixel_x_increment=round((sin(Angle)+16*sin(Angle)*2), 1) //round() is a floor operation when only one argument is supplied, we don't want that here + pixel_y_increment=round((cos(Angle)+16*cos(Angle)*2), 1) + pixel_x_offset = old_pixel_x + pixel_x_increment + pixel_y_offset = old_pixel_y + pixel_y_increment + new_x = x + new_y = y + + while(pixel_x_offset > 16) + pixel_x_offset -= 32 + old_pixel_x -= 32 + new_x++// x++ + while(pixel_x_offset < -16) + pixel_x_offset += 32 + old_pixel_x += 32 + new_x-- + while(pixel_y_offset > 16) + pixel_y_offset -= 32 + old_pixel_y -= 32 + new_y++ + while(pixel_y_offset < -16) + pixel_y_offset += 32 + old_pixel_y += 32 + new_y-- + + step_towards(src, locate(new_x, new_y, z)) + pixel_x = old_pixel_x + pixel_y = old_pixel_y + animate(src, pixel_x = pixel_x_offset, pixel_y = pixel_y_offset, time = 1, flags = ANIMATION_END_NOW) + old_pixel_x = pixel_x_offset + old_pixel_y = pixel_y_offset if(can_hit_target(original, permutated)) Collide(original) Range() + last_projectile_move = world.time //Returns true if the target atom is on our current turf and above the right layer /obj/item/projectile/proc/can_hit_target(atom/target, var/list/passthrough) - return (target && ((target.layer >= PROJECTILE_HIT_THRESHHOLD_LAYER) || ismob(target)) && (loc == get_turf(target)) && (!(target in passthrough))) + if(target && (target.layer >= PROJECTILE_HIT_THRESHHOLD_LAYER) || ismob(target)) + if(loc == get_turf(target)) + if(!(target in passthrough)) + return TRUE + return FALSE /obj/item/projectile/proc/preparePixelProjectile(atom/target, atom/source, params, spread = 0) var/turf/curloc = get_turf(source) @@ -390,8 +362,7 @@ if(targloc || !params) yo = targloc.y - curloc.y xo = targloc.x - curloc.x - setAngle(Get_Angle(src, targloc)) - + if(isliving(source) && params) var/list/calculated = calculate_projectile_angle_and_pixel_offsets(source, params) p_x = calculated[2] @@ -401,13 +372,8 @@ setAngle(calculated[1] + spread) else setAngle(calculated[1]) - else if(targloc) - yo = targloc.y - curloc.y - xo = targloc.x - curloc.x - setAngle(Get_Angle(src, targloc)) else - stack_trace("WARNING: Projectile [type] fired without either mouse parameters, or a target atom to aim at!") - qdel(src) + setAngle(Get_Angle(src, targloc)) /proc/calculate_projectile_angle_and_pixel_offsets(mob/user, params) var/list/mouse_control = params2list(params) diff --git a/code/modules/reagents/chemistry/reagents/drink_reagents.dm b/code/modules/reagents/chemistry/reagents/drink_reagents.dm index 0bb00f5b49..b62afb80c0 100644 --- a/code/modules/reagents/chemistry/reagents/drink_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drink_reagents.dm @@ -70,7 +70,7 @@ //nothing if(21 to INFINITY) if(prob(current_cycle-10)) - M.cure_nearsighted(list(EYE_DAMAGE)) + M.cure_nearsighted() ..() return @@ -172,22 +172,6 @@ M.emote("laugh") ..() -/datum/reagent/consumable/superlaughter - name = "Super Laughter" - id = "superlaughter" - description = "Funny until you're the one laughing." - metabolization_rate = 1.5 * REAGENTS_METABOLISM - color = "#FF4DD2" - taste_description = "laughter" - -/datum/reagent/consumable/superlaughter/on_mob_life(mob/living/carbon/M) - if(!iscarbon(M)) - return - if(prob(30)) - M.visible_message("[M] bursts out into a fit of uncontrollable laughter!", "You burst out in a fit of uncontrollable laughter!") - M.Stun(5) - ..() - /datum/reagent/consumable/potato_juice name = "Potato Juice" id = "potato" diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 03134784a4..4f4bb6fdd1 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -44,7 +44,7 @@ M.adjustToxLoss(-5, 0) M.hallucination = 0 M.setBrainLoss(0) - M.remove_all_disabilities() + M.disabilities = 0 M.set_blurriness(0) M.set_blindness(0) M.SetKnockdown(0, 0) @@ -667,16 +667,16 @@ var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES) if (!eyes) return - if(M.has_disability(BLIND, EYE_DAMAGE)) + if(M.has_disability(DISABILITY_BLIND, EYE_DAMAGE)) if(prob(20)) to_chat(M, "Your vision slowly returns...") - M.cure_blind(EYE_DAMAGE) - M.cure_nearsighted(EYE_DAMAGE) + M.cure_blind() + M.cure_nearsighted() M.blur_eyes(35) - else if(M.has_disability(NEARSIGHT, EYE_DAMAGE)) + else if(M.has_disability(DISABILITY_NEARSIGHT, EYE_DAMAGE)) to_chat(M, "The blackness in your peripheral vision fades.") - M.cure_nearsighted(EYE_DAMAGE) + M.cure_nearsighted() M.blur_eyes(10) else if(M.eye_blind || M.eye_blurry) M.set_blindness(0) @@ -765,7 +765,7 @@ M.visible_message("[M]'s body convulses a bit, and then falls still once more.") return M.visible_message("[M]'s body convulses a bit.") - if(!M.suiciding && !(M.has_disability(NOCLONE)) && !M.hellbound) + if(!M.suiciding && !(M.has_disability(DISABILITY_NOCLONE)) && !M.hellbound) if(!M) return if(M.notify_ghost_cloning(source = M)) diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 0a6288896a..6e1e8046fe 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -141,7 +141,7 @@ taste_description = "mint" /datum/reagent/toxin/minttoxin/on_mob_life(mob/living/M) - if(M.has_disability(FAT)) + if(M.has_disability(DISABILITY_FAT)) M.gib() return ..() diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index e736c344db..0a99d9da6e 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -130,18 +130,6 @@ Borg Hypospray reagent_ids = list ("facid", "mutetoxin", "cyanide", "sodium_thiopental", "heparin", "lexorin") accepts_reagent_upgrades = FALSE -/obj/item/reagent_containers/borghypo/clown - name = "laughter injector" - desc = "Keeps the crew happy and productive!" - reagent_ids = list("laughter") - accepts_reagent_upgrades = FALSE - -/obj/item/reagent_containers/borghypo/clown/hacked - name = "laughter injector" - desc = "Keeps the crew so happy they don't work!" - reagent_ids = list("superlaughter") - accepts_reagent_upgrades = FALSE - /obj/item/reagent_containers/borghypo/syndicate name = "syndicate cyborg hypospray" desc = "An experimental piece of Syndicate technology used to produce powerful restorative nanites used to very quickly restore injuries of all types. Also metabolizes potassium iodide, for radiation poisoning, and morphine, for offense." diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index f79418eee5..2e34e39f8f 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -18,16 +18,16 @@ var/spray_range = 3 //the range of tiles the sprayer will reach when in spray mode. var/stream_range = 1 //the range of tiles the sprayer will reach when in stream mode. var/stream_amount = 10 //the amount of reagents transfered when in stream mode. - var/can_fill_from_container = TRUE amount_per_transfer_from_this = 5 volume = 250 possible_transfer_amounts = list(5,10,15,20,25,30,50,100) + /obj/item/reagent_containers/spray/afterattack(atom/A, mob/user) if(istype(A, /obj/structure/sink) || istype(A, /obj/structure/janitorialcart) || istype(A, /obj/machinery/hydroponics)) return - if((A.is_drainable() && !A.is_refillable()) && get_dist(src,A) <= 1 && can_fill_from_container) + if((A.is_drainable() && !A.is_refillable()) && get_dist(src,A) <= 1) if(!A.reagents.total_volume) to_chat(user, "[A] is empty.") return @@ -205,46 +205,6 @@ /obj/item/reagent_containers/spray/waterflower/attack_self(mob/user) //Don't allow changing how much the flower sprays return -/obj/item/reagent_containers/spray/waterflower/cyborg - container_type = NONE - volume = 100 - list_reagents = list("water" = 100) - var/generate_amount = 5 - var/generate_type = "water" - var/last_generate = 0 - var/generate_delay = 10 //deciseconds - can_fill_from_container = FALSE - -/obj/item/reagent_containers/spray/waterflower/cyborg/hacked - name = "nova flower" - desc = "This doesn't look safe at all..." - list_reagents = list("clf3" = 3) - volume = 3 - generate_type = "clf3" - generate_amount = 1 - generate_delay = 40 //deciseconds - -/obj/item/reagent_containers/spray/waterflower/cyborg/Initialize() - . = ..() - START_PROCESSING(SSfastprocess, src) - -/obj/item/reagent_containers/spray/waterflower/cyborg/Destroy() - STOP_PROCESSING(SSfastprocess, src) - return ..() - -/obj/item/reagent_containers/spray/waterflower/cyborg/process() - if(world.time > last_generate + generate_delay) - return - last_generate = world.time - generate_reagents() - -/obj/item/reagent_containers/spray/waterflower/cyborg/empty() - to_chat(usr, "You can not empty this!") - return - -/obj/item/reagent_containers/spray/waterflower/cyborg/proc/generate_reagents() - reagents.add_reagent(generate_type, generate_amount) - //chemsprayer /obj/item/reagent_containers/spray/chemsprayer name = "chem sprayer" diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index b3b0f8df99..0af1650d42 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -51,8 +51,40 @@ other types of metals and chemistry for reagents). return ..() /datum/design/proc/icon_html(client/user) - send_asset(user, "design_[id].png", FALSE) - return "" + if (!icon_cache) + // construct the icon and slap it into the resource cache + var/atom/item = build_path + if (!ispath(item, /atom)) + // biogenerator outputs to beakers by default + if (build_type & BIOGENERATOR) + item = /obj/item/reagent_containers/glass/beaker/large + else + return // shouldn't happen, but just in case + + // circuit boards become their resulting machines or computers + if (ispath(item, /obj/item/circuitboard)) + var/obj/item/circuitboard/C = item + var/machine = initial(C.build_path) + if (machine) + item = machine + var/icon_file = initial(item.icon) + var/icon/I = icon(icon_file, initial(item.icon_state), SOUTH) + + // computers (and snowflakes) get their screen and keyboard sprites + if (ispath(item, /obj/machinery/computer) || ispath(item, /obj/machinery/power/solar_control)) + var/obj/machinery/computer/C = item + var/screen = initial(C.icon_screen) + var/keyboard = initial(C.icon_keyboard) + if (screen) + I.Blend(icon(icon_file, screen, SOUTH), ICON_OVERLAY) + if (keyboard) + I.Blend(icon(icon_file, keyboard, SOUTH), ICON_OVERLAY) + + // based on icon2html + icon_cache = "[generate_asset_name(I)].png" + register_asset(icon_cache, I) + send_asset(user, icon_cache, FALSE) + return "" //////////////////////////////////////// //Disks for transporting design datums// diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index ebcea57b6d..8542660343 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -814,12 +814,3 @@ materials = list(MAT_METAL = 1000) build_path = /obj/item/disk/holodisk category = list("initial", "Misc") - -//CITADEL -/datum/design/shock_collar - name = "Shock Collar" - id = "shock_collar" - build_type = AUTOLATHE - materials = list(MAT_METAL = 5000, MAT_GLASS = 2000) - build_path = /obj/item/device/electropack/shockcollar - category = list("hacked", "Security") diff --git a/code/modules/research/designs/machine_designs.dm b/code/modules/research/designs/machine_designs.dm index 059d9c982c..2343bd8814 100644 --- a/code/modules/research/designs/machine_designs.dm +++ b/code/modules/research/designs/machine_designs.dm @@ -111,7 +111,6 @@ desc = "The circuit board for a sleeper." id = "sleeper" build_path = /obj/item/circuitboard/machine/sleeper - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_MEDICAL category = list ("Medical Machinery") /datum/design/board/cryotube @@ -119,7 +118,6 @@ desc = "The circuit board for a cryotube." id = "cryotube" build_path = /obj/item/circuitboard/machine/cryo_tube - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_MEDICAL category = list ("Medical Machinery") /datum/design/board/chem_dispenser @@ -127,14 +125,12 @@ desc = "The circuit board for a portable chem dispenser." id = "chem_dispenser" build_path = /obj/item/circuitboard/machine/chem_dispenser - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_MEDICAL category = list ("Medical Machinery") /datum/design/board/chem_master name = "Machine Design (Chem Master Board)" desc = "The circuit board for a Chem Master 3000." id = "chem_master" - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_MEDICAL build_path = /obj/item/circuitboard/machine/chem_master category = list ("Medical Machinery") @@ -142,7 +138,6 @@ name = "Machine Design (Chemical Heater Board)" desc = "The circuit board for a chemical heater." id = "chem_heater" - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_MEDICAL build_path = /obj/item/circuitboard/machine/chem_heater category = list ("Medical Machinery") @@ -158,14 +153,12 @@ desc = "Allows for the construction of circuit boards used to build a new Cloning Machine console." id = "clonecontrol" build_path = /obj/item/circuitboard/computer/cloning - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_MEDICAL category = list("Medical Machinery") /datum/design/board/clonepod name = "Machine Design (Clone Pod)" desc = "Allows for the construction of circuit boards used to build a Cloning Pod." id = "clonepod" - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_MEDICAL build_path = /obj/item/circuitboard/machine/clonepod category = list("Medical Machinery") @@ -173,7 +166,6 @@ name = "Machine Design (Cloning Scanner)" desc = "Allows for the construction of circuit boards used to build a Cloning Scanner." id = "clonescanner" - departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_MEDICAL build_path = /obj/item/circuitboard/machine/clonescanner category = list("Medical Machinery") diff --git a/code/modules/shuttle/navigation_computer.dm b/code/modules/shuttle/navigation_computer.dm index 15257a62a1..739e057177 100644 --- a/code/modules/shuttle/navigation_computer.dm +++ b/code/modules/shuttle/navigation_computer.dm @@ -119,7 +119,7 @@ return if(!my_port) - my_port = new() + my_port = new(locate(eyeobj.x - x_offset, eyeobj.y - y_offset, eyeobj.z)) my_port.name = shuttlePortName my_port.id = shuttlePortId my_port.height = shuttle_port.height @@ -128,7 +128,6 @@ my_port.dwidth = shuttle_port.dwidth my_port.hidden = shuttle_port.hidden my_port.dir = the_eye.dir - my_port.forceMove(locate(eyeobj.x - x_offset, eyeobj.y - y_offset, eyeobj.z)) if(current_user.client) current_user.client.images -= the_eye.placed_images diff --git a/code/modules/shuttle/syndicate.dm b/code/modules/shuttle/syndicate.dm index ee5a435a86..283ac0f35c 100644 --- a/code/modules/shuttle/syndicate.dm +++ b/code/modules/shuttle/syndicate.dm @@ -56,8 +56,8 @@ shuttlePortName = "custom location" jumpto_ports = list("syndicate_ne" = 1, "syndicate_nw" = 1, "syndicate_n" = 1, "syndicate_se" = 1, "syndicate_sw" = 1, "syndicate_s" = 1) view_range = 13 - x_offset = -7 - y_offset = -1 + x_offset = -4 + y_offset = -2 see_hidden = TRUE #undef SYNDICATE_CHALLENGE_TIMER \ No newline at end of file diff --git a/code/modules/spells/spell_types/construct_spells.dm b/code/modules/spells/spell_types/construct_spells.dm index 8e9b4fb1e4..eca4990290 100644 --- a/code/modules/spells/spell_types/construct_spells.dm +++ b/code/modules/spells/spell_types/construct_spells.dm @@ -209,14 +209,14 @@ to_chat(target, "A freezing darkness surrounds you...") target.playsound_local(get_turf(target), 'sound/hallucinations/i_see_you1.ogg', 50, 1) user.playsound_local(get_turf(user), 'sound/effects/ghost2.ogg', 50, 1) - target.become_blind("abyssal_gaze") + target.adjust_blindness(5) addtimer(CALLBACK(src, .proc/cure_blindness, target), 40) target.bodytemperature -= 200 /obj/effect/proc_holder/spell/targeted/abyssal_gaze/proc/cure_blindness(mob/target) if(isliving(target)) var/mob/living/L = target - L.cure_blind(BLIND, "abyssal_gaze") + L.cure_blind(DISABILITY_BLIND, "abyssal_gaze") /obj/effect/proc_holder/spell/targeted/dominate name = "Dominate" diff --git a/code/modules/spells/spell_types/genetic.dm b/code/modules/spells/spell_types/genetic.dm index 1b60800458..c6945dab50 100644 --- a/code/modules/spells/spell_types/genetic.dm +++ b/code/modules/spells/spell_types/genetic.dm @@ -1,34 +1,32 @@ -/obj/effect/proc_holder/spell/targeted/genetic - name = "Genetic" - desc = "This spell inflicts a set of mutations and disabilities upon the target." - - var/list/disabilities = list() //disabilities - var/list/mutations = list() //mutation strings - var/duration = 100 //deciseconds - /* - Disabilities - 1st bit - ? - 2nd bit - ? - 3rd bit - ? - 4th bit - ? - 5th bit - ? - 6th bit - ? - */ - -/obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets,mob/user = usr) - playMagSound() - for(var/mob/living/carbon/target in targets) - if(!target.dna) - continue - for(var/A in mutations) - target.dna.add_mutation(A) - for(var/A in disabilities) - target.add_disability(A, GENETICS_SPELL) +/obj/effect/proc_holder/spell/targeted/genetic + name = "Genetic" + desc = "This spell inflicts a set of mutations and disabilities upon the target." + + var/disabilities = 0 //bits + var/list/mutations = list() //mutation strings + var/duration = 100 //deciseconds + /* + Disabilities + 1st bit - ? + 2nd bit - ? + 3rd bit - ? + 4th bit - ? + 5th bit - ? + 6th bit - ? + */ + +/obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets,mob/user = usr) + playMagSound() + for(var/mob/living/carbon/target in targets) + if(!target.dna) + continue + for(var/A in mutations) + target.dna.add_mutation(A) + target.disabilities |= disabilities addtimer(CALLBACK(src, .proc/remove, target), duration) /obj/effect/proc_holder/spell/targeted/genetic/proc/remove(mob/living/carbon/target) if(!QDELETED(target)) for(var/A in mutations) target.dna.remove_mutation(A) - for(var/A in disabilities) - target.remove_disability(A, GENETICS_SPELL) + target.disabilities &= ~disabilities diff --git a/code/modules/surgery/bodyparts/bodyparts.dm b/code/modules/surgery/bodyparts/bodyparts.dm index 474075591f..fa8d04d987 100644 --- a/code/modules/surgery/bodyparts/bodyparts.dm +++ b/code/modules/surgery/bodyparts/bodyparts.dm @@ -217,7 +217,7 @@ C = owner no_update = 0 - if(C.has_disability(HUSK)) + if(C.has_disability(DISABILITY_HUSK)) species_id = "husk" //overrides species_id dmg_overlay_type = "" //no damage overlay shown when husked should_draw_gender = FALSE diff --git a/code/modules/surgery/bodyparts/head.dm b/code/modules/surgery/bodyparts/head.dm index 464da21e44..4afe4df220 100644 --- a/code/modules/surgery/bodyparts/head.dm +++ b/code/modules/surgery/bodyparts/head.dm @@ -61,7 +61,7 @@ C = owner real_name = C.real_name - if(C.has_disability(HUSK)) + if(C.has_disability(DISABILITY_HUSK)) real_name = "Unknown" hair_style = "Bald" facial_hair_style = "Shaved" diff --git a/code/modules/surgery/eye_surgery.dm b/code/modules/surgery/eye_surgery.dm index 00a9a99bb0..c8a47d2096 100644 --- a/code/modules/surgery/eye_surgery.dm +++ b/code/modules/surgery/eye_surgery.dm @@ -23,9 +23,9 @@ /datum/surgery_step/fix_eyes/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) user.visible_message("[user] successfully fixes [target]'s eyes!", "You succeed in fixing [target]'s eyes.") - target.cure_blind(list(EYE_DAMAGE)) + target.cure_blind() target.set_blindness(0) - target.cure_nearsighted(list(EYE_DAMAGE)) + target.cure_nearsighted() target.blur_eyes(35) //this will fix itself slowly. target.set_eye_damage(0) return TRUE diff --git a/code/modules/surgery/lipoplasty.dm b/code/modules/surgery/lipoplasty.dm index ba43a5cc3b..dfb41f90e0 100644 --- a/code/modules/surgery/lipoplasty.dm +++ b/code/modules/surgery/lipoplasty.dm @@ -4,7 +4,7 @@ possible_locs = list("chest") /datum/surgery/lipoplasty/can_start(mob/user, mob/living/carbon/target) - if(target.has_disability(FAT)) + if(target.has_disability(DISABILITY_FAT)) return 1 return 0 diff --git a/code/modules/surgery/organs/ears.dm b/code/modules/surgery/organs/ears.dm index 905f9c2e1f..2a12005956 100644 --- a/code/modules/surgery/organs/ears.dm +++ b/code/modules/surgery/organs/ears.dm @@ -25,7 +25,7 @@ return var/mob/living/carbon/C = owner // genetic deafness prevents the body from using the ears, even if healthy - if(C.has_disability(DEAF)) + if(C.has_disability(DISABILITY_DEAF)) deaf = max(deaf, 1) else if(C.ears && (C.ears.flags_2 & HEALS_EARS_2)) @@ -42,7 +42,7 @@ var/mob/living/carbon/C = owner - if(iscarbon(owner) && C.has_disability(DEAF)) + if(iscarbon(owner) && C.has_disability(DISABILITY_DEAF)) deaf = 1 /obj/item/organ/ears/proc/adjustEarDamage(ddmg, ddeaf) diff --git a/code/modules/vehicles/pimpin_ride.dm b/code/modules/vehicles/pimpin_ride.dm index 88524366a6..3925b863ff 100644 --- a/code/modules/vehicles/pimpin_ride.dm +++ b/code/modules/vehicles/pimpin_ride.dm @@ -13,9 +13,6 @@ var/datum/component/riding/D = LoadComponent(/datum/component/riding) D.set_riding_offsets(RIDING_OFFSET_ALL, list(TEXT_NORTH = list(0, 4), TEXT_SOUTH = list(0, 7), TEXT_EAST = list(-12, 7), TEXT_WEST = list( 12, 7))) - if(floorbuffer) - AddComponent(/datum/component/cleaning) - /obj/vehicle/ridden/janicart/Destroy() if(mybag) qdel(mybag) @@ -50,7 +47,7 @@ floorbuffer = TRUE qdel(I) to_chat(user, "You upgrade [src] with the floor buffer.") - AddComponent(/datum/component/cleaning) + flags_1 |= CLEAN_ON_MOVE_1 update_icon() else return ..() diff --git a/icons/mob/robots.dmi b/icons/mob/robots.dmi index fd145092a7..5d8bfa629b 100644 Binary files a/icons/mob/robots.dmi and b/icons/mob/robots.dmi differ diff --git a/icons/obj/assemblies/electronic_components.dmi b/icons/obj/assemblies/electronic_components.dmi index a9dac06d6b..1852079e73 100644 Binary files a/icons/obj/assemblies/electronic_components.dmi and b/icons/obj/assemblies/electronic_components.dmi differ diff --git a/interface/stylesheet.dm b/interface/stylesheet.dm index ece61736ba..e1505d6088 100644 --- a/interface/stylesheet.dm +++ b/interface/stylesheet.dm @@ -168,7 +168,4 @@ h1.alert, h2.alert {color: #000000;} .resonate {color: #298F85;} .love {color: #FF69Bf;} .lovebold {color: #FF69Bf; font-weight: bold;} - -.monkeyhive {color: #774704;} -.monkeylead {color: #774704; font-size: 2;} "} diff --git a/modular_citadel/code/game/objects/items/melee/eutactic_blades.dm b/modular_citadel/code/game/objects/items/melee/eutactic_blades.dm index d324c95511..385e9cd9d4 100644 --- a/modular_citadel/code/game/objects/items/melee/eutactic_blades.dm +++ b/modular_citadel/code/game/objects/items/melee/eutactic_blades.dm @@ -317,7 +317,7 @@ unwield() return ..() - if(user.disabilities & CLUMSY && (wielded) && prob(40)) + if(user.has_disability(DISABILITY_CLUMSY) && (wielded) && prob(40)) impale(user) return diff --git a/tgstation.dme b/tgstation.dme index bafb0406ee..bc6f2fc007 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -1707,6 +1707,7 @@ #include "code\modules\mob\login.dm" #include "code\modules\mob\logout.dm" #include "code\modules\mob\mob.dm" +#include "code\modules\mob\mob_cleanup.dm" #include "code\modules\mob\mob_defines.dm" #include "code\modules\mob\mob_helpers.dm" #include "code\modules\mob\mob_movement.dm"