Merge branch 'master' into cit_mood

Handled Conflict with tgstation.dme
This commit is contained in:
Anonymous
2018-03-16 17:09:57 +03:00
318 changed files with 94821 additions and 13311 deletions
@@ -0,0 +1,12 @@
/proc/tg_ui_icon_to_cit_ui(ui_style)
switch(ui_style)
if('icons/mob/screen_plasmafire.dmi')
return 'modular_citadel/icons/ui/screen_plasmafire.dmi'
if('icons/mob/screen_slimecore.dmi')
return 'modular_citadel/icons/ui/screen_slimecore.dmi'
if('icons/mob/screen_operative.dmi')
return 'modular_citadel/icons/ui/screen_operative.dmi'
if('icons/mob/screen_clockwork.dmi')
return 'modular_citadel/icons/ui/screen_clockwork.dmi'
else
return 'modular_citadel/icons/ui/screen_midnight.dmi'
+74
View File
@@ -0,0 +1,74 @@
/mob/proc/RightClickOn(atom/A, params) //mostly a copy-paste from ClickOn()
var/list/modifiers = params2list(params)
if(incapacitated(ignore_restraints = 1))
return
face_atom(A)
if(next_move > world.time) // in the year 2000...
return
if(!modifiers["catcher"] && A.IsObscured())
return
if(ismecha(loc))
var/obj/mecha/M = loc
return M.click_action(A,src,params)
if(restrained())
changeNext_move(CLICK_CD_HANDCUFFED) //Doing shit in cuffs shall be vey slow
RestrainedClickOn(A)
return
if(in_throw_mode)
throw_item(A)//todo: make it plausible to lightly toss items via right-click
return
var/obj/item/W = get_active_held_item()
if(W == A)
if(!W.rightclick_attack_self(src))
W.attack_self(src)
update_inv_hands()
return
//These are always reachable.
//User itself, current loc, and user inventory
if(DirectAccess(A))
if(W)
W.rightclick_melee_attack_chain(src, A, params)
else
if(ismob(A))
changeNext_move(CLICK_CD_MELEE)
if(!AltUnarmedAttack(A))
UnarmedAttack(A)
return
//Can't reach anything else in lockers or other weirdness
if(!loc.AllowClick())
return
//Standard reach turf to turf or reaching inside storage
if(CanReach(A,W))
if(W)
W.rightclick_melee_attack_chain(src, A, params)
else
if(ismob(A))
changeNext_move(CLICK_CD_MELEE)
if(!AltUnarmedAttack(A,1))
UnarmedAttack(A,1)
else
if(W)
if(!W.altafterattack(A, src, FALSE, params))
W.afterattack(A, src, FALSE, params)
else
if(!AltRangedAttack(A,params))
RangedAttack(A,params)
/mob/proc/AltUnarmedAttack(atom/A, proximity_flag)
if(ismob(A))
changeNext_move(CLICK_CD_MELEE)
return FALSE
/mob/proc/AltRangedAttack(atom/A, params)
return FALSE
@@ -0,0 +1,49 @@
/obj/screen/mov_intent
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
/obj/screen/sprintbutton
name = "toggle sprint"
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
icon_state = "act_sprint"
layer = ABOVE_HUD_LAYER - 0.1
/obj/screen/sprintbutton/Click()
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
H.togglesprint()
/obj/screen/sprintbutton/proc/insert_witty_toggle_joke_here(mob/living/carbon/human/H)
if(!H)
return
if(H.sprinting)
icon_state = "act_sprint_on"
else
icon_state = "act_sprint"
/obj/screen/restbutton
name = "rest"
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
icon_state = "rest"
/obj/screen/restbutton/Click()
if(isliving(usr))
var/mob/living/theuser = usr
theuser.lay_down()
/obj/screen/combattoggle
name = "toggle combat mode"
icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
icon_state = "combat_off"
/obj/screen/combattoggle/Click()
if(iscarbon(usr))
var/mob/living/carbon/C = usr
C.toggle_combat_mode()
/obj/screen/combattoggle/proc/rebasetointerbay(mob/living/carbon/C)
if(!C)
return
if(C.combatmode)
icon_state = "combat"
else
icon_state = "combat_off"
@@ -0,0 +1,73 @@
/datum/hud/var/obj/screen/staminas/staminas
/datum/hud/var/obj/screen/staminabuffer/staminabuffer
/obj/screen/staminas
icon = 'modular_citadel/icons/ui/screen_gen.dmi'
name = "stamina"
icon_state = "stamina0"
screen_loc = ui_stamina
mouse_opacity = 0
/mob/living/carbon/human/proc/staminahudamount()
if(stat == DEAD || recoveringstam)
return "staminacrit"
else
switch(hal_screwyhud)
if(1 to 2)
return "staminacrit"
if(5)
return "stamina0"
else
switch(100 - staminaloss)
if(100 to INFINITY)
return "stamina0"
if(80 to 100)
return "stamina1"
if(60 to 80)
return "stamina2"
if(40 to 60)
return "stamina3"
if(20 to 40)
return "stamina4"
if(0 to 20)
return "stamina5"
else
return "stamina6"
//stam buffer
/obj/screen/staminabuffer
icon = 'modular_citadel/icons/ui/screen_gen.dmi'
name = "stamina buffer"
icon_state = "stambuffer0"
screen_loc = ui_stamina
layer = ABOVE_HUD_LAYER + 0.1
mouse_opacity = 0
/mob/living/carbon/human/proc/staminabufferhudamount()
if(stat == DEAD || recoveringstam)
return "stambuffer7"
else
switch(hal_screwyhud)
if(1 to 2)
return "stambuffer7"
if(5)
return "stambuffer0"
else
var/percentmult = 100/stambuffer
switch(stambuffer*percentmult - bufferedstam*percentmult)
if(95 to INFINITY)
return "stambuffer0"
if(90 to 95)
return "stambuffer1"
if(80 to 90)
return "stambuffer2"
if(60 to 80)
return "stambuffer3"
if(40 to 60)
return "stambuffer4"
if(20 to 40)
return "stambuffer5"
if(5 to 20)
return "stambuffer6"
else
return "stambuffer7"
@@ -0,0 +1,25 @@
/obj/item/proc/rightclick_melee_attack_chain(mob/user, atom/target, params)
if(!pre_altattackby(target, user, params)) //Hey, does this item have special behavior that should override all normal right-click functionality?
if(!target.altattackby(src, user, params)) //Does the target do anything special when we right-click on it?
melee_attack_chain(user, target, params) //Ugh. Lame! I'm filing a legal complaint about the discrimination against the right mouse button!
else
altafterattack(target, user, TRUE, params)
return
/obj/item/proc/pre_altattackby(atom/A, mob/living/user, params)
return FALSE //return something other than false if you wanna override attacking completely
/atom/proc/altattackby(obj/item/W, mob/user, params)
return FALSE //return something other than false if you wanna add special right-click behavior to objects.
/obj/item/proc/rightclick_attack_self(mob/user)
return FALSE
/obj/item/proc/altafterattack(atom/target, mob/user, proximity_flag, click_parameters)
return FALSE
/obj/item/proc/getweight()
if(total_mass)
return max(total_mass,MIN_MELEE_STAMCOST)
else
return w_class*1.25
@@ -0,0 +1,29 @@
/mob/living/carbon/human/AltUnarmedAttack(atom/A, proximity)
if(!has_active_hand())
to_chat(src, "<span class='notice'>You look at the state of the universe and sigh.</span>") //lets face it, people rarely ever see this message in its intended condition.
return TRUE
if(!A.alt_attack_hand(src))
A.attack_hand(src)
return TRUE
return TRUE
/mob/living/carbon/human/AltRangedAttack(atom/A, params)
if(!has_active_hand())
to_chat(src, "<span class='notice'>You ponder your life choices and sigh.</span>")
return TRUE
if(!incapacitated())
switch(a_intent)
if(INTENT_HELP)
visible_message("<span class='notice'>[src] waves to [A].</span>", "<span class='notice'>You wave to [A].</span>")
if(INTENT_DISARM)
visible_message("<span class='notice'>[src] shoos away [A].</span>", "<span class='notice'>You shoo away [A].</span>")
if(INTENT_GRAB)
visible_message("<span class='notice'>[src] beckons [A] to come.</span>", "<span class='notice'>You beckon [A] to come.</span>") //This sounds lewder than it actually is. Fuck.
if(INTENT_HARM)
visible_message("<span class='notice'>[src] shakes [p_their()] fist at [A].</span>", "<span class='notice'>You shake your fist at [A].</span>")
return TRUE
/atom/proc/alt_attack_hand(mob/user)
return FALSE
@@ -0,0 +1,4 @@
/datum/material/plastic
name = "Plastic"
id = MAT_PLASTIC
sheet_type = /obj/item/stack/sheet/plastic
@@ -0,0 +1,13 @@
/datum/status_effect/incapacitating/knockdown/on_creation(mob/living/new_owner, set_duration, updating_canmove)
if(iscarbon(new_owner) && isnum(set_duration))
new_owner.resting = TRUE
new_owner.adjustStaminaLoss(set_duration*0.25)
if(set_duration > 80)
set_duration = set_duration*0.15
. = ..()
return
else if(updating_canmove)
new_owner.update_canmove()
qdel(src)
else
. = ..()
@@ -0,0 +1,10 @@
/obj/machinery/firealarm/alt_attack_hand(mob/user)
if(is_interactable() && !user.stat)
var/area/A = get_area(src)
if(istype(A))
if(A.fire)
reset()
else
alarm()
return TRUE
return FALSE
@@ -24,7 +24,7 @@
/obj/item/clothing/under/mankini = 1,
/obj/item/dildo/flared/huge = 1
)
premium = list(/obj/item/device/electropack/shockcollar = 1)
premium = list(/obj/item/device/electropack/shockcollar = 3)
refill_canister = /obj/item/vending_refill/kink
/*
/obj/machinery/vending/nazivend
@@ -90,8 +90,8 @@
machine_name = "KinkMate"
icon = 'modular_citadel/icons/vending_restock.dmi'
icon_state = "refill_kink"
charges = list(8, 5, 0)// of 20 standard, 12 contraband, 0 premium
init_charges = list(8, 5, 0)
charges = list(8, 5, 1)// of 20 standard, 12 contraband, 3 premium
init_charges = list(8, 5, 1)
/obj/item/vending_refill/nazi
machine_name = "nazivend"
@@ -0,0 +1,121 @@
/obj/machinery/wish_granter/attack_hand(mob/living/carbon/user)
if(charges <= 0)
to_chat(user, "The Wish Granter lies silent.")
return
else if(!ishuman(user))
to_chat(user, "You feel a dark stirring inside of the Wish Granter, something you want nothing of. Your instincts are better than any man's.")
return
else if (!insisting)
to_chat(user, "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?")
insisting++
else
if(is_special_character(user))
to_chat(user, "You speak. [pick("I want power","Humanity is corrupt, mankind must be destroyed", "I want to rule the world","I want immortality")]. The Wish Granter answers.")
to_chat(user, "Your head pounds for a moment, before your vision clears. The Wish Granter, sensing the darkness in your heart, has given you limitless power, and it's all yours!")
user.dna.add_mutation(HULK)
user.dna.add_mutation(XRAY)
user.dna.add_mutation(COLDRES)
user.dna.add_mutation(TK)
user.next_move_modifier *= 0.5 //half the delay between attacks!
to_chat(user, "Things around you feel slower!")
charges--
insisting = FALSE
to_chat(user, "You have a very great feeling about this!")
else
to_chat(user, "The Wish Granter awaits your wish.")
var/wish = input("You want...","Wish") as null|anything in list("Power","Wealth","The Station To Disappear","To Kill","Nothing")
switch(wish)
if("Power") //Gives infinite power in exchange for infinite power going off in your face!
if(charges <= 0)
return
to_chat(user, "<B>Your wish is granted, but at a terrible cost...</B>")
to_chat(user, "The Wish Granter punishes you for your selfishness, warping itself into a delaminating supermatter shard!")
var/obj/item/stock_parts/cell/infinite/powah = new /obj/item/stock_parts/cell/infinite(get_turf(user))
if(user.put_in_hands(powah))
to_chat(user, "[powah] materializes into your hands!")
else
to_chat(user, "[powah] materializes onto the floor.")
var/obj/machinery/power/supermatter_shard/powerwish = new /obj/machinery/power/supermatter_shard(loc)
powerwish.damage = 700 //right at the emergency threshold
powerwish.produces_gas = FALSE
charges--
insisting = FALSE
if(!charges)
qdel(src)
if("Wealth") //Gives 1 million space bucks in exchange for being turned into gold!
if(charges <= 0)
return
to_chat(user, "<B>Your wish is granted, but at a cost...</B>")
to_chat(user, "The Wish Granter punishes you for your selfishness, warping your body to match the greed in your heart.")
new /obj/structure/closet/crate/trashcart/moneywish(loc)
new /obj/structure/closet/crate/trashcart/moneywish(loc)
user.set_species(/datum/species/golem/gold)
charges--
insisting = FALSE
if(!charges)
qdel(src)
if("The Station To Disappear") //teleports you to the station and makes you blind, making the station disappear for you!
if(charges <= 0)
return
to_chat(user, "<B>Your wish is 'granted', but at a terrible cost...</B>")
to_chat(user, "The Wish Granter punishes you for your selfishness, claiming your soul and warping your eyes to match the darkness in your heart.")
user.dna.add_mutation(BLINDMUT)
user.adjust_eye_damage(100)
var/list/destinations = list()
for(var/obj/item/device/beacon/B in GLOB.teleportbeacons)
var/turf/T = get_turf(B)
if(is_station_level(T.z))
destinations += B
var/chosen_beacon = pick(destinations)
var/obj/effect/portal/jaunt_tunnel/J = new (get_turf(src), src, 100, null, FALSE, get_turf(chosen_beacon))
try_move_adjacent(J)
playsound(src,'sound/effects/sparks4.ogg',50,1)
charges--
insisting = FALSE
if(!charges)
qdel(src)
if("To Kill") //Makes you kill things in exchange for rewards!
if(charges <= 0)
return
to_chat(user, "<B>Your wish is granted, but at a terrible cost...</B>")
to_chat(user, "The Wish Granter punishes you for your wickedness, warping itself into a dastardly creature for you to kill! ...but it almost seems to reward you for this.")
var/obj/item/melee/transforming/energy/sword/cx/killreward = new /obj/item/melee/transforming/energy/sword/cx(get_turf(user))
if(user.put_in_hands(killreward))
to_chat(user, "[killreward] materializes into your hands!")
else
to_chat(user, "[killreward] materializes onto the floor.")
user.next_move_modifier *= 0.8 //20% less delay between attacks!
to_chat(user, "Things around you feel slightly slower!")
var/mob/living/simple_animal/hostile/venus_human_trap/killwish = new /mob/living/simple_animal/hostile/venus_human_trap(loc)
killwish.maxHealth = 1500
killwish.health = killwish.maxHealth
killwish.grasp_range = 6
killwish.melee_damage_upper = 30
killwish.grasp_chance = 50
killwish.loot = list(/obj/item/twohanded/hypereutactic)
charges--
insisting = FALSE
if(!charges)
qdel(src)
if("Nothing") //Makes the wish granter disappear
if(charges <= 0)
return
to_chat(user, "<B>The Wish Granter vanishes from sight!</B>")
to_chat(user, "You feel as if you just narrowly avoided a terrible fate...")
charges--
insisting = FALSE
qdel(src)
//ITEMS THAT IT USES
/obj/structure/closet/crate/trashcart/moneywish
desc = "A heavy, metal trashcart with wheels. Filled with cash."
name = "loaded trash cart"
/obj/structure/closet/crate/trashcart/moneywish/PopulateContents() //25*20*1000=500,000
for(var/i = 0, i < 25, i++)
var/obj/item/stack/spacecash/c1000/lodsamoney = new /obj/item/stack/spacecash/c1000(src)
lodsamoney.amount = lodsamoney.max_amount
@@ -0,0 +1,2 @@
/obj/item
var/total_mass //Total mass in arbitrary pound-like values. If there's no balance reasons for an item to have otherwise, this var should be the item's weight in pounds.
@@ -0,0 +1,3 @@
/obj/item/melee/transforming/energy/sword
total_mass = 0.375 //Survival flashlights typically weigh around 5 ounces.
total_mass_on = 3.4 //The typical medieval sword, on the other hand, weighs roughly 3 pounds.
@@ -11,16 +11,18 @@
lefthand_file = 'modular_citadel/icons/eutactic/mob/noneutactic_left.dmi'
righthand_file = 'modular_citadel/icons/eutactic/mob/noneutactic_right.dmi'
force = 3
force_on = 21
throwforce = 5
throwforce_on = 20
hitsound = "swing_hit" //it starts deactivated
hitsound_on = 'sound/weapons/nebhit.ogg'
attack_verb_off = list("tapped", "poked")
throw_speed = 3
throw_range = 5
sharpness = IS_SHARP
embedding = list("embedded_pain_multiplier" = 6, "embed_chance" = 40, "embedded_fall_chance" = 10)
armour_penetration = 0
block_chance = 60
embedding = list("embedded_pain_multiplier" = 6, "embed_chance" = 20, "embedded_fall_chance" = 60)
armour_penetration = 10
block_chance = 35
light_color = "#37FFF7"
actions_types = list()
@@ -217,14 +219,14 @@
w_class = WEIGHT_CLASS_SMALL
var/w_class_on = WEIGHT_CLASS_BULKY
force_unwielded = 3
force_wielded = 40
force_wielded = 30
wieldsound = 'sound/weapons/nebon.ogg'
unwieldsound = 'sound/weapons/neboff.ogg'
hitsound = "swing_hit"
armour_penetration = 40
armour_penetration = 10
light_color = "#37FFF7"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "destroyed", "ripped", "devastated", "shredded")
block_chance = 75
block_chance = 25
max_integrity = 200
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 70)
resistance_flags = FIRE_PROOF
@@ -390,8 +392,9 @@
which utilizes a hardlight blade that is dynamically 'forged' on demand to create a deadly sharp edge that is unbreakable. \
It appears to have a wooden grip and a shaved down guard."
icon_state = "cxsword_hilt_traitor"
force_on = 30
armour_penetration = 35
embedding = list("embedded_pain_multiplier" = 10, "embed_chance" = 70, "embedded_fall_chance" = 0)
embedding = list("embedded_pain_multiplier" = 10, "embed_chance" = 75, "embedded_fall_chance" = 0, "embedded_impact_pain_multiplier" = 10)
block_chance = 50
hitsound_on = 'sound/weapons/blade1.ogg'
light_color = "#37F0FF"
@@ -0,0 +1,11 @@
/obj/item/melee/transforming
var/total_mass_on //Total mass in ounces when transformed. Primarily for balance purposes. Don't think about it too hard.
/obj/item/melee/transforming/getweight()
if(total_mass && total_mass_on)
if(active)
return max(total_mass_on,MIN_MELEE_STAMCOST)
else
return max(total_mass,MIN_MELEE_STAMCOST)
else
return initial(w_class)*1.25
@@ -0,0 +1,21 @@
/obj/structure/chair/alt_attack_hand(mob/living/user)
if(Adjacent(user) && istype(user))
if(!item_chair || !user.can_hold_items() || !has_buckled_mobs() || buckled_mobs.len > 1 || dir != user.dir || flags_1 & NODECONSTRUCT_1)
return TRUE
if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return TRUE
if(user.staminaloss >= STAMINA_SOFTCRIT)
to_chat(user, "<span class='warning'>You're too exhausted for that.</span>")
return TRUE
var/mob/living/poordude = buckled_mobs[1]
if(!istype(poordude))
return TRUE
user.visible_message("<span class='notice'>[user] pulls [src] out from under [poordude].</span>", "<span class='notice'>You pull [src] out from under [poordude].</span>")
var/C = new item_chair(loc)
user.put_in_hands(C)
poordude.Knockdown(20)//rip in peace
user.adjustStaminaLoss(5)
unbuckle_all_mobs(TRUE)
qdel(src)
return TRUE
@@ -1,3 +1,24 @@
/client/New()
. = ..()
mentor_datum_set()
/client/proc/citadel_client_procs(href_list)
if(href_list["mentor_msg"])
if(CONFIG_GET(flag/mentors_mobname_only))
var/mob/M = locate(href_list["mentor_msg"])
cmd_mentor_pm(M,null)
else
cmd_mentor_pm(href_list["mentor_msg"],null)
return TRUE
//Mentor Follow
if(href_list["mentor_follow"])
var/mob/living/M = locate(href_list["mentor_follow"])
if(istype(M))
mentor_follow(M)
return TRUE
/client/proc/mentor_datum_set(admin)
mentor_datum = GLOB.mentor_datums[ckey]
if(!mentor_datum && check_rights_for(src, R_ADMIN,0)) // admin with no mentor datum?let's fix that
@@ -12,3 +33,11 @@
/client/proc/is_mentor() // admins are mentors too.
if(mentor_datum || check_rights_for(src, R_ADMIN,0))
return TRUE
/client/verb/togglerightclickstuff()
set category = "OOC"
set name = "Toggle Rightclick"
set desc = "Did the context menu get stuck on or off? Press this button."
show_popup_menus = !show_popup_menus
to_chat(src, "<span class='notice'>The right-click context menu is now [show_popup_menus ? "enabled" : "disabled"].</span>")
@@ -198,9 +198,27 @@
category = slot_wear_suit
path = /obj/item/clothing/under/gladiator
ckeywhitelist = list("aroche")
/datum/gear/bloodredtie
name = "Blood Red Tie"
category = slot_neck
path = /obj/item/clothing/neck/tie/bloodred
ckeywhitelist = list("kyutness")
/datum/gear/puffydress
name = "Puffy Dress"
category = slot_wear_suit
path = /obj/item/clothing/suit/puffydress
//ckeywhitelist = //Don't know their ckey yet
/datum/gear/labredblack
name = "Black and Red Coat"
category = slot_wear_suit
path = /obj/item/clothing/suit/toggle/labcoat/labredblack
ckeywhitelist = list("blakeryan")
@@ -11,6 +11,7 @@
var/damagescreenshake = 2
var/arousable = TRUE
var/widescreenpref = TRUE
var/autostand = TRUE
/datum/preferences/New(client/C)
..()
@@ -85,6 +85,15 @@
item_state = "labred"
/obj/item/clothing/suit/toggle/labcoat/labredblack
name = "Black and Red Coat"
desc = "An oddly special looking coat."
icon = 'icons/obj/custom.dmi'
icon_state = "labredblack"
icon_override = 'icons/mob/custom_w.dmi'
item_state = "labredblack"
/*Improvedname*/
/obj/item/toy/plush/carrot
@@ -259,6 +268,15 @@
icon_state = "bloodredtie"
icon_override = 'icons/mob/custom_w.dmi'
/obj/item/clothing/suit/puffydress
name = "Puffy Dress"
desc = "A formal puffy black and red Victorian dress."
icon = 'icons/obj/custom.dmi'
icon_override = 'icons/mob/custom_w.dmi'
icon_state = "puffydress"
item_state = "puffydress"
body_parts_covered = CHEST|GROIN|LEGS
/*Fractious*/
@@ -1,3 +1,2 @@
/datum/round_event_control/blob
min_players = 50
earliest_start = 60 MINUTES
@@ -0,0 +1,6 @@
/mob/living/carbon/key_down(_key, client/user)
switch(_key)
if("C")
toggle_combat_mode()
return
return ..()
@@ -0,0 +1,13 @@
/mob/living/carbon/human/key_down(_key, client/user)
switch(_key)
if("Shift")
togglesprint()
return
return ..()
/mob/living/carbon/human/key_up(_key, client/user)
switch(_key)
if("Shift")
togglesprint()
return
return ..()
@@ -23,4 +23,4 @@
verbs -= /client/proc/mentor_unfollow
to_chat(GLOB.admins, "<span class='mentor'><span class='prefix'>MENTOR:</span> <EM>[key_name(usr)]</EM> is no longer following <EM>[key_name(mentor_datum.following)]</span>")
log_mentor("[key_name(usr)] stopped following [key_name(mentor_datum.following)]")
mentor_datum.following = null
mentor_datum.following = null
@@ -57,29 +57,6 @@ GLOBAL_PROTECT(mentor_href_token)
/proc/MentorHrefToken(forceGlobal = FALSE)
return "mentor_token=[RawMentorHrefToken(forceGlobal)]"
/datum/mentors/Topic(href, href_list)
..()
if(!usr || !usr.client || usr.client != owner || !usr.client.is_mentor())
return
if(!CheckMentorHREF(href, href_list))
return
if(href_list["mentor_msg"])
if(CONFIG_GET(flag/mentors_mobname_only))
var/mob/M = locate(href_list["mentor_msg"])
usr.client.cmd_mentor_pm(M,null)
else
usr.client.cmd_mentor_pm(href_list["mentor_msg"],null)
return
//Mentor Follow
if(href_list["mentor_follow"])
var/mob/living/M = locate(href_list["mentor_follow"])
if(istype(M))
usr.client.mentor_follow(M)
return
/proc/load_mentors()
GLOB.mentor_datums.Cut()
for(var/client/C in GLOB.mentors)
@@ -9,4 +9,4 @@ GLOBAL_LIST_INIT(mentor_verbs, list(
verbs += GLOB.mentor_verbs
/client/proc/remove_mentor_verbs()
verbs -= GLOB.mentor_verbs
verbs -= GLOB.mentor_verbs
@@ -35,10 +35,18 @@
if(!msg)
msg = input(src,"Message:", "Private message") as text|null
if(!msg) return
if(!msg)
return
if(!C)
if(is_mentor()) to_chat(src, "<font color='red'>Error: Mentor-PM: Client not found.</font>")
else mentorhelp(msg) //Mentor we are replying to has vanished, Mentorhelp instead (how the fuck does this work?let's hope it works,shrug)
if(is_mentor())
to_chat(src, "<font color='red'>Error: Mentor-PM: Client not found.</font>")
else
mentorhelp(msg) //Mentor we are replying to has vanished, Mentorhelp instead (how the fuck does this work?let's hope it works,shrug)
return
// Neither party is a mentor, they shouldn't be PMing!
if (!C.is_mentor() && !is_mentor())
return
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
@@ -15,4 +15,4 @@
msg = "<b><font color ='#8A2BE2'><span class='prefix'>MENTOR:</span> <EM>[key_name(src, 0, 0)]</EM>: <span class='message'>[msg]</span></font></b>"
else
msg = "<b><font color ='#E236D8'><span class='prefix'>MENTOR:</span> <EM>[key_name(src, 0, 0)]</EM>: <span class='message'>[msg]</span></font></b>"
to_chat(GLOB.admins | GLOB.mentors, msg)
to_chat(GLOB.admins | GLOB.mentors, msg)
@@ -0,0 +1,27 @@
/mob/living/carbon
var/combatmode = FALSE //literally lifeweb
/mob/living/carbon/CanPass(atom/movable/mover, turf/target)
. = ..()
if(.)
var/mob/living/mobdude = mover
if(istype(mobdude))
if(!resting && mobdude.resting)
if(!(mobdude.pass_flags & PASSMOB))
return FALSE
return .
/mob/living/carbon/proc/toggle_combat_mode()
if(recoveringstam)
return TRUE
combatmode = !combatmode
if(combatmode)
playsound_local(src, 'modular_citadel/sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay!
else
playsound_local(src, 'modular_citadel/sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE) //Slightly modified version of the above!
if(client)
client.show_popup_menus = !combatmode // So we can right-click for alternate actions and all that other good shit. Also moves examine to shift+rightclick to make it possible to attack while sprinting
if(hud_used && hud_used.static_inventory)
for(var/obj/screen/combattoggle/selector in hud_used.static_inventory)
selector.rebasetointerbay(src)
return TRUE
@@ -0,0 +1,10 @@
/mob/living/carbon/adjustStaminaLossBuffered(amount, updating_stamina = 1)
if(status_flags & GODMODE)
return 0
var/directstamloss = (bufferedstam + amount) - stambuffer
if(directstamloss > 0)
adjustStaminaLoss(directstamloss)
bufferedstam = CLAMP(bufferedstam + amount, 0, stambuffer)
stambufferregentime = world.time + 2 SECONDS
if(updating_stamina)
update_health_hud()
@@ -2,4 +2,13 @@
if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && isliving(pulling))
vore_attack(user, pulling)
else
..()
..()
/mob/living/carbon/human/alt_attack_hand(mob/user)
if(..())
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!dna.species.alt_spec_attack_hand(H, src))
dna.species.spec_attack_hand(H, src)
return TRUE
@@ -0,0 +1,31 @@
/mob/living/carbon/human
var/sprinting = FALSE
/mob/living/carbon/human/Move(NewLoc, direct)
var/oldpseudoheight = pseudo_z_axis
. = ..()
if(. && sprinting && !resting && m_intent == MOVE_INTENT_RUN)
adjustStaminaLossBuffered(0.3)
if((oldpseudoheight - pseudo_z_axis) >= 8)
to_chat(src, "<span class='warning'>You trip off of the elevated surface!</span>")
for(var/obj/item/I in held_items)
accident(I)
Knockdown(80)
/mob/living/carbon/human/movement_delay()
. = 0
if(!resting && m_intent == MOVE_INTENT_RUN && !sprinting)
. += 1
. += ..()
/mob/living/carbon/human/proc/togglesprint() // If you call this proc outside of hotkeys or clicking the HUD button, I'll be disappointed in you.
sprinting = !sprinting
if(!resting && m_intent == MOVE_INTENT_RUN && canmove)
if(sprinting)
playsound_local(src, 'modular_citadel/sound/misc/sprintactivate.ogg', 50, FALSE, pressure_affected = FALSE)
else
playsound_local(src, 'modular_citadel/sound/misc/sprintdeactivate.ogg', 50, FALSE, pressure_affected = FALSE)
if(hud_used && hud_used.static_inventory)
for(var/obj/screen/sprintbutton/selector in hud_used.static_inventory)
selector.insert_witty_toggle_joke_here(src)
return TRUE
@@ -3,10 +3,19 @@
if(stat != DEAD)
handle_arousal()
. = ..()
/mob/living/carbon/human/calculate_affecting_pressure(pressure)
if(ismob(loc))
return ONE_ATMOSPHERE
if(istype(loc, /obj/item/device/dogborg/sleeper))
return ONE_ATMOSPHERE
. = ..()
. = ..()
/mob/living/carbon/human/update_health_hud(shown_health_amount)
. = ..()
if(!client || !hud_used)
return
if(hud_used.staminas)
hud_used.staminas.icon_state = staminahudamount()
if(hud_used.staminabuffer)
hud_used.staminabuffer.icon_state = staminabufferhudamount()
@@ -0,0 +1,57 @@
/datum/species/proc/alt_spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
if(!istype(M))
return TRUE
CHECK_DNA_AND_SPECIES(M)
CHECK_DNA_AND_SPECIES(H)
if(!istype(M)) //sanity check for drones.
return TRUE
if(M.mind)
attacker_style = M.mind.martial_art
if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(M, 0, M.name, attack_type = UNARMED_ATTACK))
add_logs(M, H, "attempted to touch")
H.visible_message("<span class='warning'>[M] attempted to touch [H]!</span>")
return TRUE
switch(M.a_intent)
if("disarm")
altdisarm(M, H, attacker_style)
return TRUE
return FALSE
/datum/species/proc/altdisarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(user.staminaloss >= STAMINA_SOFTCRIT)
to_chat(user, "<span class='warning'>You're too exhausted.</span>")
return FALSE
else if(target.check_block())
target.visible_message("<span class='warning'>[target] blocks [user]'s disarm attempt!</span>")
return 0
if(attacker_style && attacker_style.disarm_act(user,target))
return 1
else
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
user.adjustStaminaLossBuffered(4) //CITADEL CHANGE - makes disarmspam cause staminaloss
if(target.w_uniform)
target.w_uniform.add_fingerprint(user)
var/randomized_zone = ran_zone(user.zone_selected)
target.SendSignal(COMSIG_HUMAN_DISARM_HIT, user, user.zone_selected)
var/obj/item/bodypart/affecting = target.get_bodypart(randomized_zone)
var/randn = rand(1, 100)
if(user.resting)
randn += 20 //Makes it plausible, but unlikely, to push someone over while resting
if(!user.combatmode)
randn += 25 //Makes it impossible to push actually push someone outside of combat mode
if(randn <= 25)
playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
target.visible_message("<span class='danger'>[user] has pushed [target]!</span>",
"<span class='userdanger'>[user] has pushed [target]!</span>", null, COMBAT_MESSAGE_RANGE)
target.apply_effect(40, KNOCKDOWN, target.run_armor_check(affecting, "melee", "Your armor prevents your fall!", "Your armor softens your fall!"))
target.forcesay(GLOB.hit_appends)
add_logs(user, target, "disarmed", " pushing them to the ground")
return
playsound(target, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
target.visible_message("<span class='danger'>[user] attempted to push [target]!</span>", \
"<span class='userdanger'>[user] attemped to push [target]!</span>", null, COMBAT_MESSAGE_RANGE)
@@ -0,0 +1,2 @@
/mob/living/proc/adjustStaminaLossBuffered(amount, updating_stamina = TRUE, forced = FALSE)
return
@@ -0,0 +1,123 @@
/mob/living
var/recoveringstam = FALSE
var/bufferedstam = 0
var/stambuffer = 20
var/stambufferregentime
var/aimingdownsights = FALSE
var/attemptingstandup = FALSE
var/intentionalresting = FALSE
var/attemptingcrawl = FALSE
/mob/living/movement_delay(ignorewalk = 0)
. = ..()
if(resting)
. += 6
/atom
var/pseudo_z_axis
/atom/proc/get_fake_z()
return pseudo_z_axis
/obj/structure/table
pseudo_z_axis = 8
/turf/open/get_fake_z()
var/objschecked
for(var/obj/structure/structurestocheck in contents)
objschecked++
if(structurestocheck.pseudo_z_axis)
return structurestocheck.pseudo_z_axis
if(objschecked >= 25)
break
return pseudo_z_axis
/mob/living/Move(atom/newloc, direct)
. = ..()
if(.)
if(makesfootstepsounds)
CitFootstep(newloc)
pseudo_z_axis = newloc.get_fake_z()
pixel_z = pseudo_z_axis
if(aimingdownsights)
aimingdownsights = FALSE
to_chat(src, "<span class='notice'>You are no longer aiming down your weapon's sights.</span>")
/mob/living/proc/lay_down()
set name = "Rest"
set category = "IC"
if(client && client.prefs && client.prefs.autostand)
intentionalresting = !intentionalresting
to_chat(src, "<span class='notice'>You are now attempting to [intentionalresting ? "[!resting ? "lay down and ": ""]stay down" : "[resting ? "get up and ": ""]stay up"].</span>")
if(intentionalresting && !resting)
resting = TRUE
update_canmove()
else
resist_a_rest()
else
if(!resting)
resting = TRUE
to_chat(src, "<span class='notice'>You are now laying down.</span>")
update_canmove()
else
resist_a_rest()
/mob/living/proc/resist_a_rest(automatic = FALSE, ignoretimer = FALSE) //Lets mobs resist out of resting. Major QOL change with combat reworks.
if(!resting || stat || attemptingstandup)
return FALSE
if(ignoretimer)
resting = FALSE
update_canmove()
return TRUE
else
var/totaldelay = 3 //A little bit less than half of a second as a baseline for getting up from a rest
if(staminaloss >= STAMINA_SOFTCRIT)
to_chat(src, "<span class='warning'>You're too exhausted to get up!")
return FALSE
attemptingstandup = TRUE
var/health_deficiency = max((maxHealth - (health - staminaloss))*0.5, 0)
if(!has_gravity())
health_deficiency = health_deficiency*0.2
totaldelay += health_deficiency
var/standupwarning = "[src] and everyone around them should probably yell at the dev team"
switch(health_deficiency)
if(-INFINITY to 10)
standupwarning = "[src] stands right up!"
if(10 to 35)
standupwarning = "[src] tries to stand up."
if(35 to 60)
standupwarning = "[src] slowly pushes [p_them()]self upright."
if(60 to 80)
standupwarning = "[src] weakly attempts to stand up."
if(80 to INFINITY)
standupwarning = "[src] struggles to stand up."
var/usernotice = automatic ? "<span class='notice'>You are now getting up. (Auto)</span>" : "<span class='notice'>You are now getting up.</span>"
visible_message("<span class='notice'>[standupwarning]</span>", usernotice, vision_distance = 5)
if(do_after(src, totaldelay, target = src))
resting = FALSE
attemptingstandup = FALSE
update_canmove()
return TRUE
else
visible_message("<span class='notice'>[src] falls right back down.</span>", "<span class='notice'>You fall right back down.</span>")
attemptingstandup = FALSE
if(has_gravity())
playsound(src, "bodyfall", 20, 1)
return FALSE
/mob/living/carbon/proc/update_stamina()
var/total_health = (min(health*2,100) - staminaloss)
if(staminaloss)
if(!recoveringstam && total_health <= STAMINA_CRIT_TRADITIONAL && !stat)
to_chat(src, "<span class='notice'>You're too exhausted to keep going...</span>")
resting = TRUE
if(combatmode)
toggle_combat_mode()
recoveringstam = TRUE
update_canmove()
if(recoveringstam && total_health >= STAMINA_SOFTCRIT_TRADITIONAL)
to_chat(src, "<span class='notice'>You don't feel nearly as exhausted anymore.</span>")
recoveringstam = FALSE
update_canmove()
update_health_hud()
@@ -379,7 +379,7 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm !
blocked = 1
if(!blocked)
L.visible_message("<span class ='danger'>[src] pounces on [L]!</span>", "<span class ='userdanger'>[src] pounces on you!</span>")
L.Knockdown(45)
L.Knockdown(iscarbon(L) ? 450 : 45) // Temporary. If someone could rework how dogborg pounces work to accomodate for combat changes, that'd be nice.
playsound(src, 'sound/weapons/Egloves.ogg', 50, 1)
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
step_towards(src,L)
@@ -30,7 +30,7 @@
foodtype = GROSS | MEAT | RAW | FRUIT
grind_results = list("blood" = 20, "liquidgibs" = 5)
juice_results = list("banana" = 0)
var awakening = 0
var/awakening = 0
/obj/item/reagent_containers/food/snacks/grown/banana/banana_spider_spawnable/attack_self(mob/user)
+2
View File
@@ -0,0 +1,2 @@
/mob/proc/use_that_empty_hand() //currently unused proc so i can implement 2-handing any item a lot easier in the future.
return
@@ -0,0 +1,13 @@
/obj/item/ammo_casing/caseless/foam_dart/tag
name = "lastag foam dart"
desc = "Foam darts fitted with special lights. Compatible with existing laser tag systems. Ages 8 and up."
color = "#FF00FF"
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart/tag
/obj/item/ammo_casing/caseless/foam_dart/tag/red
name = "lastag red foam dart"
color = "#FF0000"
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart/tag/red
/obj/item/ammo_casing/caseless/foam_dart/tag/blue
name = "lastag blue foam dart"
color = "#0000FF"
projectile_type = /obj/item/projectile/bullet/reusable/foam_dart/tag/blue
@@ -0,0 +1,23 @@
/obj/item/ammo_box/foambox/tag
name = "ammo box (Lastag Foam Darts)"
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foambox"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/tag
max_ammo = 40
color = "#FF00FF"
/obj/item/ammo_box/foambox/tag/red
name = "ammo box (Lastag Red Foam Darts)"
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foambox"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/tag/red
max_ammo = 40
color = "#FF0000"
/obj/item/ammo_box/foambox/tag/blue
name = "ammo box (Lastag Blue Foam Darts)"
icon = 'icons/obj/guns/toy.dmi'
icon_state = "foambox"
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/tag/blue
max_ammo = 40
color = "#0000FF"
@@ -0,0 +1,36 @@
/obj/item/gun/pre_altattackby(atom/A, mob/living/user, params)
altafterattack(A, user, TRUE, params)
return TRUE
/obj/item/gun/altafterattack(atom/target, mob/living/carbon/user, proximity_flag, click_parameters)
if(istype(user))
if(!user.aimingdownsights)
user.visible_message("<span class='warning'>[user] brings [src]'s sights up to [user.p_their()] eyes, aiming directly at [target].</span>", "<span class='warning'>You bring [src]'s sights up to your eyes, aiming directly at [target].</span>")
user.adjustStaminaLossBuffered(1)
else
user.visible_message("<span class='notice'>[user] lowers [src].</span>", "<span class='notice'>You lower [src].</span>")
user.aimingdownsights = !user.aimingdownsights
return TRUE
/obj/item/gun/dropped(mob/living/user)
. = ..()
if(istype(user))
user.aimingdownsights = FALSE
/obj/item/gun/proc/getstamcost(mob/living/carbon/user)
if(user && user.has_gravity())
return recoil
else
return recoil*5
/obj/item/gun/energy/kinetic_accelerator/getstamcost(mob/living/carbon/user)
if(user && !lavaland_equipment_pressure_check(get_turf(user)))
return 0
else
return ..()
/obj/item/gun/proc/getinaccuracy(mob/living/user)
if(!iscarbon(user) || user.aimingdownsights)
return 0
else
return weapon_weight * 25
@@ -0,0 +1,2 @@
/obj/item/projectile/energy/electrode
stamina = 30
@@ -0,0 +1,22 @@
/obj/item/projectile/bullet/reusable/foam_dart/tag
name = "lastag foam dart"
var/suit_types = list(/obj/item/clothing/suit/redtag, /obj/item/clothing/suit/bluetag)
/obj/item/projectile/bullet/reusable/foam_dart/tag/on_hit(atom/target, blocked = FALSE)
. = ..()
if(ishuman(target))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit))
if(M.wear_suit.type in suit_types)
M.adjustStaminaLoss(24)
/obj/item/projectile/bullet/reusable/foam_dart/tag/red
name = "lastag red foam dart"
color = "#FF0000"
suit_types = list(/obj/item/clothing/suit/bluetag)
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/tag/red
/obj/item/projectile/bullet/reusable/foam_dart/tag/blue
color = "#0000FF"
name = "lastag blue foam dart"
suit_types = list(/obj/item/clothing/suit/redtag)
ammo_type = /obj/item/ammo_casing/caseless/foam_dart/tag/blue
@@ -0,0 +1,6 @@
/obj/machinery/disposal/bin/alt_attack_hand(mob/user)
if(is_interactable() && !user.stat)
flush = !flush
update_icon()
return TRUE
return FALSE
@@ -561,12 +561,12 @@
build_path = /obj/item/gun/ballistic/automatic/x9/toy
category = list("initial", "Rifles")
/datum/design/magfoam_dart
name = "Box of MagFoam Darts"
id = "magfoam_dart"
/datum/design/foam_dart
name = "Box of Foam Darts"
id = "foam_dart"
build_type = AUTOYLATHE
materials = list(MAT_PLASTIC = 500, MAT_METAL = 100)
build_path = /obj/item/ammo_box/foambox/mag
build_path = /obj/item/ammo_box/foambox
category = list("initial", "Misc")
/datum/design/foam_magpistol
@@ -647,4 +647,68 @@
build_type = AUTOYLATHE
materials = list(MAT_METAL = 10, MAT_GLASS = 10)
build_path = /obj/item/toy/ammo/gun
category = list("initial", "Misc")
category = list("initial", "Misc")
/datum/design/foam_smg
name = "Foam Force SMG"
id = "foam_smg"
build_type = AUTOYLATHE
materials = list(MAT_PLASTIC = 2000, MAT_METAL = 250)
build_path = /obj/item/gun/ballistic/automatic/toy/unrestricted
category = list("initial", "Pistols")
/datum/design/foam_pistol
name = "Foam Force Pistol"
id = "foam_pistol"
build_type = AUTOYLATHE
materials = list(MAT_PLASTIC = 2000, MAT_METAL = 250)
build_path = /obj/item/gun/ballistic/automatic/toy/pistol/unrestricted
category = list("initial", "Pistols")
/datum/design/foam_shotgun
name = "Foam Force Shotgun"
id = "foam_shotgun"
build_type = AUTOYLATHE
materials = list(MAT_PLASTIC = 4000, MAT_METAL = 500)
build_path = /obj/item/gun/ballistic/shotgun/toy/unrestricted
category = list("initial", "Rifles")
/datum/design/foam_dartred
name = "Box of Lastag Red Foam Darts"
id = "redfoam_dart"
build_type = AUTOYLATHE
materials = list(MAT_PLASTIC = 500, MAT_METAL = 100)
build_path = /obj/item/ammo_box/foambox/tag/red
category = list("initial", "Misc")
/datum/design/foam_dartblue
name = "Box of Lastag Blue Foam Darts"
id = "bluefoam_dart"
build_type = AUTOYLATHE
materials = list(MAT_PLASTIC = 500, MAT_METAL = 100)
build_path = /obj/item/ammo_box/foambox/tag/blue
category = list("initial", "Misc")
/datum/design/foam_bow
name = "Foam Force Crossbow"
id = "foam_bow"
build_type = AUTOYLATHE
materials = list(MAT_PLASTIC = 2000, MAT_METAL = 250)
build_path = /obj/item/gun/ballistic/shotgun/toy/crossbow
category = list("initial", "Pistols")
/datum/design/foam_c20
name = "Donksoft C20R"
id = "foam_c20"
build_type = AUTOYLATHE
materials = list(MAT_PLASTIC = 4000, MAT_METAL = 500)
build_path = /obj/item/gun/ballistic/automatic/c20r/toy/unrestricted
category = list("hacked", "Rifles")
/datum/design/foam_l6
name = "Donksoft LMG"
id = "foam_LMG"
build_type = AUTOYLATHE
materials = list(MAT_PLASTIC = 4000, MAT_METAL = 500)
build_path = /obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted
category = list("hacked", "Rifles")