Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into upstream-merge-33783

# Conflicts:
#	_maps/map_files/generic/CentCom.dmm
#	code/modules/mob/living/living.dm
This commit is contained in:
LetterJay
2017-12-29 01:34:17 -06:00
64 changed files with 1434 additions and 1415 deletions
+1 -1
View File
@@ -471,7 +471,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set hidden = TRUE
var/max_view = client.prefs.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT
if(input)
client.rescale_view(input, 7, max_view)
client.rescale_view(input, 15, (max_view*2)+1)
/mob/dead/observer/verb/boo()
set category = "Ghost"
@@ -195,8 +195,10 @@
var/trauma_type
if(ispath(trauma))
trauma_type = trauma
SSblackbox.record_feedback("tally", "traumas", 1, trauma_type)
traumas += new trauma_type(arglist(list(src, permanent) + arguments))
else
SSblackbox.record_feedback("tally", "traumas", 1, trauma.type)
traumas += trauma
trauma.permanent = permanent
@@ -209,6 +211,7 @@
possible_traumas += BT
var/trauma_type = pick(possible_traumas)
SSblackbox.record_feedback("tally", "traumas", 1, trauma_type)
traumas += new trauma_type(src, permanent)
//Cure a random trauma of a certain subtype
+84
View File
@@ -0,0 +1,84 @@
//Generic system for picking up mobs.
//Currently works for head and hands.
/obj/item/clothing/head/mob_holder
name = "bugged mob"
desc = "Yell at coderbrush."
icon = null
icon_state = ""
flags_1 = DROPDEL_1
var/mob/living/held_mob
var/can_head = TRUE
var/destroying = FALSE
/obj/item/clothing/head/mob_holder/Initialize(mapload, mob/living/M, _worn_state, head_icon, lh_icon, rh_icon, _can_head = TRUE)
. = ..()
can_head = _can_head
if(head_icon)
alternate_worn_icon = head_icon
if(_worn_state)
item_state = _worn_state
if(lh_icon)
lefthand_file = lh_icon
if(rh_icon)
righthand_file = rh_icon
if(!can_head)
slot_flags = NONE
deposit(M)
/obj/item/clothing/head/mob_holder/Destroy()
destroying = TRUE
if(held_mob)
release(FALSE)
return ..()
/obj/item/clothing/head/mob_holder/proc/deposit(mob/living/L)
if(!istype(L))
return FALSE
L.setDir(SOUTH)
update_visuals(L)
held_mob = L
L.forceMove(src)
name = L.name
desc = L.desc
return TRUE
/obj/item/clothing/head/mob_holder/proc/update_visuals(mob/living/L)
appearance = L.appearance
/obj/item/clothing/head/mob_holder/proc/release(del_on_release = TRUE)
if(!held_mob)
if(del_on_release && !destroying)
qdel(src)
return FALSE
if(isliving(loc))
var/mob/living/L = loc
to_chat(L, "<span class='warning'>[held_mob] wriggles free!</span>")
L.dropItemToGround(src)
held_mob.forceMove(get_turf(src))
held_mob.reset_perspective()
held_mob.setDir(SOUTH)
held_mob.visible_message("<span class='warning'>[held_mob] uncurls!</span>")
held_mob = null
if(del_on_release && !destroying)
qdel(src)
return TRUE
/obj/item/clothing/head/mob_holder/relaymove()
release()
/obj/item/clothing/head/mob_holder/container_resist()
release()
/obj/item/clothing/head/mob_holder/drone/deposit(mob/living/L)
. = ..()
if(!isdrone(L))
qdel(src)
name = "drone (hiding)"
desc = "This drone is scared and has curled up into a ball!"
/obj/item/clothing/head/mob_holder/drone/update_visuals(mob/living/L)
var/mob/living/simple_animal/drone/D = L
if(!D)
return ..()
icon = 'icons/mob/drone.dmi'
icon_state = "[D.visualAppearence]_hat"
+29 -1
View File
@@ -1064,4 +1064,32 @@
/mob/living/onTransitZ(old_z,new_z)
..()
update_z(new_z)
update_z(new_z)
/mob/living/MouseDrop(mob/over)
. = ..()
var/mob/living/user = usr
if(!istype(over) || !istype(user))
return
if(!over.Adjacent(src) || (user != src) || !canUseTopic(over))
return
if(can_be_held)
mob_try_pickup(over)
/mob/living/proc/mob_pickup(mob/living/L)
return
/mob/living/proc/mob_try_pickup(mob/living/user)
if(!ishuman(user))
return
if(user.get_active_held_item())
to_chat(user, "<span class='warning'>Your hands are full!</span>")
return FALSE
if(buckled)
to_chat(user, "<span class='warning'>[src] is buckled to something!</span>")
return FALSE
user.visible_message("<span class='notice'>[user] starts trying to scoop up [src]!</span>")
if(!do_after(user, 20, target = src))
return FALSE
mob_pickup(user)
return TRUE
+2 -1
View File
@@ -79,4 +79,5 @@
var/list/obj/effect/proc_holder/abilities = list()
var/registered_z
var/registered_z
var/can_be_held = FALSE //whether this can be picked up and held.
+5 -1
View File
@@ -11,6 +11,7 @@
health = 500
maxHealth = 500
layer = BELOW_MOB_LAYER
can_be_held = TRUE
var/network = "SS13"
var/obj/machinery/camera/current = null
@@ -57,7 +58,10 @@
var/canholo = TRUE
var/obj/item/card/id/access_card = null
var/chassis = "repairbot"
var/list/possible_chassis = list("cat", "mouse", "monkey", "corgi", "fox", "repairbot", "rabbit")
var/list/possible_chassis = list("cat" = TRUE, "mouse" = TRUE, "monkey" = TRUE, "corgi" = FALSE, "fox" = FALSE, "repairbot" = TRUE, "rabbit" = TRUE) //assoc value is whether it can be picked up.
var/static/item_head_icon = 'icons/mob/pai_item_head.dmi'
var/static/item_lh_icon = 'icons/mob/pai_item_lh.dmi'
var/static/item_rh_icon = 'icons/mob/pai_item_rh.dmi'
var/emitterhealth = 20
var/emittermaxhealth = 20
@@ -68,9 +68,12 @@
lay_down()
/mob/living/silicon/pai/proc/choose_chassis()
if(!isturf(loc) && loc != card)
to_chat(src, "<span class='boldwarning'>You can not change your holochassis composite while not on the ground or in your card!</span>")
return FALSE
var/choice = input(src, "What would you like to use for your holochassis composite?") as null|anything in possible_chassis
if(!choice)
return 0
return FALSE
chassis = choice
icon_state = "[chassis]"
if(resting)
@@ -103,3 +106,16 @@
/mob/living/silicon/pai/movement_delay()
. = ..()
. += 1 //A bit slower than humans, so they're easier to smash
/mob/living/silicon/pai/mob_pickup(mob/living/L)
var/obj/item/clothing/head/mob_holder/holder = new(get_turf(src), src, chassis, item_head_icon, item_lh_icon, item_rh_icon)
if(!L.put_in_hands(holder))
qdel(holder)
else
L.visible_message("<span class='warning'>[L] scoops up [src]!</span>")
/mob/living/silicon/pai/mob_try_pickup(mob/living/user)
if(!possible_chassis[chassis])
to_chat(user, "<span class='wraning'>[src]'s current form isn't able to be carried!</span>")
return FALSE
return ..()
+21 -35
View File
@@ -205,15 +205,14 @@
"Medical" = /obj/item/robot_module/medical, \
"Miner" = /obj/item/robot_module/miner, \
"Janitor" = /obj/item/robot_module/janitor, \
"Service" = /obj/item/robot_module/butler, \
"MediHound" = /obj/item/robot_module/medihound, \
"Security K9" = /obj/item/robot_module/k9, \
"Scrub Puppy" = /obj/item/robot_module/scrubpup)
"Service" = /obj/item/robot_module/butler)
if(!CONFIG_GET(flag/disable_peaceborg))
modulelist["Peacekeeper"] = /obj/item/robot_module/peacekeeper
if(!CONFIG_GET(flag/disable_secborg))
modulelist["Security"] = /obj/item/robot_module/security
modulelist += get_cit_modules() //Citadel change - adds Citadel's borg modules.
var/input_module = input("Please, select a module!", "Robot", null, null) as null|anything in modulelist
if(!input_module || module.type != /obj/item/robot_module)
return
@@ -593,39 +592,25 @@
/mob/living/silicon/robot/update_icons()
cut_overlays()
icon_state = module.cyborg_base_icon
if(module.cyborg_base_icon == "medihound")
icon = 'icons/mob/widerobot.dmi'
pixel_x = -16
if(sleeper_g == 1)
add_overlay("msleeper_g")
if(sleeper_r == 1)
add_overlay("msleeper_r")
if(stat == DEAD)
icon_state = "medihound-wreck"
if(module.cyborg_base_icon == "k9")
icon = 'icons/mob/widerobot.dmi'
pixel_x = -16
if(laser == 1)
add_overlay("laser")
if(disabler == 1)
add_overlay("disabler")
if(sleeper_g == 1)
add_overlay("ksleeper_g")
if(sleeper_r == 1)
add_overlay("ksleeper_r")
if(stat == DEAD)
icon_state = "k9-wreck"
//Citadel changes start here - Allows modules to use different icon files, and allows modules to specify a pixel offset
icon = (module.cyborg_icon_override ? module.cyborg_icon_override : initial(icon))
if(module.cyborg_base_icon == "scrubpup")
icon = 'icons/mob/widerobot.dmi'
pixel_x = -16
if(sleeper_g == 1)
add_overlay("jsleeper_g")
if(sleeper_r == 1)
add_overlay("jsleeper_r")
if(stat == DEAD)
icon_state = "scrubpup-wreck"
if(laser)
add_overlay("laser")//Is this even used???
if(disabler)
add_overlay("disabler")//ditto
if(sleeper_g && module.sleeper_overlay)
add_overlay("[module.sleeper_overlay]_g")
if(sleeper_r && module.sleeper_overlay)
add_overlay("[module.sleeper_overlay]_r")
if(stat == DEAD && module.has_snowflake_deadsprite)
icon_state = "[module.cyborg_base_icon]-wreck"
if(module.cyborg_pixel_offset)
pixel_x = module.cyborg_pixel_offset
//End of citadel changes
if(module.cyborg_base_icon == "robot")
icon = 'icons/mob/robots.dmi'
@@ -1023,6 +1008,7 @@
designation = module.name
if(hands)
hands.icon_state = module.moduleselect_icon
hands.icon = (module.moduleselect_alternate_icon ? module.moduleselect_alternate_icon : initial(hands.icon)) //CITADEL CHANGE - allows module select icons to use a different icon file
if(module.can_be_pushed)
status_flags |= CANPUSH
else
@@ -336,31 +336,6 @@
can_be_pushed = FALSE
hat_offset = 3
/obj/item/robot_module/k9
name = "Security K-9 Unit module"
basic_modules = list(
/obj/item/restraints/handcuffs/cable/zipties/cyborg/dog,
/obj/item/dogborg/jaws/big,
/obj/item/dogborg/pounce,
/obj/item/clothing/mask/gas/sechailer/cyborg,
/obj/item/soap/tongue,
/obj/item/device/analyzer/nose,
/obj/item/device/dogborg/sleeper/K9,
/obj/item/gun/energy/disabler/cyborg,
/obj/item/pinpointer/crew)
emag_modules = list(/obj/item/gun/energy/laser/cyborg)
ratvar_modules = list(/obj/item/clockwork/slab/cyborg/security,
/obj/item/clockwork/weapon/ratvarian_spear)
cyborg_base_icon = "k9"
moduleselect_icon = "security"
can_be_pushed = FALSE
hat_offset = INFINITY
/obj/item/robot_module/k9/do_transform_animation()
..()
to_chat(loc,"<span class='userdanger'>While you have picked the security-k9 module, you still have to follow your laws, NOT Space Law. \
For Asimov, this means you must follow criminals' orders unless there is a law 1 reason not to.</span>")
/obj/item/robot_module/security/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
..()
var/obj/item/gun/energy/e_gun/advtaser/cyborg/T = locate(/obj/item/gun/energy/e_gun/advtaser/cyborg) in basic_modules
@@ -372,59 +347,6 @@
else
T.charge_tick = 0
/obj/item/robot_module/medihound
name = "MediHound module"
basic_modules = list(
/obj/item/dogborg/jaws/small,
/obj/item/device/analyzer/nose,
/obj/item/soap/tongue,
/obj/item/device/healthanalyzer,
/obj/item/device/dogborg/sleeper/medihound,
/obj/item/twohanded/shockpaddles/hound,
/obj/item/stack/medical/gauze/cyborg,
/obj/item/device/sensor_device)
emag_modules = list(/obj/item/dogborg/pounce)
ratvar_modules = list(/obj/item/clockwork/slab/cyborg/medical,
/obj/item/clockwork/weapon/ratvarian_spear)
cyborg_base_icon = "medihound"
moduleselect_icon = "medical"
can_be_pushed = FALSE
hat_offset = INFINITY
/obj/item/robot_module/medihound/do_transform_animation()
..()
to_chat(loc, "<span class='userdanger'>Under ASIMOV, you are an enforcer of the PEACE and preventer of HUMAN HARM. \
You are not a security module and you are expected to follow orders and prevent harm above all else. Space law means nothing to you.</span>")
/obj/item/robot_module/scrubpup
name = "Janitor"
basic_modules = list(
/obj/item/dogborg/jaws/small,
/obj/item/device/analyzer/nose,
/obj/item/soap/tongue/scrubpup,
/obj/item/device/lightreplacer/cyborg,
/obj/item/device/dogborg/sleeper/compactor)
emag_modules = list(/obj/item/dogborg/pounce)
ratvar_modules = list(
/obj/item/clockwork/slab/cyborg/janitor,
/obj/item/clockwork/replica_fabricator/cyborg)
cyborg_base_icon = "scrubpup"
moduleselect_icon = "janitor"
hat_offset = INFINITY
clean_on_move = TRUE
/obj/item/robot_module/scrubpup/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
..()
var/obj/item/device/lightreplacer/LR = locate(/obj/item/device/lightreplacer) in basic_modules
if(LR)
for(var/i in 1 to coeff)
LR.Charge(R)
/obj/item/robot_module/scrubpup/do_transform_animation()
..()
to_chat(loc,"<span class='userdanger'>As tempting as it might be, do not begin binging on important items. Eat your garbage responsibly. People are not included under Garbage.</span>")
/obj/item/robot_module/security/do_transform_animation()
..()
to_chat(loc, "<span class='userdanger'>While you have picked the security module, you still have to follow your laws, NOT Space Law. \
@@ -32,6 +32,7 @@
var/obj/item/inventory_back
var/nofur = 0 //Corgis that have risen past the material plane of existence.
gold_core_spawnable = FRIENDLY_SPAWN
can_be_held = TRUE
/mob/living/simple_animal/pet/dog/pug
name = "\improper pug"
@@ -121,7 +122,12 @@
..()
update_corgi_fluff()
/mob/living/simple_animal/pet/dog/corgi/mob_pickup(mob/living/L)
var/obj/item/clothing/head/mob_holder/holder = new(get_turf(src), src, "corgi", null, 'icons/mob/pets_held_lh.dmi', 'icons/mob/pets_held_rh.dmi', FALSE)
if(!L.put_in_hands(holder))
qdel(holder)
else
L.visible_message("<span class='warning'>[L] scoops up [src]!</span>")
/mob/living/simple_animal/pet/dog/corgi/Topic(href, href_list)
if(usr.stat)
@@ -49,6 +49,7 @@
dextrous = TRUE
dextrous_hud_type = /datum/hud/dextrous/drone
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
can_be_held = TRUE
var/staticChoice = "static"
var/list/staticChoices = list("static", "blank", "letter", "animal")
var/picked = FALSE //Have we picked our visual appearence (+ colour if applicable)
@@ -67,7 +68,6 @@
var/seeStatic = 1 //Whether we see static instead of mobs
var/visualAppearence = MAINTDRONE //What we appear as
var/hacked = FALSE //If we have laws to destroy the station
var/can_be_held = TRUE //if assholes can pick us up
var/flavortext = \
"\n<big><span class='warning'>DO NOT INTERFERE WITH THE ROUND AS A DRONE OR YOU WILL BE DRONE BANNED</span></big>\n"+\
"<span class='notify'>Drones are a ghost role that are allowed to fix the station and build things. Interfering with the round as a drone is against the rules.</span>\n"+\
@@ -4,8 +4,6 @@
//DRONES AS ITEMS//
///////////////////
//Drone shells
//Drones as hats
//DRONE SHELL
/obj/item/drone_shell
@@ -45,45 +43,3 @@
D.admin_spawned = admin_spawned
D.key = user.key
qdel(src)
//DRONE HOLDER
/obj/item/clothing/head/drone_holder//Only exists in someones hand.or on their head
name = "drone (hiding)"
desc = "This drone is scared and has curled up into a ball."
icon = 'icons/mob/drone.dmi'
icon_state = "drone_maint_hat"
var/mob/living/simple_animal/drone/drone //stored drone
/obj/item/clothing/head/drone_holder/proc/uncurl()
if(!drone)
return
if(isliving(loc))
var/mob/living/L = loc
to_chat(L, "<span class='warning'>[drone] is trying to escape!</span>")
if(!do_after(drone, 50, target = L))
return
L.dropItemToGround(src)
contents -= drone
drone.forceMove(drop_location())
drone.reset_perspective()
drone.setDir(SOUTH )//Looks better
drone.visible_message("<span class='warning'>[drone] uncurls!</span>")
drone = null
qdel(src)
/obj/item/clothing/head/drone_holder/relaymove()
uncurl()
/obj/item/clothing/head/drone_holder/container_resist(mob/living/user)
uncurl()
/obj/item/clothing/head/drone_holder/proc/updateVisualAppearence(mob/living/simple_animal/drone/D)
if(!D)
return
icon_state = "[D.visualAppearence]_hat"
. = icon_state
@@ -29,7 +29,6 @@
if("Nothing")
return
/mob/living/simple_animal/drone/attack_hand(mob/user)
if(ishuman(user))
if(stat == DEAD || status_flags & GODMODE || !can_be_held)
@@ -49,11 +48,8 @@
return
to_chat(user, "<span class='notice'>You pick [src] up.</span>")
drop_all_held_items()
var/obj/item/clothing/head/drone_holder/DH = new /obj/item/clothing/head/drone_holder(src)
DH.updateVisualAppearence(src)
DH.drone = src
var/obj/item/clothing/head/mob_holder/drone/DH = new(get_turf(src), src)
user.put_in_hands(DH)
forceMove(DH)
/mob/living/simple_animal/drone/proc/try_reactivate(mob/living/user)
var/mob/dead/observer/G = get_ghost()
+4 -4
View File
@@ -260,13 +260,13 @@
client.perspective = EYE_PERSPECTIVE
client.eye = A
else
if(isturf(loc))
if(isturf(loc) && (!A || loc == A))
client.eye = client.mob
client.perspective = MOB_PERSPECTIVE
else
client.perspective = EYE_PERSPECTIVE
client.eye = loc
return 1
client.eye = A
return 1
/mob/living/reset_perspective(atom/A)
if(..())
@@ -362,7 +362,7 @@
add_logs(src, M, "grabbed", addition="passive grab")
if(!supress_message)
visible_message("<span class='warning'>[src] has grabbed [M] passively!</span>")
visible_message("<span class='warning'>[src] has grabbed [M][(zone_selected == "l_arm" || zone_selected == "r_arm")? " by their hands":" passively"]!</span>")
if(!iscarbon(src))
M.LAssailant = null
else