From 7d300117af25656a1746bb46b595e738e1b0e894 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Tue, 18 Sep 2018 03:59:46 -0500 Subject: [PATCH] literally everything Bhjin has been complaining about also modularizes stuff and adds more comments. Like responsible downstream repos should have. --- .../game/machinery/computer/communications.dm | 5 +++- code/game/objects/items.dm | 7 ++--- .../objects/items/implants/implant_stealth.dm | 11 +++++-- code/game/objects/items/storage/toolbox.dm | 13 ++++++-- code/game/objects/items/tanks/tanks.dm | 2 +- code/game/objects/items/twohanded.dm | 12 ++++---- .../crates_lockers/closets/cardboardbox.dm | 3 +- code/modules/mob/living/carbon/human/human.dm | 9 +++--- code/modules/mob/living/living.dm | 2 +- modular_citadel/code/game/objects/items.dm | 5 +++- .../modules/mob/living/carbon/human/human.dm | 30 ++++++++++++++++++- 11 files changed, 72 insertions(+), 27 deletions(-) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 596300097b..72944d6afe 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -200,7 +200,10 @@ state = STATE_CANCELSHUTTLE if("cancelshuttle2") if(authenticated) - SSshuttle.cancelEvac(usr) + if(world.time > SSshuttle.auto_call) //Citadel Edit Removing auto_call caused recall. + say("Warning: Emergency shuttle recalls have been blocked by Central Command due to ongoing crew transfer procedures.") + else + SSshuttle.cancelEvac(usr) state = STATE_DEFAULT if("messagelist") currmsg = 0 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 455f4f4ab1..01fd0e78f3 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -112,10 +112,10 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) /obj/item/Initialize() materials = typelist("materials", materials) - + if (attack_verb) attack_verb = typelist("attack_verb", attack_verb) - + . = ..() for(var/path in actions_types) new path(src) @@ -799,6 +799,3 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) if (item_flags & NODROP) return return ..() - -/obj/item/proc/grenade_prime_react(obj/item/grenade/nade) - return diff --git a/code/game/objects/items/implants/implant_stealth.dm b/code/game/objects/items/implants/implant_stealth.dm index b3e9f24206..84f9f5f454 100644 --- a/code/game/objects/items/implants/implant_stealth.dm +++ b/code/game/objects/items/implants/implant_stealth.dm @@ -9,10 +9,11 @@ name = "inconspicious box" desc = "It's so normal that you didn't notice it before." icon_state = "agentbox" - move_speed_multiplier = 0.5 + use_mob_movespeed = TRUE /obj/structure/closet/cardboard/agent/proc/go_invisible() animate(src, , alpha = 0, time = 5) + START_PROCESSING(SSobj, src) /obj/structure/closet/cardboard/agent/Initialize() . = ..() @@ -24,7 +25,13 @@ qdel(src) /obj/structure/closet/cardboard/agent/process() - alpha = max(0, alpha - 50) + //alpha = max(0, alpha - 50) //Citadel edit + animate(src, , alpha = alpha - 50, time = 3) + +/obj/structure/closet/cardboard/agent/Move() + . = ..() + if(.) + alpha = min(alpha + 5, 255) /obj/structure/closet/cardboard/agent/proc/reveal() alpha = 255 diff --git a/code/game/objects/items/storage/toolbox.dm b/code/game/objects/items/storage/toolbox.dm index eb6f88679f..6667cee76a 100644 --- a/code/game/objects/items/storage/toolbox.dm +++ b/code/game/objects/items/storage/toolbox.dm @@ -79,10 +79,17 @@ has_latches = FALSE /obj/item/storage/toolbox/mechanical/old/heirloom - name = "toolbox" //this will be named "X family toolbox" + name = "old, robust toolbox" //this will be named "X family toolbox" desc = "It's seen better days." - force = 5 - w_class = WEIGHT_CLASS_NORMAL + //Citadel change buffed to base levels + total_mass = 2 + +/obj/item/storage/toolbox/mechanical/old/heirloom/afterattack(atom/A, mob/user, proximity) //Citadel Adds massive buff to machinery destruction + . = ..() + if(proximity) + if(isobj(A)) + var/obj/O = A + O.take_damage(20) /obj/item/storage/toolbox/mechanical/old/heirloom/PopulateContents() return diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index bb1a858e7b..cdeb972ca1 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -242,7 +242,7 @@ //Give the gas a chance to build up more pressure through reacting air_contents.react(src) air_contents.react(src) - air_contents.react(src) + //Citadel Edit: removing extra react for "balance" pressure = air_contents.return_pressure() var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE var/turf/epicenter = get_turf(loc) diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 05a9ee07fb..bd4ee0d35b 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -485,6 +485,8 @@ return . = ..() +//Citadel additions : attack_self and rightclick_attack_self + /obj/item/twohanded/rightclick_attack_self(mob/user) if(wielded) //Trying to unwield it unwield(user) @@ -494,12 +496,10 @@ /obj/item/twohanded/spear/suicide_act(mob/living/carbon/user) user.visible_message("[user] begins to sword-swallow \the [src]! It looks like [user.p_theyre()] trying to commit suicide!") - if(explosive) + if(explosive) //Citadel Edit removes qdel and explosive.forcemove(AM) user.say("[war_cry]", forced="spear warcry") - explosive.forceMove(user) explosive.prime() user.gib() - qdel(src) return BRUTELOSS return BRUTELOSS @@ -524,13 +524,11 @@ return if(isopenturf(AM)) //So you can actually melee with it return - if(explosive && wielded) + if(explosive && wielded) //Citadel edit removes qdel and explosive.forcemove(AM) user.say("[war_cry]", forced="spear warcry") - explosive.forceMove(AM) explosive.prime() - qdel(src) -/obj/item/twohanded/spear/grenade_prime_react(obj/item/grenade/nade) +/obj/item/twohanded/spear/grenade_prime_react(obj/item/grenade/nade) //Citadel edit, removes throw_impact because memes nade.forceMove(get_turf(src)) qdel(src) diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm index 4726707996..82b0d1a441 100644 --- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm +++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm @@ -16,13 +16,14 @@ var/move_speed_multiplier = 1 var/move_delay = FALSE var/egged = 0 + var/use_mob_movespeed = FALSE //Citadel adds snowflake box handling /obj/structure/closet/cardboard/relaymove(mob/user, direction) if(opened || move_delay || user.stat || user.IsStun() || user.IsKnockdown() || user.IsUnconscious() || !isturf(loc) || !has_gravity(loc)) return move_delay = TRUE if(step(src, direction)) - addtimer(CALLBACK(src, .proc/ResetMoveDelay), CONFIG_GET(number/movedelay/walk_delay) * move_speed_multiplier) + addtimer(CALLBACK(src, .proc/ResetMoveDelay), (use_mob_movespeed ? user.movement_delay() : CONFIG_GET(number/movedelay/walk_delay)) * move_speed_multiplier) else ResetMoveDelay() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 312fc315e9..bff95c5f31 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -207,7 +207,6 @@ spreadFire(AM) - /mob/living/carbon/human/Topic(href, href_list) if(usr.canUseTopic(src, BE_CLOSE, NO_DEXTERY)) if(href_list["embedded_object"]) @@ -217,9 +216,11 @@ var/obj/item/I = locate(href_list["embedded_object"]) in L.embedded_objects if(!I || I.loc != src) //no item, no limb, or item is not in limb or in the person anymore return - var/time_taken = I.embedding.embedded_unsafe_removal_time*I.w_class + var/time_taken = I.embedding.embedded_unsafe_removal_time/I.w_class //Citadel Change from * to / usr.visible_message("[usr] attempts to remove [I] from [usr.p_their()] [L.name].","You attempt to remove [I] from your [L.name]... (It will take [DisplayTimeText(time_taken)].)") if(do_after(usr, time_taken, needhand = 1, target = src)) + remove_embedded_unsafe(L, I, usr) + /* CITADEL EDIT: remove_embedded_unsafe replaces this code if(!I || !L || I.loc != src || !(I in L.embedded_objects)) return L.embedded_objects -= I @@ -230,7 +231,7 @@ usr.visible_message("[usr] successfully rips [I] out of [usr.p_their()] [L.name]!","You successfully remove [I] from your [L.name].") if(!has_embedded_objects()) clear_alert("embeddedobject") - SEND_SIGNAL(usr, COMSIG_CLEAR_MOOD_EVENT, "embedded") + SEND_SIGNAL(usr, COMSIG_CLEAR_MOOD_EVENT, "embedded") */ return if(href_list["item"]) @@ -918,7 +919,7 @@ /mob/living/carbon/human/species/felinid race = /datum/species/human/felinid - + /mob/living/carbon/human/species/fly race = /datum/species/fly diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 684484ed68..373fef85af 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -617,7 +617,7 @@ resist_fire() //stop, drop, and roll else if(resting) //cit change - allows resisting out of resting resist_a_rest() // ditto - else if(istype(src, /mob/living/carbon)) + else if(iscarbon(src)) //Citadel Change for embedded removal memes var/mob/living/carbon/C = src if(!C.handcuffed && !C.legcuffed) return TRUE diff --git a/modular_citadel/code/game/objects/items.dm b/modular_citadel/code/game/objects/items.dm index 31ab57ee47..337db986b0 100644 --- a/modular_citadel/code/game/objects/items.dm +++ b/modular_citadel/code/game/objects/items.dm @@ -11,4 +11,7 @@ alternate_screams = list('modular_citadel/sound/voice/scream_silicon.ogg') /obj/item/clothing/head/ushanka - alternate_screams = list('modular_citadel/sound/misc/cyka1.ogg', 'modular_citadel/sound/misc/cheekibreeki.ogg') \ No newline at end of file + alternate_screams = list('modular_citadel/sound/misc/cyka1.ogg', 'modular_citadel/sound/misc/cheekibreeki.ogg') + +/obj/item/proc/grenade_prime_react(obj/item/grenade/nade) + return \ No newline at end of file diff --git a/modular_citadel/code/modules/mob/living/carbon/human/human.dm b/modular_citadel/code/modules/mob/living/carbon/human/human.dm index 6466b1ff70..70bac64825 100644 --- a/modular_citadel/code/modules/mob/living/carbon/human/human.dm +++ b/modular_citadel/code/modules/mob/living/carbon/human/human.dm @@ -11,4 +11,32 @@ race = /datum/species/insect /mob/living/carbon/human/species/xeno - race = /datum/species/xeno \ No newline at end of file + race = /datum/species/xeno + +/mob/living/carbon/human/resist() + . = ..() + if(wear_suit && wear_suit.breakouttime)//added in human cuff breakout proc + return + if(.) + if(canmove && !on_fire) + for(var/obj/item/bodypart/L in bodyparts) + if(istype(L) && L.embedded_objects.len) + for(var/obj/item/I in L.embedded_objects) + if(istype(I) && I.w_class >= WEIGHT_CLASS_NORMAL) //minimum weight class to insta-ripout via resist + remove_embedded_unsafe(L, I, src, 1.5) //forcefully call the remove embedded unsafe proc but with extra pain multiplier. if you want to remove it less painfully, examine and remove it carefully. + return FALSE //Hands are occupied + return + +/mob/living/carbon/human/proc/remove_embedded_unsafe(obj/item/bodypart/L, obj/item/I, mob/user, painmul = 1) + if(!I || !L || I.loc != src || !(I in L.embedded_objects)) + return + L.embedded_objects -= I + L.receive_damage(I.embedding.embedded_unsafe_removal_pain_multiplier*I.w_class*painmul)//It hurts to rip it out, get surgery you dingus. And if you're ripping it out quickly via resist, it's gonna hurt even more + I.forceMove(get_turf(src)) + user.put_in_hands(I) + user.emote("scream") + user.visible_message("[user] rips [I] out of [user.p_their()] [L.name]!","You remove [I] from your [L.name].") + if(!has_embedded_objects()) + clear_alert("embeddedobject") + SEND_SIGNAL(user, COMSIG_CLEAR_MOOD_EVENT, "embedded") + return