diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 5a4e6d72554..101e6995079 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -270,9 +270,9 @@ Class Procs: if(temp_apc && temp_apc.terminal && temp_apc.terminal.powernet) temp_apc.terminal.powernet.trigger_warning() - return 1 - else - return 0 + if(user.stunned) + return 1 + return 0 /obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C) if(!istype(C)) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 984da10be6d..917d244afa1 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -30,7 +30,8 @@ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(5, 1, src) s.start() - return 2 + if(usr.stunned) + return 2 playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3) for(var/obj/O in src) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index c78754c7ed5..b6407fd3767 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -68,12 +68,12 @@ //Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact var/damage = Proj.damage var/passthrough = 0 - + //20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area. //If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used. switch(Proj.damage_type) if(BRUTE) - //bullets + //bullets if(Proj.original == src || prob(20)) Proj.damage *= between(0, Proj.damage/60, 0.5) if(prob(max((damage-10)/25, 0))*100) @@ -86,11 +86,11 @@ if(!(Proj.original == src || prob(20))) Proj.damage *= 0.5 passthrough = 1 - + if(passthrough) . = -1 damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage - + src.health -= damage*0.2 spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted @@ -139,7 +139,7 @@ if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting. user << "There is already a window facing this way there." return - + var/wtype = ST.created_window if (ST.use(1)) var/obj/structure/window/WD = new wtype(loc, dir_to_set, 1) @@ -197,7 +197,8 @@ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(3, 1, src) s.start() - return 1 + if(user.stunned) + return 1 else return 0 return 0 diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 437bc40607e..1a80bfd2a2e 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -688,27 +688,28 @@ //Todo /obj/item/weapon/rig/proc/malfunction() - return 0 - + return 0 + /obj/item/weapon/rig/emp_act(severity_class) //set malfunctioning if(emp_protection < 30) //for ninjas, really. malfunctioning += 10 if(malfunction_delay <= 0) - malfunction_delay = max(malfunction_delay, round(30/severity_class)) - + malfunction_delay = max(malfunction_delay, round(30/severity_class)) + //drain some charge if(cell) cell.emp_act(severity_class + 15) - + //possibly damage some modules - take_hit((100/severity_class), "electrical pulse", 1) + take_hit((100/severity_class), "electrical pulse", 1) /obj/item/weapon/rig/proc/shock(mob/user) if (electrocute_mob(user, cell, src)) spark_system.start() - return 1 + if(user.stunned) + return 1 return 0 - + /obj/item/weapon/rig/proc/take_hit(damage, source, is_emp=0) if(!installed_modules.len) @@ -740,7 +741,7 @@ dam_module = pick(damaged_modules) else if(valid_modules.len) dam_module = pick(valid_modules) - + if(!dam_module) return dam_module.damage++ @@ -748,11 +749,11 @@ if(!source) source = "hit" - if(wearer) + if(wearer) if(dam_module.damage >= 2) wearer << "The [source] has disabled your [dam_module.interface_name]!" else - wearer << "The [source] has damaged your [dam_module.interface_name]!" + wearer << "The [source] has damaged your [dam_module.interface_name]!" dam_module.deactivate() /obj/item/weapon/rig/proc/malfunction_check(var/mob/living/carbon/human/user) diff --git a/code/modules/hydroponics/seed_controller.dm b/code/modules/hydroponics/seed_controller.dm index 84cbc727deb..9b346b961cc 100644 --- a/code/modules/hydroponics/seed_controller.dm +++ b/code/modules/hydroponics/seed_controller.dm @@ -66,7 +66,9 @@ var/global/datum/controller/plants/plant_controller // Set in New(). plant_sprites[base] = ikey for(var/icostate in icon_states('icons/obj/hydroponics_products.dmi')) - plant_product_sprites |= icostate + var/split = findtext(icostate,"-") + if(split) + plant_product_sprites |= copytext(icostate,1,split) // Populate the global seed datum list. for(var/type in typesof(/datum/seed)-/datum/seed) diff --git a/code/modules/hydroponics/seed_packets.dm b/code/modules/hydroponics/seed_packets.dm index 21472e8ab23..093c4d7926f 100644 --- a/code/modules/hydroponics/seed_packets.dm +++ b/code/modules/hydroponics/seed_packets.dm @@ -12,6 +12,8 @@ var/global/list/plant_seed_sprites = list() var/modified = 0 /obj/item/seeds/New() + while(!plant_controller) + sleep(30) update_seed() ..() diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 6add592da8f..7aca17963bd 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -196,7 +196,7 @@ var/obj/item/stack/sheet/glass/reinforced/cyborg/RG = new /obj/item/stack/sheet/glass/reinforced/cyborg(src) RG.synths = list(metal, glass) - src.modules += R + src.modules += RG /obj/item/weapon/robot_module/engineering name = "engineering robot module" diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 73d7005eb9e..38f2f1610d5 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -324,8 +324,7 @@ if(href_list["write"]) var/id = href_list["write"] //var/t = strip_html_simple(input(usr, "What text do you wish to add to " + (id=="end" ? "the end of the paper" : "field "+id) + "?", "[name]", null),8192) as message - //var/t = strip_html_simple(input("Enter what you want to write:", "Write", null, null) as message, MAX_MESSAGE_LEN) - var/t = input("Enter what you want to write:", "Write", null, null) as message + var/t = strip_html_simple(input("Enter what you want to write:", "Write", null, null) as message, MAX_PAPER_MESSAGE_LEN) var/obj/item/i = usr.get_active_hand() // Check to see if he still got that darn pen, also check if he's using a crayon or pen. var/iscrayon = 0 if(!istype(i, /obj/item/weapon/pen)) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 671be94f53e..6285e9dfe26 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -534,7 +534,8 @@ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(5, 1, src) s.start() - return + if(user.stunned) + return C.use(10) user.visible_message(\ "[user.name] has added cables to the APC frame!",\ @@ -554,7 +555,8 @@ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(5, 1, src) s.start() - return + if(usr.stunned) + return new /obj/item/stack/cable_coil(loc,10) user << "You cut the cables and dismantle the power terminal." del(terminal) // qdel diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 4c0d9dfbf70..d73d60926e5 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -193,9 +193,9 @@ By design, d1 is the smallest direction and d2 is the highest var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(5, 1, src) s.start() - return 1 - else - return 0 + if(usr.stunned) + return 1 + return 0 //explosion handling /obj/structure/cable/ex_act(severity) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index caa6b5513f3..4fdcbe811f8 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -275,7 +275,8 @@ s.set_up(5, 1, src) s.start() building_terminal = 0 - return 0 + if(usr.stunned) + return 0 new /obj/item/stack/cable_coil(loc,10) user.visible_message(\ "[user.name] cut the cables and dismantled the power terminal.",\ diff --git a/icons/obj/seeds.dmi b/icons/obj/seeds.dmi index 63d1ecd9435..530683ef9bf 100644 Binary files a/icons/obj/seeds.dmi and b/icons/obj/seeds.dmi differ