From 736760ac067d1784cf6a88405a95079bd8418862 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 1 Apr 2020 04:39:36 +0200 Subject: [PATCH 1/6] Minesweeper oopsies etcetera. --- code/game/machinery/computer/arcade/minesweeper.dm | 11 ++++++----- .../machine_desings/machine_designs_all_misc.dm | 2 +- code/modules/research/techweb/all_nodes.dm | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/code/game/machinery/computer/arcade/minesweeper.dm b/code/game/machinery/computer/arcade/minesweeper.dm index 3e32c4ceeb..2f8d36ea82 100644 --- a/code/game/machinery/computer/arcade/minesweeper.dm +++ b/code/game/machinery/computer/arcade/minesweeper.dm @@ -378,12 +378,13 @@ explosion(loc, 2, 5, 10, 15) //Thought you could survive by putting as few mines as possible, huh?? else explosion(loc, 1, 3, rand(1,5), rand(1,10)) - for(var/y69=y-row_limit;y69 Date: Wed, 1 Apr 2020 04:41:21 +0200 Subject: [PATCH 2/6] out of bounds coordinates sanity --- code/game/machinery/computer/arcade/minesweeper.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/computer/arcade/minesweeper.dm b/code/game/machinery/computer/arcade/minesweeper.dm index 2f8d36ea82..2d7a52a6dd 100644 --- a/code/game/machinery/computer/arcade/minesweeper.dm +++ b/code/game/machinery/computer/arcade/minesweeper.dm @@ -382,7 +382,10 @@ for(var/y69 in y-row_limit to y+row_limit) //Create a shitton of explosions in irl turfs if we lose, it will probably kill us for(var/x69 in x-column_limit to x+column_limit) if(prob(mine_limit_v2)) //Probability of explosion happening, according to how many mines were on the board... up to a limit - addtimer(CALLBACK(GLOBAL_PROC, /proc/explosion, locate(y69,x69,z), 0, rand(1,2),rand(1,5),rand(3,10), FALSE), 10 * ++num_explosions) + var/turf/target = locate(y69,x69,z) + if(!target) + continue + addtimer(CALLBACK(GLOBAL_PROC, /proc/explosion, target, 0, rand(1,2),rand(1,5),rand(3,10), FALSE), 10 * ++num_explosions) if(num_explosions == mine_limit_v2) return From 73c52c0c6e78ce0e471faec88e4a4b223cd14ca1 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 1 Apr 2020 05:19:29 +0200 Subject: [PATCH 3/6] Accurate minefield. --- .../machinery/computer/arcade/minesweeper.dm | 37 +++++++++++++------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/code/game/machinery/computer/arcade/minesweeper.dm b/code/game/machinery/computer/arcade/minesweeper.dm index 2d7a52a6dd..5c30489b00 100644 --- a/code/game/machinery/computer/arcade/minesweeper.dm +++ b/code/game/machinery/computer/arcade/minesweeper.dm @@ -159,6 +159,8 @@ if(CHECK_BITFIELD(obj_flags, EMAGGED) && !exploding_hell) exploding_hell = TRUE explode_EVERYTHING() + if(QDELETED(src)) + return if(mine_sound) switch(rand(1,3)) //Play every time a mine is hit if(1) @@ -367,10 +369,10 @@ var/row_limit = rows-1 var/column_limit = columns-1 var/mine_limit_v2 = mine_limit - if(rows > 11) - row_limit = 10 - if(columns > 11) - column_limit = 10 + if(rows > 21) + row_limit = 20 + if(columns > 21) + column_limit = 20 if(mine_limit > (rows*columns) * 0.25) mine_limit_v2 = 24 message_admins("[key_name_admin(user)] failed an emagged Minesweeper arcade and has unleashed an explosion armageddon of size [row_limit],[column_limit] around [ADMIN_LOOKUPFLW(user.loc)]!") @@ -378,16 +380,27 @@ explosion(loc, 2, 5, 10, 15) //Thought you could survive by putting as few mines as possible, huh?? else explosion(loc, 1, 3, rand(1,5), rand(1,10)) - var/num_explosions = 0 - for(var/y69 in y-row_limit to y+row_limit) //Create a shitton of explosions in irl turfs if we lose, it will probably kill us - for(var/x69 in x-column_limit to x+column_limit) - if(prob(mine_limit_v2)) //Probability of explosion happening, according to how many mines were on the board... up to a limit - var/turf/target = locate(y69,x69,z) + var/list/targets = list() + var/cur_y = y - round(row_limit * 0.5, 1) + var/start_x = x - round(column_limit * 0.5, 1) + for(var/row in table) //translate the mines locations into actual turf coordinates. + if(!locate(cur_y, start_x, z)) + continue + var/cur_x = start_x + for(var/column in row) + var/coord_value = table[row][column] + if(coord_value == 10 || coord_value == 0) //there is a mine in here. + var/turf/target = locate(cur_y, cur_x, z) if(!target) continue - addtimer(CALLBACK(GLOBAL_PROC, /proc/explosion, target, 0, rand(1,2),rand(1,5),rand(3,10), FALSE), 10 * ++num_explosions) - if(num_explosions == mine_limit_v2) - return + targets += target + cur_x++ + cur_y++ + var/num_explosions = 0 + for(var/T in shuffle(targets)) //Create a shitton of explosions in irl turfs if we lose, it will probably kill us + addtimer(CALLBACK(GLOBAL_PROC, /proc/explosion, T, 0, rand(1,2),rand(1,5),rand(3,10), FALSE), 15 * ++num_explosions) + if(num_explosions == mine_limit_v2) + return #undef MINESWEEPERIMG #undef MINESWEEPER_GAME_MAIN_MENU From 519ebd5ed873aa9f1ca33b800478b37b46edbb29 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 1 Apr 2020 15:29:35 +0200 Subject: [PATCH 4/6] Porting the mutation conflict system, and resizing quantum realm fix. --- code/datums/mutations/_mutations.dm | 9 +++++++++ code/datums/mutations/body.dm | 2 ++ .../reagents/chemistry/reagents/drink_reagents.dm | 6 ++++-- .../reagents/chemistry/reagents/other_reagents.dm | 15 ++++++++------- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/code/datums/mutations/_mutations.dm b/code/datums/mutations/_mutations.dm index 2156581cb1..9edaa7605c 100644 --- a/code/datums/mutations/_mutations.dm +++ b/code/datums/mutations/_mutations.dm @@ -31,6 +31,7 @@ //MUT_EXTRA - A mutation that is in the mutations tab, and can be given and taken away through though the DNA console. Has a 0 before it's name in the mutation section of the dna console //MUT_OTHER Cannot be interacted with by players through normal means. I.E. wizards mutate + var/list/conflicts //any mutations that might conflict. put mutation typepath defines in here. make sure to enter it both ways (so that A conflicts with B, and B with A) var/can_chromosome = CHROMOSOME_NONE //can we take chromosomes? 0: CHROMOSOME_NEVER never, 1:CHROMOSOME_NONE yeah, 2: CHROMOSOME_USED no, already have one var/chromosome_name //purely cosmetic var/modified = FALSE //ugly but we really don't want chromosomes and on_acquiring to overlap and apply double the powers @@ -60,6 +61,14 @@ return TRUE if(limb_req && !H.get_bodypart(limb_req)) return TRUE + for(var/M in H.dna.mutations)//check for conflicting powers + var/datum/mutation/human/mewtayshun = M + if(LAZYLEN(mewtayshun.conflicts)) + for(var/cons in mewtayshun.conflicts) + var/datum/mutation/human/conflicter = cons + if(conflicter == type) + to_chat(H, "You feel your genes resisting something.") + return TRUE owner = H dna = H.dna dna.mutations += src diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm index cc286058f1..7c2c954bcc 100644 --- a/code/datums/mutations/body.dm +++ b/code/datums/mutations/body.dm @@ -75,6 +75,7 @@ quality = POSITIVE difficulty = 16 instability = 5 + conflicts = list(GIGANTISM) locked = TRUE // Default intert species for now, so locked from regular pool. /datum/mutation/human/dwarfism/on_acquiring(mob/living/carbon/human/owner) @@ -333,6 +334,7 @@ desc = "The cells within the subject spread out to cover more area, making the subject appear larger." quality = MINOR_NEGATIVE difficulty = 12 + conflicts = list(DWARFISM) /datum/mutation/human/gigantism/on_acquiring(mob/living/carbon/human/owner) if(..()) diff --git a/code/modules/reagents/chemistry/reagents/drink_reagents.dm b/code/modules/reagents/chemistry/reagents/drink_reagents.dm index 482dfde1d6..52c06bca9b 100644 --- a/code/modules/reagents/chemistry/reagents/drink_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drink_reagents.dm @@ -864,12 +864,13 @@ glass_icon_state = "red_queen" glass_name = "Red Queen" glass_desc = "DRINK ME." - var/current_size = 1 + var/current_size = RESIZE_DEFAULT_SIZE /datum/reagent/consumable/red_queen/on_mob_life(mob/living/carbon/H) if(prob(75)) return ..() var/newsize = pick(0.5, 0.75, 1, 1.50, 2) + newsize *= RESIZE_DEFAULT_SIZE H.resize = newsize/current_size current_size = newsize H.update_transform() @@ -878,7 +879,8 @@ ..() /datum/reagent/consumable/red_queen/on_mob_end_metabolize(mob/living/M) - M.resize = 1/current_size + M.resize = RESIZE_DEFAULT_SIZE/current_size + current_size = RESIZE_DEFAULT_SIZE M.update_transform() ..() diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 1fbb3cc346..d9b2aafb4b 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1917,22 +1917,22 @@ name = "Growth Serum" description = "A commercial chemical designed to help older men in the bedroom."//not really it just makes you a giant color = "#ff0000"//strong red. rgb 255, 0, 0 - var/current_size = 1 + var/current_size = RESIZE_DEFAULT_SIZE taste_description = "bitterness" // apparently what viagra tastes like /datum/reagent/growthserum/on_mob_life(mob/living/carbon/H) var/newsize = current_size switch(volume) if(0 to 19) - newsize = 1.25 + newsize = 1.25*RESIZE_DEFAULT_SIZE if(20 to 49) - newsize = 1.5 + newsize = 1.5*RESIZE_DEFAULT_SIZE if(50 to 99) - newsize = 2 + newsize = 2*RESIZE_DEFAULT_SIZE if(100 to 199) - newsize = 2.5 + newsize = 2.5*RESIZE_DEFAULT_SIZE if(200 to INFINITY) - newsize = 3.5 + newsize = 3.5*RESIZE_DEFAULT_SIZE H.resize = newsize/current_size current_size = newsize @@ -1940,7 +1940,8 @@ ..() /datum/reagent/growthserum/on_mob_end_metabolize(mob/living/M) - M.resize = 1/current_size + M.resize = RESIZE_DEFAULT_SIZE/current_size + current_size = RESIZE_DEFAULT_SIZE M.update_transform() ..() From 39482143808850e329272c50bd179eb490faffe2 Mon Sep 17 00:00:00 2001 From: Trilbyspaceclone <30435998+Trilbyspaceclone@users.noreply.github.com> Date: Thu, 2 Apr 2020 09:18:37 -0400 Subject: [PATCH 5/6] Update handguns.dm --- .../code/modules/projectiles/guns/ballistic/handguns.dm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modular_citadel/code/modules/projectiles/guns/ballistic/handguns.dm b/modular_citadel/code/modules/projectiles/guns/ballistic/handguns.dm index 98d2efc4ea..53463bcfe5 100644 --- a/modular_citadel/code/modules/projectiles/guns/ballistic/handguns.dm +++ b/modular_citadel/code/modules/projectiles/guns/ballistic/handguns.dm @@ -58,12 +58,9 @@ //////10mm soporific bullets////// -obj/item/projectile/bullet/c10mm/soporific +/obj/item/projectile/bullet/c10mm/soporific name ="10mm soporific bullet" - armour_penetration = 0 nodamage = TRUE - dismemberment = 0 - knockdown = 0 /obj/item/projectile/bullet/c10mm/soporific/on_hit(atom/target, blocked = FALSE) . = ..() @@ -144,4 +141,4 @@ obj/item/projectile/bullet/c10mm/soporific icon_state = "raygun" desc = "A toy laser with a classic, retro feel and look. Compatible with existing laser tag systems." ammo_type = list(/obj/item/ammo_casing/energy/laser/raytag) - selfcharge = EGUN_SELFCHARGE \ No newline at end of file + selfcharge = EGUN_SELFCHARGE From 58bc10bd31cd8d76d66b2ef5a38a34ede979b899 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Thu, 2 Apr 2020 23:33:40 +0200 Subject: [PATCH 6/6] Fixing three runtime errors. --- code/datums/elements/ghost_role_eligibility.dm | 3 ++- code/modules/antagonists/abductor/abductee/abductee.dm | 3 ++- .../code/modules/arousal/genitals_sprite_accessories.dm | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/code/datums/elements/ghost_role_eligibility.dm b/code/datums/elements/ghost_role_eligibility.dm index 519a34e01f..81fd593d5f 100644 --- a/code/datums/elements/ghost_role_eligibility.dm +++ b/code/datums/elements/ghost_role_eligibility.dm @@ -15,6 +15,7 @@ var/mob/M = target if(!(M in eligible_mobs)) eligible_mobs += M + RegisterSignal(M, COMSIG_MOB_GHOSTIZE, .proc/get_ghost_flags) if(penalize) //penalizing them from making a ghost role / midround antag comeback right away. var/penalty = CONFIG_GET(number/suicide_reenter_round_timer) MINUTES var/roundstart_quit_limit = CONFIG_GET(number/roundstart_suicide_time_limit) MINUTES @@ -32,12 +33,12 @@ else if(timeouts[M.ckey] == CANT_REENTER_ROUND) return timeouts[M.ckey] = max(timeouts[M.ckey],penalty) - RegisterSignal(M,COMSIG_MOB_GHOSTIZE,.proc/get_ghost_flags) /datum/element/ghost_role_eligibility/Detach(mob/M) . = ..() if(M in eligible_mobs) eligible_mobs -= M + UnregisterSignal(M, COMSIG_MOB_GHOSTIZE) /datum/element/ghost_role_eligibility/proc/get_all_ghost_role_eligible(silent = FALSE) var/list/candidates = list() diff --git a/code/modules/antagonists/abductor/abductee/abductee.dm b/code/modules/antagonists/abductor/abductee/abductee.dm index 901d2f5b11..780c3f7419 100644 --- a/code/modules/antagonists/abductor/abductee/abductee.dm +++ b/code/modules/antagonists/abductor/abductee/abductee.dm @@ -31,4 +31,5 @@ /datum/antagonist/abductee/remove_innate_effects(mob/living/mob_override) update_abductor_icons_removed(mob_override ? mob_override.mind : owner) - qdel(brain_trauma) + if(!QDELETED(brain_trauma)) + qdel(brain_trauma) diff --git a/modular_citadel/code/modules/arousal/genitals_sprite_accessories.dm b/modular_citadel/code/modules/arousal/genitals_sprite_accessories.dm index dcefa27305..6bbe947f54 100644 --- a/modular_citadel/code/modules/arousal/genitals_sprite_accessories.dm +++ b/modular_citadel/code/modules/arousal/genitals_sprite_accessories.dm @@ -3,8 +3,8 @@ var/taur_icon //leave null if the genital doesn't have a taur counterpart. var/accepted_taurs = STYLE_HOOF_TAURIC|STYLE_PAW_TAURIC //Types that match with the accessory. var/feat_taur //the text string of the dna feature to check for those who want to opt out. - var/taur_dimension_y = 0 - var/taur_dimension_x = 0 + var/taur_dimension_y = 32 + var/taur_dimension_x = 32 //DICKS,COCKS,PENISES,WHATEVER YOU WANT TO CALL THEM