diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index c244dc0c7a7..686bc3e1759 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -32,11 +32,10 @@ #define CANWEAKEN 2 #define CANPARALYSE 4 #define CANPUSH 8 -#define LEAPING 16 -#define PASSEMOTES 32 //Mob has a cortical borer or holders inside of it that need to see emotes. -#define GOTTAGOFAST 64 -#define GOTTAGOREALLYFAST 128 -#define IGNORESLOWDOWN 256 +#define PASSEMOTES 16 //Mob has a cortical borer or holders inside of it that need to see emotes. +#define GOTTAGOFAST 32 +#define GOTTAGOREALLYFAST 64 +#define IGNORESLOWDOWN 128 #define GODMODE 4096 #define FAKEDEATH 8192 //Replaces stuff like changeling.changeling_fakedeath #define XENO_HOST 16384 //Tracks whether we're gonna be a baby alien's mummy. diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 5fb559651d5..8e9b5f93691 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -96,9 +96,12 @@ if(non_whitespace) return text //only accepts the text if it has some non-spaces // Used to get a sanitized input. -/proc/stripped_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN) - var/name = input(user, message, title, default) - return strip_html_properly(name, max_length) +/proc/stripped_input(mob/user, message = "", title = "", default = "", max_length=MAX_MESSAGE_LEN, no_trim=FALSE) + var/name = input(user, message, title, default) as text|null + if(no_trim) + return copytext(html_encode(name), 1, max_length) + else + return trim(html_encode(name), max_length) //trim is "outside" because html_encode can expand single symbols into multiple symbols (such as turning < into <) //Filters out undesirable characters from names /proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN) diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index fd0c91ded3a..a44f5d2e5a8 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -1,8 +1,3 @@ -#define FULLSCREEN_LAYER 18 -#define DAMAGE_LAYER FULLSCREEN_LAYER + 0.1 -#define BLIND_LAYER DAMAGE_LAYER + 0.1 -#define CRIT_LAYER BLIND_LAYER + 0.1 - /mob var/list/screens = list() @@ -68,11 +63,11 @@ /obj/screen/fullscreen/brute icon_state = "brutedamageoverlay" - layer = DAMAGE_LAYER + layer = UI_DAMAGE_LAYER /obj/screen/fullscreen/oxy icon_state = "oxydamageoverlay" - layer = DAMAGE_LAYER + layer = UI_DAMAGE_LAYER /obj/screen/fullscreen/crit icon_state = "passage" @@ -107,5 +102,4 @@ #undef FULLSCREEN_LAYER #undef BLIND_LAYER -#undef DAMAGE_LAYER #undef CRIT_LAYER diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index 0da932d1575..775a8667b3f 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -106,7 +106,7 @@ /datum/component/proc/_GetInverseTypeList(our_type = type) #if DM_VERSION >= 513 - #warning 512 is definitely stable now, remove the old code + #warn 512 is definitely stable now, remove the old code #endif #if DM_VERSION < 512 diff --git a/code/datums/diseases/kingstons.dm b/code/datums/diseases/kingstons.dm index 260f01e0301..c7db27968ef 100644 --- a/code/datums/diseases/kingstons.dm +++ b/code/datums/diseases/kingstons.dm @@ -66,7 +66,7 @@ chosentype = pick(virspecies) chosensuff = pick(virsuffix) - name = "[chosentype] [chosensuff]" + name = "[initial(chosentype.name)] [chosensuff]" /datum/disease/kingstons/advanced/stage_act() ..() diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index 50f24eac58f..952711f3063 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -1029,9 +1029,8 @@ var/list/uplink_items = list() /datum/uplink_item/suits/hardsuit name = "Syndicate Hardsuit" - desc = "The feared suit of a syndicate nuclear agent. Features slightly better armoring and a built in jetpack \ - that runs off standard atmospheric tanks. When the built in helmet is deployed your identity will be \ - protected, even in death, as the suit cannot be removed by outside forces. Toggling the suit in and out of \ + desc = "The feared suit of a syndicate nuclear agent. Features armor and a combat mode \ + for faster movement on station. Toggling the suit in and out of \ combat mode will allow you all the mobility of a loose fitting uniform without sacrificing armoring. \ Additionally the suit is collapsible, making it small enough to fit within a backpack. \ Nanotrasen crew who spot these suits are known to panic." diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm index b6e3ecde8bd..1664a7051da 100644 --- a/code/defines/procs/announce.dm +++ b/code/defines/procs/announce.dm @@ -48,8 +48,8 @@ if(!message) return - var/tmp/message_title = new_title ? new_title : title - var/tmp/message_sound = new_sound ? sound(new_sound) : sound + var/message_title = new_title ? new_title : title + var/message_sound = new_sound ? sound(new_sound) : sound if(!msg_sanitized) message = trim_strip_html_properly(message, allow_lines = 1) diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index f8f55f0e126..ea846e394a5 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -365,6 +365,7 @@ var/mob/living/carbon/human/H = target H.visible_message("[H]'s skin suddenly bubbles and shifts around [H.p_their()] body!", \ "You regenerate your protective armor and cleanse your form of defects.") + H.set_species(/datum/species/shadow/ling) H.adjustCloneLoss(-target.getCloneLoss()) H.equip_to_slot_or_del(new /obj/item/clothing/under/shadowling(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/shadowling(H), slot_shoes) @@ -373,7 +374,6 @@ H.equip_to_slot_or_del(new /obj/item/clothing/gloves/shadowling(H), slot_gloves) H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/shadowling(H), slot_wear_mask) H.equip_to_slot_or_del(new /obj/item/clothing/glasses/shadowling(H), slot_glasses) - H.set_species(/datum/species/shadow/ling) /obj/effect/proc_holder/spell/targeted/collective_mind //Lets a shadowling bring together their thralls' strength, granting new abilities and a headcount name = "Collective Hivemind" diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm index 03780f7a47e..7aebaa0b044 100644 --- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm @@ -84,6 +84,7 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N H.socks = "None" H.faction |= "faithless" + H.set_species(/datum/species/shadow/ling) //can't be a shadowling without being a shadowling H.equip_to_slot_or_del(new /obj/item/clothing/under/shadowling(user), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/shadowling(user), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/suit/space/shadowling(user), slot_wear_suit) @@ -91,7 +92,6 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N H.equip_to_slot_or_del(new /obj/item/clothing/gloves/shadowling(user), slot_gloves) H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/shadowling(user), slot_wear_mask) H.equip_to_slot_or_del(new /obj/item/clothing/glasses/shadowling(user), slot_glasses) - H.set_species(/datum/species/shadow/ling) //can't be a shadowling without being a shadowling H.mind.RemoveSpell(src) diff --git a/code/game/machinery/Freezer.dm b/code/game/machinery/Freezer.dm index 4876c904de7..dc06a13e076 100644 --- a/code/game/machinery/Freezer.dm +++ b/code/game/machinery/Freezer.dm @@ -140,7 +140,11 @@ if(href_list["toggleStatus"]) src.on = !src.on update_icon() - if(href_list["temp"]) + else if(href_list["minimum"]) + current_temperature = min_temperature + else if(href_list["maximum"]) + current_temperature = T20C + else if(href_list["temp"]) var/amount = text2num(href_list["temp"]) if(amount > 0) src.current_temperature = min(T20C, src.current_temperature+amount) @@ -299,7 +303,11 @@ if(href_list["toggleStatus"]) src.on = !src.on update_icon() - if(href_list["temp"]) + else if(href_list["minimum"]) + current_temperature = T20C + else if(href_list["maximum"]) + current_temperature = max_temperature + T20C + else if(href_list["temp"]) var/amount = text2num(href_list["temp"]) if(amount > 0) src.current_temperature = min((T20C+max_temperature), src.current_temperature+amount) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 054d4d441a3..865f683946e 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -231,7 +231,7 @@ to_chat(usr, "Arrays recycling. Please stand by.") SSnanoui.update_uis(src) return - var/input = stripped_input(usr, "Please enter the reason for requesting the nuclear self-destruct codes. Misuse of the nuclear request system will not be tolerated under any circumstances. Transmission does not guarantee a response.", "Self Destruct Code Request.","") as text|null + var/input = stripped_input(usr, "Please enter the reason for requesting the nuclear self-destruct codes. Misuse of the nuclear request system will not be tolerated under any circumstances. Transmission does not guarantee a response.", "Self Destruct Code Request.","") if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) SSnanoui.update_uis(src) return @@ -250,7 +250,7 @@ to_chat(usr, "Arrays recycling. Please stand by.") SSnanoui.update_uis(src) return - var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null + var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) SSnanoui.update_uis(src) return @@ -270,7 +270,7 @@ to_chat(usr, "Arrays recycling. Please stand by.") SSnanoui.update_uis(src) return - var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null + var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) SSnanoui.update_uis(src) return diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 0d49cc1b0cd..4de934f1c96 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -796,7 +796,7 @@ About the new airlock wires panel: if(do_after(user, 20, 1, target = src)) if(!panel_open || !S.use(2)) return - user.visible_message("[user] reinforce \the [src] with metal.", + user.visible_message("[user] reinforces \the [src] with metal.", "You reinforce \the [src] with metal.") security_level = AIRLOCK_SECURITY_METAL update_icon() @@ -810,7 +810,7 @@ About the new airlock wires panel: if(do_after(user, 20, 1, target = src)) if(!panel_open || !S.use(2)) return - user.visible_message("[user] reinforce \the [src] with plasteel.", + user.visible_message("[user] reinforces \the [src] with plasteel.", "You reinforce \the [src] with plasteel.") security_level = AIRLOCK_SECURITY_PLASTEEL modify_max_integrity(normal_integrity * AIRLOCK_INTEGRITY_MULTIPLIER) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 4fea8e93a39..5fa97f07d62 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -59,6 +59,7 @@ /obj/item/megaphone/proc/saymsg(mob/living/user as mob, message) audible_message("[user] broadcasts, \"[message]\"", hearing_distance = 14) + log_say(message, user) for(var/obj/O in oview(14, get_turf(src))) O.hear_talk(user, "[message]") diff --git a/code/game/objects/items/random_items.dm b/code/game/objects/items/random_items.dm index 2625d2b865a..ded05d6f795 100644 --- a/code/game/objects/items/random_items.dm +++ b/code/game/objects/items/random_items.dm @@ -130,8 +130,7 @@ /obj/item/storage/pill_bottle/random_meds/New() ..() - var/i = 1 - while(i < storage_slots) + for(var/i in 1 to storage_slots) var/list/possible_medicines = standard_medicines.Copy() if(prob(50)) possible_medicines += rare_medicines.Copy() @@ -144,7 +143,6 @@ P.reagents.add_reagent(R, rand(2, 5)*10) P.name = "Unlabelled Pill" P.desc = "Something about this pill entices you to try it, against your better judgement." - i++ pixel_x = rand(-10, 10) pixel_y = rand(-10, 10) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 051f450179b..9a9a83f616b 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -878,10 +878,10 @@ var/global/nologevent = 0 to_chat(usr, "[P.pai_laws]") continue // Skip showing normal silicon laws for pAIs - they don't have any else - to_chat(usr, "SILICON [key_name(S, usr)]'s laws:") + to_chat(usr, "SILICON [key_name(S, TRUE)]'s laws:") if(S.laws == null) - to_chat(usr, "[key_name(S, usr)]'s laws are null. Contact a coder.") + to_chat(usr, "[key_name(S, TRUE)]'s laws are null. Contact a coder.") else S.laws.show_laws(usr) if(!ai_number) diff --git a/code/modules/arcade/arcade_prize.dm b/code/modules/arcade/arcade_prize.dm index 6af1ca30f36..94c265848b7 100644 --- a/code/modules/arcade/arcade_prize.dm +++ b/code/modules/arcade/arcade_prize.dm @@ -2,7 +2,6 @@ * Prize balls * Prize tickets */ - /obj/item/toy/prizeball name = "prize ball" desc = "A toy is a toy, but a prize ball could be anything! It could even be a toy!" @@ -25,7 +24,7 @@ var/prize_inside = pick(possible_contents) spawn(10) user.unEquip(src) - if(istype(prize_inside, /obj/item/stack)) + if(ispath(prize_inside,/obj/item/stack)) var/amount = pick(5, 10, 15, 25, 50) new prize_inside(user.loc, amount) else @@ -78,12 +77,12 @@ return /obj/item/stack/tickets/update_icon() - var/amount = get_amount() - if((amount >= 75)) - icon_state = "tickets_4" - else if(amount >=25) - icon_state = "tickets_3" - else if(amount >= 4) - icon_state = "tickets_2" - else - icon_state = "tickets_1" + switch(get_amount()) + if(1 to 3) + icon_state = "tickets_1" // One ticket + if(4 to 24) + icon_state = "tickets_2" // Couple tickets + if(25 to 74) + icon_state = "tickets_3" // Buncha tickets + else + icon_state = "tickets_4" // Ticket snake \ No newline at end of file diff --git a/code/modules/clothing/suits/hood.dm b/code/modules/clothing/suits/hood.dm index 7e2307c96b4..c784306cf66 100644 --- a/code/modules/clothing/suits/hood.dm +++ b/code/modules/clothing/suits/hood.dm @@ -31,6 +31,8 @@ ..() /obj/item/clothing/suit/hooded/proc/RemoveHood() + if(isnull(hood)) + return icon_state = "[initial(icon_state)]" suit_adjusted = 0 if(ishuman(hood.loc)) diff --git a/code/modules/flufftext/Dreaming.dm b/code/modules/flufftext/Dreaming.dm index b69ed4738b6..ea35118ab11 100644 --- a/code/modules/flufftext/Dreaming.dm +++ b/code/modules/flufftext/Dreaming.dm @@ -33,7 +33,7 @@ dream_images += pick_n_take(nightmares) nightmare++ for(var/i in 1 to dream_images.len) - addtimer(CALLBACK(src, .proc/experience_dream, nightmares[i], TRUE), ((i - 1) * rand(30,60))) + addtimer(CALLBACK(src, .proc/experience_dream, dream_images[i], TRUE), ((i - 1) * rand(30,60))) return TRUE /mob/living/carbon/proc/handle_dreams() @@ -54,4 +54,3 @@ if(isNightmare) dream_image = "[dream_image]" to_chat(src, "... [dream_image] ...") - diff --git a/code/modules/food_and_drinks/food/customizables.dm b/code/modules/food_and_drinks/food/customizables.dm index 33987737fa2..70027028344 100644 --- a/code/modules/food_and_drinks/food/customizables.dm +++ b/code/modules/food_and_drinks/food/customizables.dm @@ -378,9 +378,9 @@ /obj/item/reagent_containers/food/snacks/customizable/examine(mob/user) ..(user) - var/whatsinside = pick(ingredients) - - to_chat(user, " You think you can see [whatsinside] in there.") + if(LAZYLEN(ingredients)) + var/whatsinside = pick(ingredients) + to_chat(user, " You think you can see [whatsinside] in there.") /obj/item/reagent_containers/food/snacks/customizable/proc/newname() @@ -470,4 +470,3 @@ if(unsorted[it] == i) sorted[it] = i return sorted - diff --git a/code/modules/karma/karma.dm b/code/modules/karma/karma.dm index e9265c15b4a..1f18edfae22 100644 --- a/code/modules/karma/karma.dm +++ b/code/modules/karma/karma.dm @@ -371,29 +371,30 @@ You've gained [totalkarma] total karma in your time here.
"} return /client/proc/karmarefund(var/type,var/name,var/cost) - if(name == "Tajaran Ambassador") - cost = 30 - else if(name == "Unathi Ambassador") - cost = 30 - else if(name == "Skrell Ambassador") - cost = 30 - else if(name == "Diona Ambassador") - cost = 30 - else if(name == "Kidan Ambassador") - cost = 30 - else if(name == "Slime People Ambassador") - cost = 30 - else if(name == "Grey Ambassador") - cost = 30 - else if(name == "Vox Ambassador") - cost = 30 - else if(name == "Customs Officer") - cost = 30 - else if(name == "Nanotrasen Recruiter") - cost = 10 - else - to_chat(usr, "That job is not refundable.") - return + switch(name) + if("Tajaran Ambassador") + cost = 30 + if("Unathi Ambassador") + cost = 30 + if("Skrell Ambassador") + cost = 30 + if("Diona Ambassador") + cost = 30 + if("Kidan Ambassador") + cost = 30 + if("Slime People Ambassador") + cost = 30 + if("Grey Ambassador") + cost = 30 + if("Vox Ambassador") + cost = 30 + if("Customs Officer") + cost = 30 + if("Nanotrasen Recruiter") + cost = 10 + else + to_chat(usr, "That job is not refundable.") + return var/DBQuery/query = dbcon.NewQuery("SELECT * FROM [format_table_name("whitelist")] WHERE ckey='[usr.ckey]'") query.Execute() @@ -408,12 +409,13 @@ You've gained [totalkarma] total karma in your time here.
"} if(dbckey) var/list/typelist = list() - if(type == "job") - typelist = splittext(dbjob,",") - else if(type == "species") - typelist = splittext(dbspecies,",") - else - to_chat(usr, "Type [type] is not a valid column.") + switch(type) + if("job") + typelist = splittext(dbjob,",") + if("species") + typelist = splittext(dbspecies,",") + else + to_chat(usr, "Type [type] is not a valid column.") if(name in typelist) typelist -= name diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index 8df5d593b9b..a856e3f822f 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -228,7 +228,7 @@ src.name = newtitle src.title = newtitle if("Contents") - var/content = strip_html(input(usr, "Write your book's contents (HTML NOT allowed):"), MAX_BOOK_MESSAGE_LEN) as message|null + var/content = strip_html(input(usr, "Write your book's contents (HTML NOT allowed):") as message|null, MAX_BOOK_MESSAGE_LEN) if(!content) to_chat(usr, "The content is invalid.") return 1 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 1cf1a8bb942..3f36b8b6d55 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1291,7 +1291,7 @@ if(oldspecies.default_genes.len) oldspecies.handle_dna(src, TRUE) // Remove any genes that belong to the old species - oldspecies.handle_pre_change(src) + oldspecies.on_species_loss(src) dna.species = new new_species() @@ -1365,7 +1365,7 @@ dna.real_name = real_name - dna.species.handle_post_spawn(src) + dna.species.on_species_gain(src) see_in_dark = dna.species.get_resultant_darksight(src) if(see_in_dark > 2) @@ -1447,122 +1447,6 @@ W.message = message W.add_fingerprint(src) -// Allows IPC's to change their monitor display -/mob/living/carbon/human/proc/change_monitor() - set category = "IC" - set name = "Change Monitor/Optical Display" - set desc = "Change the display on your monitor or the colour of your optics." - - if(incapacitated()) - to_chat(src, "You cannot change your monitor or optical display in your current state.") - return - - var/obj/item/organ/external/head/head_organ = get_organ("head") - if(!head_organ) //If the rock'em-sock'em robot's head came off during a fight, they shouldn't be able to change their screen/optics. - to_chat(src, "Where's your head at? Can't change your monitor/display without one.") - return - - if(dna.species.bodyflags & ALL_RPARTS) //If they can have a fully cybernetic body... - var/datum/robolimb/robohead = all_robolimbs[head_organ.model] - if(!head_organ) - return - if(!robohead.is_monitor) //If they've got a prosthetic head and it isn't a monitor, they've no screen to adjust. Instead, let them change the colour of their optics! - var/optic_colour = input(src, "Select optic colour", m_colours["head"]) as color|null - if(incapacitated()) - to_chat(src, "You were interrupted while changing the colour of your optics.") - return - if(optic_colour) - change_markings(optic_colour, "head") - - else if(robohead.is_monitor) //Means that the character's head is a monitor (has a screen). Time to customize. - var/list/hair = list() - for(var/i in hair_styles_public_list) - var/datum/sprite_accessory/hair/tmp_hair = hair_styles_public_list[i] - if((head_organ.dna.species.name in tmp_hair.species_allowed) && (robohead.company in tmp_hair.models_allowed)) //Populate the list of available monitor styles only with styles that the monitor-head is allowed to use. - hair += i - - var/new_style = input(src, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair - if(incapacitated()) - to_chat(src, "You were interrupted while changing your monitor display.") - return - if(new_style) - change_hair(new_style) - -//Putting a couple of procs here that I don't know where else to dump. -//Mostly going to be used for Vox and Vox Armalis, but other human mobs might like them (for adminbuse). -/mob/living/carbon/human/proc/leap() - set category = "Abilities" - set name = "Leap" - set desc = "Leap at a target and grab them aggressively." - - if(last_special > world.time) - return - - if(stat || paralysis || stunned || weakened || lying || restrained() || buckled) - to_chat(src, "You cannot leap in your current state.") - return - - var/list/choices = list() - for(var/mob/living/M in view(6,src)) - if(!istype(M,/mob/living/silicon)) - choices += M - choices -= src - - var/mob/living/T = input(src,"Who do you wish to leap at?") as null|anything in choices - - if(!T || !src || src.stat) return - - if(get_dist(get_turf(T), get_turf(src)) > 6) return - - if(last_special > world.time) - return - - if(!canmove) - to_chat(src, "You cannot leap in your current state.") - return - - last_special = world.time + 75 - status_flags |= LEAPING - - src.visible_message("\The [src] leaps at [T]!") - src.throw_at(get_step(get_turf(T),get_turf(src)), 5, 1, src) - playsound(src.loc, 'sound/voice/shriek1.ogg', 50, 1) - - sleep(5) - - if(status_flags & LEAPING) status_flags &= ~LEAPING - - if(!src.Adjacent(T)) - to_chat(src, "You miss!") - return - - T.Weaken(5) - - //Only official raider vox get the grab and no self-prone." - if(src.mind && src.mind.special_role != "Vox Raider") - src.Weaken(5) - return - - var/use_hand = "left" - if(l_hand) - if(r_hand) - to_chat(src, "You need to have one hand free to grab someone.") - return - else - use_hand = "right" - - src.visible_message("\The [src] seizes [T] aggressively!") - - var/obj/item/grab/G = new(src,T) - if(use_hand == "left") - l_hand = G - else - r_hand = G - - G.state = GRAB_AGGRESSIVE - G.icon_state = "grabbed1" - G.synch() - /mob/living/carbon/human/proc/get_eyecon() var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes) var/obj/item/organ/internal/cyberimp/eyes/eye_implant = get_int_organ(/obj/item/organ/internal/cyberimp/eyes) @@ -1598,43 +1482,6 @@ Eyes need to have significantly high darksight to shine unless the mob has the X return TRUE -/mob/living/carbon/human/proc/gut() - set category = "Abilities" - set name = "Gut" - set desc = "While grabbing someone aggressively, rip their guts out or tear them apart." - - if(last_special > world.time) - return - - if(!canmove) - to_chat(src, "You cannot do that in your current state.") - return - - var/obj/item/grab/G = locate() in src - if(!G || !istype(G)) - to_chat(src, "You are not grabbing anyone.") - return - - if(G.state < GRAB_AGGRESSIVE) - to_chat(src, "You must have an aggressive grab to gut your prey!") - return - - last_special = world.time + 50 - - visible_message("\The [src] rips viciously at \the [G.affecting]'s body with its claws!") - - if(istype(G.affecting,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = G.affecting - H.apply_damage(50,BRUTE) - if(H.stat == 2) - H.gib() - else - var/mob/living/M = G.affecting - if(!istype(M)) return //wut - M.apply_damage(50,BRUTE) - if(M.stat == 2) - M.gib() - /mob/living/carbon/human/assess_threat(var/mob/living/simple_animal/bot/secbot/judgebot, var/lasercolor) if(judgebot.emagged == 2) return 10 //Everyone is a criminal! diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 6ce91d80ddd..c11d84451f9 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -79,8 +79,6 @@ var/bodyflags = 0 var/dietflags = 0 // Make sure you set this, otherwise it won't be able to digest a lot of foods - var/list/abilities = list() // For species-derived or admin-given powers - var/blood_color = "#A10808" //Red. var/flesh_color = "#FFC896" //Pink. var/single_gib_type = /obj/effect/decal/cleanable/blood/gibs @@ -95,6 +93,8 @@ var/show_ssd = 1 var/can_revive_by_healing // Determines whether or not this species can be revived by simply healing them var/has_gender = TRUE + var/blacklisted = FALSE + var/dangerous_existence = FALSE //Death vars. var/death_message = "seizes up and falls limp, their eyes dead and lifeless..." @@ -151,9 +151,7 @@ "l_hand" = list("path" = /obj/item/organ/external/hand), "r_hand" = list("path" = /obj/item/organ/external/hand/right), "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right) - ) - var/list/proc/species_abilities = list() + "r_foot" = list("path" = /obj/item/organ/external/foot/right)) /datum/species/New() //If the species has eyes, they are the default vision organ @@ -259,25 +257,16 @@ . -= 2 return . -/datum/species/proc/handle_post_spawn(mob/living/carbon/C) //Handles anything not already covered by basic species assignment. - grant_abilities(C) +/datum/species/proc/on_species_gain(mob/living/carbon/human/H) //Handles anything not already covered by basic species assignment. + return + +/datum/species/proc/on_species_loss(mob/living/carbon/human/H) + if(H.butcher_results) //clear it out so we don't butcher a actual human. + H.butcher_results = null /datum/species/proc/updatespeciescolor(mob/living/carbon/human/H) //Handles changing icobase for species that have multiple skin colors. return -/datum/species/proc/grant_abilities(mob/living/carbon/human/H) - for(var/proc/ability in species_abilities) - H.verbs += ability - -/datum/species/proc/handle_pre_change(mob/living/carbon/human/H) - if(H.butcher_results) //clear it out so we don't butcher a actual human. - H.butcher_results = null - remove_abilities(H) - -/datum/species/proc/remove_abilities(mob/living/carbon/human/H) - for(var/proc/ability in species_abilities) - H.verbs -= ability - // Do species-specific reagent handling here // Return 1 if it should do normal processing too // Return the parent value if processing does not explicitly stop @@ -297,7 +286,7 @@ H.setOxyLoss(0) H.SetLoseBreath(0) -/datum/species/proc/handle_dna(mob/living/carbon/C, remove) //Handles DNA mutations, as that doesn't work at init. Make sure you call genemutcheck on any blocks changed here +/datum/species/proc/handle_dna(mob/living/carbon/human/H, remove) //Handles DNA mutations, as that doesn't work at init. Make sure you call genemutcheck on any blocks changed here return /datum/species/proc/handle_death(mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns). @@ -717,4 +706,15 @@ It'll return null if the organ doesn't correspond, so include null checks when u /datum/species/proc/water_act(mob/living/carbon/human/M, volume, temperature, source) if(abs(temperature - M.bodytemperature) > 10) //If our water and mob temperature varies by more than 10K, cool or/ heat them appropriately - M.bodytemperature = (temperature + M.bodytemperature) * 0.5 //Approximation for gradual heating or cooling \ No newline at end of file + M.bodytemperature = (temperature + M.bodytemperature) * 0.5 //Approximation for gradual heating or cooling + +/proc/get_random_species(species_name = FALSE) // Returns a random non black-listed or hazardous species, either as a string or datum + var/static/list/random_species = list() + if(!random_species.len) + for(var/thing in subtypesof(/datum/species)) + var/datum/species/S = thing + if(!initial(S.dangerous_existence) && !initial(S.blacklisted)) + random_species += initial(S.name) + var/picked_species = pick(random_species) + var/datum/species/selected_species = GLOB.all_species[picked_species] + return species_name ? picked_species : selected_species.type \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/abductor.dm b/code/modules/mob/living/carbon/human/species/abductor.dm index c205cb6d033..f51870d9e00 100644 --- a/code/modules/mob/living/carbon/human/species/abductor.dm +++ b/code/modules/mob/living/carbon/human/species/abductor.dm @@ -32,15 +32,15 @@ /datum/species/abductor/can_understand(mob/other) //Abductors can understand everyone, but they can only speak over their mindlink to another team-member return TRUE -/datum/species/abductor/handle_post_spawn(mob/living/carbon/human/H) +/datum/species/abductor/on_species_gain(mob/living/carbon/human/H) + ..() H.gender = NEUTER H.languages.Cut() //Under no condition should you be able to speak any language H.add_language("Abductor Mindlink") //other than over the abductor's own mindlink var/datum/atom_hud/abductor_hud = huds[DATA_HUD_ABDUCTOR] abductor_hud.add_hud_to(H) - return ..() -/datum/species/abductor/remove_abilities(mob/living/carbon/human/H) +/datum/species/abductor/on_species_loss(mob/living/carbon/human/H) ..() var/datum/atom_hud/abductor_hud = huds[DATA_HUD_ABDUCTOR] abductor_hud.remove_hud_from(H) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/diona.dm b/code/modules/mob/living/carbon/human/species/diona.dm index 7d7b2acd713..6f53be4d3c8 100644 --- a/code/modules/mob/living/carbon/human/species/diona.dm +++ b/code/modules/mob/living/carbon/human/species/diona.dm @@ -76,17 +76,16 @@ "pulls out a secret stash of herbicide and takes a hearty swig!", "is pulling themselves apart!") -/datum/species/diona/can_understand(var/mob/other) +/datum/species/diona/can_understand(mob/other) if(istype(other, /mob/living/simple_animal/diona)) return 1 return 0 -/datum/species/diona/handle_post_spawn(var/mob/living/carbon/human/H) +/datum/species/diona/on_species_gain(mob/living/carbon/human/H) + ..() H.gender = NEUTER - return ..() - -/datum/species/diona/handle_life(var/mob/living/carbon/human/H) +/datum/species/diona/handle_life(mob/living/carbon/human/H) H.radiation = Clamp(H.radiation, 0, 100) //We have to clamp this first, then decrease it, or there's a few edge cases of massive heals if we clamp and decrease at the same time. var/rads = H.radiation / 25 H.radiation = max(H.radiation-rads, 0) diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm index 772a5ca5ba6..c3fa38611b5 100644 --- a/code/modules/mob/living/carbon/human/species/golem.dm +++ b/code/modules/mob/living/carbon/human/species/golem.dm @@ -42,7 +42,8 @@ "is crumbling into dust!", "is smashing their body apart!") -/datum/species/golem/handle_post_spawn(var/mob/living/carbon/human/H) +/datum/species/golem/on_species_gain(mob/living/carbon/human/H) + ..() if(H.mind) H.mind.assigned_role = "Golem" H.mind.special_role = SPECIAL_ROLE_GOLEM @@ -53,7 +54,6 @@ H.equip_to_slot_or_del(new /obj/item/clothing/shoes/golem(H), slot_shoes) H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/golem(H), slot_wear_mask) H.equip_to_slot_or_del(new /obj/item/clothing/gloves/golem(H), slot_gloves) - ..() ////////Adamantine Golem stuff I dunno where else to put it diff --git a/code/modules/mob/living/carbon/human/species/grey.dm b/code/modules/mob/living/carbon/human/species/grey.dm index ad4239c0d05..e8cb6b13083 100644 --- a/code/modules/mob/living/carbon/human/species/grey.dm +++ b/code/modules/mob/living/carbon/human/species/grey.dm @@ -29,19 +29,15 @@ reagent_tag = PROCESS_ORG blood_color = "#A200FF" -/datum/species/grey/handle_dna(var/mob/living/carbon/C, var/remove) - if(!remove) - C.dna.SetSEState(REMOTETALKBLOCK,1,1) - genemutcheck(C,REMOTETALKBLOCK,null,MUTCHK_FORCED) - else - C.dna.SetSEState(REMOTETALKBLOCK,0,1) - genemutcheck(C,REMOTETALKBLOCK,null,MUTCHK_FORCED) +/datum/species/grey/handle_dna(mob/living/carbon/human/H, remove) ..() + H.dna.SetSEState(REMOTETALKBLOCK, !remove, 1) + genemutcheck(H, REMOTETALKBLOCK, null, MUTCHK_FORCED) -/datum/species/grey/water_act(var/mob/living/carbon/C, volume, temperature, source) +/datum/species/grey/water_act(mob/living/carbon/human/H, volume, temperature, source) ..() - C.take_organ_damage(5,min(volume,20)) - C.emote("scream") + H.take_organ_damage(5, min(volume, 20)) + H.emote("scream") /datum/species/grey/after_equip_job(datum/job/J, mob/living/carbon/human/H) var/speech_pref = H.client.prefs.speciesprefs diff --git a/code/modules/mob/living/carbon/human/species/machine.dm b/code/modules/mob/living/carbon/human/species/machine.dm index 066677f3104..fa3e4e321a9 100644 --- a/code/modules/mob/living/carbon/human/species/machine.dm +++ b/code/modules/mob/living/carbon/human/species/machine.dm @@ -72,17 +72,64 @@ "is frying their own circuits!", "is blocking their ventilation port!") - species_abilities = list( - /mob/living/carbon/human/proc/change_monitor - ) + var/datum/action/innate/change_monitor/monitor -/datum/species/machine/handle_death(var/mob/living/carbon/human/H) +/datum/species/machine/on_species_gain(mob/living/carbon/human/H) + ..() + monitor = new() + monitor.Grant(H) + +/datum/species/machine/on_species_loss(mob/living/carbon/human/H) + ..() + if(monitor) + monitor.Remove(H) + +/datum/species/machine/handle_death(mob/living/carbon/human/H) var/obj/item/organ/external/head/head_organ = H.get_organ("head") if(!head_organ) return head_organ.h_style = "Bald" head_organ.f_style = "Shaved" spawn(100) - if(H) + if(H && head_organ) H.update_hair() - H.update_fhair() \ No newline at end of file + H.update_fhair() + +// Allows IPC's to change their monitor display +/datum/action/innate/change_monitor + name = "Change Monitor" + check_flags = AB_CHECK_CONSCIOUS + button_icon_state = "scan_mode" + +/datum/action/innate/change_monitor/Activate() + var/mob/living/carbon/human/H = owner + var/obj/item/organ/external/head/head_organ = H.get_organ("head") + + if(!head_organ) //If the rock'em-sock'em robot's head came off during a fight, they shouldn't be able to change their screen/optics. + to_chat(H, "Where's your head at? Can't change your monitor/display without one.") + return + + var/datum/robolimb/robohead = all_robolimbs[head_organ.model] + if(!head_organ) + return + if(!robohead.is_monitor) //If they've got a prosthetic head and it isn't a monitor, they've no screen to adjust. Instead, let them change the colour of their optics! + var/optic_colour = input(H, "Select optic colour", H.m_colours["head"]) as color|null + if(H.incapacitated()) + to_chat(H, "You were interrupted while changing the colour of your optics.") + return + if(optic_colour) + H.change_markings(optic_colour, "head") + + else if(robohead.is_monitor) //Means that the character's head is a monitor (has a screen). Time to customize. + var/list/hair = list() + for(var/i in hair_styles_public_list) + var/datum/sprite_accessory/hair/tmp_hair = hair_styles_public_list[i] + if((head_organ.dna.species.name in tmp_hair.species_allowed) && (robohead.company in tmp_hair.models_allowed)) //Populate the list of available monitor styles only with styles that the monitor-head is allowed to use. + hair += i + + var/new_style = input(H, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair + if(H.incapacitated()) + to_chat(src, "You were interrupted while changing your monitor display.") + return + if(new_style) + H.change_hair(new_style) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/monkey.dm b/code/modules/mob/living/carbon/human/species/monkey.dm index 4128024a8c9..5e926a23870 100644 --- a/code/modules/mob/living/carbon/human/species/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/monkey.dm @@ -35,7 +35,7 @@ brute_mod = 1.5 burn_mod = 1.5 -/datum/species/monkey/handle_npc(var/mob/living/carbon/human/H) +/datum/species/monkey/handle_npc(mob/living/carbon/human/H) if(H.stat != CONSCIOUS) return if(prob(33) && H.canmove && isturf(H.loc) && !H.pulledby) //won't move if being pulled @@ -46,16 +46,17 @@ /datum/species/monkey/get_random_name() return "[lowertext(name)] ([rand(100,999)])" -/datum/species/monkey/handle_post_spawn(var/mob/living/carbon/human/H) +/datum/species/monkey/on_species_gain(mob/living/carbon/human/H) + ..() H.real_name = "[lowertext(name)] ([rand(100,999)])" H.name = H.real_name H.butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/monkey = 5) +/datum/species/monkey/handle_dna(mob/living/carbon/human/H, remove) ..() - -/datum/species/monkey/handle_dna(var/mob/living/carbon/human/H) - H.dna.SetSEState(MONKEYBLOCK,1) - genemutcheck(H,MONKEYBLOCK,null,MUTCHK_FORCED) + if(!remove) + H.dna.SetSEState(MONKEYBLOCK, TRUE) + genemutcheck(H, MONKEYBLOCK, null, MUTCHK_FORCED) /datum/species/monkey/handle_can_equip(obj/item/I, slot, disable_warning = 0, mob/living/carbon/human/user) switch(slot) diff --git a/code/modules/mob/living/carbon/human/species/nucleation.dm b/code/modules/mob/living/carbon/human/species/nucleation.dm index 4fcfae74282..21d8a5c0012 100644 --- a/code/modules/mob/living/carbon/human/species/nucleation.dm +++ b/code/modules/mob/living/carbon/human/species/nucleation.dm @@ -2,6 +2,7 @@ name = "Nucleation" name_plural = "Nucleations" icobase = 'icons/mob/human_races/r_nucleation.dmi' + blacklisted = TRUE blurb = "A sub-race of unfortunates who have been exposed to too much supermatter radiation. As a result, \ supermatter crystal clusters have begun to grow across their bodies. Research to find a cure for this ailment \ has been slow, and so this is a common fate for veteran engineers. The supermatter crystals produce oxygen, \ @@ -28,14 +29,13 @@ ) vision_organ = /obj/item/organ/internal/eyes/luminescent_crystal -/datum/species/nucleation/handle_post_spawn(var/mob/living/carbon/human/H) +/datum/species/nucleation/on_species_gain(mob/living/carbon/human/H) + ..() H.light_color = "#1C1C00" H.set_light(2) - return ..() -/datum/species/nucleation/handle_death(var/mob/living/carbon/human/H) +/datum/species/nucleation/handle_death(mob/living/carbon/human/H) var/turf/T = get_turf(H) H.visible_message("[H]'s body explodes, leaving behind a pile of microscopic crystals!") explosion(T, 0, 0, 2, 2) // Create a small explosion burst upon death -// new /obj/item/shard/supermatter( T ) qdel(H) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm index 46270219735..b49dd88d8e6 100644 --- a/code/modules/mob/living/carbon/human/species/plasmaman.dm +++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm @@ -3,6 +3,7 @@ name_plural = "Plasmamen" icobase = 'icons/mob/human_races/r_plasmaman_sb.dmi' deform = 'icons/mob/human_races/r_plasmaman_pb.dmi' // TODO: Need deform. + dangerous_existence = TRUE //So so much //language = "Clatter" species_traits = list(IS_WHITELISTED, NO_BLOOD, NOTRANSSTING) @@ -162,7 +163,7 @@ H.internal = H.get_item_by_slot(tank_slot) H.update_action_buttons_icon() -/datum/species/plasmaman/handle_life(var/mob/living/carbon/human/H) +/datum/species/plasmaman/handle_life(mob/living/carbon/human/H) if(!istype(H.wear_suit, /obj/item/clothing/suit/space/eva/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/eva/plasmaman)) var/datum/gas_mixture/environment = H.loc.return_air() if(environment && environment.oxygen && environment.oxygen >= OXYCONCEN_PLASMEN_IGNITION) //Plasmamen so long as there's enough oxygen (0.5 moles, same as it takes to burn gaseous plasma). @@ -178,7 +179,7 @@ H.update_fire() ..() -/datum/species/plasmaman/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) +/datum/species/plasmaman/handle_reagents(mob/living/carbon/human/H, datum/reagent/R) if(R.id == "plasma") H.adjustBruteLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) H.adjustFireLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER) diff --git a/code/modules/mob/living/carbon/human/species/shadow.dm b/code/modules/mob/living/carbon/human/species/shadow.dm index 0e8bd2e91e2..df1ecd61484 100644 --- a/code/modules/mob/living/carbon/human/species/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/shadow.dm @@ -4,6 +4,7 @@ icobase = 'icons/mob/human_races/r_shadow.dmi' deform = 'icons/mob/human_races/r_shadow.dmi' + dangerous_existence = TRUE unarmed_type = /datum/unarmed_attack/claws @@ -28,7 +29,7 @@ "is twisting their own neck!", "is staring into the closest light source!") - var/grant_vision_toggle = 1 + var/grant_vision_toggle = TRUE var/datum/action/innate/shadow/darkvision/vision_toggle /datum/action/innate/shadow/darkvision //Darkvision toggle so shadowpeople can actually see where darkness is @@ -46,19 +47,19 @@ H.vision_type = null to_chat(H, "You adjust your vision to recognize the shadows.") -/datum/species/shadow/grant_abilities(var/mob/living/carbon/human/H) - . = ..() +/datum/species/shadow/on_species_gain(mob/living/carbon/human/H) + ..() if(grant_vision_toggle) vision_toggle = new vision_toggle.Grant(H) -/datum/species/shadow/remove_abilities(var/mob/living/carbon/human/H) - . = ..() +/datum/species/shadow/on_species_loss(mob/living/carbon/human/H) + ..() if(grant_vision_toggle && vision_toggle) H.vision_type = null vision_toggle.Remove(H) -/datum/species/shadow/handle_life(var/mob/living/carbon/human/H) +/datum/species/shadow/handle_life(mob/living/carbon/human/H) var/light_amount = 0 if(isturf(H.loc)) var/turf/T = H.loc diff --git a/code/modules/mob/living/carbon/human/species/shadowling.dm b/code/modules/mob/living/carbon/human/species/shadowling.dm index e7d7982a765..1ce7b5cd0e0 100644 --- a/code/modules/mob/living/carbon/human/species/shadowling.dm +++ b/code/modules/mob/living/carbon/human/species/shadowling.dm @@ -4,6 +4,7 @@ icobase = 'icons/mob/human_races/r_shadowling.dmi' deform = 'icons/mob/human_races/r_shadowling.dmi' + blacklisted = TRUE blood_color = "#555555" flesh_color = "#222222" @@ -20,7 +21,7 @@ "brain" = /obj/item/organ/internal/brain, "eyes" = /obj/item/organ/internal/eyes) -/datum/species/shadow/ling/handle_life(var/mob/living/carbon/human/H) +/datum/species/shadow/ling/handle_life(mob/living/carbon/human/H) if(!H.weakeyes) H.weakeyes = 1 //Makes them more vulnerable to flashes and flashbangs var/light_amount = 0 @@ -60,12 +61,12 @@ blood_color = "#CCCCCC" flesh_color = "#AAAAAA" - species_traits = list(NO_BLOOD, NO_BREATHE, RADIMMUNE) + species_traits = list(NO_BLOOD, NO_BREATHE, RADIMMUNE, NO_EXAMINE) burn_mod = 1.1 oxy_mod = 0 heatmod = 1.1 -/datum/species/shadow/ling/lesser/handle_life(var/mob/living/carbon/human/H) +/datum/species/shadow/ling/lesser/handle_life(mob/living/carbon/human/H) if(!H.weakeyes) H.weakeyes = 1 //Makes them more vulnerable to flashes and flashbangs var/light_amount = 0 diff --git a/code/modules/mob/living/carbon/human/species/skeleton.dm b/code/modules/mob/living/carbon/human/species/skeleton.dm index 8afc35f743a..6a2b74fb671 100644 --- a/code/modules/mob/living/carbon/human/species/skeleton.dm +++ b/code/modules/mob/living/carbon/human/species/skeleton.dm @@ -39,7 +39,7 @@ "brain" = /obj/item/organ/internal/brain/golem, ) //Has default darksight of 2. -/datum/species/skeleton/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) +/datum/species/skeleton/handle_reagents(mob/living/carbon/human/H, datum/reagent/R) // Crazylemon is still silly if(R.id == "milk") H.heal_overall_damage(4,4) diff --git a/code/modules/mob/living/carbon/human/species/slime.dm b/code/modules/mob/living/carbon/human/species/slime.dm index 77fa54491e0..583835b7358 100644 --- a/code/modules/mob/living/carbon/human/species/slime.dm +++ b/code/modules/mob/living/carbon/human/species/slime.dm @@ -1,3 +1,11 @@ +#define SLIMEPERSON_COLOR_SHIFT_TRIGGER 0.1 +#define SLIMEPERSON_ICON_UPDATE_PERIOD 200 // 20 seconds +#define SLIMEPERSON_BLOOD_SCALING_FACTOR 5 // Used to adjust how much of an effect the blood has on the rate of color change. Higher is slower. + +#define SLIMEPERSON_HUNGERCOST 50 +#define SLIMEPERSON_MINHUNGER 250 +#define SLIMEPERSON_REGROWTHDELAY 450 // 45 seconds + /datum/species/slime name = "Slime People" name_plural = "Slime People" @@ -41,33 +49,24 @@ "is turning a dull, brown color and melting into a puddle!") var/reagent_skin_coloring = FALSE + var/datum/action/innate/regrow/grow + var/datum/action/innate/slimecolor/recolor - var/datum/action/innate/regrow/grow = new() - - species_abilities = list( - /mob/living/carbon/human/verb/toggle_recolor_verb, - /mob/living/carbon/human/proc/regrow_limbs - ) - -/datum/species/slime/handle_post_spawn(var/mob/living/carbon/human/H) - grow.Grant(H) +/datum/species/slime/on_species_gain(mob/living/carbon/human/H) ..() + grow = new() + grow.Grant(H) + recolor = new() + recolor.Grant(H) -/datum/action/innate/regrow - name = "Regrow limbs" - icon_icon = 'icons/effects/effects.dmi' - button_icon_state = "greenglow" +/datum/species/slime/on_species_loss(mob/living/carbon/human/H) + ..() + if(grow) + grow.Remove(H) + if(recolor) + recolor.Remove(H) -/datum/action/innate/regrow/Activate() - var/mob/living/carbon/human/user = owner - user.regrow_limbs() - - -/datum/species/slime/handle_life(var/mob/living/carbon/human/H) -//This is allegedly for code "style". Like a plaid sweater? -#define SLIMEPERSON_COLOR_SHIFT_TRIGGER 0.1 -#define SLIMEPERSON_ICON_UPDATE_PERIOD 200 // 20 seconds -#define SLIMEPERSON_BLOOD_SCALING_FACTOR 5 // Used to adjust how much of an effect the blood has on the rate of color change. Higher is slower. +/datum/species/slime/handle_life(mob/living/carbon/human/H) // Slowly shifting to the color of the reagents if(reagent_skin_coloring && H.reagents.total_volume > SLIMEPERSON_COLOR_SHIFT_TRIGGER) var/blood_amount = H.blood_volume @@ -83,118 +82,99 @@ H.update_body() ..() -#undef SLIMEPERSON_COLOR_SHIFT_TRIGGER -#undef SLIMEPERSON_ICON_UPDATE_PERIOD -#undef SLIMEPERSON_BLOOD_SCALING_FACTOR +/datum/action/innate/slimecolor + name = "Toggle Recolor" + check_flags = AB_CHECK_CONSCIOUS + icon_icon = 'icons/effects/effects.dmi' + button_icon_state = "greenglow" -/mob/living/carbon/human/proc/toggle_recolor(silent = FALSE) - if(!isslimeperson(src)) - if(!silent) - to_chat(src, "You're not a slime person!") - return - - var/datum/species/slime/S = dna.species +/datum/action/innate/slimecolor/Activate() + var/mob/living/carbon/human/H = owner + var/datum/species/slime/S = H.dna.species if(S.reagent_skin_coloring) - S.reagent_skin_coloring = TRUE - if(!silent) - to_chat(src, "You adjust your internal chemistry to filter out pigments from things you consume.") + S.reagent_skin_coloring = FALSE + to_chat(H, "You adjust your internal chemistry to filter out pigments from things you consume.") else S.reagent_skin_coloring = TRUE - if(!silent) - to_chat(src, "You adjust your internal chemistry to permit pigments in chemicals you consume to tint you.") + to_chat(H, "You adjust your internal chemistry to permit pigments in chemicals you consume to tint you.") -/mob/living/carbon/human/verb/toggle_recolor_verb() - set category = "IC" - set name = "Toggle Reagent Recoloring" - set desc = "While active, you'll slowly adjust your body's color to that of the reagents inside of you, moderated by how much blood you have." +/datum/action/innate/regrow + name = "Regrow limbs" + check_flags = AB_CHECK_CONSCIOUS + icon_icon = 'icons/effects/effects.dmi' + button_icon_state = "greenglow" - toggle_recolor() - - -/mob/living/carbon/human/proc/regrow_limbs() - set category = "IC" - set name = "Regrow Limbs" - set desc = "Regrow one of your missing limbs at the cost of a large amount of hunger" - -#define SLIMEPERSON_HUNGERCOST 50 -#define SLIMEPERSON_MINHUNGER 250 -#define SLIMEPERSON_REGROWTHDELAY 450 // 45 seconds - - if(stat || paralysis || stunned) - to_chat(src, "You cannot regenerate missing limbs in your current state.") - return - - if(nutrition < SLIMEPERSON_MINHUNGER) - to_chat(src, "You're too hungry to regenerate a limb!") +/datum/action/innate/regrow/Activate() + var/mob/living/carbon/human/H = owner + if(H.nutrition < SLIMEPERSON_MINHUNGER) + to_chat(H, "You're too hungry to regenerate a limb!") return var/list/missing_limbs = list() - for(var/l in bodyparts_by_name) - var/obj/item/organ/external/E = bodyparts_by_name[l] + for(var/l in H.bodyparts_by_name) + var/obj/item/organ/external/E = H.bodyparts_by_name[l] if(!istype(E)) - var/list/limblist = dna.species.has_limbs[l] + var/list/limblist = H.dna.species.has_limbs[l] var/obj/item/organ/external/limb = limblist["path"] var/parent_organ = initial(limb.parent_organ) - var/obj/item/organ/external/parentLimb = bodyparts_by_name[parent_organ] + var/obj/item/organ/external/parentLimb = H.bodyparts_by_name[parent_organ] if(!istype(parentLimb)) continue missing_limbs[initial(limb.name)] = l if(!missing_limbs.len) - to_chat(src, "You're not missing any limbs!") + to_chat(H, "You're not missing any limbs!") return - var/limb_select = input(src, "Choose a limb to regrow", "Limb Regrowth") as null|anything in missing_limbs + var/limb_select = input(H, "Choose a limb to regrow", "Limb Regrowth") as null|anything in missing_limbs var/chosen_limb = missing_limbs[limb_select] - visible_message("[src] begins to hold still and concentrate on [p_their()] missing [limb_select]...", "You begin to focus on regrowing your missing [limb_select]... (This will take [round(SLIMEPERSON_REGROWTHDELAY/10)] seconds, and you must hold still.)") - if(do_after(src, SLIMEPERSON_REGROWTHDELAY, needhand=0, target = src)) - if(stat || paralysis || stunned) - to_chat(src, "You cannot regenerate missing limbs in your current state.") + H.visible_message("[H] begins to hold still and concentrate on [H.p_their()] missing [limb_select]...", "You begin to focus on regrowing your missing [limb_select]... (This will take [round(SLIMEPERSON_REGROWTHDELAY/10)] seconds, and you must hold still.)") + if(do_after(H, SLIMEPERSON_REGROWTHDELAY, needhand = 0, target = H)) + if(H.incapacitated()) + to_chat(H, "You cannot regenerate missing limbs in your current state.") return - if(nutrition < SLIMEPERSON_MINHUNGER) - to_chat(src, "You're too hungry to regenerate a limb!") + if(H.nutrition < SLIMEPERSON_MINHUNGER) + to_chat(H, "You're too hungry to regenerate a limb!") return - var/obj/item/organ/external/O = bodyparts_by_name[chosen_limb] + var/obj/item/organ/external/O = H.bodyparts_by_name[chosen_limb] var/stored_brute = 0 var/stored_burn = 0 if(istype(O)) - to_chat(src, "You distribute the damaged tissue around your body, out of the way of your new pseudopod!") + to_chat(H, "You distribute the damaged tissue around your body, out of the way of your new pseudopod!") var/obj/item/organ/external/doomedStump = O stored_brute = doomedStump.brute_dam stored_burn = doomedStump.burn_dam qdel(O) - var/limb_list = dna.species.has_limbs[chosen_limb] + var/limb_list = H.dna.species.has_limbs[chosen_limb] var/obj/item/organ/external/limb_path = limb_list["path"] // Parent check - var/obj/item/organ/external/potential_parent = bodyparts_by_name[initial(limb_path.parent_organ)] + var/obj/item/organ/external/potential_parent = H.bodyparts_by_name[initial(limb_path.parent_organ)] if(!istype(potential_parent)) - to_chat(src, "You've lost the organ that you've been growing your new part on!") + to_chat(H, "You've lost the organ that you've been growing your new part on!") return // No rayman for you // Grah this line will leave a "not used" warning, in spite of the fact that the new() proc WILL do the thing. // Bothersome. - var/obj/item/organ/external/new_limb = new limb_path(src) + var/obj/item/organ/external/new_limb = new limb_path(H) new_limb.open = 0 // This is just so that the compiler won't think that new_limb is unused, because the compiler is horribly stupid. - adjustBruteLoss(stored_brute) - adjustFireLoss(stored_burn) - update_body() - updatehealth() - UpdateDamageIcon() - nutrition -= SLIMEPERSON_HUNGERCOST - visible_message("[src] finishes regrowing [p_their()] missing [new_limb]!", "You finish regrowing your [limb_select]") + H.adjustBruteLoss(stored_brute) + H.adjustFireLoss(stored_burn) + H.update_body() + H.updatehealth() + H.UpdateDamageIcon() + H.nutrition -= SLIMEPERSON_HUNGERCOST + H.visible_message("[H] finishes regrowing [H.p_their()] missing [new_limb]!", "You finish regrowing your [limb_select]") else - to_chat(src, "You need to hold still in order to regrow a limb!") - return + to_chat(H, "You need to hold still in order to regrow a limb!") + +#undef SLIMEPERSON_COLOR_SHIFT_TRIGGER +#undef SLIMEPERSON_ICON_UPDATE_PERIOD +#undef SLIMEPERSON_BLOOD_SCALING_FACTOR #undef SLIMEPERSON_HUNGERCOST #undef SLIMEPERSON_MINHUNGER -#undef SLIMEPERSON_REGROWTHDELAY - -/datum/species/slime/handle_pre_change(mob/living/carbon/human/H) - ..() - if(reagent_skin_coloring) - H.toggle_recolor(silent = 1) \ No newline at end of file +#undef SLIMEPERSON_REGROWTHDELAY \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/tajaran.dm b/code/modules/mob/living/carbon/human/species/tajaran.dm index 0eaede54dbf..d4cdaf95944 100644 --- a/code/modules/mob/living/carbon/human/species/tajaran.dm +++ b/code/modules/mob/living/carbon/human/species/tajaran.dm @@ -54,5 +54,5 @@ "is twisting their own neck!", "is holding their breath!") -/datum/species/tajaran/handle_death(var/mob/living/carbon/human/H) +/datum/species/tajaran/handle_death(mob/living/carbon/human/H) H.stop_tail_wagging(1) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/unathi.dm b/code/modules/mob/living/carbon/human/species/unathi.dm index 247dfab98a4..bcad7d9342e 100644 --- a/code/modules/mob/living/carbon/human/species/unathi.dm +++ b/code/modules/mob/living/carbon/human/species/unathi.dm @@ -56,12 +56,18 @@ "is twisting their own neck!", "is holding their breath!") - var/datum/action/innate/tail_lash/lash = new() + var/datum/action/innate/tail_lash/lash -/datum/species/unathi/handle_post_spawn(var/mob/living/carbon/human/H) - lash.Grant(H) +/datum/species/unathi/on_species_gain(mob/living/carbon/human/H) ..() + lash = new + lash.Grant(H) + +/datum/species/unathi/on_species_loss(mob/living/carbon/human/H) + ..() + if(lash) + lash.Remove(H) /datum/action/innate/tail_lash name = "Tail lash" @@ -81,7 +87,7 @@ var/obj/item/organ/external/E = C.get_organ(pick("l_leg", "r_leg", "l_foot", "r_foot", "groin")) if(E) user.changeNext_move(CLICK_CD_MELEE) - user.visible_message("[src] smacks [C] in [E] with their tail! ", "You hit [C] in [E] with your tail!") + user.visible_message("[user] smacks [C] in [E] with their tail! ", "You hit [C] in [E] with your tail!") user.adjustStaminaLoss(15) C.apply_damage(5, BRUTE, E) user.spin(20, 1) @@ -90,7 +96,7 @@ if(user.restrained()) if(prob(50)) user.Weaken(5) - user.visible_message("[src] loses [p_their()] balance!", "You lose your balance!") + user.visible_message("[user] loses [user.p_their()] balance!", "You lose your balance!") return if(user.getStaminaLoss() >= 60) //Bit higher as you don't need to start, just would need to keep going with the tail lash. to_chat(user, "You run out of momentum!") @@ -98,5 +104,5 @@ -/datum/species/unathi/handle_death(var/mob/living/carbon/human/H) +/datum/species/unathi/handle_death(mob/living/carbon/human/H) H.stop_tail_wagging(1) diff --git a/code/modules/mob/living/carbon/human/species/vox.dm b/code/modules/mob/living/carbon/human/species/vox.dm index e86185a4d9b..1bc0b8b3b9e 100644 --- a/code/modules/mob/living/carbon/human/species/vox.dm +++ b/code/modules/mob/living/carbon/human/species/vox.dm @@ -3,6 +3,7 @@ name_plural = "Vox" icobase = 'icons/mob/human_races/vox/r_vox.dmi' deform = 'icons/mob/human_races/vox/r_def_vox.dmi' + dangerous_existence = TRUE language = "Vox-pidgin" tail = "voxtail" speech_sounds = list('sound/voice/shriek1.ogg') @@ -77,7 +78,7 @@ "is holding their breath!", "is deeply inhaling oxygen!") -/datum/species/vox/handle_death(var/mob/living/carbon/human/H) +/datum/species/vox/handle_death(mob/living/carbon/human/H) H.stop_tail_wagging(1) /datum/species/vox/after_equip_job(datum/job/J, mob/living/carbon/human/H) @@ -95,13 +96,12 @@ H.internal = H.l_hand H.update_action_buttons_icon() -/datum/species/vox/handle_post_spawn(var/mob/living/carbon/human/H) +/datum/species/vox/on_species_gain(mob/living/carbon/human/H) + ..() updatespeciescolor(H) H.update_icons() - //H.verbs += /mob/living/carbon/human/proc/leap - ..() -/datum/species/vox/updatespeciescolor(var/mob/living/carbon/human/H, var/owner_sensitive = 1) //Handling species-specific skin-tones for the Vox race. +/datum/species/vox/updatespeciescolor(mob/living/carbon/human/H, owner_sensitive = 1) //Handling species-specific skin-tones for the Vox race. if(H.dna.species.bodyflags & HAS_ICON_SKIN_TONE) //Making sure we don't break Armalis. var/new_icobase = 'icons/mob/human_races/vox/r_vox.dmi' //Default Green Vox. var/new_deform = 'icons/mob/human_races/vox/r_def_vox.dmi' //Default Green Vox. @@ -132,25 +132,21 @@ H.change_icobase(new_icobase, new_deform, owner_sensitive) //Update the icobase/deform of all our organs, but make sure we don't mess with frankenstein limbs in doing so. H.update_dna() -/datum/species/vox/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R) +/datum/species/vox/handle_reagents(mob/living/carbon/human/H, datum/reagent/R) if(R.id == "oxygen") //Armalis are above such petty things. H.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER) //Same as plasma. H.reagents.remove_reagent(R.id, REAGENTS_METABOLISM) - return 0 //Handling reagent removal on our own. + return FALSE //Handling reagent removal on our own. return ..() -/datum/species/vox/armalis/handle_post_spawn(var/mob/living/carbon/human/H) - H.verbs += /mob/living/carbon/human/proc/leap - H.verbs += /mob/living/carbon/human/proc/gut - ..() - /datum/species/vox/armalis name = "Vox Armalis" name_plural = "Vox Armalis" icobase = 'icons/mob/human_races/r_armalis.dmi' deform = 'icons/mob/human_races/r_armalis.dmi' unarmed_type = /datum/unarmed_attack/claws/armalis + blacklisted = TRUE warning_low_pressure = 50 hazard_low_pressure = 0 @@ -198,4 +194,4 @@ "is huffing oxygen!") /datum/species/vox/armalis/handle_reagents() //Skip the Vox oxygen reagent toxicity. Armalis are above such things. - return 1 \ No newline at end of file + return TRUE \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/vulpkanin.dm b/code/modules/mob/living/carbon/human/species/vulpkanin.dm index 5746fe125c9..3e6ebc1d41d 100644 --- a/code/modules/mob/living/carbon/human/species/vulpkanin.dm +++ b/code/modules/mob/living/carbon/human/species/vulpkanin.dm @@ -48,5 +48,5 @@ "is twisting their own neck!", "is holding their breath!") -/datum/species/vulpkanin/handle_death(var/mob/living/carbon/human/H) +/datum/species/vulpkanin/handle_death(mob/living/carbon/human/H) H.stop_tail_wagging(1) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/species/wryn.dm b/code/modules/mob/living/carbon/human/species/wryn.dm index 5606cd81e9b..219be4111b3 100644 --- a/code/modules/mob/living/carbon/human/species/wryn.dm +++ b/code/modules/mob/living/carbon/human/species/wryn.dm @@ -3,11 +3,11 @@ name_plural = "Wryn" icobase = 'icons/mob/human_races/r_wryn.dmi' deform = 'icons/mob/human_races/r_wryn.dmi' + blacklisted = TRUE language = "Wryn Hivemind" tail = "wryntail" punchdamagelow = 0 punchdamagehigh = 1 - //primitive = /mob/living/carbon/monkey/wryn slowdown = 1 warning_low_pressure = -300 hazard_low_pressure = 1 @@ -49,11 +49,11 @@ default_hair = "Antennae" -/datum/species/wryn/handle_death(var/mob/living/carbon/human/H) +/datum/species/wryn/handle_death(mob/living/carbon/human/H) for(var/mob/living/carbon/C in living_mob_list) if(C.get_int_organ(/obj/item/organ/internal/wryn/hivenode)) to_chat(C, "Your antennae tingle as you are overcome with pain...") - to_chat(C, "It feels like part of you has died.") + to_chat(C, "It feels like part of you has died.") // This is bullshit /datum/species/wryn/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) if(target.handcuffed && target.get_int_organ(/obj/item/organ/internal/wryn/hivenode)) diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 2d024ec786e..a5883fe93f2 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -56,11 +56,7 @@ if(abilities) client.verbs |= abilities - if(istype(src,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = src - if(H.dna.species && H.dna.species.abilities) - client.verbs |= H.dna.species.abilities - + if(ishuman(src)) client.screen += client.void //HUD updates (antag hud, etc) diff --git a/code/modules/modular_computers/file_system/programs/command/comms.dm b/code/modules/modular_computers/file_system/programs/command/comms.dm index ef6cf016cd5..2ca6d9928a3 100644 --- a/code/modules/modular_computers/file_system/programs/command/comms.dm +++ b/code/modules/modular_computers/file_system/programs/command/comms.dm @@ -325,7 +325,7 @@ to_chat(usr, "Arrays recycling. Please stand by.") SSnanoui.update_uis(src) return 1 - var/input = stripped_input(usr, "Please enter the reason for requesting the nuclear self-destruct codes. Misuse of the nuclear request system will not be tolerated under any circumstances. Transmission does not guarantee a response.", "Self Destruct Code Request.","") as text|null + var/input = stripped_input(usr, "Please enter the reason for requesting the nuclear self-destruct codes. Misuse of the nuclear request system will not be tolerated under any circumstances. Transmission does not guarantee a response.", "Self Destruct Code Request.","") if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) SSnanoui.update_uis(src) return 1 @@ -344,7 +344,7 @@ to_chat(usr, "Arrays recycling. Please stand by.") SSnanoui.update_uis(src) return 1 - var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null + var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) SSnanoui.update_uis(src) return 1 @@ -363,7 +363,7 @@ to_chat(usr, "Arrays recycling. Please stand by.") SSnanoui.update_uis(src) return 1 - var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") as text|null + var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "") if(!input || ..() || !(is_authenticated(usr) == COMM_AUTHENTICATION_MAX)) SSnanoui.update_uis(src) return 1 diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index e8858a4dd31..2fe57c5698f 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -405,7 +405,8 @@ stamps += (!stamps || stamps == "" ? "
" : "") + "" var/image/stampoverlay = image('icons/obj/bureaucracy.dmi') - var/{x; y;} + var/x + var/y if(istype(S, /obj/item/stamp/captain) || istype(S, /obj/item/stamp/centcom)) x = rand(-2, 0) y = rand(-1, 2) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index fd031f987c6..125706bff28 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -15,7 +15,7 @@ //Controls how much power is produced by each collector in range - this is the main parameter for tweaking SM balance, as it basically controls how the power variable relates to the rest of the game. #define POWER_FACTOR 1.0 #define DECAY_FACTOR 700 //Affects how fast the supermatter power decays -#define CRITICAL_TEMPERATURE 5000 //K +#define CRITICAL_TEMPERATURE 10000 //K #define CHARGING_FACTOR 0.05 #define DAMAGE_RATE_LIMIT 4.5 //damage rate cap at power = 300, scales linearly with power @@ -425,8 +425,6 @@ else L.show_message("You hear an uneartly ringing and notice your skin is covered in fresh radiation burns.", 2) -#define CRITICAL_TEMPERATURE 10000 - /obj/machinery/power/supermatter_shard/proc/get_status() var/turf/T = get_turf(src) if(!T) diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm index a7baacb9583..24b77ee9bb5 100644 --- a/code/modules/projectiles/ammunition/magazines.dm +++ b/code/modules/projectiles/ammunition/magazines.dm @@ -119,6 +119,9 @@ ammo_type = /obj/item/ammo_casing/shotgun/rubbershot max_ammo = 6 +/obj/item/ammo_box/magazine/internal/shot/riot/short + max_ammo = 3 + /obj/item/ammo_box/magazine/internal/grenadelauncher name = "grenade launcher internal magazine" ammo_type = /obj/item/ammo_casing/a40mm diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index e2067467ddb..7169b3d1443 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -28,7 +28,7 @@ /obj/item/gun/energy/gun/mini name = "miniature energy gun" - desc = "A small, pistol-sized energy gun with a built-in flashlight. It has two settings: stun and kill." + desc = "A small, pistol-sized energy gun with a built-in flashlight. It has two settings: disable and kill." icon_state = "mini" w_class = WEIGHT_CLASS_SMALL ammo_x_offset = 2 diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 7559fc1a591..1f1a02a78e2 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -196,7 +196,7 @@ /obj/item/gun/energy/wormhole_projector/process_chamber() ..() - select_fire() + select_fire(usr) /obj/item/gun/energy/wormhole_projector/proc/portal_destroyed(obj/effect/portal/P) if(P.icon_state == "portal") diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index c0678323409..903d18798d7 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -81,6 +81,7 @@ icon_state = "riotshotgun" mag_type = /obj/item/ammo_box/magazine/internal/shot/riot sawn_desc = "Come with me if you want to live." + sawn_state = SAWN_INTACT /obj/item/gun/projectile/shotgun/riot/attackby(obj/item/A, mob/user, params) ..() @@ -90,6 +91,109 @@ var/obj/item/melee/energy/W = A if(W.active) sawoff(user) + if(istype(A, /obj/item/pipe)) + unsaw(A, user) + +/obj/item/gun/projectile/sawoff(mob/user) + if(sawn_state == SAWN_OFF) + to_chat(user, "[src] has already been shortened!") + return + if(istype(loc, /obj/item/storage)) //To prevent inventory exploits + to_chat(user, "How do you plan to modify [src] while it's in a bag.") + return + if(chambered) //if the gun is chambering live ammo, shoot self, if chambering empty ammo, 'click' + if(chambered.BB) + afterattack(user, user) + user.visible_message("\The [src] goes off!", "\The [src] goes off in your face!") + return + else + afterattack(user, user) + user.visible_message("The [src] goes click!", "The [src] you are holding goes click.") + if(magazine.ammo_count()) //Spill the mag onto the floor + user.visible_message("[user.name] opens [src] up and the shells go goes flying around!", "You open [src] up and the shells go goes flying everywhere!!") + while(get_ammo(0) > 0) + var/obj/item/ammo_casing/CB + CB = magazine.get_round(0) + if(CB) + CB.loc = get_turf(loc) + CB.update_icon() + + if(do_after(user, 30, target = src)) + user.visible_message("[user] shortens \the [src]!", "You shorten \the [src].") + post_sawoff() + return 1 + + +/obj/item/gun/projectile/proc/post_sawoff() + name = "assault shotgun" + desc = sawn_desc + w_class = WEIGHT_CLASS_NORMAL + current_skin = "riotshotgun-short" + item_state = "gun" //phil235 is it different with different skin? + slot_flags &= ~SLOT_BACK //you can't sling it on your back + slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) + sawn_state = SAWN_OFF + magazine.max_ammo = 3 + update_icon() + + +/obj/item/gun/projectile/proc/unsaw(obj/item/A, mob/user) + if(sawn_state == SAWN_INTACT) + to_chat(user, "[src] has not been shortened!") + return + if(istype(loc, /obj/item/storage)) //To prevent inventory exploits + to_chat(user, "How do you plan to modify [src] while it's in a bag.") + return + if(chambered) //if the gun is chambering live ammo, shoot self, if chambering empty ammo, 'click' + if(chambered.BB) + afterattack(user, user) + user.visible_message("\The [src] goes off!", "\The [src] goes off in your face!") + return + else + afterattack(user, user) + user.visible_message("The [src] goes click!", "The [src] you are holding goes click.") + if(magazine.ammo_count()) //Spill the mag onto the floor + user.visible_message("[user.name] opens [src] up and the shells go goes flying around!", "You open [src] up and the shells go goes flying everywhere!!") + while(get_ammo() > 0) + var/obj/item/ammo_casing/CB + CB = magazine.get_round(0) + if(CB) + CB.loc = get_turf(loc) + CB.update_icon() + + if(do_after(user, 30, target = src)) + qdel(A) + user.visible_message("[user] lengthens [src]!", "You lengthen [src].") + post_unsaw(user) + return 1 + +/obj/item/gun/projectile/proc/post_unsaw() + name = initial(name) + desc = initial(desc) + w_class = initial(w_class) + current_skin = "riotshotgun" + item_state = initial(item_state) + slot_flags &= ~SLOT_BELT + slot_flags |= SLOT_BACK + sawn_state = SAWN_INTACT + magazine.max_ammo = 6 + update_icon() + +/obj/item/gun/projectile/shotgun/riot/update_icon() //Can't use the old proc as it makes it go to riotshotgun-short_sawn + ..() + if(current_skin) + icon_state = "[current_skin]" + else + icon_state = "[initial(icon_state)]" + +/obj/item/gun/projectile/shotgun/riot/short + mag_type = /obj/item/ammo_box/magazine/internal/shot/riot/short + +/obj/item/gun/projectile/shotgun/riot/short/New() + ..() + post_sawoff() + + /////////////////////// // BOLT ACTION RIFLE // diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 1df45dbe064..854fd1edbaf 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -146,114 +146,120 @@ . = ..() wabbajack(change) -proc/wabbajack(mob/living/M) - if(istype(M)) - if(istype(M, /mob/living) && M.stat != DEAD) - if(M.notransform) - return - M.notransform = 1 - M.canmove = 0 - M.icon = null - M.overlays.Cut() - M.invisibility = 101 +/proc/wabbajack(mob/living/M) + if(istype(M) && M.stat != DEAD && !M.notransform) + M.notransform = TRUE + M.canmove = FALSE + M.icon = null + M.overlays.Cut() + M.invisibility = 101 - if(istype(M, /mob/living/silicon/robot)) - var/mob/living/silicon/robot/Robot = M - if(Robot.mmi) - qdel(Robot.mmi) - Robot.notify_ai(1) - else - if(ishuman(M)) - var/mob/living/carbon/human/H = M - // Make sure there are no organs or limbs to drop - for(var/t in H.bodyparts) - qdel(t) - for(var/i in H.internal_organs) - qdel(i) - for(var/obj/item/W in M) - M.unEquip(W, 1) - qdel(W) + if(isrobot(M)) + var/mob/living/silicon/robot/Robot = M + QDEL_NULL(Robot.mmi) + Robot.notify_ai(1) + else + if(ishuman(M)) + var/mob/living/carbon/human/H = M + // Make sure there are no organs or limbs to drop + for(var/t in H.bodyparts) + qdel(t) + for(var/i in H.internal_organs) + qdel(i) + for(var/obj/item/W in M) + M.unEquip(W, 1) + qdel(W) - var/mob/living/new_mob + var/mob/living/new_mob - var/randomize = pick("robot","slime","xeno","human","animal") - switch(randomize) - if("robot") - if(prob(30)) - new_mob = new /mob/living/silicon/robot/syndicate(M.loc) - else - new_mob = new /mob/living/silicon/robot(M.loc) - new_mob.gender = M.gender - new_mob.invisibility = 0 - new_mob.job = "Cyborg" - var/mob/living/silicon/robot/Robot = new_mob - Robot.mmi = new /obj/item/mmi(new_mob) - if(ishuman(M)) - Robot.mmi.transfer_identity(M) //Does not transfer key/client. - if("slime") - new_mob = new /mob/living/carbon/slime/random(M.loc) - new_mob.universal_speak = 1 - if("xeno") - if(prob(50)) - new_mob = new /mob/living/carbon/alien/humanoid/hunter(M.loc) - else - new_mob = new /mob/living/carbon/alien/humanoid/sentinel(M.loc) - new_mob.universal_speak = 1 - if("animal") - if(prob(50)) - var/beast = pick("carp","bear","mushroom","statue", "bat", "goat", "tomato") - switch(beast) - if("carp") new_mob = new /mob/living/simple_animal/hostile/carp(M.loc) - if("bear") new_mob = new /mob/living/simple_animal/hostile/bear(M.loc) - if("mushroom") new_mob = new /mob/living/simple_animal/hostile/mushroom(M.loc) - if("statue") new_mob = new /mob/living/simple_animal/hostile/statue(M.loc) - if("bat") new_mob = new /mob/living/simple_animal/hostile/scarybat(M.loc) - if("goat") new_mob = new /mob/living/simple_animal/hostile/retaliate/goat(M.loc) - if("tomato") new_mob = new /mob/living/simple_animal/hostile/killertomato(M.loc) - else - var/animal = pick("parrot","corgi","crab","pug","cat","mouse","chicken","cow","lizard","chick","fox") - switch(animal) - if("parrot") new_mob = new /mob/living/simple_animal/parrot(M.loc) - if("corgi") new_mob = new /mob/living/simple_animal/pet/corgi(M.loc) - if("crab") new_mob = new /mob/living/simple_animal/crab(M.loc) - if("cat") new_mob = new /mob/living/simple_animal/pet/cat(M.loc) - if("mouse") new_mob = new /mob/living/simple_animal/mouse(M.loc) - if("chicken") new_mob = new /mob/living/simple_animal/chicken(M.loc) - if("cow") new_mob = new /mob/living/simple_animal/cow(M.loc) - if("lizard") new_mob = new /mob/living/simple_animal/lizard(M.loc) - if("fox") new_mob = new /mob/living/simple_animal/pet/fox(M.loc) - else new_mob = new /mob/living/simple_animal/chick(M.loc) - new_mob.universal_speak = 1 - if("human") - new_mob = new /mob/living/carbon/human(M.loc) - // Include standard, whitelisted, and monkey species... - var/list/new_species = list() - for(var/datum/species/S in subtypesof(/datum/species)) - if(istype(S, /datum/species/vox/armalis)) - continue - new_species.Add(S) - var/mob/living/carbon/human/H = new_mob - var/datum/species/S = pick(new_species) - H.set_species(S) - randomize = initial(S.name) - var/datum/preferences/A = new() //Randomize appearance for the human - A.copy_to(new_mob) + var/randomize = pick("robot", "slime", "xeno", "human", "animal") + switch(randomize) + if("robot") + if(prob(30)) + new_mob = new /mob/living/silicon/robot/syndicate(M.loc) else - return - - M.create_attack_log("[key_name(M)] became [new_mob.real_name].") - new_mob.attack_log = M.attack_log - - new_mob.a_intent = INTENT_HARM - if(M.mind) - M.mind.transfer_to(new_mob) + new_mob = new /mob/living/silicon/robot(M.loc) + new_mob.gender = M.gender + new_mob.invisibility = 0 + new_mob.job = "Cyborg" + var/mob/living/silicon/robot/Robot = new_mob + Robot.mmi = new /obj/item/mmi(new_mob) + if(ishuman(M)) + Robot.mmi.transfer_identity(M) //Does not transfer key/client. + if("slime") + new_mob = new /mob/living/carbon/slime/random(M.loc) + new_mob.universal_speak = TRUE + if("xeno") + if(prob(50)) + new_mob = new /mob/living/carbon/alien/humanoid/hunter(M.loc) + else + new_mob = new /mob/living/carbon/alien/humanoid/sentinel(M.loc) + new_mob.universal_speak = TRUE + if("animal") + if(prob(50)) + var/beast = pick("carp","bear","mushroom","statue", "bat", "goat", "tomato") + switch(beast) + if("carp") + new_mob = new /mob/living/simple_animal/hostile/carp(M.loc) + if("bear") + new_mob = new /mob/living/simple_animal/hostile/bear(M.loc) + if("mushroom") + new_mob = new /mob/living/simple_animal/hostile/mushroom(M.loc) + if("statue") + new_mob = new /mob/living/simple_animal/hostile/statue(M.loc) + if("bat") + new_mob = new /mob/living/simple_animal/hostile/scarybat(M.loc) + if("goat") + new_mob = new /mob/living/simple_animal/hostile/retaliate/goat(M.loc) + if("tomato") + new_mob = new /mob/living/simple_animal/hostile/killertomato(M.loc) + else + var/animal = pick("parrot", "corgi", "crab", "pug", "cat", "mouse", "chicken", "cow", "lizard", "chick", "fox") + switch(animal) + if("parrot") + new_mob = new /mob/living/simple_animal/parrot(M.loc) + if("corgi") + new_mob = new /mob/living/simple_animal/pet/corgi(M.loc) + if("crab") + new_mob = new /mob/living/simple_animal/crab(M.loc) + if("cat") + new_mob = new /mob/living/simple_animal/pet/cat(M.loc) + if("mouse") + new_mob = new /mob/living/simple_animal/mouse(M.loc) + if("chicken") + new_mob = new /mob/living/simple_animal/chicken(M.loc) + if("cow") + new_mob = new /mob/living/simple_animal/cow(M.loc) + if("lizard") + new_mob = new /mob/living/simple_animal/lizard(M.loc) + if("fox") + new_mob = new /mob/living/simple_animal/pet/fox(M.loc) + else + new_mob = new /mob/living/simple_animal/chick(M.loc) + new_mob.universal_speak = TRUE + if("human") + new_mob = new /mob/living/carbon/human(M.loc) + var/mob/living/carbon/human/H = new_mob + var/datum/preferences/A = new() //Randomize appearance for the human + A.species = get_random_species(TRUE) + A.copy_to(new_mob) + randomize = H.dna.species.name else - new_mob.key = M.key + return - to_chat(new_mob, "Your form morphs into that of a [randomize].") + M.create_attack_log("[key_name(M)] became [new_mob.real_name].") + new_mob.attack_log = M.attack_log - qdel(M) - return new_mob + new_mob.a_intent = INTENT_HARM + if(M.mind) + M.mind.transfer_to(new_mob) + else + new_mob.key = M.key + + to_chat(new_mob, "Your form morphs into that of a [randomize].") + + qdel(M) + return new_mob /obj/item/projectile/magic/animate name = "bolt of animation" diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm index b54444ee2d4..f2a5e8b9e24 100644 --- a/code/modules/reagents/chemistry/reagents/pyrotechnic.dm +++ b/code/modules/reagents/chemistry/reagents/pyrotechnic.dm @@ -221,7 +221,7 @@ /datum/reagent/pyrosium name = "Pyrosium" id = "pyrosium" - description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Pyrosium slowly cools all other reagents in the mob down to 0K." + description = "Comes into existence at 20K. As long as there is sufficient oxygen for it to react with, Pyrosium slowly heats all other reagents." color = "#B20000" // rgb: 139, 166, 233 process_flags = ORGANIC | SYNTHETIC diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm index 6fb2a891214..51b4f8512e1 100644 --- a/code/modules/research/rdmachines.dm +++ b/code/modules/research/rdmachines.dm @@ -43,15 +43,15 @@ if(shocked) shock(user,50) if(panel_open) - var/dat as text + var/list/dat = list() dat += "[src.name] Wires:
" - for(var/wire in src.wires) - dat += text("[wire] Wire: [src.wires[wire] ? "Mend" : "Cut"] Pulse
") + for(var/wire in wires) + dat += "[wire] Wire: [src.wires[wire] ? "Mend" : "Cut"] Pulse
" - dat += text("The red light is [src.disabled ? "off" : "on"].
") - dat += text("The green light is [src.shocked ? "off" : "on"].
") - dat += text("The blue light is [src.hacked ? "off" : "on"].
") - user << browse("[src.name] Hacking[dat]","window=hack_win") + dat += "The red light is [src.disabled ? "off" : "on"].
" + dat += "The green light is [src.shocked ? "off" : "on"].
" + dat += "The blue light is [src.hacked ? "off" : "on"].
" + user << browse("[src.name] Hacking[dat.Join("")]","window=hack_win") return diff --git a/html/changelog.html b/html/changelog.html index cf1341a3dad..d1ed6c081a8 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -56,6 +56,62 @@ -->
+

03 August 2018

+

Fox McCloud updated:

+ +

Shazbot updated:

+ + +

02 August 2018

+

variableundefined updated:

+ + +

01 August 2018

+

Citinited updated:

+ +

CornMyCob updated:

+ +

Tails2091 updated:

+ +

datlo updated:

+ + +

31 July 2018

+

Tails2091 updated:

+ +

variableundefined updated:

+ + +

30 July 2018

+

Tails2091 updated:

+ +

28 July 2018

KasparoVy updated: