mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-27 18:12:00 +00:00
* Add the system for managed global variables * Travis ban old globals * So you CAN inline proccall, that's neat * Fix that * master.dm * Remove the hack procs * Move InitGlobals to the proper spot * configuration.dm * Fix the missing pre-slash * clockcult.dm * This is probably for the best * Doy * Fix shit * Rest of the DEFINES tree * Fix * Use global. for access * Update find_references_in_globals Always hated that proc Whoever made it must've bee a r e a l idiot... * __HELPERS tree * Move global initialization to master. Fix the declaration * database.dm * Dat newline * I said DECLARATIVE order! * Here's something you can chew on @Iamgoofball * game_modes.dm * Fix this * genetics.dm * flavor_misc.dm * More stuff * Do it mso's way. Keep the controllers as global * Make master actually see it * Fix * Finish _globalvars/lists * Finish the rest of the _globalvars tree * This is weird * Migrate the controllers * SLOTH -> GLOB * Lighting globals * round_start_time -> ticker * PAI card list -> pai SS * record_id_num -> static * Diseases list -> SSdisease * More disease globals to the SS * More disease stuff * Emote list * Better and better * Bluh * So much stuff * Ahh * Wires * dview * station_areas * Teleportlocs * blood_splatter_icons * Stuff and such * More stuff * RAD IO * More stuff and such * Blob shit * Changeling stuff * Add "Balance" to changelogs * Balance for changelog compiler + Auto Tagging * Update the PR template * hivemind_bank * Bip * sacrificed * Good shit * Better define * More cult shit * Devil shit * Gang shit * > borers Fix shit * Rename the define * Nuke * Objectives * Sandbox * Multiverse sword * Announce systems * Stuff and such * TC con * Airlock * doppllllerrrrrr * holopads * Shut up byond you inconsistent fuck * Sneaky fuck * Burp * Bip * Fixnshit * Port without regard * askdlfjs; * asdfjasoidojfi * Protected globals and more * SO MANY * ajsimkvahsaoisd * akfdsiaopwimfeoiwafaw * gsdfigjosidjfgiosdg * AHHHHHHHHHHHHHHHHHHHHHHH!!!!! * facerolll * ASDFASDFASDF * Removes the unused parts of dmm_suite * WIP * Fix quote * asdfjauwfnkjs * afwlunhskjfda * asfjlaiwuefhaf * SO CLOSE * wwwweeeeeewwwww * agdgmoewranwg * HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!? * Fix syntax errors * 100 errors * Another 100 * So many... * Ugh * More shit * kilme * Stuuuuuufffff * ajrgmrlshio;djfa;sdkl * jkbhkhjbmjvjmh * soi soi soi * butt * TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING * lllllllllllllllllllllllllllllllllllllllllll * afsdijfiawhnflnjhnwsdfs * yugykihlugk,kj * time to go * STUFFF!!! * AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!! * ngoaijdjlfkamsdlkf * Break time * aufjsdklfalsjfi * CONTROL KAY AND PRAY * IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * Goteem * Fix testing mode * This does not belong in this PR * Convert it to a controller * Eh, fuck this option * Revert controllerization Ill do it some other time * Fix * Working controllerization * FOR THE LOVE OF CHRIST PROTECT THE LOGS * Protect admins and deadmins * Use the inbuilt proc
114 lines
3.5 KiB
Plaintext
114 lines
3.5 KiB
Plaintext
/obj/structure
|
|
icon = 'icons/obj/structures.dmi'
|
|
pressure_resistance = 8
|
|
obj_integrity = 300
|
|
max_integrity = 300
|
|
var/climb_time = 20
|
|
var/climb_stun = 2
|
|
var/climbable = FALSE
|
|
var/mob/structureclimber
|
|
var/broken = 0 //similar to machinery's stat BROKEN
|
|
|
|
/obj/structure/Initialize()
|
|
if (!armor)
|
|
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
|
|
..()
|
|
if(smooth)
|
|
queue_smooth(src)
|
|
queue_smooth_neighbors(src)
|
|
icon_state = ""
|
|
if(SSticker)
|
|
GLOB.cameranet.updateVisibility(src)
|
|
|
|
/obj/structure/Destroy()
|
|
if(SSticker)
|
|
GLOB.cameranet.updateVisibility(src)
|
|
if(smooth)
|
|
queue_smooth_neighbors(src)
|
|
return ..()
|
|
|
|
/obj/structure/attack_hand(mob/user)
|
|
. = ..()
|
|
add_fingerprint(user)
|
|
if(structureclimber && structureclimber != user)
|
|
user.changeNext_move(CLICK_CD_MELEE)
|
|
user.do_attack_animation(src)
|
|
structureclimber.Weaken(2)
|
|
structureclimber.visible_message("<span class='warning'>[structureclimber.name] has been knocked off the [src]", "You're knocked off the [src]!", "You see [structureclimber.name] get knocked off the [src]</span>")
|
|
interact(user)
|
|
|
|
/obj/structure/interact(mob/user)
|
|
ui_interact(user)
|
|
|
|
/obj/structure/ui_act(action, params)
|
|
..()
|
|
add_fingerprint(usr)
|
|
|
|
/obj/structure/MouseDrop_T(atom/movable/O, mob/user)
|
|
. = ..()
|
|
if(!climbable)
|
|
return
|
|
if(ismob(O) && user == O && iscarbon(user))
|
|
if(user.canmove)
|
|
climb_structure(user)
|
|
return
|
|
if ((!( istype(O, /obj/item/weapon) ) || user.get_active_held_item() != O))
|
|
return
|
|
if(iscyborg(user))
|
|
return
|
|
if(!user.drop_item())
|
|
return
|
|
if (O.loc != src.loc)
|
|
step(O, get_dir(O, src))
|
|
return
|
|
|
|
/obj/structure/proc/do_climb(atom/movable/A)
|
|
if(climbable)
|
|
density = 0
|
|
. = step(A,get_dir(A,src.loc))
|
|
density = 1
|
|
|
|
/obj/structure/proc/climb_structure(mob/user)
|
|
src.add_fingerprint(user)
|
|
user.visible_message("<span class='warning'>[user] starts climbing onto [src].</span>", \
|
|
"<span class='notice'>You start climbing onto [src]...</span>")
|
|
var/adjusted_climb_time = climb_time
|
|
if(user.restrained()) //climbing takes twice as long when restrained.
|
|
adjusted_climb_time *= 2
|
|
if(isalien(user))
|
|
adjusted_climb_time *= 0.25 //aliens are terrifyingly fast
|
|
structureclimber = user
|
|
if(do_mob(user, user, adjusted_climb_time))
|
|
if(src.loc) //Checking if structure has been destroyed
|
|
if(do_climb(user))
|
|
user.visible_message("<span class='warning'>[user] climbs onto [src].</span>", \
|
|
"<span class='notice'>You climb onto [src].</span>")
|
|
add_logs(user, src, "climbed onto")
|
|
user.Stun(climb_stun)
|
|
. = 1
|
|
else
|
|
to_chat(user, "<span class='warning'>You fail to climb onto [src].</span>")
|
|
structureclimber = null
|
|
|
|
/obj/structure/examine(mob/user)
|
|
..()
|
|
if(!(resistance_flags & INDESTRUCTIBLE))
|
|
if(resistance_flags & ON_FIRE)
|
|
to_chat(user, "<span class='warning'>It's on fire!</span>")
|
|
if(broken)
|
|
to_chat(user, "<span class='notice'>It appears to be broken.</span>")
|
|
var/examine_status = examine_status(user)
|
|
if(examine_status)
|
|
to_chat(user, examine_status)
|
|
|
|
/obj/structure/proc/examine_status(mob/user) //An overridable proc, mostly for falsewalls.
|
|
var/healthpercent = (obj_integrity/max_integrity) * 100
|
|
switch(healthpercent)
|
|
if(50 to 99)
|
|
return "It looks slightly damaged."
|
|
if(25 to 50)
|
|
return "It appears heavily damaged."
|
|
if(0 to 25)
|
|
if(!broken)
|
|
return "<span class='warning'>It's falling apart!</span>"
|