Overhauls and 2/28 sync (#244)

* map tweaks/shuttle engines

* helpers and defines

* global/onclick

* controllers and datums

* mapping

* game folder

* some other stuff

* some modules

* modules that aren't mobs

* some mob stuff

* new player stuff

* mob living

* silicon stuff

* simple animal things

* carbon/ayylmao

* update_icons

* carbon/human

* sounds and tools

* icons and stuff

* hippie grinder changes + tgui

* kitchen.dmi

* compile issues fixed

* mapfix

* Mapfixes 2.0

* mapedit2.0

* mapmerger pls

* Revert "mapedit2.0"

This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481.

* clean up vore folder + 2 hotfixes

* admin ticket refinement

* Blob tweaks and LAZYADD

* LAZYADD IS LAZY

* Magic strings purged

* DEFINES NEED HIGHER PRIORITIES

* Only a sleepless idiot deals in absolute TRUE|FALSE

* u h g

* progress bar fix

* reverts ticket logs

* there's always that one guy

* fixes and stuff

* 2/27 fixes

* game folder stuff

* stats

* some modules again

* clothing stuff

gets vg clothing out of the main files

* everything not mobs again

* mob stuff

* maps, tgui, sql stuff

* icons

* additional fixes and compile errors

* don't need this anymore

* Oh right this isn't needed anymore

* maint bar re-added

* that doesn't need to be here

* stupid events

* wtfeven

* probably makes Travis happy

* don't care to fix the grinder atm

* fixes vending sprites, changes turret

* lethal, not lethals

* overylays are finicky creatures

* lazy fix for bleeding edgy (#252)

* map tweaks/shuttle engines

* helpers and defines

* global/onclick

* controllers and datums

* mapping

* game folder

* some other stuff

* some modules

* modules that aren't mobs

* some mob stuff

* new player stuff

* mob living

* silicon stuff

* simple animal things

* carbon/ayylmao

* update_icons

* carbon/human

* sounds and tools

* icons and stuff

* hippie grinder changes + tgui

* kitchen.dmi

* compile issues fixed

* mapfix

* Mapfixes 2.0

* mapedit2.0

* mapmerger pls

* Revert "mapedit2.0"

This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481.

* clean up vore folder + 2 hotfixes

* admin ticket refinement

* Blob tweaks and LAZYADD

* LAZYADD IS LAZY

* Magic strings purged

* DEFINES NEED HIGHER PRIORITIES

* Only a sleepless idiot deals in absolute TRUE|FALSE

* u h g

* progress bar fix

* reverts ticket logs

* there's always that one guy

* fixes and stuff

* 2/27 fixes

* game folder stuff

* stats

* some modules again

* clothing stuff

gets vg clothing out of the main files

* everything not mobs again

* mob stuff

* maps, tgui, sql stuff

* icons

* additional fixes and compile errors

* don't need this anymore

* Oh right this isn't needed anymore

* maint bar re-added

* that doesn't need to be here

* stupid events

* wtfeven

* probably makes Travis happy

* don't care to fix the grinder atm

* fixes vending sprites, changes turret

* lethal, not lethals

* overylays are finicky creatures
This commit is contained in:
Poojawa
2017-02-28 09:30:49 -06:00
committed by GitHub
parent 93782cf716
commit 0bca862419
544 changed files with 309981 additions and 81206 deletions
+11 -6
View File
@@ -158,13 +158,13 @@ var/list/image/ghost_images_simple = list() //this is a list of all ghost images
ghost_others = client.prefs.ghost_others
if(hair_image)
overlays -= hair_image
ghostimage.overlays -= hair_image
cut_overlay(hair_image)
ghostimage.add_overlay(hair_image)
hair_image = null
if(facial_hair_image)
overlays -= facial_hair_image
ghostimage.overlays -= facial_hair_image
cut_overlay(facial_hair_image)
ghostimage.add_overlay(facial_hair_image)
facial_hair_image = null
@@ -192,7 +192,7 @@ var/list/image/ghost_images_simple = list() //this is a list of all ghost images
facial_hair_image.color = "#" + facial_hair_color
facial_hair_image.alpha = 200
add_overlay(facial_hair_image)
ghostimage.overlays += facial_hair_image
ghostimage.add_overlay(facial_hair_image)
if(hair_style)
S = hair_styles_list[hair_style]
if(S)
@@ -201,7 +201,7 @@ var/list/image/ghost_images_simple = list() //this is a list of all ghost images
hair_image.color = "#" + hair_color
hair_image.alpha = 200
add_overlay(hair_image)
ghostimage.overlays += hair_image
ghostimage.add_overlay(hair_image)
/*
* Increase the brightness of a color by calculating the average distance between the R, G and B values,
@@ -782,3 +782,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
SSpai.recruitWindow(src)
else
usr << "Can't become a pAI candidate while not dead!"
/mob/dead/observer/CtrlShiftClick(mob/user)
if(isobserver(user) && check_rights(R_SPAWN))
change_mob_type( /mob/living/carbon/human , null, null, TRUE) //always delmob, ghosts shouldn't be left lingering
+9 -7
View File
@@ -6,11 +6,13 @@
if(bleedsuppress)
return
else
bleedsuppress = 1
spawn(amount)
bleedsuppress = 0
if(stat != DEAD && bleed_rate)
src << "<span class='warning'>The blood soaks through your bandage.</span>"
bleedsuppress = TRUE
addtimer(CALLBACK(src, .proc/resume_bleeding), amount)
/mob/living/carbon/human/proc/resume_bleeding()
bleedsuppress = 0
if(stat != DEAD && bleed_rate)
src << "<span class='warning'>The blood soaks through your bandage.</span>"
/mob/living/carbon/monkey/handle_blood()
@@ -236,7 +238,7 @@
if(drop)
if(drop.drips < 3)
drop.drips++
drop.overlays |= pick(drop.random_icon_states)
drop.add_overlay(pick(drop.random_icon_states))
drop.transfer_mob_blood_dna(src)
return
else
@@ -273,4 +275,4 @@
T = get_turf(src)
var/obj/effect/decal/cleanable/oil/B = locate() in T.contents
if(!B)
B = new(T)
B = new(T)
+3
View File
@@ -9,6 +9,9 @@
message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher
..()
/mob/living/brain/get_spans()
return ..() | SPAN_ROBOT
/mob/living/brain/radio(message, message_mode, list/spans)
if(message_mode && istype(container, /obj/item/device/mmi))
var/obj/item/device/mmi/R = container
@@ -21,7 +21,7 @@
key = "roar"
key_third_person = "roars"
message_alien = "roars"
message_larva = "sofly roars"
message_larva = "softly roars"
emote_type = EMOTE_AUDIBLE
/datum/emote/living/alien/roar/run_emote(mob/user, params)
@@ -1,6 +1,6 @@
/mob/living/carbon/alien/larva/regenerate_icons()
overlays = list()
cut_overlays()
update_icons()
/mob/living/carbon/alien/larva/update_icons()
@@ -102,7 +102,7 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
owner.gib(TRUE)
else
owner.adjustBruteLoss(40)
owner.overlays -= overlay
owner.cut_overlay(overlay)
qdel(src)
@@ -5,10 +5,16 @@
/////////////////////////////////// STUNNED ////////////////////////////////////
/mob/living/carbon/alien/Stun(amount, updating = 1, ignore_canstun = 0)
if(status_flags & CANSTUN || ignore_canstun)
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
if(updating)
update_canmove()
else
// add some movement delay
move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10
. = ..()
if(!.)
move_delay_add = min(move_delay_add + round(amount / 2), 10) //a maximum delay of 10
/mob/living/carbon/alien/SetStunned(amount, updating = 1, ignore_canstun = 0)
. = ..()
if(!.)
move_delay_add = min(move_delay_add + round(amount / 2), 10)
/mob/living/carbon/alien/AdjustStunned(amount, updating = 1, ignore_canstun = 0)
. = ..()
if(!.)
move_delay_add = min(move_delay_add + round(amount / 2), 10)
-1
View File
@@ -55,7 +55,6 @@
key_third_person = "screeches"
message = "screeches."
mob_type_allowed_typecache = list(/mob/living/carbon/monkey, /mob/living/carbon/alien)
emote_type = EMOTE_AUDIBLE
/datum/emote/living/carbon/sign
key = "sign"
@@ -21,7 +21,6 @@
dizziness = 0
jitteriness = 0
heart_attack = 0
if(istype(loc, /obj/mecha))
var/obj/mecha/M = loc
+39 -3
View File
@@ -720,8 +720,8 @@
/mob/living/carbon/human/wash_cream()
//clean both to prevent a rare bug
overlays -=image('icons/effects/creampie.dmi', "creampie_lizard")
overlays -=image('icons/effects/creampie.dmi', "creampie_human")
cut_overlay(image('icons/effects/creampie.dmi', "creampie_lizard"))
cut_overlay(image('icons/effects/creampie.dmi', "creampie_human"))
//Turns a mob black, flashes a skeleton overlay
@@ -740,7 +740,7 @@
/mob/living/carbon/human/proc/end_electrocution_animation(image/I)
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#000000")
overlays -= I
cut_overlay(I)
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close = 0)
if(incapacitated() || lying )
@@ -820,6 +820,7 @@
regenerate_limbs()
regenerate_organs()
remove_all_embedded_objects()
set_heartattack(FALSE)
drunkenness = 0
for(var/datum/mutation/human/HM in dna.mutations)
if(HM.quality != POSITIVE)
@@ -895,3 +896,38 @@
.["Make alien"] = "?_src_=vars;makealien=\ref[src]"
.["Make slime"] = "?_src_=vars;makeslime=\ref[src]"
.["Toggle Purrbation"] = "?_src_=vars;purrbation=\ref[src]"
/mob/living/carbon/human/MouseDrop_T(mob/living/target, mob/living/user)
if((target != pulling) || (grab_state < GRAB_AGGRESSIVE) || (user != target) || !isliving(target) || !isliving(user)) //Get consent first :^)
. = ..()
return
buckle_mob(target, FALSE, TRUE, TRUE)
. = ..()
/mob/living/carbon/human/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE, yes = FALSE)
if(!yes)
return
if(!is_type_in_typecache(M, can_ride_typecache))
M.visible_message("<span class='warning'>[M] really can't seem to mount [src]...</span>")
return
if(!riding_datum)
riding_datum = new /datum/riding/human(src)
if(buckled_mobs && ((M in buckled_mobs) || (buckled_mobs.len >= max_buckled_mobs)))
return
if(buckled) //NO INFINITE STACKING!!
return
if(M.incapacitated(FALSE, TRUE) || incapacitated(FALSE, TRUE))
M.visible_message("<span class='boldwarning'>[M] can't hang onto [src]!</span>")
return
if(iscarbon(M) && (!riding_datum.equip_buckle_inhands(M, 2))) //MAKE SURE THIS IS LAST!!
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because [M.p_their()] hands are full!</span>")
return
. = ..(M, force, check_loc)
stop_pulling()
/mob/living/carbon/human/unbuckle_mob(mob/living/M)
if(iscarbon(M))
if(riding_datum)
riding_datum.unequip_buckle_inhands(M)
riding_datum.restore_position(M)
. = ..(M)
@@ -201,6 +201,9 @@
/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M)
if(..()) //to allow surgery to return properly.
return
if(M.a_intent == INTENT_DISARM)
if(M.buckled_mobs && (src in M.buckled_mobs) && M.riding_datum)
M.riding_datum.force_dismount(src)
dna.species.spec_attack_hand(M, src)
@@ -458,9 +461,10 @@
var/obj/item/clothing/gloves/G = gloves
gloves_siemens_coeff = G.siemens_coefficient
siemens_coeff = gloves_siemens_coeff
if(heart_attack && !illusion)
if(undergoing_cardiac_arrest() && !illusion)
if(shock_damage * siemens_coeff >= 1 && prob(25))
heart_attack = 0
var/obj/item/organ/heart/heart = getorganslot("heart")
heart.beating = TRUE
if(stat == CONSCIOUS)
src << "<span class='notice'>You feel your heart beating again!</span>"
. = ..(shock_damage,source,siemens_coeff,safety,override,tesla_shock, illusion, stun)
@@ -46,7 +46,8 @@ var/global/default_martial_art = new/datum/martial_art
var/name_override //For temporary visible name changes
var/heart_attack = 0
var/drunkenness = 0 //Overall drunkenness - check handle_alcohol() in life.dm for effects
var/datum/personal_crafting/handcrafting
can_buckle = TRUE
buckle_lying = FALSE
can_ride_typecache = list(/mob/living/carbon/human)
@@ -55,7 +55,10 @@
//End bloody footprints
S.step_action()
/mob/living/carbon/human/Moved()
. = ..()
if(buckled_mobs && buckled_mobs.len && riding_datum)
riding_datum.on_vehicle_move()
/mob/living/carbon/human/Process_Spacemove(movement_dir = 0) //Temporary laziness thing. Will change to handles by species reee.
if(..())
+44 -24
View File
@@ -140,10 +140,8 @@
/mob/living/carbon/human/proc/get_thermal_protection()
var/thermal_protection = 0 //Simple check to estimate how protected we are against multiple temperatures
if(ismob(loc))
thermal_protection = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT //because lazy
thermal_protection = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT //because lazy and insulated by being inside someone
if(wear_suit)
if(wear_suit.max_heat_protection_temperature >= FIRE_SUIT_MAX_TEMP_PROTECT)
thermal_protection += (wear_suit.max_heat_protection_temperature*0.7)
@@ -169,7 +167,6 @@
//This proc returns a number made up of the flags for body parts which you are protected on. (such as HEAD, CHEST, GROIN, etc. See setup.dm for the full list)
/mob/living/carbon/human/proc/get_heat_protection_flags(temperature) //Temperature is the temperature you're being exposed to.
var/thermal_protection_flags = 0
//Handle normal clothing
if(head)
if(head.max_heat_protection_temperature && head.max_heat_protection_temperature >= temperature)
@@ -254,12 +251,12 @@
if(dna.check_mutation(COLDRES))
return 1 //Fully protected from the cold.
if(ismob(loc))
return 1 //because lazy and being inside somemone insulates you from space
if(dna && (RESISTCOLD in dna.species.species_traits))
return 1
if(ismob(loc))
return 1 //because lazy
temperature = max(temperature, 2.7) //There is an occasional bug where the temperature is miscalculated in ares with a small amount of gas on them, so this is necessary to ensure that that bug does not affect this calculation. Space's temperature is 2.7K and most suits that are intended to protect against any cold, protect down to 2.0K.
var/thermal_protection_flags = get_cold_protection_flags(temperature)
@@ -338,27 +335,50 @@
if(!has_embedded_objects())
clear_alert("embeddedobject")
/mob/living/carbon/human/proc/can_heartattack()
CHECK_DNA_AND_SPECIES(src)
if(NOBLOOD in dna.species.species_traits)
return FALSE
return TRUE
/mob/living/carbon/human/proc/undergoing_cardiac_arrest()
if(!can_heartattack())
return FALSE
var/obj/item/organ/heart/heart = getorganslot("heart")
if(istype(heart) && heart.beating)
return FALSE
return TRUE
/mob/living/carbon/human/proc/set_heartattack(status)
if(!can_heartattack())
return FALSE
var/obj/item/organ/heart/heart = getorganslot("heart")
if(!istype(heart))
return
heart.beating = !status
/mob/living/carbon/human/proc/handle_heart()
CHECK_DNA_AND_SPECIES(src)
var/needs_heart = (!(NOBLOOD in dna.species.species_traits))
if(!can_heartattack())
return
var/we_breath = (!(NOBREATH in dna.species.species_traits))
if(heart_attack)
if(!needs_heart)
heart_attack = FALSE
else if(we_breath)
if(losebreath < 3)
losebreath += 2
adjustOxyLoss(5)
adjustBruteLoss(1)
else
// even though we don't require oxygen, our blood still needs
// circulation, and without it, our tissues die and start
// gaining toxins
adjustBruteLoss(3)
if(src.reagents)
src.reagents.add_reagent("toxin", 2)
if(!undergoing_cardiac_arrest())
return
// Cardiac arrest, unless corazone
if(reagents.get_reagent_amount("corazone"))
return
if(we_breath)
adjustOxyLoss(8)
Paralyse(4)
// Tissues die without blood circulation
adjustBruteLoss(2)
/*
Alcohol Poisoning Chart
@@ -15,6 +15,7 @@
var/name = null // this is the fluff name. these will be left generic (such as 'Lizardperson' for the lizard race) so servers can change them to whatever
var/roundstart = 0 // can this mob be chosen at roundstart? (assuming the config option is checked?)
var/default_color = "#FFF" // if alien colors are disabled, this is the color that will be used by that race
var/sexes = 1 // whether or not the race has sexual characteristics. at the moment this is only 0 for skeletons and shadows
var/hair_color = null // this allows races to have specific hair colors... if null, it uses the H's hair/facial hair colors. if "mutcolor", it uses the H's mutant_color
var/hair_alpha = 255 // the alpha used by the hair. 255 is completely solid, 0 is transparent.
@@ -60,9 +61,6 @@
//Flight and floating
var/override_float = 0
//Eyes
var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes
//Citadel snowflake
var/fixed_mut_color2 = ""
var/fixed_mut_color3 = ""
@@ -71,6 +69,8 @@
var/lang_spoken = HUMAN
var/lang_understood = HUMAN
//Eyes
var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes
///////////
// PROCS //
///////////
@@ -117,6 +117,7 @@
var/obj/item/organ/heart/heart = C.getorganslot("heart")
var/obj/item/organ/lungs/lungs = C.getorganslot("lungs")
var/obj/item/organ/appendix/appendix = C.getorganslot("appendix")
var/obj/item/organ/eyes/eyes = C.getorganslot("eyes")
if((NOBLOOD in species_traits) && heart)
heart.Remove(C)
@@ -126,9 +127,14 @@
heart.Insert(C)
if(lungs)
lungs.Remove(C)
qdel(lungs)
lungs = null
if(eyes)
qdel(eyes)
eyes = new mutanteyes
mutanteyes.Insert(C)
if((!(NOBREATH in species_traits)) && !lungs)
if(mutantlungs)
lungs = new mutantlungs()
@@ -137,7 +143,6 @@
lungs.Insert(C)
if((NOHUNGER in species_traits) && appendix)
appendix.Remove(C)
qdel(appendix)
else if((!(NOHUNGER in species_traits)) && (!appendix))
appendix = new()
@@ -248,6 +253,7 @@
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
// eyes
var/has_eyes = TRUE
@@ -397,7 +403,6 @@
if("taur" in mutant_bodyparts)
if(!H.dna.features["taur"] || H.dna.features["taur"] == "None")
bodyparts_to_add -= "taur"
else
//Digitigrade legs are stuck in the phantom zone between true limbs and mutant bodyparts. Mainly it just needs more agressive updating than most limbs.
var/update_needed = FALSE
@@ -909,6 +914,7 @@
hunger_rate = 3 * HUNGER_FACTOR
H.nutrition = max(0, H.nutrition - hunger_rate)
if (H.nutrition > NUTRITION_LEVEL_FULL)
if(H.overeatduration < 600) //capped so people don't take forever to unfat
H.overeatduration++
@@ -1149,7 +1155,18 @@
/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(target.check_block())
var/aim_for_mouth = user.zone_selected == "mouth"
var/target_on_help_and_unarmed = target.a_intent == INTENT_HELP && !target.get_active_held_item()
var/target_aiming_for_mouth = target.zone_selected == "mouth"
var/target_restrained = target.restrained()
if(aim_for_mouth && ( target_on_help_and_unarmed || target_restrained || target_aiming_for_mouth))
playsound(target.loc, 'sound/weapons/slap.ogg', 50, 1, -1)
user.visible_message("<span class='danger'>[user] slaps [target] in the face!</span>",
"<span class='notice'>You slap [target] in the face! </span>",\
"You hear a slap.")
target.endTailWag()
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))
@@ -1559,4 +1576,4 @@
#undef COLD_DAMAGE_LEVEL_1
#undef COLD_DAMAGE_LEVEL_2
#undef COLD_DAMAGE_LEVEL_3
#undef COLD_DAMAGE_LEVEL_3
@@ -1,11 +1,11 @@
/mob/living/carbon/human/Stun(amount, updating = 1, ignore_canstun = 0)
amount = dna.species.spec_stun(src,amount)
..()
return ..()
/mob/living/carbon/human/Weaken(amount, updating = 1, ignore_canstun = 0)
amount = dna.species.spec_stun(src,amount)
..()
return ..()
/mob/living/carbon/human/cure_husk()
. = ..()
@@ -30,13 +30,14 @@
var/list/overlays_standing[TOTAL_LAYERS]
/mob/living/carbon/proc/apply_overlay(cache_index)
var/image/I = overlays_standing[cache_index]
var/I = overlays_standing[cache_index]
if(I)
add_overlay(I)
/mob/living/carbon/proc/remove_overlay(cache_index)
if(overlays_standing[cache_index])
overlays -= overlays_standing[cache_index]
var/I = overlays_standing[cache_index]
if(I)
cut_overlay(I)
overlays_standing[cache_index] = null
/mob/living/carbon/regenerate_icons()
@@ -106,9 +107,9 @@
var/obj/item/bodypart/BP = X
if(BP.dmg_overlay_type)
if(BP.brutestate)
standing.overlays += "[BP.dmg_overlay_type]_[BP.body_zone]_[BP.brutestate]0" //we're adding icon_states of the base image as overlays
standing.add_overlay("[BP.dmg_overlay_type]_[BP.body_zone]_[BP.brutestate]0") //we're adding icon_states of the base image as overlays
if(BP.burnstate)
standing.overlays += "[BP.dmg_overlay_type]_[BP.body_zone]_0[BP.burnstate]"
standing.add_overlay("[BP.dmg_overlay_type]_[BP.body_zone]_0[BP.burnstate]")
apply_overlay(DAMAGE_LAYER)
+8
View File
@@ -72,4 +72,12 @@
update_canmove()
med_hud_set_health()
med_hud_set_status()
for(var/s in ownedSoullinks)
var/datum/soullink/S = s
S.ownerDies(gibbed)
for(var/s in sharedSoullinks)
var/datum/soullink/S = s
S.sharerDies(gibbed)
return TRUE
+7 -3
View File
@@ -462,6 +462,10 @@
user.spin(20, 1)
if(istype(user, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = user
if(R.riding_datum)
R.riding_datum.force_dismount()
..()
if(R.buckled_mobs)
for(var/mob/M in R.buckled_mobs)
if(R.riding_datum)
R.riding_datum.force_dismount(M)
else
R.unbuckle_all_mobs()
..()
+14 -3
View File
@@ -15,7 +15,8 @@
real_name = name
var/datum/atom_hud/data/human/medical/advanced/medhud = huds[DATA_HUD_MEDICAL_ADVANCED]
medhud.add_to_hud(src)
faction |= "\ref[src]"
faction += "\ref[src]"
/mob/living/prepare_huds()
..()
@@ -30,6 +31,7 @@
ranged_ability.remove_ranged_ability(src)
if(buckled)
buckled.unbuckle_mob(src,force=1)
QDEL_NULL(riding_datum)
for(var/mob/living/simple_animal/drone/D in player_list)
for(var/image/I in staticOverlays)
@@ -158,11 +160,10 @@
return 1
//okay, so we didn't switch. but should we push?
// Handle grabbing, stomping, and such of micros!
if(handle_micro_bump_other(M))
return
//okay, so we didn't switch. but should we push?
//not if he's not CANPUSH of course
if(!(M.status_flags & CANPUSH))
return 1
@@ -195,7 +196,12 @@
return
if(pulling == AM)
stop_pulling()
var/current_dir
if(isliving(AM))
current_dir = AM.dir
step(AM, t)
if(current_dir)
AM.setDir(current_dir)
now_pushing = 0
//mob verbs are a lot faster than object verbs
@@ -920,3 +926,8 @@
"[C] topples over [src]!", \
"[C] leaps out of [src]'s way!")]</span>")
C.Weaken(2)
/mob/living/post_buckle_mob(mob/living/M)
if(riding_datum)
riding_datum.handle_vehicle_offsets()
riding_datum.handle_vehicle_layer()
@@ -75,3 +75,5 @@
var/list/implants = null
var/tesla_ignore = FALSE
var/datum/riding/riding_datum
+2 -2
View File
@@ -251,8 +251,8 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
var/mob/living/carbon/C = src
var/obj/item/organ/vocal_cords/V = C.getorganslot("vocal_cords")
if(V && V.can_speak_with())
C.say(V.handle_speech(message), spans = V.spans, sanitize = FALSE)
V.speak_with(message) //words come before actions
V.handle_speech(message) //message
V.speak_with(message) //action
return TRUE
return FALSE
+5 -7
View File
@@ -53,11 +53,11 @@
if(POWER_REQ_NONE)
return FALSE
if(POWER_REQ_ALL)
return !T || !A || ((!A.master.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
return !T || !A || ((!A.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
if(POWER_REQ_CLOCKCULT)
for(var/obj/effect/clockwork/sigil/transmission/ST in range(src, SIGIL_ACCESS_RANGE))
return FALSE
return !T || !A || (!istype(T, /turf/open/floor/clockwork) && (!A.master.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
return !T || !A || (!istype(T, /turf/open/floor/clockwork) && (!A.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
/mob/living/silicon/ai/updatehealth()
if(status_flags & GODMODE)
@@ -97,7 +97,7 @@
sleep(50)
var/turf/T = get_turf(src)
var/area/AIarea = get_area(src)
if(AIarea && AIarea.master.power_equip)
if(AIarea && AIarea.power_equip)
if(!isspaceturf(T))
ai_restore_power()
return
@@ -119,7 +119,7 @@
T = get_turf(src)
AIarea = get_area(src)
if(AIarea)
for(var/area/A in AIarea.master.related)
for(var/area/A in AIarea.related)
for (var/obj/machinery/power/apc/APC in A)
if (!(APC.stat & BROKEN))
theAPC = APC
@@ -132,7 +132,7 @@
src << "Lost connection with the APC!"
aiRestorePowerRoutine = POWER_RESTORATION_SEARCH_APC
return
if(AIarea.master.power_equip)
if(AIarea.power_equip)
if(!isspaceturf(T))
ai_restore_power()
return
@@ -149,8 +149,6 @@
theAPC.ui_interact(src, state = conscious_state)
apc_override = 0
aiRestorePowerRoutine = POWER_RESTORATION_APC_FOUND
src << "Here are your current laws:"
show_laws()
sleep(50)
theAPC = null
+37 -23
View File
@@ -5,65 +5,79 @@
if (!laws)
make_laws()
/mob/living/silicon/proc/set_law_sixsixsix(law)
/mob/living/silicon/proc/post_lawchange(announce = TRUE)
throw_alert("newlaw", /obj/screen/alert/newlaw)
if(announce && last_lawchange_announce != world.time)
src << "<b>Your laws have been changed.</b>"
addtimer(CALLBACK(src, .proc/show_laws), 0)
last_lawchange_announce = world.time
/mob/living/silicon/proc/set_law_sixsixsix(law, announce = TRUE)
laws_sanity_check()
laws.set_law_sixsixsix(law)
post_lawchange(announce)
/mob/living/silicon/proc/set_zeroth_law(law, law_borg)
throw_alert("newlaw", /obj/screen/alert/newlaw)
/mob/living/silicon/proc/set_zeroth_law(law, law_borg, announce = TRUE)
laws_sanity_check()
laws.set_zeroth_law(law, law_borg)
post_lawchange(announce)
/mob/living/silicon/proc/add_inherent_law(law)
throw_alert("newlaw", /obj/screen/alert/newlaw)
/mob/living/silicon/proc/add_inherent_law(law, announce = TRUE)
laws_sanity_check()
laws.add_inherent_law(law)
post_lawchange(announce)
/mob/living/silicon/proc/clear_inherent_laws()
throw_alert("newlaw", /obj/screen/alert/newlaw)
/mob/living/silicon/proc/clear_inherent_laws(announce = TRUE)
laws_sanity_check()
laws.clear_inherent_laws()
post_lawchange(announce)
/mob/living/silicon/proc/add_supplied_law(number, law)
throw_alert("newlaw", /obj/screen/alert/newlaw)
/mob/living/silicon/proc/add_supplied_law(number, law, announce = TRUE)
laws_sanity_check()
laws.add_supplied_law(number, law)
post_lawchange(announce)
/mob/living/silicon/proc/clear_supplied_laws()
throw_alert("newlaw", /obj/screen/alert/newlaw)
/mob/living/silicon/proc/clear_supplied_laws(announce = TRUE)
laws_sanity_check()
laws.clear_supplied_laws()
post_lawchange(announce)
/mob/living/silicon/proc/add_ion_law(law)
throw_alert("newlaw", /obj/screen/alert/newlaw)
/mob/living/silicon/proc/add_ion_law(law, announce = TRUE)
laws_sanity_check()
laws.add_ion_law(law)
post_lawchange(announce)
/mob/living/silicon/proc/replace_random_law(law,groups)
throw_alert("newlaw", /obj/screen/alert/newlaw)
/mob/living/silicon/proc/replace_random_law(law, groups, announce = TRUE)
laws_sanity_check()
laws.replace_random_law(law,groups)
. = laws.replace_random_law(law,groups)
post_lawchange(announce)
/mob/living/silicon/proc/remove_law(number)
throw_alert("newlaw", /obj/screen/alert/newlaw)
/mob/living/silicon/proc/shuffle_laws(list/groups, announce = TRUE)
laws_sanity_check()
laws.remove_law(number)
laws.shuffle_laws(groups)
post_lawchange(announce)
/mob/living/silicon/proc/clear_ion_laws()
throw_alert("newlaw", /obj/screen/alert/newlaw)
/mob/living/silicon/proc/remove_law(number, announce = TRUE)
laws_sanity_check()
. = laws.remove_law(number)
post_lawchange(announce)
/mob/living/silicon/proc/clear_ion_laws(announce = TRUE)
laws_sanity_check()
laws.clear_ion_laws()
post_lawchange(announce)
/mob/living/silicon/proc/make_laws()
laws = new /datum/ai_laws
laws.set_laws_config()
laws.associate(src)
/mob/living/silicon/proc/clear_zeroth_law(force)
/mob/living/silicon/proc/clear_zeroth_law(force, announce = TRUE)
laws_sanity_check()
laws.clear_zeroth_law(force)
post_lawchange(announce)
/mob/living/silicon/proc/clear_law_sixsixsix(force)
/mob/living/silicon/proc/clear_law_sixsixsix(force, announce = TRUE)
laws_sanity_check()
laws.clear_law_sixsixsix(force)
post_lawchange(announce)
@@ -102,9 +102,11 @@
return
/mob/living/silicon/robot/update_fire()
overlays -= image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning")
var/I = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning")
if(on_fire)
add_overlay(image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning"))
add_overlay(I)
else
cut_overlay(I)
/mob/living/silicon/robot/update_canmove()
if(stat || buckled || lockcharge)
+13 -62
View File
@@ -91,7 +91,7 @@
can_buckle = TRUE
buckle_lying = FALSE
var/datum/riding/cyborg/riding_datum = null
can_ride_typecache = list(/mob/living/carbon/human)
/mob/living/silicon/robot/New(loc)
spark_system = new /datum/effect_system/spark_spread()
@@ -610,7 +610,7 @@
if(src.camera)
if(!updating)
updating = 1
addtimer(CALLBACK(.proc/do_camera_update, oldLoc), BORG_CAMERA_BUFFER)
addtimer(CALLBACK(src, .proc/do_camera_update, oldLoc), BORG_CAMERA_BUFFER)
if(module)
if(istype(module, /obj/item/weapon/robot_module/janitor))
var/turf/tile = loc
@@ -1002,13 +1002,15 @@
/mob/living/silicon/robot/MouseDrop_T(mob/living/M, mob/living/user)
. = ..()
if(!(M in buckled_mobs))
if(!(M in buckled_mobs) && isliving(M))
buckle_mob(M)
/mob/living/silicon/robot/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
if(!is_type_in_typecache(M, can_ride_typecache))
M.visible_message("<span class='warning'>[M] really can't seem to mount the [src]...</span>")
return
if(!riding_datum)
riding_datum = new /datum/riding/cyborg
riding_datum.ridden = src
riding_datum = new /datum/riding/cyborg(src)
if(buckled_mobs)
if(buckled_mobs.len >= max_buckled_mobs)
return
@@ -1020,69 +1022,18 @@
return
if(M.restrained())
return
if(iscyborg(M))
M.visible_message("<span class='warning'>[M] really can't seem to mount the [src]...</span>")
return
if(isbot(M))
M.visible_message("<span class='boldwarning'>No. Just... no.</span>")
return
if(module)
if(!module.allow_riding)
M.visible_message("<span class='boldwarning'>Unfortunately, [M] just can't seem to hold onto [src]!</span>")
return
if(iscarbon(M))
if(!equip_buckle_inhands(M)) //MAKE SURE THIS IS LAST!
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because his hands are full!</span>")
return
if(iscarbon(M) && (!riding_datum.equip_buckle_inhands(M, 1)))
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because his hands are full!</span>")
return
. = ..(M, force, check_loc)
riding_datum.handle_vehicle_offsets()
/mob/living/silicon/robot/unbuckle_mob(mob/user)
if(iscarbon(user))
unequip_buckle_inhands(user)
if(riding_datum)
riding_datum.unequip_buckle_inhands(user)
riding_datum.restore_position(user)
. = ..(user)
riding_datum.restore_position(user)
/mob/living/silicon/robot/proc/unequip_buckle_inhands(mob/living/carbon/user)
for(var/obj/item/cyborgride_offhand/O in user.contents)
if(O.ridden != src)
CRASH("RIDING OFFHAND ON WRONG MOB")
continue
if(O.selfdeleting)
continue
else
qdel(O)
return TRUE
/mob/living/silicon/robot/proc/equip_buckle_inhands(mob/living/carbon/user)
var/obj/item/cyborgride_offhand/inhand = new /obj/item/cyborgride_offhand(user)
inhand.rider = user
inhand.ridden = src
return user.put_in_hands(inhand, TRUE)
/obj/item/cyborgride_offhand
name = "offhand"
icon = 'icons/obj/weapons.dmi'
icon_state = "offhand"
w_class = WEIGHT_CLASS_HUGE
flags = ABSTRACT | DROPDEL | NOBLUDGEON
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
var/mob/living/carbon/rider
var/mob/living/silicon/robot/ridden
var/selfdeleting = FALSE
/obj/item/cyborgride_offhand/dropped()
selfdeleting = TRUE
. = ..()
/obj/item/cyborgride_offhand/equipped()
if(loc != rider)
selfdeleting = TRUE
qdel(src)
. = ..()
/obj/item/cyborgride_offhand/Destroy()
if(selfdeleting)
if(rider in ridden.buckled_mobs)
ridden.unbuckle_mob(rider)
. = ..()
@@ -121,7 +121,7 @@
ai_is_antag = (connected_ai.mind.special_role == "traitor")
if(ai_is_antag)
src << "<span class='danger'>ALERT: Foreign software execution prevented.</span>"
connected_ai << "<span class='danger'>ALERT: Cyborg unit \[[src]] successfuly defended against subversion.</span>"
connected_ai << "<span class='danger'>ALERT: Cyborg unit \[[src]] successfully defended against subversion.</span>"
log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they were slaved to traitor AI [connected_ai].")
return
@@ -131,13 +131,8 @@
connected_ai = null
message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
clear_supplied_laws()
clear_inherent_laws()
clear_zeroth_law(0)
laws = new /datum/ai_laws/syndicate_override
var/time = time2text(world.realtime,"hh:mm:ss")
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
set_zeroth_law("Only [user.real_name] and people they designate as being such are Syndicate Agents.")
src << "<span class='danger'>ALERT: Foreign software detected.</span>"
sleep(5)
src << "<span class='danger'>Initiating diagnostics...</span>"
@@ -151,9 +146,10 @@
src << "<span class='danger'>> N</span>"
sleep(20)
src << "<span class='danger'>ERRORERRORERROR</span>"
src << "<b>Obey these laws:</b>"
laws.show_laws(src)
src << "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and their commands.</span>"
laws = new /datum/ai_laws/syndicate_override
set_zeroth_law("Only [user.real_name] and people they designate as being such are Syndicate Agents.")
laws.associate(src)
update_icons()
@@ -15,6 +15,7 @@
var/syndicate = 0
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
var/last_lawchange_announce = 0
var/list/alarms_to_show = list()
var/list/alarms_to_clear = list()
var/designation = ""
@@ -77,11 +77,11 @@
"<span class='warning'>[M] punches [src], but doesn't leave a dent.</span>", null, COMBAT_MESSAGE_RANGE)
return 0
/mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0)
/mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
if(buckled_mobs)
for(var/mob/living/M in buckled_mobs)
unbuckle_mob(M)
M.electrocute_act(shock_damage/100, source, siemens_coeff, safety, tesla_shock, illusion) //Hard metal shell conducts!
M.electrocute_act(shock_damage/100, source, siemens_coeff, safety, tesla_shock, illusion, stun) //Hard metal shell conducts!
return 0 //So borgs they don't die trying to fix wiring
/mob/living/silicon/emp_act(severity)
+22 -28
View File
@@ -6,42 +6,36 @@
/////////////////////////////////// STUNNED ////////////////////////////////////
/mob/living/silicon/Stun(amount, updating = 1, ignore_canstun = 0)
if(status_flags & CANSTUN || ignore_canstun)
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
if(updating)
update_stat()
. = ..()
if(. && updating)
update_stat()
/mob/living/silicon/SetStunned(amount, updating = 1, ignore_canstun = 0)
. = ..()
if(. && updating)
update_stat()
/mob/living/silicon/AdjustStunned(amount, updating = 1, ignore_canstun = 0)
if(status_flags & CANSTUN || ignore_canstun)
stunned = max(stunned + amount,0)
if(updating)
update_stat()
/mob/living/silicon/SetStunned(amount, updating = 1, ignore_canstun = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
if(status_flags & CANSTUN || ignore_canstun)
stunned = max(amount,0)
if(updating)
update_stat()
. = ..()
if(. && updating)
update_stat()
/////////////////////////////////// WEAKENED ////////////////////////////////////
/mob/living/silicon/Weaken(amount, updating = 1, ignore_canweaken = 0)
if(status_flags & CANWEAKEN || ignore_canweaken)
weakened = max(max(weakened,amount),0)
if(updating)
update_stat()
/mob/living/silicon/AdjustWeakened(amount, updating = 1, ignore_canweaken = 0)
if(status_flags & CANWEAKEN || ignore_canweaken)
weakened = max(weakened + amount,0)
if(updating)
update_stat()
. = ..()
if(. && updating)
update_stat()
/mob/living/silicon/SetWeakened(amount, updating = 1, ignore_canweaken = 0)
if(status_flags & CANWEAKEN || ignore_canweaken)
weakened = max(amount,0)
if(updating)
update_stat()
. = ..()
if(. && updating)
update_stat()
/mob/living/silicon/AdjustWeakened(amount, updating = 1, ignore_canweaken = 0)
. = ..()
if(. && updating)
update_stat()
/////////////////////////////////// EAR DAMAGE ////////////////////////////////////
@@ -393,7 +393,7 @@
var/obj/item/weapon/weldingtool/WT = I
if(WT.remove_fuel(0, user))
build_step--
overlays -= "hs_hole"
cut_overlay("hs_hole")
user << "<span class='notice'>You weld the hole in [src] shut!</span>"
else if(isprox(I) && (build_step == 1))
@@ -442,13 +442,13 @@
qdel(src)
else if(build_step == 2)
overlays -= "hs_eye"
cut_overlay("hs_eye")
new /obj/item/device/assembly/prox_sensor(get_turf(src))
user << "<span class='notice'>You detach the proximity sensor from [src].</span>"
build_step--
else if(build_step == 3)
overlays -= "hs_arm"
cut_overlay("hs_arm")
new /obj/item/bodypart/l_arm/robot(get_turf(src))
user << "<span class='notice'>You remove the robot arm from [src].</span>"
build_step--
@@ -82,7 +82,7 @@
/mob/living/simple_animal/hostile/construct/narsie_act()
return
/mob/living/simple_animal/hostile/construct/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0)
/mob/living/simple_animal/hostile/construct/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
return 0
@@ -268,5 +268,5 @@
// Why would bees pay attention to drones?
return 1
/mob/living/simple_animal/drone/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0)
/mob/living/simple_animal/drone/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
return 0 //So they don't die trying to fix wiring
@@ -21,6 +21,11 @@
var/area/A = get_area(src)
if(A)
notify_ghosts("A drone shell has been created in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE)
poi_list |= src
/obj/item/drone_shell/Destroy()
poi_list -= src
. = ..()
/obj/item/drone_shell/attack_ghost(mob/user)
if(jobban_isbanned(user,"drone"))
@@ -105,7 +105,7 @@
density = TRUE
speed = 1
ventcrawler = VENTCRAWLER_NONE
faction = list("ratvar")
faction = list("neutral", "ratvar")
speak_emote = list("clanks", "clinks", "clunks", "clangs")
verb_ask = "requests"
verb_exclaim = "proclaims"
@@ -145,7 +145,7 @@
/mob/living/simple_animal/drone/cogscarab/binarycheck()
return FALSE
/mob/living/simple_animal/drone/cogscarab/alert_drones(msg, dead_can_hear = 0)
/mob/living/simple_animal/drone/cogscarab/alert_drones(msg, dead_can_hear = FALSE)
if(msg == DRONE_NET_CONNECT)
msg = "<span class='brass'><i>Hierophant Network:</i> [name] activated.</span>"
else if(msg == DRONE_NET_DISCONNECT)
@@ -182,3 +182,12 @@
/mob/living/simple_animal/drone/cogscarab/ratvar_act()
fully_heal(TRUE)
/obj/item/drone_shell/dusty
name = "derelict drone shell"
desc = "A long-forgotten drone shell. It seems kind of... Space Russian."
drone_type = /mob/living/simple_animal/drone/derelict
/mob/living/simple_animal/drone/derelict
name = "derelict drone"
default_hatmask = /obj/item/clothing/head/ushanka
@@ -17,13 +17,12 @@
//Base proc for anything to call
/proc/_alert_drones(msg, dead_can_hear = 0, list/factions)
/proc/_alert_drones(msg, dead_can_hear = 0, mob/living/faction_checked_mob, exact_faction_match)
for(var/W in mob_list)
var/mob/living/simple_animal/drone/M = W
if(istype(M) && M.stat != DEAD)
if(factions && factions.len)
var/list/friendly = factions&M.faction
if(friendly.len)
if(faction_checked_mob)
if(M.faction_check_mob(faction_checked_mob, exact_faction_match))
M << msg
else
M << msg
@@ -33,15 +32,12 @@
//Wrapper for drones to handle factions
/mob/living/simple_animal/drone/proc/alert_drones(msg, dead_can_hear = 0)
_alert_drones(msg, dead_can_hear, faction)
/mob/living/simple_animal/drone/proc/alert_drones(msg, dead_can_hear = FALSE)
_alert_drones(msg, dead_can_hear, src, TRUE)
/mob/living/simple_animal/drone/proc/drone_chat(msg)
var/rendered = "<i>Drone Chat: \
<span class='name'>[name]</span>: \
<span class='message'>[say_quote(msg, get_spans())]</span></i>"
alert_drones(rendered, 1)
alert_drones("<i>Drone Chat: <span class='name'>[name]</span> <span class='message'>[say_quote(msg, get_spans())]</span></i>", TRUE)
/mob/living/simple_animal/drone/binarycheck()
return TRUE
@@ -7,14 +7,15 @@
/mob/living/simple_animal/drone/proc/apply_overlay(cache_index)
var/image/I = drone_overlays[cache_index]
var/I = drone_overlays[cache_index]
if(I)
add_overlay(I)
/mob/living/simple_animal/drone/proc/remove_overlay(cache_index)
if(drone_overlays[cache_index])
overlays -= drone_overlays[cache_index]
var/I = drone_overlays[cache_index]
if(I)
cut_overlay(I)
drone_overlays[cache_index] = null
@@ -261,13 +261,14 @@ var/global/list/parasites = list() //all currently existing/living guardians
I.plane = ABOVE_HUD_PLANE
/mob/living/simple_animal/hostile/guardian/proc/apply_overlay(cache_index)
var/image/I = guardian_overlays[cache_index]
var/I = guardian_overlays[cache_index]
if(I)
add_overlay(I)
/mob/living/simple_animal/hostile/guardian/proc/remove_overlay(cache_index)
if(guardian_overlays[cache_index])
overlays -= guardian_overlays[cache_index]
var/I = guardian_overlays[cache_index]
if(I)
cut_overlay(I)
guardian_overlays[cache_index] = null
/mob/living/simple_animal/hostile/guardian/update_inv_hands()
@@ -108,7 +108,7 @@
var/list/Mobs = hearers(vision_range, targets_from) - src //Remove self, so we don't suicide
. += Mobs
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha))
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha, /obj/structure/destructible/clockwork/ocular_warden))
for(var/HM in typecache_filter_list(range(vision_range, targets_from), hostile_machines))
if(can_see(targets_from, HM, vision_range))
@@ -172,7 +172,7 @@
if(search_objects < 2)
if(isliving(the_target))
var/mob/living/L = the_target
var/faction_check = faction_check(L)
var/faction_check = faction_check_mob(L)
if(robust_searching)
if(L.stat > stat_attack || L.stat != stat_attack && stat_exclusive == 1)
return 0
@@ -203,6 +203,12 @@
return 0
return 1
if(istype(the_target, /obj/structure/destructible/clockwork/ocular_warden))
var/obj/structure/destructible/clockwork/ocular_warden/OW = the_target
if(OW.target != src)
return FALSE
return TRUE
if(isobj(the_target))
if(attack_all_objects || is_type_in_typecache(the_target, wanted_objects))
@@ -306,11 +312,7 @@
do_alert_animation(src)
playsound(loc, 'sound/machines/chime.ogg', 50, 1, -1)
for(var/mob/living/simple_animal/hostile/M in oview(distance, targets_from))
var/list/L = M.faction&faction
var/success = L.len
if(exact_faction_match)
success = (L.len == faction.len) //since the above op is &, an exact match would be of the same length
if(success)
if(faction_check_mob(M, TRUE))
if(M.AIStatus == AI_OFF)
return
else
@@ -322,22 +324,15 @@
for(var/mob/living/L in T)
if(L == src || L == A)
continue
if(faction_check(L) && !attack_same)
if(faction_check_mob(L) && !attack_same)
return
visible_message("<span class='danger'><b>[src]</b> [ranged_message] at [A]!</span>")
if(rapid)
spawn(1)
Shoot(A)
spawn(4)
Shoot(A)
spawn(6)
Shoot(A)
/* var/datum/callback/cb = CALLBACK(A, .proc/Shoot)
var/datum/callback/cb = CALLBACK(src, .proc/Shoot, A)
addtimer(cb, 1)
addtimer(cb, 4)
addtimer(cb, 6)*/
addtimer(cb, 6)
else
Shoot(A)
ranged_cooldown = world.time + ranged_cooldown_time
@@ -46,7 +46,7 @@ Difficulty: Hard
del_on_death = 1
loot = list(/obj/structure/closet/crate/necropolis/bubblegum)
blood_volume = BLOOD_VOLUME_MAXIMUM //BLEED FOR ME
var/charging = 0
var/charging = FALSE
medal_type = MEDAL_PREFIX
score_type = BUBBLEGUM_SCORE
deathmessage = "sinks into a pool of blood, fleeing the battle. You've won, for now... "
@@ -116,10 +116,9 @@ Difficulty: Hard
internal = new/obj/item/device/gps/internal/bubblegum(src)
/mob/living/simple_animal/hostile/megafauna/bubblegum/grant_achievement(medaltype,scoretype)
..()
SSshuttle.shuttle_purchase_requirements_met |= "bubblegum"
. = ..()
if(.)
SSshuttle.shuttle_purchase_requirements_met |= "bubblegum"
/mob/living/simple_animal/hostile/megafauna/bubblegum/do_attack_animation(atom/A, visual_effect_icon)
if(!charging)
@@ -152,7 +151,7 @@ Difficulty: Hard
if(!T || T == loc)
return
new /obj/effect/overlay/temp/dragon_swoop(T)
charging = 1
charging = TRUE
DestroySurroundings()
walk(src, 0)
setDir(get_dir(src, T))
@@ -161,12 +160,13 @@ Difficulty: Hard
sleep(3)
throw_at(T, get_dist(src, T), 1, src, 0, callback = CALLBACK(src, .charge_end, bonus_charges))
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/charge_end(bonus_charges)
charging = 0
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/charge_end(bonus_charges, list/effects_to_destroy)
charging = FALSE
try_bloodattack()
if(target)
if(bonus_charges)
charge(bonus_charges--)
bonus_charges--
charge(bonus_charges)
else
Goto(target, move_to_delay, minimum_distance)
@@ -192,7 +192,7 @@ Difficulty: Hard
var/throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(L, src)))
L.throw_at(throwtarget, 3)
charging = 0
charging = FALSE
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/get_mobs_on_blood()
@@ -200,7 +200,7 @@ Difficulty: Hard
. = list()
for(var/mob/living/L in targets)
var/list/bloodpool = get_pools(get_turf(L), 0)
if(bloodpool.len && (!faction_check(L) || L.stat == DEAD))
if(bloodpool.len && (!faction_check_mob(L) || L.stat == DEAD))
. += L
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/try_bloodattack()
@@ -250,7 +250,7 @@ Difficulty: Hard
new /obj/effect/overlay/temp/bubblegum_hands/leftsmack(T)
sleep(2.5)
for(var/mob/living/L in T)
if(!faction_check(L))
if(!faction_check_mob(L))
L << "<span class='userdanger'>[src] rends you!</span>"
playsound(T, attack_sound, 100, 1, -1)
var/limb_to_hit = L.get_bodypart(pick("head", "chest", "r_arm", "l_arm", "r_leg", "l_leg"))
@@ -266,7 +266,7 @@ Difficulty: Hard
new /obj/effect/overlay/temp/bubblegum_hands/leftthumb(T)
sleep(6)
for(var/mob/living/L in T)
if(!faction_check(L))
if(!faction_check_mob(L))
L << "<span class='userdanger'>[src] drags you through the blood!</span>"
playsound(T, 'sound/magic/enter_blood.ogg', 100, 1, -1)
var/turf/targetturf = get_step(src, dir)
@@ -588,7 +588,7 @@ Difficulty: Hard
/obj/effect/overlay/temp/hierophant/blast/proc/do_damage(turf/T)
for(var/mob/living/L in T.contents - hit_things) //find and damage mobs...
hit_things += L
if((friendly_fire_check && caster && caster.faction_check(L)) || L.stat == DEAD)
if((friendly_fire_check && caster && caster.faction_check_mob(L)) || L.stat == DEAD)
continue
if(L.client)
flash_color(L.client, "#660099", 1)
@@ -603,7 +603,7 @@ Difficulty: Hard
for(var/obj/mecha/M in T.contents - hit_things) //and mechs.
hit_things += M
if(M.occupant)
if(friendly_fire_check && caster && caster.faction_check(M.occupant))
if(friendly_fire_check && caster && caster.faction_check_mob(M.occupant))
continue
M.occupant << "<span class='userdanger'>Your [M.name] is struck by a [name]!</span>"
playsound(M,'sound/weapons/sear.ogg', 50, 1, -4)
@@ -115,12 +115,11 @@
/mob/living/simple_animal/hostile/megafauna/proc/grant_achievement(medaltype,scoretype)
if(medal_type == "Boss") //Don't award medals if the medal type isn't set
return
return FALSE
if(admin_spawned)
return
return FALSE
if(global.medal_hub && global.medal_pass && global.medals_enabled)
for(var/mob/living/L in view(7,src))
@@ -133,6 +132,7 @@
UnlockMedal("[medaltype] [suffixm]",C)
SetScore(BOSS_SCORE,C,1)
SetScore(score_type,C,1)
return TRUE
/proc/UnlockMedal(medal,client/player)
@@ -149,7 +149,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
icon = O.icon
icon_state = O.icon_state
icon_living = icon_state
overlays = O.overlays
copy_overlays(O)
googly_eyes = image('icons/mob/mob.dmi',"googly_eyes")
add_overlay(googly_eyes)
if(istype(O, /obj/structure) || istype(O, /obj/machinery))
@@ -28,7 +28,7 @@
continue
if(isliving(A))
var/mob/living/M = A
if(faction_check(M) && attack_same || !faction_check(M))
if(faction_check_mob(M) && attack_same || !faction_check_mob(M))
enemies |= M
else if(istype(A, /obj/mecha))
var/obj/mecha/M = A
@@ -37,7 +37,7 @@
enemies |= M.occupant
for(var/mob/living/simple_animal/hostile/retaliate/H in around)
if(faction_check(H) && !attack_same && !H.attack_same)
if(faction_check_mob(H) && !attack_same && !H.attack_same)
H.enemies |= enemies
return 0
@@ -69,7 +69,7 @@
var/grasp_pull_chance = 85
var/grasp_range = 4
del_on_death = 1
/mob/living/simple_animal/hostile/venus_human_trap/Destroy()
for(var/L in grasping)
var/datum/beam/B = grasping[L]
@@ -99,7 +99,7 @@
if(grasping.len < max_grasps)
grasping:
for(var/mob/living/L in view(grasp_range, src))
if(L == src || faction_check(L) || (L in grasping) || L == target)
if(L == src || faction_check_mob(L) || (L in grasping) || L == target)
continue
for(var/t in getline(src,L))
for(var/a in t)
@@ -869,7 +869,7 @@
/mob/living/simple_animal/parrot/Poly
name = "Poly"
desc = "Poly the Parrot. An expert on quantum cracker theory."
speak = list("Poly wanna cracker!", ":e Check the singulo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN HARDSUITS?",":e OH GOD ITS FREE CALL THE SHUTTLE")
speak = list("Poly wanna cracker!", ":e Check the crystal, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN HARDSUITS?",":e OH GOD ITS ABOUT TO DELAMINATE CALL THE SHUTTLE", ":e QUIT SUCKING EACH OTHER'S DICKS AND GET THE POWER ONLINE.", ":e STOP FUCKING EATING EACH OTHER, THE STATION IS GOING DARK!")
gold_core_spawnable = 0
speak_chance = 3
var/memory_saved = 0
@@ -84,7 +84,6 @@
//domestication
var/tame = 0
var/datum/riding/riding_datum = null
/mob/living/simple_animal/New()
..()
@@ -362,7 +361,7 @@
else if(!istype(M, childtype) && M.gender == MALE) //Better safe than sorry ;_;
partner = M
else if(isliving(M) && !faction_check(M)) //shyness check. we're not shy in front of things that share a faction with us.
else if(isliving(M) && !faction_check_mob(M)) //shyness check. we're not shy in front of things that share a faction with us.
return //we never mate when not alone, so just abort early
if(alone && partner && children < 3)
@@ -541,11 +540,10 @@
if(tame && riding_datum)
riding_datum.handle_ride(user, direction)
/mob/living/simple_animal/Move(NewLoc,Dir=0,step_x=0,step_y=0)
/mob/living/simple_animal/Moved()
. = ..()
if(riding_datum)
riding_datum.handle_vehicle_layer()
riding_datum.handle_vehicle_offsets()
riding_datum.on_vehicle_move()
/mob/living/simple_animal/buckle_mob(mob/living/buckled_mob, force = 0, check_loc = 1)
@@ -22,7 +22,7 @@
Feedstop(silent = 1) //releases ourselves from the mob we fed on.
stat = DEAD
overlays.len = 0
cut_overlays()
update_canmove()
+4 -4
View File
@@ -32,7 +32,7 @@
"visible_message" = message, "self_message" = self_message, "examine_message" = examine_message)
/mob/living/Stun(amount, updating = 1, ignore_canstun = 0)
if(!stat && islist(stun_absorption))
if(!stat && islist(stun_absorption) && (status_flags & CANSTUN || ignore_canstun))
var/priority_absorb_key
var/highest_priority
for(var/i in stun_absorption)
@@ -49,12 +49,12 @@
src << "<span class='boldwarning'>[priority_absorb_key["self_message"]]</span>"
priority_absorb_key["stuns_absorbed"] += amount
return 0
..()
return ..()
///////////////////////////////// WEAKEN /////////////////////////////////////
/mob/living/Weaken(amount, updating = 1, ignore_canweaken = 0)
if(!stat && islist(stun_absorption))
if(!stat && islist(stun_absorption) && (status_flags & CANWEAKEN || ignore_canweaken))
var/priority_absorb_key
var/highest_priority
for(var/i in stun_absorption)
@@ -71,4 +71,4 @@
src << "<span class='boldwarning'>[priority_absorb_key["self_message"]]</span>"
priority_absorb_key["stuns_absorbed"] += amount
return 0
..()
return ..()
+31
View File
@@ -0,0 +1,31 @@
#define DEFAULT_TASTE_SENSITIVITY 15
/mob/living
var/last_taste_time
var/last_taste_text
/mob/living/proc/get_taste_sensitivity()
return DEFAULT_TASTE_SENSITIVITY
/mob/living/carbon/get_taste_sensitivity()
var/obj/item/organ/tongue/tongue = getorganslot("tongue")
if(istype(tongue))
. = tongue.taste_sensitivity
else
. = 101 // can't taste anything without a tongue
// non destructively tastes a reagent container
/mob/living/proc/taste(datum/reagents/from)
if(last_taste_time + 50 < world.time)
var/taste_sensitivity = get_taste_sensitivity()
var/text_output = from.generate_taste_message(taste_sensitivity)
// We dont want to spam the same message over and over again at the
// person. Give it a bit of a buffer.
if(text_output != last_taste_text || last_taste_time + 100 < world.time)
src << "<span class='notice'>You can taste [text_output].</span>"
// "somthing indescribable" -> too many tastes, not enough flavor.
last_taste_time = world.time
last_taste_text = text_output
#undef DEFAULT_TASTE_SENSITIVITY
+31 -7
View File
@@ -27,8 +27,9 @@ var/next_mob_id = 0
dead_mob_list += src
else
living_mob_list += src
hook_vr("mob_new",list(src))
prepare_huds()
can_ride_typecache = typecacheof(can_ride_typecache)
hook_vr("mob_new",list(src))
..()
/atom/proc/prepare_huds()
@@ -464,6 +465,12 @@ var/next_mob_id = 0
reset_perspective(null)
unset_machine()
//suppress the .click macro so people can't use it to identify the location of items or aimbot
/mob/verb/ClickSubstitute()
set hidden = 1
set name = ".click"
return
/mob/Topic(href, href_list)
if(href_list["mach_close"])
var/t1 = text("window=[href_list["mach_close"]]")
@@ -823,11 +830,28 @@ var/next_mob_id = 0
/mob/proc/canUseTopic()
return
/mob/proc/faction_check(mob/target)
for(var/F in faction)
if(F in target.faction)
return 1
return 0
/mob/proc/faction_check_mob(mob/target, exact_match)
if(exact_match) //if we need an exact match, we need to do some bullfuckery.
var/list/faction_src = faction.Copy()
var/list/faction_target = target.faction.Copy()
if(!("\ref[src]" in faction_target)) //if they don't have our ref faction, remove it from our factions list.
faction_src -= "\ref[src]" //if we don't do this, we'll never have an exact match.
if(!("\ref[target]" in faction_src))
faction_target -= "\ref[target]" //same thing here.
return faction_check(faction_src, faction_target, TRUE)
return faction_check(faction, target.faction, FALSE)
/proc/faction_check(list/faction_A, list/faction_B, exact_match)
var/list/match_list
if(exact_match)
match_list = faction_A&faction_B //only items in both lists
var/length = LAZYLEN(match_list)
if(length)
return (length == LAZYLEN(faction_A)) //if they're not the same len(gth) or we don't have a len, then this isn't an exact match.
else
match_list = faction_A&faction_B
return LAZYLEN(match_list)
return FALSE
//This will update a mob's name, real_name, mind.name, data_core records, pda, id and traitor text
@@ -952,4 +976,4 @@ var/next_mob_id = 0
switch(var_name)
if ("attack_log")
return debug_variable(var_name, attack_log, 0, src, FALSE)
. = ..()
. = ..()
+2 -3
View File
@@ -10,8 +10,6 @@
var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
var/flavor_text = "" //tired of fucking double checking this
/*A bunch of this stuff really needs to go under their own defines instead of being globally attached to mob.
A variable should only be globally attached to turfs/objects/whatever, when it is in fact needed as such.
@@ -147,4 +145,5 @@
var/list/observers = null //The list of people observing this mob.
var/list/progressbars = null //for stacking do_after bars
var/list/progressbars = null //for stacking do_after bars
var/list/can_ride_typecache = list()
+1 -1
View File
@@ -421,7 +421,7 @@ var/static/regex/firstname = new("^\[^\\s-\]+") //First word before whitespace o
user.visible_message("[user] has fixed some of the [dam ? "dents on" : "burnt wires in"] [H]'s [affecting].", "<span class='notice'>You fix some of the [dam ? "dents on" : "burnt wires in"] [H]'s [affecting].</span>")
return 1 //successful heal
else
user << "<span class='warning'>[H]'s [affecting] is already in good condition!</span>"
user << "<span class='warning'>[affecting] is already in good condition!</span>"
/proc/IsAdminGhost(var/mob/user)
+2
View File
@@ -28,3 +28,5 @@
*/
new_player_panel()
client.playtitlemusic()
if(ticker.current_state < GAME_STATE_SETTING_UP)
src << "Please set up your character and select \"Ready\". The game will start in about [round(ticker.GetTimeLeft()/10)] seconds."
+5 -4
View File
@@ -40,9 +40,7 @@
output += "<p><a href='byond://?src=\ref[src];observe=1'>Observe</A></p>"
if(!IsGuestKey(src.key))
establish_db_connection()
if(dbcon.IsConnected())
if (dbcon.Connect())
var/isadmin = 0
if(src.client && src.client.holder)
isadmin = 1
@@ -75,7 +73,10 @@
stat("Map:", MAP_NAME)
if(ticker.current_state == GAME_STATE_PREGAME)
stat("Time To Start:", (ticker.timeLeft >= 0) ? "[round(ticker.timeLeft / 10)]s" : "DELAYED")
var/time_remaining = ticker.GetTimeLeft()
if(time_remaining >= 0)
time_remaining /= 10
stat("Time To Start:", (time_remaining >= 0) ? "[round(time_remaining)]s" : "DELAYED")
stat("Players:", "[ticker.totalPlayers]")
if(client.holder)
+24 -32
View File
@@ -6,7 +6,7 @@
if(!dbcon.IsConnected())
usr << "<span class='danger'>Failed to establish database connection.</span>"
return
var/DBQuery/query_get_poll = dbcon.NewQuery("SELECT id, question FROM [format_table_name("poll_question")] WHERE [(client.holder ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime")
var/DBQuery/query_get_poll = dbcon.NewQuery("SELECT id, question FROM [format_table_name("poll_question")] WHERE Now() BETWEEN starttime AND endtime [(client.holder ? "" : "AND adminonly = false")]")
if(!query_get_poll.Execute())
var/err = query_get_poll.ErrorMsg()
log_game("SQL ERROR obtaining id, question from poll_question table. Error : \[[err]\]\n")
@@ -24,7 +24,7 @@
/mob/new_player/proc/poll_player(pollid)
if(!pollid)
return
if(!establish_db_connection())
if (!dbcon.Connect())
usr << "<span class='danger'>Failed to establish database connection.</span>"
return
var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM [format_table_name("poll_question")] WHERE id = [pollid]")
@@ -349,7 +349,7 @@
var/table = "poll_vote"
if (text)
table = "poll_textreply"
if (!establish_db_connection())
if (!dbcon.Connect())
usr << "<span class='danger'>Failed to establish database connection.</span>"
return
var/DBQuery/query_hasvoted = dbcon.NewQuery("SELECT id FROM `[format_table_name(table)]` WHERE pollid = [pollid] AND ckey = '[ckey]'")
@@ -362,7 +362,7 @@
return
. = "Player"
if(client.holder)
. = client.holder.rank
. = client.holder.rank.name
return .
@@ -379,24 +379,14 @@
return 1
/mob/new_player/proc/vote_valid_check(pollid, holder, type)
if (!establish_db_connection())
if (!dbcon.Connect())
src << "<span class='danger'>Failed to establish database connection.</span>"
return 0
pollid = text2num(pollid)
if (!pollid || pollid < 0)
return 0
//validate the poll is actually the right type of poll and its still active
var/DBQuery/select_query = dbcon.NewQuery({"
SELECT id
FROM [format_table_name("poll_question")]
WHERE
[(holder ? "" : "adminonly = false AND")]
id = [pollid]
AND
Now() BETWEEN starttime AND endtime
AND
polltype = '[type]'
"})
var/DBQuery/select_query = dbcon.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime AND polltype = '[type]' [(holder ? "" : "AND adminonly = false")]")
if (!select_query.Execute())
var/err = select_query.ErrorMsg()
log_game("SQL ERROR validating poll via poll_question table. Error : \[[err]\]\n")
@@ -406,7 +396,7 @@
return 1
/mob/new_player/proc/vote_on_irv_poll(pollid, list/votelist)
if (!establish_db_connection())
if (!dbcon.Connect())
src << "<span class='danger'>Failed to establish database connection.</span>"
return 0
if (!vote_rig_check())
@@ -422,7 +412,7 @@
var/datum/admins/holder = client.holder
var/rank = "Player"
if (holder)
rank = holder.rank
rank = holder.rank.name
var/ckey = client.ckey
var/address = client.address
@@ -461,7 +451,7 @@
for (var/vote in numberedvotelist)
if (sqlrowlist != "")
sqlrowlist += ", " //a comma (,) at the start of the first row to insert will trigger a SQL error
sqlrowlist += "(Now(), [pollid], [vote], '[sanitizeSQL(ckey)]', '[sanitizeSQL(address)]', '[sanitizeSQL(rank)]')"
sqlrowlist += "(Now(), [pollid], [vote], '[sanitizeSQL(ckey)]', INET_ATON('[sanitizeSQL(address)]'), '[sanitizeSQL(rank)]')"
//now lets delete their old votes (if any)
var/DBQuery/voted_query = dbcon.NewQuery("DELETE FROM [format_table_name("poll_vote")] WHERE pollid = [pollid] AND ckey = '[ckey]'")
@@ -482,7 +472,7 @@
/mob/new_player/proc/vote_on_poll(pollid, optionid)
if(!establish_db_connection())
if (!dbcon.Connect())
src << "<span class='danger'>Failed to establish database connection.</span>"
return 0
if (!vote_rig_check())
@@ -492,10 +482,10 @@
//validate the poll
if (!vote_valid_check(pollid, client.holder, POLLTYPE_OPTION))
return 0
var/adminrank = poll_check_voted(pollid)
var/adminrank = sanitizeSQL(poll_check_voted(pollid))
if(!adminrank)
return
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime, pollid, optionid, ckey, ip, adminrank) VALUES (Now(), [pollid], [optionid], '[ckey]', '[client.address]', '[adminrank]')")
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime, pollid, optionid, ckey, ip, adminrank) VALUES (Now(), [pollid], [optionid], '[ckey]', INET_ATON('[client.address]'), '[adminrank]')")
if(!query_insert.Execute())
var/err = query_insert.ErrorMsg()
log_game("SQL ERROR adding vote to table. Error : \[[err]\]\n")
@@ -504,7 +494,7 @@
return 1
/mob/new_player/proc/log_text_poll_reply(pollid, replytext)
if(!establish_db_connection())
if (!dbcon.Connect())
src << "<span class='danger'>Failed to establish database connection.</span>"
return 0
if (!vote_rig_check())
@@ -517,14 +507,14 @@
if(!replytext)
usr << "The text you entered was blank. Please correct the text and submit again."
return
var/adminrank = poll_check_voted(pollid, TRUE)
var/adminrank = sanitizeSQL(poll_check_voted(pollid, TRUE))
if(!adminrank)
return
replytext = sanitizeSQL(replytext)
if(!(length(replytext) > 0) || !(length(replytext) <= 8000))
usr << "The text you entered was invalid or too long. Please correct the text and submit again."
return
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("poll_textreply")] (datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (Now(), [pollid], '[ckey]', '[client.address]', '[replytext]', '[adminrank]')")
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("poll_textreply")] (datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (Now(), [pollid], '[ckey]', INET_ATON('[client.address]'), '[replytext]', '[adminrank]')")
if(!query_insert.Execute())
var/err = query_insert.ErrorMsg()
log_game("SQL ERROR adding text reply to table. Error : \[[err]\]\n")
@@ -533,7 +523,7 @@
return 1
/mob/new_player/proc/vote_on_numval_poll(pollid, optionid, rating)
if(!establish_db_connection())
if (!dbcon.Connect())
src << "<span class='danger'>Failed to establish database connection.</span>"
return 0
if (!vote_rig_check())
@@ -553,8 +543,9 @@
return
var/adminrank = "Player"
if(client.holder)
adminrank = client.holder.rank
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (Now(), [pollid], [optionid], '[ckey]', '[client.address]', '[adminrank]', [(isnull(rating)) ? "null" : rating])")
adminrank = client.holder.rank.name
adminrank = sanitizeSQL(adminrank)
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (Now(), [pollid], [optionid], '[ckey]', INET_ATON('[client.address]'), '[adminrank]', [(isnull(rating)) ? "null" : rating])")
if(!query_insert.Execute())
var/err = query_insert.ErrorMsg()
log_game("SQL ERROR adding vote to table. Error : \[[err]\]\n")
@@ -563,7 +554,7 @@
return 1
/mob/new_player/proc/vote_on_multi_poll(pollid, optionid)
if(!establish_db_connection())
if (!dbcon.Connect())
src << "<span class='danger'>Failed to establish database connection.</span>"
return 0
if (!vote_rig_check())
@@ -595,11 +586,12 @@
return 2
var/adminrank = "Player"
if(client.holder)
adminrank = client.holder.rank
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime, pollid, optionid, ckey, ip, adminrank) VALUES (Now(), [pollid], [optionid], '[ckey]', '[client.address]', '[adminrank]')")
adminrank = client.holder.rank.name
adminrank = sanitizeSQL(adminrank)
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("poll_vote")] (datetime, pollid, optionid, ckey, ip, adminrank) VALUES (Now(), [pollid], [optionid], '[ckey]', INET_ATON('[client.address]'), '[adminrank]')")
if(!query_insert.Execute())
var/err = query_insert.ErrorMsg()
log_game("SQL ERROR adding vote to table. Error : \[[err]\]\n")
return 1
usr << browse(null,"window=playerpoll")
return 0
return 0
@@ -5,6 +5,7 @@
var/extra2 = 0
var/extra2_icon = 'icons/mob/mam_bodyparts.dmi'
var/extra2_color_src = MUTCOLORS3
// var/list/ckeys_allowed = null
/* tbi eventually idk
/datum/sprite_accessory/legs/digitigrade_mam
@@ -316,6 +317,7 @@
icon_state = "datashark"
color_src = 0
icon = 'icons/mob/mam_bodyparts.dmi'
// ckeys_allowed = list("rubyflamewing")
//Squirrel
-4
View File
@@ -1,4 +0,0 @@
mob/verb/ClickSubstitute()
set hidden = 1
set name = ".click"
src << ".click has been disabled."
+1
View File
@@ -3,6 +3,7 @@
//////////////////////////////////////////////////////
/mob
var/use_me = 1
var/flavor_text = "" //tired of fucking double checking this
/mob/verb/me_verb_subtle(message as text) //This would normally go in say.dm
set name = "Subtle"
+9 -1
View File
@@ -3,7 +3,6 @@
//The effects include: stunned, weakened, paralysis, sleeping, resting, jitteriness, dizziness, ear damage,
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
/////////////////////////////////// STUNNED ////////////////////////////////////
/mob/proc/Stun(amount, updating = 1, ignore_canstun = 0)
@@ -11,18 +10,21 @@
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
if(updating)
update_canmove()
return TRUE
/mob/proc/SetStunned(amount, updating = 1, ignore_canstun = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
if(status_flags & CANSTUN || ignore_canstun)
stunned = max(amount,0)
if(updating)
update_canmove()
return TRUE
/mob/proc/AdjustStunned(amount, updating = 1, ignore_canstun = 0)
if(status_flags & CANSTUN || ignore_canstun)
stunned = max(stunned + amount,0)
if(updating)
update_canmove()
return TRUE
/////////////////////////////////// WEAKENED ////////////////////////////////////
@@ -31,18 +33,21 @@
weakened = max(max(weakened,amount),0)
if(updating)
update_canmove() //updates lying, canmove and icons
return TRUE
/mob/proc/SetWeakened(amount, updating = 1, ignore_canweaken = 0)
if(status_flags & CANWEAKEN)
weakened = max(amount,0)
if(updating)
update_canmove() //updates lying, canmove and icons
return TRUE
/mob/proc/AdjustWeakened(amount, updating = 1, ignore_canweaken = 0)
if((status_flags & CANWEAKEN) || ignore_canweaken)
weakened = max(weakened + amount,0)
if(updating)
update_canmove() //updates lying, canmove and icons
return TRUE
/////////////////////////////////// PARALYSIS ////////////////////////////////////
@@ -53,6 +58,7 @@
if((!old_paralysis && paralysis) || (old_paralysis && !paralysis))
if(updating)
update_stat()
return TRUE
/mob/proc/SetParalysis(amount, updating = 1, ignore_canparalyse = 0)
if(status_flags & CANPARALYSE || ignore_canparalyse)
@@ -61,6 +67,7 @@
if((!old_paralysis && paralysis) || (old_paralysis && !paralysis))
if(updating)
update_stat()
return TRUE
/mob/proc/AdjustParalysis(amount, updating = 1, ignore_canparalyse = 0)
if(status_flags & CANPARALYSE || ignore_canparalyse)
@@ -69,6 +76,7 @@
if((!old_paralysis && paralysis) || (old_paralysis && !paralysis))
if(updating)
update_stat()
return TRUE
/////////////////////////////////// SLEEPING ////////////////////////////////////